Interface ITrackingGraph
-
- All Known Implementing Classes:
LockGraph
public interface ITrackingGraph extends org.jgrapht.WeightedGraph<String,Edge>
This interface is for classes that are used to store the information that then gets used in the optimal multi-commodity flow problem that we use for track association.- Author:
- Dustin Kempton, Data Mining Lab, Georgia State University
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addAssociationPossibility(ISTTrackingTrajectory leftTrajectory, ISTTrackingTrajectory rightTrajectory)
Adds an association edge between the two tracks.void
addTrackToGraph(ISTTrackingTrajectory trajectory)
Adds the track to the graph by adding any vertices and edges from the source or to the sink that are used to represent the given track.boolean
containsTrack(ISTTrackingTrajectory trajectory)
Returns whether this graph contains the vertices that represent the passed in track.String
getSinkName()
Returns the name of the sink vertex for this graph.String
getSourceName()
Returns the name of the source vertex for this graph.ISTTrackingTrajectory
getTrackForVertex(String name)
Given the vertex name, this method returns the track that the vertex represents.boolean
moveTrackToGraph(ISTTrackingTrajectory trajectory, ITrackingGraph graph)
This method moves the track passed in, and all those that are reachable from the passed in track, to the passed in graph.-
Methods inherited from interface org.jgrapht.Graph
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
-
-
-
-
Method Detail
-
addTrackToGraph
void addTrackToGraph(ISTTrackingTrajectory trajectory)
Adds the track to the graph by adding any vertices and edges from the source or to the sink that are used to represent the given track.- Parameters:
trajectory
- The track to insert into the graph.
-
getTrackForVertex
ISTTrackingTrajectory getTrackForVertex(String name)
Given the vertex name, this method returns the track that the vertex represents.- Parameters:
name
- The vertex to get the track for.- Returns:
- The track that the vertex represents.
-
addAssociationPossibility
boolean addAssociationPossibility(ISTTrackingTrajectory leftTrajectory, ISTTrackingTrajectory rightTrajectory)
Adds an association edge between the two tracks. This assumes that the tracks are already in the graph.- Parameters:
leftTrajectory
- The track at an earlier time step.rightTrajectory
- The track at a later time step.- Returns:
- True if successful, false otherwise.
-
containsTrack
boolean containsTrack(ISTTrackingTrajectory trajectory)
Returns whether this graph contains the vertices that represent the passed in track.- Parameters:
trajectory
- Track to test for graph containment- Returns:
- True if the graph has the vertices that represent the passed in track. False otherwise.
-
moveTrackToGraph
boolean moveTrackToGraph(ISTTrackingTrajectory trajectory, ITrackingGraph graph)
This method moves the track passed in, and all those that are reachable from the passed in track, to the passed in graph. It is not safe to call this method by passing in a pointer to the same graph that you are calling this method on. Just don't do it.- Parameters:
trajectory
- The track to movegraph
- The graph to move to- Returns:
- True if successful, otherwise you will probably just lock up.
-
getSinkName
String getSinkName()
Returns the name of the sink vertex for this graph.- Returns:
- The name of the sink vertex.
-
getSourceName
String getSourceName()
Returns the name of the source vertex for this graph.- Returns:
- The name of the source vertex.
-
-