public class VertexResetter
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
resetColors(AbstractGraph<? extends ColoredVertex> graph)
Reset the color of all vertices in the graph to white (typically signifies that the vertex
has not yet been explored).
|
static void |
resetColors(AbstractGraph<? extends ColoredVertex> graph,
Color color)
Reset the color of all vertices in the graph to the given value.
|
static void |
resetDiscoveryTimes(AbstractGraph<? extends VisitedVertex> graph)
Reset the discovery time of all vertices in the graph to the default value
|
static void |
resetDiscoveryTimes(AbstractGraph<? extends VisitedVertex> graph,
int discoveryTime)
Reset the discovery time of all vertices in the graph to the given value.
|
static void |
resetDistances(AbstractGraph<? extends DistanceVertex> graph)
Reset the distance property of all vertices in the graph to the default value.
|
static void |
resetDistances(AbstractGraph<? extends DistanceVertex> graph,
int distance)
Reset the distance property of all vertices in the graph to the given value.
|
static void |
resetFinishTimes(AbstractGraph<? extends VisitedVertex> graph)
Reset the finish time of all vertices in the graph to the default value
|
static void |
resetFinishTimes(AbstractGraph<? extends VisitedVertex> graph,
int finishTime)
Reset the finish time of all vertices in the graph to the given value.
|
static void |
resetForBfs(AbstractGraph<? extends BfsVertex> graph)
Reset the vertex properties used in breadth-first search
|
static void |
resetForDfs(AbstractGraph<? extends DfsVertex> graph)
Reset the vertex properties used in edge type depth-first search
|
static void |
resetForEdgeTypeDfs(AbstractGraph<? extends EdgeTypeDfsVertex<?>> graph)
Reset the vertex properties used in edge type depth-first search
|
static void |
resetForOrderedDfs(AbstractGraph<? extends OrderedDfsVertex> graph)
Reset the vertex properties used in ordered depth-first search
|
static <E extends SpanningTreeEdgeData,V extends PrimVertex<E>> |
resetForPrim(AbstractGraph<V> graph) |
static void |
resetParents(AbstractGraph<? extends ChildVertex> graph)
Reset the parent of all vertices in the graph to null
|
static void |
resetWeights(AbstractGraph<? extends WeightedVertex> graph)
Reset the weight of all vertices in the graph to the default value.
|
static void |
resetWeights(AbstractGraph<? extends WeightedVertex> graph,
double weight)
Reset the weight of all vertices in the graph to the given value.
|
public static final <E extends SpanningTreeEdgeData,V extends PrimVertex<E>> void resetForPrim(AbstractGraph<V> graph)
public static final void resetForOrderedDfs(AbstractGraph<? extends OrderedDfsVertex> graph)
graph
- graph whose vertices are to be resetpublic static final void resetForEdgeTypeDfs(AbstractGraph<? extends EdgeTypeDfsVertex<?>> graph)
graph
- graph whose vertices are to be resetpublic static final void resetForDfs(AbstractGraph<? extends DfsVertex> graph)
graph
- graph whose vertices are to be resetpublic static final void resetForBfs(AbstractGraph<? extends BfsVertex> graph)
graph
- graph whose vertices are to be resetpublic static final void resetColors(AbstractGraph<? extends ColoredVertex> graph)
graph
- graph whose vertices are to be resetpublic static final void resetColors(AbstractGraph<? extends ColoredVertex> graph, Color color)
graph
- graph whose vertices are to be resetcolor
- value to which the color of all vertices is to be resetpublic static final void resetDistances(AbstractGraph<? extends DistanceVertex> graph)
graph
- graph whose vertices are to be resetpublic static final void resetDistances(AbstractGraph<? extends DistanceVertex> graph, int distance)
graph
- graph whose vertices are to be resetdistance
- value to which the distance property of all vertices is to be resetpublic static final void resetParents(AbstractGraph<? extends ChildVertex> graph)
graph
- graph whose vertices are to be reset to have parent nullpublic static final void resetDiscoveryTimes(AbstractGraph<? extends VisitedVertex> graph)
graph
- graph whose vertices are to be resetpublic static final void resetDiscoveryTimes(AbstractGraph<? extends VisitedVertex> graph, int discoveryTime)
graph
- graph graph whose vertices are to be resetdiscoveryTime
- value to which the discovery time of all vertices in the graph is to be resetpublic static final void resetFinishTimes(AbstractGraph<? extends VisitedVertex> graph)
graph
- graph whose vertices are to be resetpublic static final void resetFinishTimes(AbstractGraph<? extends VisitedVertex> graph, int finishTime)
graph
- graph graph whose vertices are to be resetfinishTime
- value to which the finish time of all vertices in the graph is to be resetpublic static final void resetWeights(AbstractGraph<? extends WeightedVertex> graph)
graph
- graph graph whose vertices are to be resetpublic static final void resetWeights(AbstractGraph<? extends WeightedVertex> graph, double weight)
graph
- graph graph whose vertices are to be resetweight
- value to which the weight of all vertices in the graph is to be reset