Class TrajectorySet

java.lang.Object
  |
  +--TrajectorySet

public class TrajectorySet
extends Object

This class represents a set of trajectories.


Constructor Summary
TrajectorySet()
          Constructs an empty TrajectorySet.
 
Method Summary
 void add(Trajectory trj)
          Adds a Trajectory to the TrajectorySet.
 Enumeration elements()
          Returns an Enumeration of the trajectories in the TrajectorySet.
 Trajectory get(int index)
          Retrieves a Trajectory from the TrajectorySet.
 int getSize()
          Returns the number of elements of the TrajectorySet.
 Vector getStatesAt(int timeStep)
          Returns the set of states at the given step of all the trajectories in this TrajectorySet.
 Vector toVector()
          Returns a Vector representing the whole TrajectorySet.
 Vector toVector(int fromStep)
          Returns a Vector representing the TrajectorySet, starting from the given step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrajectorySet

public TrajectorySet()
Constructs an empty TrajectorySet.
Method Detail

add

public void add(Trajectory trj)
Adds a Trajectory to the TrajectorySet.
Parameters:
trj - the Trajectory to be added

get

public Trajectory get(int index)
Retrieves a Trajectory from the TrajectorySet.
Parameters:
index - the index of the Trajectory to be retrieved
Returns:
the Trajectory at the specified index

getSize

public int getSize()
Returns the number of elements of the TrajectorySet.
Returns:
the size of the TrajectorySet

elements

public Enumeration elements()
Returns an Enumeration of the trajectories in the TrajectorySet.
Returns:
the Enumeration of the elements of the TrajectorySet

getStatesAt

public Vector getStatesAt(int timeStep)
Returns the set of states at the given step of all the trajectories in this TrajectorySet.
Parameters:
timeStep - the step whose states should be returned
Returns:
the set of states at the given step of all the trajectories in this TrajectorySet.

toVector

public Vector toVector(int fromStep)
Returns a Vector representing the TrajectorySet, starting from the given step. Each element of the Vector contains the string representation of a Trajectory, prefixed by the index of the Trajectory.
Parameters:
timeStep - the first step in the representation
Returns:
the Vector representing the TrajectorySet

toVector

public Vector toVector()
Returns a Vector representing the whole TrajectorySet. Each element of the Vector contains the string representation of a Trajectory, prefixed by the index of the Trajectory.
Returns:
the Vector representing the TrajectorySet