Algorithm-Graphs-TransitiveClosure-Tiny
view release on metacpan or search on metacpan
t/01-floyd_warshall.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Storable qw(dclone);
use Algorithm::Graphs::TransitiveClosure::Tiny qw(floyd_warshall);
{
note "Taken from original but with integers as keys";
my $graph = {
0 => {0 => undef},
1 => {1 => undef, 2 => undef, 3 => undef},
2 => {1 => undef, 2 => undef},
3 => {0 => undef, 2 => undef, 3 => undef},
};
is(floyd_warshall($graph),
$graph, 'floyd_warshall($graph) returns $graph'
);
( run in 0.230 second using v1.01-cache-2.11-cpan-1c8d708658b )