Opus5
Interface Edge

All Superinterfaces:
Comparable
All Known Implementing Classes:
AbstractGraph.GraphEdge

public interface Edge
extends Comparable

Encapsulates methods common to all graph edges.

Version:
$Id: Edge.java,v 3.2 1998/07/28 01:50:22 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
Graph, Digraph

Field Summary
static java.lang.String copyright
           
 
Method Summary
 Vertex getMate(Vertex vertex)
          Returns the vertex at the end of this edge opposite to the specified vertex.
 Vertex getV0()
          Returns one of the two vertices that this edge joins.
 Vertex getV1()
          Returns one of the two vertices that this edge joins.
 java.lang.Object getWeight()
          Returns an object that represents the weight associated with this edge.
 boolean isDirected()
          Tests whether this edge is a directed edge.
 
Methods inherited from interface Opus5.Comparable
compare, isEQ, isGE, isGT, isLE, isLT, isNE
 

Field Detail

copyright

public static final java.lang.String copyright
Method Detail

getV0

public Vertex getV0()
Returns one of the two vertices that this edge joins. If this edge is a directed edge, this method returns the tail of the arc.
Returns:
One of the vertices that this edge joins.
See Also:
Vertex

getV1

public Vertex getV1()
Returns one of the two vertices that this edge joins. If this edge is a directed edge, this method returns the head of the arc.
Returns:
One of the vertices that this edge joins.
See Also:
Vertex

getWeight

public java.lang.Object getWeight()
Returns an object that represents the weight associated with this edge.
Returns:
The weight associated with this edge.

isDirected

public boolean isDirected()
Tests whether this edge is a directed edge. A directed edge is an edge in a directed graph.
Returns:
True if this edge is a directed edge; false otherwise.
See Also:
Graph, Digraph

getMate

public Vertex getMate(Vertex vertex)
Returns the vertex at the end of this edge opposite to the specified vertex. It is always the case that Mate(V0())==V1() and Mate(V1())==VO().
Parameters:
vertex - The specified vertex.
Returns:
The vertex opposite to the specified vertex.