|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.joensuu.cs.tra.Edge
public class Edge
Edges are objects that connect Vertices to form a graph.
Vertex
,
Graph
,
DiGraph
Method Summary | |
---|---|
int |
compareTo(Object o)
Defined in Comparable . |
int |
getColor()
Gets the color of this Edge. |
Vertex |
getEndPoint()
Returns the end point of this Edge. |
Vertex |
getEndPoint(Vertex vertex)
Returns the Vertex on the other end
of the specified Edge. |
String |
getLabel()
Gets the label of this Edge. |
Vertex |
getStartPoint()
Returns the starting point of this Edge. |
float |
getWeight()
Gets the weight of this Edge. |
boolean |
goesOut(Vertex vertex)
Determines whether this Edge goes out from the specified Vertex. |
int |
setColor(int color)
Sets the color of this Edge. |
String |
setLabel(String label)
Sets the label of this Edge. |
float |
setWeight(float weight)
Sets the weight of this Edge. |
String |
toString()
Produces a String representation of this Edge. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Vertex getEndPoint(Vertex vertex)
Vertex
on the other end
of the specified Edge.
leads to.
vertex
- the Vertex to start tracing from
public Vertex getEndPoint()
public Vertex getStartPoint()
public boolean goesOut(Vertex vertex)
DiGraph
s.
vertex
- the Vertex that is to be tested for being the
origin Vertex of this Edge.
public int getColor()
public int setColor(int color)
color
- the new color for this Edge
public float getWeight()
public float setWeight(float weight)
weight
- the new weight for this Edge
public String getLabel()
public String setLabel(String label)
label
- the new label for this Edge
public int compareTo(Object o)
Comparable
.
compareTo
in interface Comparable
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |