Meta::Graph::Directed - enhance Graph::Directed.
Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
MANIFEST: Directed.pm PROJECT: meta VERSION: 0.03
package foo; use Meta::Graph::Directed qw(); my($object)=Meta::Graph::Directed->new(); my($result)=$object->method();
This class is here to provide a place to add method to the Graph::Directed module available from CPAN. I know that Graph::Directed looks pretty nice but still if I need any convenience methods or maybe a small algorithm or two it will be nice to add them at the graph level.
vertices_num($) edges_num($) get_single_succ($$) nodes_delete_all($) TEST($)
This method returns the number of vertices in the graph. It's true that the method vertices in Graph returns this number if called in a scalar context but I hate having methods behave differently in different contexes.
This method returns the number of edges in the graph.
This method will retrieve the single successor node for a certain node (will make sure that it has only 1 of those).
This method will delete all vertices and edges from the graph.
Test suite for this module. Currently it just constructs a graph and prints some statistics.
Graph::Directed(3)
None.
Name: Mark Veltzer Email: mailto:veltzer@cpan.org WWW: http://www.veltzer.org CPAN id: VELTZER
0.00 MV web site automation 0.01 MV SEE ALSO section fix 0.02 MV teachers project 0.03 MV md5 issues
Error(3), Graph::Directed(3), Meta::Utils::Output(3), strict(3)
Nothing.
To install Meta::Init, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Meta::Init
CPAN shell
perl -MCPAN -e shell install Meta::Init
For more information on module installation, please visit the detailed CPAN module installation guide.