drasys.or.graph
Interface AddVertexI

All Known Subinterfaces:
AddI, EditI
All Known Implementing Classes:
BaseGraph, PointGraph

public interface AddVertexI
extends GraphI

An interface implemented by graphs that can add vertices.

See Also:
SparseGraph

Method Summary
 VertexI addVertex(java.lang.Object key)
          Adds a new vertex to the graph with a null value.
 VertexI addVertex(java.lang.Object key, java.lang.Object value)
          Adds a new vertex to the graph with a value.
 VertexI addVertex(VertexI vertex)
          Adds a new vertex to the graph, the key and value are taken from 'vertex'.
 void ensureVertexCapacity(int vertexCapacity)
          Ensures that the graph can efficiently hold this many vertices.
 
Methods inherited from interface drasys.or.graph.GraphI
edges, getChangeCount, getEdge, getEdge, getEdge, getMutableEdge, getVertex, isSubsetOf, isSymmetric, mutableEdges, setSymmetric, sizeOfDirectedEdges, sizeOfEdges, sizeOfVertices, vertices
 

Method Detail

ensureVertexCapacity

public void ensureVertexCapacity(int vertexCapacity)
Ensures that the graph can efficiently hold this many vertices.

addVertex

public VertexI addVertex(java.lang.Object key)
                  throws DuplicateVertexException
Adds a new vertex to the graph with a null value. Throws 'DuplicateVertexException' if the vertex already exists.

addVertex

public VertexI addVertex(java.lang.Object key,
                         java.lang.Object value)
                  throws DuplicateVertexException
Adds a new vertex to the graph with a value. Throws 'DuplicateVertexException' if the vertex already exists.

addVertex

public VertexI addVertex(VertexI vertex)
                  throws DuplicateVertexException
Adds a new vertex to the graph, the key and value are taken from 'vertex'. Throws 'DuplicateVertexException' if the vertex already exists.


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com