lu.cs.co.graph
Class UndirectedEdge

java.lang.Object
  |
  +--lu.cs.co.graph.Edge
        |
        +--lu.cs.co.graph.UndirectedEdge

public class UndirectedEdge
extends Edge

An undirected edge. The edge joins the vertices in fields u and v.


Fields inherited from class lu.cs.co.graph.Edge
len, u, v
 
Constructor Summary
UndirectedEdge(Vertex u, Vertex v)
          An undirected edge of unit length between two vertices.
UndirectedEdge(Vertex u, Vertex v, int l)
          An undirected edge between two vertices of given length.
 
Method Summary
 String toString()
           
 
Methods inherited from class lu.cs.co.graph.Edge
clone, compareTo, compareTo, neighbour
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UndirectedEdge

public UndirectedEdge(Vertex u,
                      Vertex v,
                      int l)
An undirected edge between two vertices of given length.
Parameters:
u - a vertex on the edge
v - another vertex on the edge
l - the edge's length

UndirectedEdge

public UndirectedEdge(Vertex u,
                      Vertex v)
An undirected edge of unit length between two vertices. The length is 1.
Parameters:
u - a vertex on the edge
v - another vertex on the edge
Method Detail

toString

public String toString()
Overrides:
toString in class Edge