org.jgrapht.experimental.dag

## Interface DirectedAcyclicGraph.TopoOrderMapping<V>

- All Superinterfaces:
    Serializable
  All Known Implementing Classes:
    DirectedAcyclicGraph.TopoVertexMap
  Enclosing class:
    DirectedAcyclicGraph<V,E>

      public static interface DirectedAcyclicGraph.TopoOrderMapping<V>
      extends Serializable

  For performance tuning, an interface for storing the topological ordering
  Author:
    gilesp

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Integer` | `getTopologicalIndex(V vertex)` get the topological index of the given vertex.
    `V` | `getVertex(Integer index)` get the vertex at the given topological index.
    `void` | `putVertex(Integer index, V vertex)` add a vertex at the given topological index.
    `void` | `removeAllVertices()` remove all vertices from the topological ordering
    `Integer` | `removeVertex(V vertex)` remove the given vertex from the topological ordering

- - ### Method Detail

    - #### putVertex

          void putVertex(Integer index,
                       V vertex)

      add a vertex at the given topological index.
      Parameters:
        `index` -
        `vertex` -

    - #### getVertex

          V getVertex(Integer index)

      get the vertex at the given topological index.
      Parameters:
        `index` -
      Returns:
        vertex

    - #### getTopologicalIndex

          Integer getTopologicalIndex(V vertex)

      get the topological index of the given vertex.
      Parameters:
        `vertex` -
      Returns:
        the index that the vertex is at, or null if the vertex isn't in the topological ordering

    - #### removeVertex

          Integer removeVertex(V vertex)

      remove the given vertex from the topological ordering
      Parameters:
        `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

Copyright © 2016. All rights reserved.