wGmdh.jGmdh.oldskul
Class Node.Visited
java.lang.Object
wGmdh.jGmdh.oldskul.Node.Visited
- All Implemented Interfaces:
- java.io.Serializable
- Enclosing class:
- Node
public class Node.Visited
- extends java.lang.Object
- implements java.io.Serializable
Big cyclic graphs are expected that have significantly less nodes than
vertices. So, when traversing each node once, it's beneficial to use a
traversal flag. 1 extra boolean per Node... not too much memory.
Not synchronized or anything, this is just a wrapper around a bool flag,
so have in mind who else might be using it.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isVisited
public boolean isVisited()
onVisit
public void onVisit()
resetVisited
public void resetVisited()