protected class DirectedAcyclicGraph.TopoVertexMap extends Object implements DirectedAcyclicGraph.TopoOrderMap<V>
Constructor and Description |
---|
TopoVertexMap()
Constructor
|
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.
|
public void putVertex(Integer index, V vertex)
DirectedAcyclicGraph.TopoOrderMap
putVertex
in interface DirectedAcyclicGraph.TopoOrderMap<V>
index
- the topological indexvertex
- the vertexpublic V getVertex(Integer index)
DirectedAcyclicGraph.TopoOrderMap
getVertex
in interface DirectedAcyclicGraph.TopoOrderMap<V>
index
- the topological indexpublic Integer getTopologicalIndex(V vertex)
DirectedAcyclicGraph.TopoOrderMap
getTopologicalIndex
in interface DirectedAcyclicGraph.TopoOrderMap<V>
vertex
- the vertexpublic Integer removeVertex(V vertex)
DirectedAcyclicGraph.TopoOrderMap
removeVertex
in interface DirectedAcyclicGraph.TopoOrderMap<V>
vertex
- the vertexpublic void removeAllVertices()
DirectedAcyclicGraph.TopoOrderMap
removeAllVertices
in interface DirectedAcyclicGraph.TopoOrderMap<V>
Copyright © 2019. All rights reserved.