uk.ac.ed.computational_geometry.util
Class UndirectedGraph.Edge<Value>

java.lang.Object
  extended by uk.ac.ed.computational_geometry.util.UndirectedGraph.Edge<Value>
All Implemented Interfaces:
Comparable<UndirectedGraph.Edge>
Enclosing class:
UndirectedGraph<Value>

public static class UndirectedGraph.Edge<Value>
extends Object
implements Comparable<UndirectedGraph.Edge>


Field Summary
protected  UndirectedGraph.Vertex<Value> vertex1
           
protected  UndirectedGraph.Vertex<Value> vertex2
           
protected  double weight
           
 
Constructor Summary
protected UndirectedGraph.Edge(UndirectedGraph.Vertex<Value> vertex1, UndirectedGraph.Vertex<Value> vertex2, double weight)
           
 
Method Summary
 int compareTo(UndirectedGraph.Edge edge)
           
 UndirectedGraph.Vertex<Value> getVertex1()
           
 UndirectedGraph.Vertex<Value> getVertex2()
           
 double getWeight()
           
 UndirectedGraph.Vertex otherVertex(UndirectedGraph.Vertex vertex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vertex1

protected UndirectedGraph.Vertex<Value> vertex1

vertex2

protected UndirectedGraph.Vertex<Value> vertex2

weight

protected double weight
Constructor Detail

UndirectedGraph.Edge

protected UndirectedGraph.Edge(UndirectedGraph.Vertex<Value> vertex1,
                               UndirectedGraph.Vertex<Value> vertex2,
                               double weight)
Method Detail

getVertex1

public UndirectedGraph.Vertex<Value> getVertex1()

getVertex2

public UndirectedGraph.Vertex<Value> getVertex2()

getWeight

public double getWeight()

otherVertex

public UndirectedGraph.Vertex otherVertex(UndirectedGraph.Vertex vertex)

compareTo

public int compareTo(UndirectedGraph.Edge edge)
Specified by:
compareTo in interface Comparable<UndirectedGraph.Edge>