Class LockGraph

    • Field Summary

      • Fields inherited from interface org.jgrapht.WeightedGraph

        DEFAULT_EDGE_WEIGHT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addAssociationPossibility​(ISTTrackingTrajectory leftTrack, ISTTrackingTrajectory rightTrack)
      Adds an association edge between the two tracks.
      boolean addEdge​(String sourceVertex, String targetVertex, Edge edge)  
      void addTrackToGraph​(ISTTrackingTrajectory track)
      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 track)
      Returns whether this graph contains the vertices that represent the passed in track.
      void finalize()  
      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 track, 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.
      void setEdgeWeight​(Edge e, double weight)  
      • Methods inherited from class org.jgrapht.graph.AbstractBaseGraph

        addEdge, addVertex, clone, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, incomingEdgesOf, inDegreeOf, isAllowingLoops, isAllowingMultipleEdges, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeSetFactory, vertexSet
      • Methods inherited from class org.jgrapht.graph.AbstractGraph

        assertVertexExist, containsEdge, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets
      • Methods inherited from interface org.jgrapht.DirectedGraph

        incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf
      • Methods inherited from interface org.jgrapht.Graph

        addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
    • Method Detail

      • addEdge

        public boolean addEdge​(String sourceVertex,
                               String targetVertex,
                               Edge edge)
        Specified by:
        addEdge in interface org.jgrapht.Graph<String,​Edge>
        Overrides:
        addEdge in class org.jgrapht.graph.AbstractBaseGraph<String,​Edge>
      • setEdgeWeight

        public void setEdgeWeight​(Edge e,
                                  double weight)
        Specified by:
        setEdgeWeight in interface org.jgrapht.WeightedGraph<String,​Edge>
        Overrides:
        setEdgeWeight in class org.jgrapht.graph.AbstractBaseGraph<String,​Edge>
      • addTrackToGraph

        public void addTrackToGraph​(ISTTrackingTrajectory track)
        Description copied from interface: ITrackingGraph
        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.
        Specified by:
        addTrackToGraph in interface ITrackingGraph
        Parameters:
        track - The track to insert into the graph.
      • getSinkName

        public String getSinkName()
        Description copied from interface: ITrackingGraph
        Returns the name of the sink vertex for this graph.
        Specified by:
        getSinkName in interface ITrackingGraph
        Returns:
        The name of the sink vertex.
      • getSourceName

        public String getSourceName()
        Description copied from interface: ITrackingGraph
        Returns the name of the source vertex for this graph.
        Specified by:
        getSourceName in interface ITrackingGraph
        Returns:
        The name of the source vertex.
      • getTrackForVertex

        public ISTTrackingTrajectory getTrackForVertex​(String name)
        Description copied from interface: ITrackingGraph
        Given the vertex name, this method returns the track that the vertex represents.
        Specified by:
        getTrackForVertex in interface ITrackingGraph
        Parameters:
        name - The vertex to get the track for.
        Returns:
        The track that the vertex represents.
      • addAssociationPossibility

        public boolean addAssociationPossibility​(ISTTrackingTrajectory leftTrack,
                                                 ISTTrackingTrajectory rightTrack)
        Description copied from interface: ITrackingGraph
        Adds an association edge between the two tracks. This assumes that the tracks are already in the graph.
        Specified by:
        addAssociationPossibility in interface ITrackingGraph
        Parameters:
        leftTrack - The track at an earlier time step.
        rightTrack - The track at a later time step.
        Returns:
        True if successful, false otherwise.
      • containsTrack

        public boolean containsTrack​(ISTTrackingTrajectory track)
        Description copied from interface: ITrackingGraph
        Returns whether this graph contains the vertices that represent the passed in track.
        Specified by:
        containsTrack in interface ITrackingGraph
        Parameters:
        track - Track to test for graph containment
        Returns:
        True if the graph has the vertices that represent the passed in track. False otherwise.
      • moveTrackToGraph

        public boolean moveTrackToGraph​(ISTTrackingTrajectory track,
                                        ITrackingGraph graph)
        Description copied from interface: ITrackingGraph
        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.
        Specified by:
        moveTrackToGraph in interface ITrackingGraph
        Parameters:
        track - The track to move
        graph - The graph to move to
        Returns:
        True if successful, otherwise you will probably just lock up.