logic
Class GraphProcessing
java.lang.Object
logic.GraphProcessing
public class GraphProcessing
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GraphProcessing
public GraphProcessing()
generateTree
public void generateTree(Node focusNode)
- main part of the algorithm.
generates a tree out of the graph
and sets the angle and ring at which the node has to be placed.
- Parameters:
focusNode
-
iteratorBreadthFirst
public GraphProcessing.BreadthFirstIterator iteratorBreadthFirst()
- returns an iterator, that traverses the graph like a tree with breadth-first search.
so gernerateTree() has to be called previously
- Returns:
- iterator
iteratorDepthFirst
public GraphProcessing.DepthFirstIterator iteratorDepthFirst()
- returns an iterator, that traverses the graph like a tree with depth-first search.
so gernerateTree() has to be called previously
- Returns:
- iterator
getFocusNode
public Node getFocusNode()
setFocusNode
public void setFocusNode(Node focusNode)
addChild
public void addChild(Node node,
Node father)
removeNode
public void removeNode(Node node)
removeSubtree
public void removeSubtree(Node node)
addEdge
public void addEdge(Node n1,
Node n2)