![]() |
AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
|
node with all possible attributes that we require ;-) More...
Inheritance diagram for aud.example.graph.MyNode:
Collaboration diagram for aud.example.graph.MyNode:Public Member Functions | |
| MyNode | create () |
| Create new node instance. More... | |
| String | toString () |
Public Member Functions inherited from aud.graph.SimpleNode | |
| SimpleNode | create () |
| Create new node instance. More... | |
| String | getLabel () |
| get text description More... | |
| void | setLabel (String label) |
set label (default label if label==null) More... | |
| void | setPosition (double x, double y) |
| helper for drawing the graph (if supported) More... | |
| double[] | getPosition () |
helper for drawing the graph: return {x,y} as array or null More... | |
Public Member Functions inherited from aud.graph.AbstractNode | |
| abstract AbstractNode | create () |
| Create new node instance. More... | |
| AbstractGraph<? extends AbstractNode,? extends AbstractEdge > | graph () |
| get graph More... | |
| int | index () |
get index, i.e., unique integer id within graph More... | |
| String | getLabel () |
| get text description More... | |
| void | setLabel (String label) |
| set label (if supported) More... | |
| void | setPosition (double x, double y) |
| helper for drawing the graph (if supported) More... | |
| double[] | getPosition () |
helper for drawing the graph: return {x,y} as array or null More... | |
| GraphvizDecorator | getDecorator () |
get decoration or null More... | |
| String | toString () |
| int | compareTo (AbstractNode other) |
| boolean | equals (Object other) |
| GraphvizDecorator | getDecorator () |
get decoration or null More... | |
Public Attributes | |
| int | ord = -1 |
| time when node is (first marked/put into front) More... | |
| MyNode | p = null |
| node from which node was reached (defines spanning tree) More... | |
| double | d = Double.POSITIVE_INFINITY |
| distance to start node (sum of weighs or edge count if no weights defined) More... | |
| double | f = Double.POSITIVE_INFINITY |
| priority for A*-algorithm More... | |
| String | color = null |
| color as string More... | |
node with all possible attributes that we require ;-)
Definition at line 6 of file MyNode.java.
| MyNode aud.example.graph.MyNode.create | ( | ) |
Create new node instance.
Must initialize any attributes introduced in subclasses of AbstractNode.
Reimplemented from aud.graph.SimpleNode.
Definition at line 8 of file MyNode.java.
| String aud.example.graph.MyNode.toString | ( | ) |
Reimplemented from aud.graph.AbstractNode.
Definition at line 34 of file MyNode.java.
References aud.example.graph.MyNode.d, aud.graph.SimpleNode.getLabel(), and aud.example.graph.MyNode.p.
Here is the call graph for this function:| String aud.example.graph.MyNode.color = null |
color as string
Definition at line 27 of file MyNode.java.
Referenced by aud.example.graph.TraversalExample.main(), and aud.example.graph.Traversal.showMark().
| double aud.example.graph.MyNode.d = Double.POSITIVE_INFINITY |
distance to start node (sum of weighs or edge count if no weights defined)
Definition at line 21 of file MyNode.java.
Referenced by aud.example.graph.DijkstraShortestPaths.priority(), aud.example.graph.PrimMinimumSpanningTree.priority(), aud.example.graph.BreadthFirstSearch.start(), aud.example.graph.IterativeDFS1.start(), aud.example.graph.IterativeDFS2.start(), aud.example.graph.PriorityFirstSearch.start(), and aud.example.graph.MyNode.toString().
| double aud.example.graph.MyNode.f = Double.POSITIVE_INFINITY |
priority for A*-algorithm
Definition at line 24 of file MyNode.java.
| int aud.example.graph.MyNode.ord = -1 |
time when node is (first marked/put into front)
Definition at line 13 of file MyNode.java.
Referenced by aud.example.graph.DepthFirstSearch.dfs(), aud.example.graph.BreadthFirstSearch.start(), aud.example.graph.IterativeDFS1.start(), and aud.example.graph.IterativeDFS2.start().
| MyNode aud.example.graph.MyNode.p = null |
node from which node was reached (defines spanning tree)
Definition at line 16 of file MyNode.java.
Referenced by aud.example.graph.IterativeDFS1.start(), and aud.example.graph.MyNode.toString().