nl.uu.cs.treewidth.ngraph
Class ListGraph<D>

java.lang.Object
  extended by nl.uu.cs.treewidth.ngraph.NGraph<D>
      extended by nl.uu.cs.treewidth.ngraph.ListGraph<D>
All Implemented Interfaces:
java.lang.Iterable<NVertex<D>>

public class ListGraph<D>
extends NGraph<D>


Nested Class Summary
 
Nested classes/interfaces inherited from class nl.uu.cs.treewidth.ngraph.NGraph
NGraph.Convertor<From,To>
 
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.
 
Constructor Summary
ListGraph()
           
 
Method Summary
 void addVertex(NVertex<D> v)
           
 NGraph<D> copy()
           
 int getNumberOfVertices()
           
 NVertex<D> getVertex(int i)
           
 java.util.Iterator<NVertex<D>> getVertices()
           
 void removeVertex(NVertex<D> v)
           
 void setVertices(java.util.ArrayList<NVertex<D>> vs)
           
 
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
 

Field Detail

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.

Constructor Detail

ListGraph

public ListGraph()
Method Detail

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>