org.jzy3d.maths.graphs
Class DefaultGraph<V,E>

java.lang.Object
  extended by org.jzy3d.maths.graphs.DefaultGraph<V,E>
All Implemented Interfaces:
IGraph<V,E>

public class DefaultGraph<V,E>
extends java.lang.Object
implements IGraph<V,E>


Constructor Summary
DefaultGraph()
           
 
Method Summary
 void addEdge(E edge, V v1, V v2)
           
 void addVertex(V vertex)
           
 java.util.List<E> getEdges()
           
 V getEdgeStartVertex(E e)
           
 V getEdgeStopVertex(E e)
           
 V getRandomVertex()
           
 V getVertex(int i)
           
 java.util.List<V> getVertices()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGraph

public DefaultGraph()
Method Detail

addVertex

public void addVertex(V vertex)
Specified by:
addVertex in interface IGraph<V,E>

getVertex

public V getVertex(int i)
Specified by:
getVertex in interface IGraph<V,E>

getVertices

public java.util.List<V> getVertices()
Specified by:
getVertices in interface IGraph<V,E>

addEdge

public void addEdge(E edge,
                    V v1,
                    V v2)
Specified by:
addEdge in interface IGraph<V,E>

getEdges

public java.util.List<E> getEdges()
Specified by:
getEdges in interface IGraph<V,E>

getEdgeStartVertex

public V getEdgeStartVertex(E e)
Specified by:
getEdgeStartVertex in interface IGraph<V,E>

getEdgeStopVertex

public V getEdgeStopVertex(E e)
Specified by:
getEdgeStopVertex in interface IGraph<V,E>

getRandomVertex

public V getRandomVertex()
Specified by:
getRandomVertex in interface IGraph<V,E>