AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
aud.graph.SimpleNode Class Reference

plain simple node More...

+ Inheritance diagram for aud.graph.SimpleNode:
+ Collaboration diagram for aud.graph.SimpleNode:

Public Member Functions

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 AbstractEdgegraph ()
 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...
 

Detailed Description

plain simple node

Definition at line 4 of file SimpleNode.java.

Member Function Documentation

◆ create()

SimpleNode aud.graph.SimpleNode.create ( )

Create new node instance.

Must initialize any attributes introduced in subclasses of AbstractNode.

Returns
node instance

Reimplemented from aud.graph.AbstractNode.

Reimplemented in aud.example.graph.MyNode.

Definition at line 9 of file SimpleNode.java.

9 {
10 return new SimpleNode();
11 }

◆ getLabel()

String aud.graph.SimpleNode.getLabel ( )

get text description

Reimplemented from aud.graph.AbstractNode.

Definition at line 12 of file SimpleNode.java.

12 {
13 return label_==null ? super.getLabel() : label_;
14 }

Referenced by aud.example.graph.MyNode.toString().

+ Here is the caller graph for this function:

◆ getPosition()

double[] aud.graph.SimpleNode.getPosition ( )

helper for drawing the graph: return {x,y} as array or null

Reimplemented from aud.graph.AbstractNode.

Definition at line 22 of file SimpleNode.java.

22{ return position_; }

◆ setLabel()

void aud.graph.SimpleNode.setLabel ( String  label)

set label (default label if label==null)

Reimplemented from aud.graph.AbstractNode.

Definition at line 16 of file SimpleNode.java.

16{ label_=label; }

Referenced by aud.example.graph.MaxFlowExample.createGraph(), aud.example.graph.GraphP88.GraphP88(), and aud.util.GraphDemo.main().

+ Here is the caller graph for this function:

◆ setPosition()

void aud.graph.SimpleNode.setPosition ( double  x,
double  y 
)

helper for drawing the graph (if supported)

Reimplemented from aud.graph.AbstractNode.

Definition at line 18 of file SimpleNode.java.

18 {
19 position_=new double[] {x,y};
20 }

Referenced by aud.example.graph.MaxFlowExample.createGraph(), and aud.example.graph.GraphP88.GraphP88().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: