## Interface DirectedAcyclicGraph.VisitedStrategy

• All Known Implementing Classes:
DirectedAcyclicGraph.VisitedArrayImpl, DirectedAcyclicGraph.VisitedArrayListImpl, DirectedAcyclicGraph.VisitedBitSetImpl, DirectedAcyclicGraph.VisitedHashSetImpl
Enclosing class:
DirectedAcyclicGraph<V,​E>

protected static interface DirectedAcyclicGraph.VisitedStrategy
A strategy for marking vertices as visited.

Vertices are indexed by their topological index, to avoid using the vertex type in the interface.

Author:
Peter Giles
• ### Method Summary

All Methods
Modifier and Type Method Description
void clearVisited​(int index)
Clear the visited state of the given topological index.
boolean getVisited​(int index)
Get if the given topological index has 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)
Get if the given topological index has been visited.
Parameters:
index - the topological index
Returns:
true if the given topological index has 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 creates a new instance every time, it is a waste of cycles to reset the state after the search of the Affected Region is done, so an UnsupportedOperationException *should* be thrown.