nl.uu.cs.treewidth.ngraph
Class ListGraph<D>
java.lang.Object
nl.uu.cs.treewidth.ngraph.NGraph<D>
nl.uu.cs.treewidth.ngraph.ListGraph<D>
- All Implemented Interfaces:
- java.lang.Iterable<NVertex<D>>
public class ListGraph<D>
- extends NGraph<D>
Field Summary |
java.util.ArrayList<NVertex<D>> |
vertices
The vertex list for this graph is stored in an ArrayList
TODO This would be nicer as a protected field, but right now
it is convenient to have it public. |
Methods inherited from class nl.uu.cs.treewidth.ngraph.NGraph |
addComment, addEdge, contractEdge, contractEdge, copy, deEliminate, edges, eliminate, eliminate2, ensureEdge, getComments, getNumberOfEdges, getSimplicialVertex, iterator, printGraph, testAlmostSimplicial, testSimplicial |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
vertices
public java.util.ArrayList<NVertex<D>> vertices
The vertex list for this graph is stored in an ArrayList
TODO This would be nicer as a protected field, but right now
it is convenient to have it public.
ListGraph
public ListGraph()
getVertex
public NVertex<D> getVertex(int i)
- Specified by:
getVertex
in class NGraph<D>
getVertices
public java.util.Iterator<NVertex<D>> getVertices()
- Specified by:
getVertices
in class NGraph<D>
getNumberOfVertices
public int getNumberOfVertices()
- Specified by:
getNumberOfVertices
in class NGraph<D>
addVertex
public void addVertex(NVertex<D> v)
- Specified by:
addVertex
in class NGraph<D>
removeVertex
public void removeVertex(NVertex<D> v)
- Specified by:
removeVertex
in class NGraph<D>
setVertices
public void setVertices(java.util.ArrayList<NVertex<D>> vs)
- Specified by:
setVertices
in class NGraph<D>
copy
public NGraph<D> copy()
- Overrides:
copy
in class NGraph<D>