net.sourceforge.combean.interfaces.graph.prop
Interface NeighborhoodGraphProp

Package class diagram package NeighborhoodGraphProp
All Superinterfaces:
Graph
All Known Subinterfaces:
DirectedEdgeNeighborhoodGraphProp, IncomingEdgeNeighborhoodGraphProp, OutgoingEdgeNeighborhoodGraphProp
All Known Implementing Classes:
Clique, CompositeNumberGraph, DirectedCircle, DirectedPath, DRAGraphAsConstructableNumberedGraph, DRAGraphAsGraph, DRAGraphWithAddVertexIAsGraph, DRAGraphWithEditIAsGraph, IsolatedNodes, JGraphModelAsGraph, NumberGraph, Path, ResidualNetworkGraph, SimpleNumberGraph, TransposedGraph

public interface NeighborhoodGraphProp
extends Graph

Graph property for exploring the local neighborhood of a node in the graph.


Method Summary
 Node getFirstNode(Edge e)
          Return the first node of an edge.
 EdgeIterator getIncidentEdges(Node v)
          Return an iterator for the local neighborhood of v
 Node getOtherNode(Edge e, Node v)
          Given an edge and an incident node, return the other node of the edge
 Node getSecondNode(Edge e)
          Return the second node of an edge.
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.Graph
getEdgeClass, getNodeClass
 

Method Detail

getIncidentEdges

EdgeIterator getIncidentEdges(Node v)
Return an iterator for the local neighborhood of v

Parameters:
v - the node for which the neighborhood shall be given.
Returns:
an iterator through the neighborhood

getOtherNode

Node getOtherNode(Edge e,
                  Node v)
Given an edge and an incident node, return the other node of the edge

Parameters:
e - the given edge
v - the give node
Returns:
the other incident node of e

getFirstNode

Node getFirstNode(Edge e)
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.

Parameters:
e - the edge
Returns:
the first node of the given edge

getSecondNode

Node getSecondNode(Edge e)
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.

Parameters:
e - the edge
Returns:
the second node of the given edge