The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Meta::Ds::Dgraph - data structure that represents a graph.

COPYRIGHT

Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.

LICENSE

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.

DETAILS

        MANIFEST: Dgraph.pm
        PROJECT: meta
        VERSION: 0.13

SYNOPSIS

        package foo;
        use Meta::Ds::Dgraph qw();
        my($graph)=Meta::Ds::Dgraph->new();
        $graph->node_insert("mark",undef);
        $graph->node_insert("doron",undef);
        $graph->edge_insert("mark","doron",undef);

DESCRIPTION

This is a library to let you create a graph like data structure. The library gives services like the n'th node, n'th edge etc... The graphs are directional. The extra that this library gives you over the regular Graph.pm module is that this one can have extra information (whatever you want) on the nodes and edges of the graph.

FUNCTIONS

        new($)
        nodes($)
        node_size($)
        node_has($$)
        node_data($$)
        node_insert($$$)
        node_remove($$)
        edges($)
        edge_size($)
        edge_has($$$)
        edge_data($$$)
        edge_insert($$$$)
        edge_remove($$$)
        edge_ou($$)
        edge_ou_size($$)
        edge_in($$)
        edge_in_size($$)
        print($$)
        numb_cycl($$$)
        all_ou($$$$)
        TEST($)

FUNCTION DOCUMENTATION

new($)

Gives you a new Dgraph object.

nodes($)

Return the set of nodes in the graph.

node_size($)

return number of nodes in the graph.

node_has($$)

This will return whether the graph has this node or not.

node_data($$)

This method retrieves the data associated with the node.

node_insert($$$)

Insert a new node into the graph.

node_remove($$)

This removes a node with all edges attached

edges($)

Return the set of edges in the graph.

edge_size($)

Returns number of edges in the graph.

edge_has($$$)

This method returns whether there is already an edge in the graph with the nodes you request.

edge_data($$$)

This method retrieves the data object associated with the edge.

edge_insert($$$$)

Insert a new edge into the graph.

edge_remove($$$)

This removes an edge from the graph (both nodes remain in the graph).

edge_ou($$)

This gives you the set of all nodes this edge connects to.

edge_ou_size($$)

This gives you how many edges go out of a node.

edge_in($$)

This gives you the set of all nodes this edge connects from.

edge_in_size($$)

This gives you how many edges go in to a node.

print($$)

Print the current graph to a file. The input is the file to print to.

numb_cycl($$$)

This method returns the number of cycles in the graph and acts verbosly accoding to the flag given to it. This is also receives the name of the file to be verbose into...

all_ou($$$$)

This method will add the nodes which are outwardly connected (recursivly) to the hash given to it.

TEST($)

Test suite for this module.

SUPER CLASSES

None.

BUGS

None.

AUTHOR

        Name: Mark Veltzer
        Email: mailto:veltzer@cpan.org
        WWW: http://www.veltzer.org
        CPAN id: VELTZER

HISTORY

        0.00 MV Pdmt stuff
        0.01 MV perl packaging
        0.02 MV PDMT
        0.03 MV md5 project
        0.04 MV database
        0.05 MV perl module versions in files
        0.06 MV movies and small fixes
        0.07 MV more thumbnail stuff
        0.08 MV thumbnail user interface
        0.09 MV more thumbnail issues
        0.10 MV website construction
        0.11 MV web site automation
        0.12 MV SEE ALSO section fix
        0.13 MV md5 issues

SEE ALSO

Meta::Ds::Ohash(3), Meta::Ds::Oset(3), Meta::Error::Simple(3), Meta::Utils::Arg(3), Meta::Utils::Output(3), strict(3)

TODO

Nothing.