net.sourceforge.combean.adapters.drasys.graph
Class DRAGraphAsGraph

Package class diagram package DRAGraphAsGraph
java.lang.Object
  extended by net.sourceforge.combean.adapters.drasys.graph.DRAGraphAsGraph
All Implemented Interfaces:
Graph, DirectedEdgeNeighborhoodGraphProp, GlobalEdgesGraphProp, GlobalNodesGraphProp, IncomingEdgeNeighborhoodGraphProp, NeighborhoodGraphProp, OutgoingEdgeNeighborhoodGraphProp
Direct Known Subclasses:
DRAGraphWithAddVertexIAsGraph

public class DRAGraphAsGraph
extends Object
implements Graph, DirectedEdgeNeighborhoodGraphProp, GlobalEdgesGraphProp, GlobalNodesGraphProp


Constructor Summary
DRAGraphAsGraph()
           
DRAGraphAsGraph(drasys.or.graph.GraphI draGraph)
           
 
Method Summary
protected  Edge convertToEdge(drasys.or.graph.EdgeI draEdge)
           
protected  Node convertToNode(drasys.or.graph.VertexI draVertex)
           
 EdgeIterator getAllEdgesIterator()
           
 NodeIterator getAllNodesIterator()
          Return an iterator for all nodes in the graph
 drasys.or.graph.GraphI getDraGraph()
           
 Class getEdgeClass()
           
 Object getEdgeValue(Edge e)
           
 Node getFirstNode(Edge e)
          Return the first node of an edge.
 EdgeIterator getIncidentEdges(Node v)
          Return an iterator for the local neighborhood of v
 EdgeIterator getIncomingEdges(Node v)
          Get all incoming edges of a given node
 Class getNodeClass()
           
 int getNumEdges()
           
 int getNumNodes()
          Return number of nodes in the graph.
 Node getOtherNode(Edge e, Node v)
          Given an edge and an incident node, return the other node of the edge
 EdgeIterator getOutgoingEdges(Node v)
          Get all outgoing edges of a given node
 Node getSecondNode(Edge e)
          Return the second node of an edge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DRAGraphAsGraph

public DRAGraphAsGraph()

DRAGraphAsGraph

public DRAGraphAsGraph(drasys.or.graph.GraphI draGraph)
Method Detail

getNodeClass

public Class getNodeClass()
Specified by:
getNodeClass in interface Graph

getEdgeClass

public Class getEdgeClass()
Specified by:
getEdgeClass in interface Graph

getAllEdgesIterator

public final EdgeIterator getAllEdgesIterator()
Specified by:
getAllEdgesIterator in interface GlobalEdgesGraphProp
Returns:
an iterator through all edges in the graph

getNumEdges

public final int getNumEdges()
Specified by:
getNumEdges in interface GlobalEdgesGraphProp
Returns:
the number of all edges in the graph

getAllNodesIterator

public final NodeIterator getAllNodesIterator()
Description copied from interface: GlobalNodesGraphProp
Return an iterator for all nodes in the graph

Specified by:
getAllNodesIterator in interface GlobalNodesGraphProp
Returns:
iterator through all nodes

getNumNodes

public final int getNumNodes()
Description copied from interface: GlobalNodesGraphProp
Return number of nodes in the graph.

Specified by:
getNumNodes in interface GlobalNodesGraphProp
Returns:
number of nodes

getOutgoingEdges

public final EdgeIterator getOutgoingEdges(Node v)
Description copied from interface: OutgoingEdgeNeighborhoodGraphProp
Get all outgoing edges of a given node

Specified by:
getOutgoingEdges in interface OutgoingEdgeNeighborhoodGraphProp
Returns:
the incoming edges of v

getIncomingEdges

public final EdgeIterator getIncomingEdges(Node v)
Description copied from interface: IncomingEdgeNeighborhoodGraphProp
Get all incoming edges of a given node

Specified by:
getIncomingEdges in interface IncomingEdgeNeighborhoodGraphProp
Returns:
the incoming edges of v

getFirstNode

public final Node getFirstNode(Edge e)
Description copied from interface: NeighborhoodGraphProp
Return the first node of an edge. For directed graphs this is the source of the edge. For undirected graphs the ordering of the nodes of an edge is arbitrary.

Specified by:
getFirstNode in interface NeighborhoodGraphProp
Parameters:
e - the edge
Returns:
the first node of the given edge

getIncidentEdges

public final EdgeIterator getIncidentEdges(Node v)
Description copied from interface: NeighborhoodGraphProp
Return an iterator for the local neighborhood of v

Specified by:
getIncidentEdges in interface NeighborhoodGraphProp
Parameters:
v - the node for which the neighborhood shall be given.
Returns:
an iterator through the neighborhood

getOtherNode

public final Node getOtherNode(Edge e,
                               Node v)
Description copied from interface: NeighborhoodGraphProp
Given an edge and an incident node, return the other node of the edge

Specified by:
getOtherNode in interface NeighborhoodGraphProp
Parameters:
e - the given edge
v - the give node
Returns:
the other incident node of e

getSecondNode

public final Node getSecondNode(Edge e)
Description copied from interface: NeighborhoodGraphProp
Return the second node of an edge. For directed graphs this is the target of the edge. For undirected graphs the ordering of the nodes of an edge is arbitrary.

Specified by:
getSecondNode in interface NeighborhoodGraphProp
Parameters:
e - the edge
Returns:
the second node of the given edge

getDraGraph

public final drasys.or.graph.GraphI getDraGraph()
Returns:
Returns the draGraph.

getEdgeValue

public final Object getEdgeValue(Edge e)

convertToNode

protected Node convertToNode(drasys.or.graph.VertexI draVertex)

convertToEdge

protected Edge convertToEdge(drasys.or.graph.EdgeI draEdge)