routing
Class PathEdge

java.lang.Object
  |
  +--routing.PathEdge

public class PathEdge
extends java.lang.Object

Class for representing pathes of edges.


Field Summary
protected  Edge edge
          The corresponding edge
protected  boolean forwards
          Is the direction forwards?
protected  PathEdge next
          The next edge
protected  double origWeight
          Original weight of the edge
 
Constructor Summary
PathEdge(Edge edge, boolean forwards)
          Constructor of a new path element.
PathEdge(Edge edge, boolean forwards, double origWeight)
          Constructor of a new path element.
PathEdge(Edge edge, boolean forwards, double origWeight, PathEdge next)
          Constructor of a new path element.
 
Method Summary
 PathEdge addPath(PathEdge path)
          Appends a path.
 void changePresentation(java.lang.String presName)
          Ändert die Darstellung der Kanten.
 boolean checkForDestinationNode(Node node)
          Checks the path for a given destination node.
 int computeDegree()
          Computes the degrees of starting nodes.
 double computeDistance()
          Berechnet die Länge des Pfads.
 int computeNumber()
          Computes the number of edges.
 void debugPrint()
          Gibt den Pfad zu Debugging-Zwecken aus.
 PathEdge findEdge(Edge pEdge)
          Sucht übergebene Kante im Pfad.
 Node getDestinationNode()
          Gibt den Knoten zurück, bei dem die Pfadkante endet.
 Edge getEdge()
          Gibt die Kante des Pfadelements zurück.
 boolean getForwards()
          Gibt die Kantenrichtung zurück.
 Edge getLastEdge()
          Gint die letzte Kante des Pfads zurück.
 PathEdge getNext()
          Gibt das folgende Pfadelement zurück.
 double getOrigWeight()
          Gibt das Originalgewicht der Kante zurück.
 Node getStartingNode()
          Gibt den Knoten zurück, bei dem die Pfadkante startet.
 void select()
          Selektiert die Kanten ungerichtet.
 void setNext(PathEdge path)
          Setzt das Feld "next" auf den übergebenen Pfad.
 void setStandardAppearance()
          Setzt die Kanten des Pfads auf die Standard-Darstellung.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edge

protected Edge edge
The corresponding edge


forwards

protected boolean forwards
Is the direction forwards?


origWeight

protected double origWeight
Original weight of the edge


next

protected PathEdge next
The next edge

Constructor Detail

PathEdge

public PathEdge(Edge edge,
                boolean forwards)
Constructor of a new path element.

Parameters:
edge - the corresponding edge
forwards - is the direction forwards?

PathEdge

public PathEdge(Edge edge,
                boolean forwards,
                double origWeight)
Constructor of a new path element.

Parameters:
edge - the corresponding edge
forwards - is the direction forwards?
origWeight - the (original) weigth of the edge

PathEdge

public PathEdge(Edge edge,
                boolean forwards,
                double origWeight,
                PathEdge next)
Constructor of a new path element.

Parameters:
edge - the corresponding edge
forwards - is the direction forwards?
origWeight - the (original) weigth of the edge
next - the next path element
Method Detail

addPath

public PathEdge addPath(PathEdge path)
Appends a path.

Parameters:
path - the additional path
Returns:
the additional path

changePresentation

public void changePresentation(java.lang.String presName)
Ändert die Darstellung der Kanten.

Parameters:
presName - Darstellungsname

checkForDestinationNode

public boolean checkForDestinationNode(Node node)
Checks the path for a given destination node.

Parameters:
node - the destination node

computeDegree

public int computeDegree()
Computes the degrees of starting nodes.

Returns:
total degree

computeDistance

public double computeDistance()
Berechnet die Länge des Pfads.

Returns:
Pfadlänge

computeNumber

public int computeNumber()
Computes the number of edges.

Returns:
number of edges

debugPrint

public void debugPrint()
Gibt den Pfad zu Debugging-Zwecken aus.


findEdge

public PathEdge findEdge(Edge pEdge)
Sucht übergebene Kante im Pfad. Falls sie gefunden wird, wird das Pfadelement zurückgegeben, ansonsten null.

Parameters:
pEdge - gesuchte Kante
Returns:
gefundenes Pfadelement

getDestinationNode

public Node getDestinationNode()
Gibt den Knoten zurück, bei dem die Pfadkante endet.

Returns:
Endknoten

getEdge

public Edge getEdge()
Gibt die Kante des Pfadelements zurück.

Returns:
Kante

getForwards

public boolean getForwards()
Gibt die Kantenrichtung zurück.

Returns:
Kante vorwärts gerichtet?

getLastEdge

public Edge getLastEdge()
Gint die letzte Kante des Pfads zurück.

Returns:
Kante

getNext

public PathEdge getNext()
Gibt das folgende Pfadelement zurück.

Returns:
folgendes Pfadelement

getOrigWeight

public double getOrigWeight()
Gibt das Originalgewicht der Kante zurück.

Returns:
Originalgewicht der Kante

getStartingNode

public Node getStartingNode()
Gibt den Knoten zurück, bei dem die Pfadkante startet.

Returns:
Startknoten

select

public void select()
Selektiert die Kanten ungerichtet.


setNext

public void setNext(PathEdge path)
Setzt das Feld "next" auf den übergebenen Pfad.

Parameters:
path - neuer Folge-Pfad

setStandardAppearance

public void setStandardAppearance()
Setzt die Kanten des Pfads auf die Standard-Darstellung.