![]() |
AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
|
plain simple edge More...
Public Member Functions | |
SimpleEdge | create () |
Create new edge instance. More... | |
String | getLabel () |
get text description or null if there is none More... | |
void | setLabel (String label) |
set label (default label if label==null ) More... | |
double | getWeight () |
set edge weight More... | |
void | setWeight (double w) |
set weight More... | |
![]() | |
abstract AbstractEdge | create () |
Create new edge instance. More... | |
AbstractGraph<? extends AbstractNode,? extends AbstractEdge > | graph () |
get graph More... | |
AbstractNode | source () |
Get source node. More... | |
AbstractNode | destination () |
get destination node More... | |
boolean | hasWeight () |
determine if edge weight is defined More... | |
double | getWeight () |
set edge weight More... | |
GraphvizDecorator | getDecorator () |
get decoration or null More... | |
String | toString () |
int | compareTo (AbstractEdge other) |
boolean | equals (Object other) |
GraphvizDecorator | getDecorator () |
get decoration or null More... | |
plain simple edge
Definition at line 4 of file SimpleEdge.java.
SimpleEdge aud.graph.SimpleEdge.create | ( | ) |
Create new edge instance.
Must initialize any attributes introduced in subclasses of AbstractEdge
.
Reimplemented from aud.graph.AbstractEdge.
Reimplemented in aud.example.graph.MyEdge.
Definition at line 9 of file SimpleEdge.java.
String aud.graph.SimpleEdge.getLabel | ( | ) |
get text description or null
if there is none
Reimplemented from aud.graph.AbstractEdge.
Definition at line 12 of file SimpleEdge.java.
double aud.graph.SimpleEdge.getWeight | ( | ) |
set edge weight
Reimplemented from aud.graph.AbstractEdge.
Definition at line 19 of file SimpleEdge.java.
Referenced by aud.example.graph.DijkstraShortestPaths.priority(), aud.example.graph.PrimMinimumSpanningTree.priority(), and aud.example.graph.IterativeDFS1.start().
void aud.graph.SimpleEdge.setLabel | ( | String | label | ) |
set label (default label if label==null
)
Definition at line 17 of file SimpleEdge.java.
Referenced by aud.util.GraphDemo.main().
void aud.graph.SimpleEdge.setWeight | ( | double | w | ) |
set weight
UnsupportedOperationException | if edges are not weighted (link hasWeight} returns false ) |
Reimplemented from aud.graph.AbstractEdge.
Definition at line 20 of file SimpleEdge.java.