| Constructor and Description |
|---|
SimpleGraph() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEdge(Edge<V> edge) |
boolean |
addEdge(V vertex1,
V vertex2) |
boolean |
addVertex(V vertex) |
java.lang.Object |
clone() |
boolean |
containsEdge(int index1,
int index2) |
boolean |
containsVertex(V vertex) |
SimpleGraph<V> |
extractSubGraph(java.util.List<java.lang.Integer> indices) |
int |
getEdgeCount() |
java.util.List<Edge<V>> |
getEdges() |
java.util.List<java.lang.Integer> |
getNeighborIndices(int index) |
int |
getValence(int index) |
int |
getValence(V vertex) |
V |
getVertex(int index) |
java.util.List<V> |
getVertices() |
int |
indexOf(V vertex) |
boolean |
removeEdge(int index1,
int index2) |
boolean |
removeEdge(V vertex1,
V vertex2) |
void |
setVertices(java.util.List<V> list) |
int |
size() |
java.lang.String |
toString() |
public int getEdgeCount()
getEdgeCount in interface Graph<V>public int getValence(V vertex)
getValence in interface Graph<V>public int getValence(int index)
getValence in interface Graph<V>public boolean containsVertex(V vertex)
containsVertex in interface Graph<V>public void setVertices(java.util.List<V> list)
setVertices in interface Graph<V>public java.util.List<V> getVertices()
getVertices in interface Graph<V>public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List<java.lang.Integer> getNeighborIndices(int index)
getNeighborIndices in interface Graph<V>public boolean removeEdge(int index1,
int index2)
removeEdge in interface Graph<V>public boolean removeEdge(V vertex1, V vertex2)
removeEdge in interface Graph<V>public java.lang.Object clone()
public boolean containsEdge(int index1,
int index2)
containsEdge in interface Graph<V>public SimpleGraph<V> extractSubGraph(java.util.List<java.lang.Integer> indices)
extractSubGraph in interface Graph<V>