|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.upc.dama.dex.algorithms.Traversal
public abstract class Traversal
Any class implementing this abstract class can be used to traverse a graph.
| Field Summary |
|---|
| Fields inherited from interface edu.upc.dama.dex.algorithms.Algorithm |
|---|
NAVIGATION_BACKWARD, NAVIGATION_FORWARD, NAVIGATION_UNDIRECTED |
| Constructor Summary | |
|---|---|
Traversal(Graph graph,
long source)
Creates a new instance of Traversal. |
|
| Method Summary | |
|---|---|
void |
addAllEdges(short navigation)
Adds all the edge types contained in the graph and their navigation in order to restrict the set of edge types allowed and their direction while traversing the graph. |
void |
addAllNodes()
Adds all the node types contained in the graph to restrict the set of allowed node types. |
void |
addEdge(int edgetype,
short navigation)
Adds an edge type and its navigation in order to restrict the set of edge types allowed and their direction while traversing the graph. |
void |
addNode(int nodetype)
Adds a node type in order to restrict the set of allowed node types while traversing the graph. |
abstract void |
close()
Closes the instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Iterator |
|---|
hasNext, next, remove |
| Constructor Detail |
|---|
public Traversal(Graph graph,
long source)
Traversal.
graph - Graph on which the traversal will be run.source - The node identifier which identifies the source node at
which the algorithm execution will start.| Method Detail |
|---|
public void addEdge(int edgetype,
short navigation)
edgetype - The edge type to restrict the set of edges allowed
while traversing the graph during the execution of the algorithm.navigation - The direction that has to be followed while traversing
each edge of the given edge type during the execution of the algorithm.
It must be Algorithm.NAVIGATION_BACKWARD, Algorithm.NAVIGATION_FORWARD or
Algorithm.NAVIGATION_UNDIRECTED.public void addAllEdges(short navigation)
navigation - The direction that has to be followed while traversing
each edge during the execution of the algorithm. It must be
Algorithm.NAVIGATION_BACKWARD, Algorithm.NAVIGATION_FORWARD or
Algorithm.NAVIGATION_UNDIRECTED.public void addNode(int nodetype)
nodetype - The node type to restrict the set of nodes allowed
while traversing the graph during the execution of the algorithm.public void addAllNodes()
public abstract void close()
Once executed, the instance becomes invalid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||