ca.cas.multigraph
Class AbEdge

java.lang.Object
  extended by ca.cas.multigraph.AbEdge

public class AbEdge
extends java.lang.Object

This is the basic Edge class in the AbGraph


Field Summary
static int CHROM
           
static int FINAL
           
static int INIT
           
 
Constructor Summary
AbEdge(int type, AbVertex source, AbVertex target)
          Creates a new AbEdge of type type and source and target vertices source and target.
 
Method Summary
 boolean contains(long location)
          Returns true if the location lies between the source and target location values.
 AbVertex getSource()
           
 AbVertex getTarget()
           
 int getType()
           
 boolean incidentOn(AbVertex vertex)
          Returns true if the edge is incident on vertex
 AbVertex partnerOf(java.lang.Object v)
          Returns the partner of v or null if this edge is not incident on v.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CHROM

public static final int CHROM
See Also:
Constant Field Values

INIT

public static final int INIT
See Also:
Constant Field Values

FINAL

public static final int FINAL
See Also:
Constant Field Values
Constructor Detail

AbEdge

public AbEdge(int type,
              AbVertex source,
              AbVertex target)
Creates a new AbEdge of type type and source and target vertices source and target.

Parameters:
type - edge type
source - source vertex
target - target vertex
Method Detail

getType

public int getType()
Returns:
edge type

getSource

public AbVertex getSource()
Returns:
source vertex

getTarget

public AbVertex getTarget()
Returns:
target vertex

partnerOf

public AbVertex partnerOf(java.lang.Object v)
Returns the partner of v or null if this edge is not incident on v.

Parameters:
v - vertex
Returns:
partner of v. Returns null if edge is not incident on v.

contains

public boolean contains(long location)
Returns true if the location lies between the source and target location values.

Parameters:
location -
Returns:
true if location lies between source and target locations.

incidentOn

public boolean incidentOn(AbVertex vertex)
Returns true if the edge is incident on vertex

Parameters:
vertex -
Returns:
true if edge is incident on vertex.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object