Package org.jgrapht.graph
Class DirectedAcyclicGraph.VisitedBitSetImpl
- java.lang.Object
- 
- org.jgrapht.graph.DirectedAcyclicGraph.VisitedBitSetImpl
 
- 
- All Implemented Interfaces:
- Serializable,- DirectedAcyclicGraph.VisitedStrategy,- DirectedAcyclicGraph.VisitedStrategyFactory
 - Enclosing class:
- DirectedAcyclicGraph<V,E>
 
 protected static class DirectedAcyclicGraph.VisitedBitSetImpl extends Object implements DirectedAcyclicGraph.VisitedStrategy, DirectedAcyclicGraph.VisitedStrategyFactory A visited strategy which uses aBitSet.This implementation is close to the performance of DirectedAcyclicGraph.VisitedArrayListImpl, with 1/8 the memory usage.- Author:
- John V. Sichi
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description VisitedBitSetImpl()Constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearVisited(int index)Clear the visited state of the given topological index.booleangetVisited(int index)Get if the given topological index has been visited.DirectedAcyclicGraph.VisitedStrategygetVisitedStrategy(DirectedAcyclicGraph.Region affectedRegion)Create a new instance ofDirectedAcyclicGraph.VisitedStrategy.voidsetVisited(int index)Mark the given topological index as visited.
 
- 
- 
- 
Method Detail- 
getVisitedStrategypublic DirectedAcyclicGraph.VisitedStrategy getVisitedStrategy(DirectedAcyclicGraph.Region affectedRegion) Description copied from interface:DirectedAcyclicGraph.VisitedStrategyFactoryCreate a new instance ofDirectedAcyclicGraph.VisitedStrategy.- Specified by:
- getVisitedStrategyin interface- DirectedAcyclicGraph.VisitedStrategyFactory
- Parameters:
- affectedRegion- the affected region
- Returns:
- a new instance of DirectedAcyclicGraph.VisitedStrategyfor the affected region
 
 - 
setVisitedpublic void setVisited(int index) Description copied from interface:DirectedAcyclicGraph.VisitedStrategyMark the given topological index as visited.- Specified by:
- setVisitedin interface- DirectedAcyclicGraph.VisitedStrategy
- Parameters:
- index- the topological index
 
 - 
getVisitedpublic boolean getVisited(int index) Description copied from interface:DirectedAcyclicGraph.VisitedStrategyGet if the given topological index has been visited.- Specified by:
- getVisitedin interface- DirectedAcyclicGraph.VisitedStrategy
- Parameters:
- index- the topological index
- Returns:
- true if the given topological index has been visited, false otherwise
 
 - 
clearVisitedpublic void clearVisited(int index) throws UnsupportedOperationExceptionDescription copied from interface:DirectedAcyclicGraph.VisitedStrategyClear the visited state of the given topological index.- Specified by:
- clearVisitedin interface- DirectedAcyclicGraph.VisitedStrategy
- Parameters:
- index- the index
- Throws:
- 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.
 
 
- 
 
-