Graph::SomeUtils - Some utility functions for Graph objects
use Graph::SomeUtils ':all';
graph_delete_vertices_fast($g, 'a', 'b', 'c');
my @pred = graph_all_predecessors_and_self($g, $v);
my @succ = graph_all_successors_and_self($g, $v);
my @between = graph_vertices_between($g, $source, $dest);
Some helper functions for working with Graph objects.
The delete_vertex method of the Graph module v0.96 is very slow. This function is an order-of-magnitude faster alternative. It accesses internals of the Graph module and might break under newer versions of the module.
Same as graph_delete_vertex_fast for multiple vertices.
Returns the intersection of vertices that are reachable from $source and vertices from which $destination is reachable, including the $source and $destination vertices themself.
Returns the union of $g-all_successors($v)> and $v in an arbitrary order.
Returns the union of $g-all_predecessors($v)> and $v in an arbitrary order.
Shorthand for getting the vertex attribute label.
Shorthand for setting the vertex attribute label.
Removes edges coming in and going out of $v.
Deletes vertices except @vertices.
Removes all vertices that are neither $start or $final nor on a path between them.
None by default, each of the functions by request. Use :all to import them all at once.
Copyright (c) 2014 Bjoern Hoehrmann <firstname.lastname@example.org>.
This module is licensed under the same terms as Perl itself.
To install Graph::SomeUtils, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.