Package org.jgrapht.experimental.dag
Interface DirectedAcyclicGraph.Visited
-
- All Known Implementing Classes:
DirectedAcyclicGraph.VisitedArrayImpl
,DirectedAcyclicGraph.VisitedArrayListImpl
,DirectedAcyclicGraph.VisitedBitSetImpl
,DirectedAcyclicGraph.VisitedHashSetImpl
- Enclosing class:
- DirectedAcyclicGraph<V,E>
public static interface DirectedAcyclicGraph.Visited
This interface allows specification of a strategy for marking vertices as visited (based on their topological index, so the vertex type isn't part of the interface).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearVisited(int index)
Clear the visited state of the given topological indexboolean
getVisited(int index)
Has the given topological index been visited?void
setVisited(int index)
Mark the given topological index as visited
-
-
-
Method Detail
-
setVisited
void setVisited(int index)
Mark the given topological index as visited- Parameters:
index
- the topological index
-
getVisited
boolean getVisited(int index)
Has the given topological index been visited?- Parameters:
index
- the topological index- Returns:
- true if the given topological index been visited, false otherwise
-
clearVisited
void clearVisited(int index) throws java.lang.UnsupportedOperationException
Clear the visited state of the given topological index- Parameters:
index
- the index- Throws:
java.lang.UnsupportedOperationException
- if the implementation doesn't support (or doesn't need) clearance. For example, if the factory vends a new instance every time, it is a waste of cycles to clear the state after the search of the Affected Region is done, so an UnsupportedOperationException *should* be thrown.
-
-