net.sourceforge.combean.adapters.drasys.graph
Class DRAGraphAsConstructableNumberedGraph
java.lang.Object
   net.sourceforge.combean.adapters.drasys.graph.DRAGraphAsGraph
net.sourceforge.combean.adapters.drasys.graph.DRAGraphAsGraph
       net.sourceforge.combean.adapters.drasys.graph.DRAGraphWithAddVertexIAsGraph
net.sourceforge.combean.adapters.drasys.graph.DRAGraphWithAddVertexIAsGraph
           net.sourceforge.combean.adapters.drasys.graph.DRAGraphWithEditIAsGraph
net.sourceforge.combean.adapters.drasys.graph.DRAGraphWithEditIAsGraph
               net.sourceforge.combean.adapters.drasys.graph.DRAGraphAsConstructableNumberedGraph
net.sourceforge.combean.adapters.drasys.graph.DRAGraphAsConstructableNumberedGraph
- All Implemented Interfaces: 
- Graph, AddEdgeGraphProp, AddNodeGraphProp, ConstructableGraphProp, ConstructableIndexedGraphProp, ConstructableNumberedGraphProp, DirectedEdgeNeighborhoodGraphProp, Freezable, GlobalEdgesGraphProp, GlobalIndexedEdgesGraphProp, GlobalIndexedGraphProp, GlobalIndexedNodesGraphProp, GlobalNodesGraphProp, GlobalNumberedEdgesGraphProp, GlobalNumberedGraphProp, GlobalNumberedNodesGraphProp, IncomingEdgeNeighborhoodGraphProp, NeighborhoodGraphProp, OutgoingEdgeNeighborhoodGraphProp
- public class DRAGraphAsConstructableNumberedGraph 
- extends DRAGraphWithEditIAsGraph- implements ConstructableNumberedGraphProp
 
 
 
 
 
 
 
| Methods inherited from class net.sourceforge.combean.adapters.drasys.graph.DRAGraphAsGraph | 
| convertToEdge, convertToNode, getAllEdgesIterator, getAllNodesIterator, getDraGraph, getEdgeClass, getEdgeValue, getFirstNode, getIncidentEdges, getIncomingEdges, getNodeClass, getNumEdges, getNumNodes, getOtherNode, getOutgoingEdges, getSecondNode | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
 
| Methods inherited from interface net.sourceforge.combean.interfaces.graph.prop.Freezable | 
| freeze | 
 
 
 
 
DRAGraphAsConstructableNumberedGraph
public DRAGraphAsConstructableNumberedGraph()
- constructor for an empty graph
 (uses a standard graph implementation from the OR-Objects library)
 
DRAGraphAsConstructableNumberedGraph
public DRAGraphAsConstructableNumberedGraph(drasys.or.graph.EditI draGraph)
- Constructor for wrapping a given EditI graph
 
- Parameters:
- draGraph- the graph to be wrapped (must be empty)
 
getNode
public Node getNode(int index)
- Description copied from interface: GlobalIndexedNodesGraphProp
- Returns the node with the given index.
 
- 
- Specified by:
- getNodein interface- GlobalIndexedNodesGraphProp
 
- 
- Returns:
- node with given index
 
getEdge
public Edge getEdge(int index)
- Description copied from interface: GlobalIndexedEdgesGraphProp
- Return the edge with a given index
 
- 
- Specified by:
- getEdgein interface- GlobalIndexedEdgesGraphProp
 
- 
- Returns:
- the edges with the given index
 
ensureEdgeCapacity
public void ensureEdgeCapacity(int edgeCapacity)
- Description copied from interface: AddEdgeGraphProp
- Reserve storage for given number of edges.
 
- 
- Specified by:
- ensureEdgeCapacityin interface- AddEdgeGraphProp
- Overrides:
- ensureEdgeCapacityin class- DRAGraphWithEditIAsGraph
 
- 
- Parameters:
- edgeCapacity- the number of edges for which memory shall be
 reserved,
 
getNodeNumber
public int getNodeNumber(Node v)
- Description copied from interface: GlobalNumberedNodesGraphProp
- Get the number of a given node.
 
- 
- Specified by:
- getNodeNumberin interface- GlobalNumberedNodesGraphProp
 
- 
- Parameters:
- v- the node for which the number shall be returned.
- Returns:
- the number of the node in the interval [0 ... number of nodes-1]
 
getEdgeNumber
public int getEdgeNumber(Edge e)
- Description copied from interface: GlobalNumberedEdgesGraphProp
- Get the number of a given edge.
 
- 
- Specified by:
- getEdgeNumberin interface- GlobalNumberedEdgesGraphProp
 
- 
- Parameters:
- e- the edge for which the number shall be returned.
- Returns:
- the number of the edge in the interval [0 ... number of edges-1]
 
addDraEdge
protected Edge addDraEdge(Object fromKey,
                          Object toKey)
                   throws drasys.or.graph.DuplicateEdgeException,
                          drasys.or.graph.VertexNotFoundException
- Description copied from class: DRAGraphWithEditIAsGraph
- Add an edge, given the keys of the incident nodes
 
- 
- Overrides:
- addDraEdgein class- DRAGraphWithEditIAsGraph
 
- 
- Parameters:
- fromKey- the key of the source node
- toKey- the key of the target node
- Returns:
- the added edge
- Throws:
- drasys.or.graph.DuplicateEdgeException
- drasys.or.graph.VertexNotFoundException
 
getNewEdgeKey
protected Object getNewEdgeKey()
- 
- Overrides:
- getNewEdgeKeyin class- DRAGraphWithEditIAsGraph
 
- 
- Returns:
- a key for a newly added edge
 
getNewNodeKey
protected Object getNewNodeKey()
- 
- Overrides:
- getNewNodeKeyin class- DRAGraphWithAddVertexIAsGraph
 
- 
- Returns:
- a key for a newly added node