Interface DirectedAcyclicGraph.TopoOrderMap<V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Integer getTopologicalIndex​(V vertex)
      Get the topological index of the given vertex.
      V getVertex​(java.lang.Integer index)
      Get the vertex at the given topological index.
      void putVertex​(java.lang.Integer index, V vertex)
      Add a vertex at the given topological index.
      void removeAllVertices()
      Remove all vertices from the topological ordering.
      java.lang.Integer removeVertex​(V vertex)
      Remove the given vertex from the topological ordering.
    • Method Detail

      • putVertex

        void putVertex​(java.lang.Integer index,
                       V vertex)
        Add a vertex at the given topological index.
        Parameters:
        index - the topological index
        vertex - the vertex
      • getVertex

        V getVertex​(java.lang.Integer index)
        Get the vertex at the given topological index.
        Parameters:
        index - the topological index
        Returns:
        vertex the vertex
      • getTopologicalIndex

        java.lang.Integer getTopologicalIndex​(V vertex)
        Get the topological index of the given vertex.
        Parameters:
        vertex - the vertex
        Returns:
        the index that the vertex is at, or null if the vertex isn't in the topological ordering
      • removeVertex

        java.lang.Integer removeVertex​(V vertex)
        Remove the given vertex from the topological ordering.
        Parameters:
        vertex - the vertex
        Returns:
        the index that the vertex was at, or null if the vertex wasn't in the topological ordering
      • removeAllVertices

        void removeAllVertices()
        Remove all vertices from the topological ordering.