NAME

Graph::Edge - a base class for graph edges

SYNOPSIS

Not to be used directly.

DESCRIPTION

This class is not to be used directly because an edge always must belong to a graph. The graph classes will do this right. Some useful public methods exist, though.

RETRIEVING EDGES

$edge  = $graph->edge($v1, $v2);

Return an edge of the graph by its vertex names, or vertices. If the edge does not exist, undef is returned.

	@edges = $graph->edges($e1_v1, $e1_v2,
                               $e2_v1, $e2_v2,
                               ...,
                               $en_v1, $en_v2);

Return the list of n edges of the graph by their vertex names, or vertices. If an edge by its vertices does not exist, undef is returned for that edge. If no names are specified all the edges are returned, in pseudorandom order.

RETRIEVING EDGE VERTICES

$start_vertex = $edge->start;
$stop_vertex  = $edge->stop;

The start and stop vertices of the edge.

( $start_vertex, $stop_vertex ) = $edge->vertices;

Even in an undirected graph these will be in the order defined originally by add_edge method.

ADDING AND DELETING EDGES

See Graph.

SEE ALSO

Graph, Graph::Element.

VERSION

See Graph.

AUTHOR

Jarkko Hietaniemi <jhi@iki.fi>

COPYRIGHT

Copyright 1998, O'Reilly and Associates.

This code is distributed under the same copyright terms as Perl itself.