drasys.or.graph
Interface AddEdgeI

All Known Subinterfaces:
AddI, EditI

public interface AddEdgeI
extends GraphI

An interface implemented by graphs that can add edges.

See Also:
SparseGraph

Method Summary
 EdgeI addEdge(EdgeI edge)
          Adds a new edge to the graph.
 EdgeI addEdge(java.lang.Object fromKey, java.lang.Object toKey)
          Adds a new edge to the graph where: value=null, isDirected=false, key=null.
 EdgeI addEdge(java.lang.Object fromKey, java.lang.Object toKey, java.lang.Object value)
          Adds a new edge to the graph where: isDirected=false, key=null.
 EdgeI addEdge(java.lang.Object fromKey, java.lang.Object toKey, java.lang.Object value, boolean isDirected)
          Adds a new edge to the graph where: key=null.
 EdgeI addEdge(java.lang.Object fromKey, java.lang.Object toKey, java.lang.Object value, boolean isDirected, java.lang.Object key)
          Adds a new edge to the graph.
 void ensureEdgeCapacity(int edgeCapacity)
          Ensures that the graph can efficiently hold this many edges.
 
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

ensureEdgeCapacity

public void ensureEdgeCapacity(int edgeCapacity)
Ensures that the graph can efficiently hold this many edges.

addEdge

public EdgeI addEdge(java.lang.Object fromKey,
                     java.lang.Object toKey,
                     java.lang.Object value,
                     boolean isDirected,
                     java.lang.Object key)
              throws DuplicateEdgeException,
                     VertexNotFoundException
Adds a new edge to the graph. Throws 'VertexNotFoundException' if either vertex is not in the graph. Throws 'DuplicateEdgeException' if the edge already exists.

addEdge

public EdgeI addEdge(java.lang.Object fromKey,
                     java.lang.Object toKey)
              throws DuplicateEdgeException,
                     VertexNotFoundException
Adds a new edge to the graph where: value=null, isDirected=false, key=null. Throws 'VertexNotFoundException' if either vertex is not in the graph. Throws 'DuplicateEdgeException' if the edge already exists.

addEdge

public EdgeI addEdge(java.lang.Object fromKey,
                     java.lang.Object toKey,
                     java.lang.Object value)
              throws DuplicateEdgeException,
                     VertexNotFoundException
Adds a new edge to the graph where: isDirected=false, key=null. Throws 'VertexNotFoundException' if either vertex is not in the graph. Throws 'DuplicateEdgeException' if the edge already exists.

addEdge

public EdgeI addEdge(java.lang.Object fromKey,
                     java.lang.Object toKey,
                     java.lang.Object value,
                     boolean isDirected)
              throws DuplicateEdgeException,
                     VertexNotFoundException
Adds a new edge to the graph where: key=null. Throws 'VertexNotFoundException' if either vertex is not in the graph. Throws 'DuplicateEdgeException' if the edge already exists.

addEdge

public EdgeI addEdge(EdgeI edge)
              throws DuplicateEdgeException,
                     VertexNotFoundException
Adds a new edge to the graph. Throws 'VertexNotFoundException' if either vertex is not in the graph. Throws 'DuplicateEdgeException' if the edge already exists.


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