MAN page from Mandrake Other perl-graph-modules-1.001-1.i386.rpm
Graph::Edge
Section: User Contributed Perl Documentation (3)
Updated: perl 5.004, patch 04
Index NAME
Graph::Edge - object class for an edge in a directed graph
SYNOPSIS
use Graph::Node; use Graph::Edge; $parent = new Graph::Node('LABEL' => 'Parent Node'); $child = new Graph::Node('LABEL' => 'Child Node'); $edge = new Graph::Edge('FROM' => $parent, 'TO' => $child); $parent->save('simple.daVinci', 'daVinci'); DESCRIPTION
The
Graph::Edge is a class implementing an edge, or arc,in a directed graph.A graph is constructed using Node and Edge objects, with nodes beingdefined with the Graph::Node class.
An Edge takes four standard attributes: ID, LABEL, FROM,and TO. In addition, you may also define any number of customattributes.Attributes are manipulated using the setAttribute,getAttribute methods, which are defined in the base class, Graph::Element.
CONSTRUCTOR
$edge = new Graph::Edge( . . . );
This creates a new instance of the Graph::Edge object class,used in conjunction with the Graph::Node class to constructdirected graphs.
You must specify the FROM and TO attributes of an edgewhen creating it:
$edge = new Graph::Edge('FROM' => $parent, 'TO' => $child, 'ID' => 'identifier' );where the
$parent and
$child are Graph::Node objects.The
ID attribute is optional, and must be a unique stringidentifying the edge.If you do not specify the
ID attribute, the edge will be assigneda unique identifier automatically.
SEE ALSO
- Graph::Node
- for a description of the Node class.
- Graph::Element
- for a description of the base class, including the attribute methods.
AUTHOR
Neil Bowers <neilbAATTcre.canon.co.uk>
COPYRIGHT
Copyright (c) 1997 Canon Research Centre Europe. All rights reserved.This module is free software; you can redistribute it and/or modifyit under the same terms as Perl itself.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- SEE ALSO
- AUTHOR
- COPYRIGHT
This document was created byman2html,using the manual pages.