Modifier and Type | Field and Description |
---|---|
protected List<E> |
edges |
protected Map<E,V> |
edgeStart |
protected Map<E,V> |
edgeStop |
protected List<V> |
vertices |
Constructor and Description |
---|
DefaultGraph() |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(E edge,
V v1,
V v2) |
void |
addVertex(V vertex) |
List<E> |
getEdges() |
V |
getEdgeStartVertex(E e) |
V |
getEdgeStopVertex(E e) |
V |
getRandomVertex() |
V |
getVertex(int i) |
List<V> |
getVertices() |
public V getEdgeStartVertex(E e)
getEdgeStartVertex
in interface IGraph<V,E>
public V getEdgeStopVertex(E e)
getEdgeStopVertex
in interface IGraph<V,E>
public V getRandomVertex()
getRandomVertex
in interface IGraph<V,E>
Copyright © 2016. All rights reserved.