giden.GRDS
Class Edge

java.lang.Object
  |
  +--giden.GRDS.Index
        |
        +--giden.GRDS.Edge
All Implemented Interfaces:
java.io.Serializable

public class Edge
extends Index

Copyright (c) 1993-2004 C. R. Coullard, D. S. Dilworth, J. H. Owen, All Rights Reserved.
We make no representations or warranties about the suitability of the software, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. We shall not be liable for any damages suffered by user as a result of using, modifying or distributing this software or its derivatives.

Edge is a class that is tightly coupled to the Graph class and provides methods for interacting with edge objects. An edge has a source and target node, and the unique edge index. The index is an integer that is assigned to the edge when it is created. Methods are provided to access the source and target nodes and the index. Note the index is accessed through the Index base class using the GetIndex method. Although edges are created from the Graph class their source and target nodes and indexes are accessed through the edge methods.

Copyright (c) 1993-2003 C. R. Coullard, D. S. Dilworth, J. H. Owen, All Rights Reserved.

Version:
4.0a 2004 08 27
Author:
D. S. Dilworth
See Also:
EdgeArray, Index, Network, Node, Graph, Serialized Form

Method Summary
 Node GetOpposite(Node node)
          Gets the Node incident to this Edge that is not the given Node
 Node GetSource()
          Gets the source node of this Edge
 Node GetTarget()
          Gets the target node of this Edge
 boolean IsMember(Graph graph)
          internal method
 boolean IsSource(Node node)
          Tests if the given node is the source Node of this Edge
 boolean IsTarget(Node node)
          Tests if the given node is the target Node of this Edge
 
Methods inherited from class giden.GRDS.Index
GetIndex
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

IsMember

public boolean IsMember(Graph graph)
internal method

GetSource

public Node GetSource()
Gets the source node of this Edge
Returns:
The source Node of this Edge

GetTarget

public Node GetTarget()
Gets the target node of this Edge
Returns:
The target Node of this Edge

GetOpposite

public Node GetOpposite(Node node)
Gets the Node incident to this Edge that is not the given Node
Returns:
The Node incident to this Edge that is not the given Node

IsSource

public boolean IsSource(Node node)
Tests if the given node is the source Node of this Edge
Returns:
True if the given Node is the source Node of this Edge

IsTarget

public boolean IsTarget(Node node)
Tests if the given node is the target Node of this Edge
Returns:
True if the given Node is the target Node of this Edge