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

java.lang.Object
  extended by uk.ac.ed.computational_geometry.util.UndirectedGraph<Value>

public class UndirectedGraph<Value>
extends Object

User: nix Date: 16-Mar-2005 Time: 11:34:47 To change this template use Options | File Templates.


Nested Class Summary
static class UndirectedGraph.Edge<Value>
           
static class UndirectedGraph.Vertex<Value>
           
 
Field Summary
protected  List<UndirectedGraph.Edge<Value>> edges
           
protected  Map<Value,UndirectedGraph.Vertex> vertexes
           
 
Constructor Summary
UndirectedGraph()
           
 
Method Summary
 UndirectedGraph.Edge<Value> addEdge(UndirectedGraph.Vertex<Value> vertex1, UndirectedGraph.Vertex<Value> vertex2, double weight)
           
 UndirectedGraph.Edge<Value> addEdge(Value value1, Value value2, double weight)
           
 UndirectedGraph.Vertex<Value> addVertex(Value value)
           
 List<UndirectedGraph.Edge<Value>> getEdges()
           
 int getNumberOfEdges()
           
 int getNumberOfVertexes()
           
 UndirectedGraph.Vertex<Value> getVertex(Value value)
           
 Collection<UndirectedGraph.Vertex> getVertexes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vertexes

protected Map<Value,UndirectedGraph.Vertex> vertexes

edges

protected List<UndirectedGraph.Edge<Value>> edges
Constructor Detail

UndirectedGraph

public UndirectedGraph()
Method Detail

addVertex

public UndirectedGraph.Vertex<Value> addVertex(Value value)

getVertex

public UndirectedGraph.Vertex<Value> getVertex(Value value)

addEdge

public UndirectedGraph.Edge<Value> addEdge(UndirectedGraph.Vertex<Value> vertex1,
                                           UndirectedGraph.Vertex<Value> vertex2,
                                           double weight)

addEdge

public UndirectedGraph.Edge<Value> addEdge(Value value1,
                                           Value value2,
                                           double weight)

getEdges

public List<UndirectedGraph.Edge<Value>> getEdges()

getVertexes

public Collection<UndirectedGraph.Vertex> getVertexes()

getNumberOfVertexes

public int getNumberOfVertexes()

getNumberOfEdges

public int getNumberOfEdges()