public class DirectedAcyclicGraph.TopoVertexMap extends Object implements DirectedAcyclicGraph.TopoOrderMapping<V>, DirectedAcyclicGraph.TopoOrderMappingFactory<V>
Constructor and Description |
---|
TopoVertexMap() |
Modifier and Type | Method and Description |
---|---|
Integer |
getTopologicalIndex(V vertex)
Get the topological index of the given vertex.
|
DirectedAcyclicGraph.TopoOrderMapping<V> |
getTopoOrderMapping()
Create a new instance of a
DirectedAcyclicGraph.TopoOrderMapping . |
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.TopoOrderMapping
putVertex
in interface DirectedAcyclicGraph.TopoOrderMapping<V>
index
- the topological indexvertex
- the vertexpublic V getVertex(Integer index)
DirectedAcyclicGraph.TopoOrderMapping
getVertex
in interface DirectedAcyclicGraph.TopoOrderMapping<V>
index
- the topological indexpublic Integer getTopologicalIndex(V vertex)
DirectedAcyclicGraph.TopoOrderMapping
getTopologicalIndex
in interface DirectedAcyclicGraph.TopoOrderMapping<V>
vertex
- the vertexpublic Integer removeVertex(V vertex)
DirectedAcyclicGraph.TopoOrderMapping
removeVertex
in interface DirectedAcyclicGraph.TopoOrderMapping<V>
vertex
- the vertexpublic void removeAllVertices()
DirectedAcyclicGraph.TopoOrderMapping
removeAllVertices
in interface DirectedAcyclicGraph.TopoOrderMapping<V>
public DirectedAcyclicGraph.TopoOrderMapping<V> getTopoOrderMapping()
DirectedAcyclicGraph.TopoOrderMappingFactory
DirectedAcyclicGraph.TopoOrderMapping
.getTopoOrderMapping
in interface DirectedAcyclicGraph.TopoOrderMappingFactory<V>
DirectedAcyclicGraph.TopoOrderMapping
Copyright © 2016. All rights reserved.