Graph::Matrix - create and manipulate a V x V matrix of graph G
Contents
Description
ThismoduleismeantforinternalusebytheGraphmodule.ClassMethods
new($g)
Construct a new Matrix from the Graph $g.
ObjectMethods
get($u, $v)
Return the value at the edge from $u to $v.
set($u, $v, $val)
Set the edge from $u to $v to value $val.
stringify
Returns a string roughly representing the matrix, with the $u down the left-hand side, and $v across
the top.
License
This module is licensed under the same terms as Perl itself.
perl v5.40.1 2025-03-28 Graph::Matrix(3pm)
Name
Graph::Matrix - create and manipulate a V x V matrix of graph G
Synopsis
use Graph::Matrix;
use Graph::Directed;
my $g = Graph::Directed->new;
$g->add_...(); # build $g
my $m = Graph::Matrix->new($g);
$m->get($u, $v)
$s->get($u, $v, $val)
