Graph
view release on metacpan or search on metacpan
resulting vertex 'weight' attributes.
- Add tests to t/70_spt.t for the vertex and edge attributes
of the SPT_Dijkstra() and SPT_Bellman_Ford() results.
- Minor documentation tweaks, most importantly clarify the
return value of the SPT_Dijkstra() and SPT_Bellman_Ford().
- Document that Perl 5.6.0 is the minimum (because of weak references)
and also make Graph.pm require that (Makefile.PL was already doing
the probing using Scalar::Util qw(weaken)).
- Add an early test (02_trap.t) for catching the development-time-only
setting of __DIE__ and __WARN__ handlers (as a result of this almost
all the numbered tests were renumbered, so the diff is falsely
gigantic). (If the handlers were mistakenly left turned on,
a lot of later tests that checked the $@ got confusing failures.)
0.67 2005-08-03 Jarkko Hietaniemi <jhi@iki.fi>
(noticed by Kurt Jaeger).
- A mysterious failure fixed by a mysterious fix: under some
circumstances it seems that an each() doesn't walk through
all the key-value pairs, the workaround is to reset the
each() iterator by a keys() call. Not simple test code,
sadly, since the existing test code (see the case) is 13 kB
and non-trivial.
[rt.cpan.org #9461]
- Add a safety guard against a missing Scalar::Util::weaken
[rt.cpan.org #9481]
0.51 2005-01-09 Jarkko Hietaniemi <jhi@iki.fi>
- Allow calling Makefile.PL with arguments other than --renum
(which is for internal use only, and therefore undocumented).
[rt.cpan.org #9481]
- Remove the add_graph() and delete_graph() interfaces, sorry
if you were already using them, but the current interface was
Makefile.PL view on Meta::CPAN
recommends => {
'App::Prove' => '3.00', # prove -j4
},
},
},
})
),
);
# Some Debian distributions have a broken List::Util (see rt.cpan.org #9568)
eval 'require Scalar::Util; import Scalar::Util qw(weaken)';
if ($@) {
die <<__EOF__;
$@
You do not have Scalar::Util::weaken, cannot continue, aborting.
__EOF__
}
lib/Graph/TransitiveClosure/Matrix.pm view on Meta::CPAN
package Graph::TransitiveClosure::Matrix;
use strict;
use warnings;
use Graph::AdjacencyMatrix;
use Graph::Matrix;
use Scalar::Util qw(weaken);
use List::Util qw(min);
sub _A() { 0 } # adjacency
sub _D() { 1 } # distance
sub _S() { 2 } # successors
sub _V() { 3 } # vertices
sub _G() { 4 } # the original graph (OG)
sub _new {
my ($g, $class, $am_opt, $want_transitive, $want_reflexive, $want_path, $want_path_vertices, $want_path_count) = @_;
lib/Graph/TransitiveClosure/Matrix.pm view on Meta::CPAN
if $want_path_vertices;
}
}
}
}
return 1 if $want_transitive;
my %V; @V{ @V } = @V;
$am->[0] = \@ai;
$dm->[0] = \@di if defined $dm;
$sm->[0] = \@si if defined $sm;
weaken(my $og = $g);
bless [ $am, $dm, $sm, \%V, $og ], $class;
}
sub new {
my ($class, $g, %opt) = @_;
my %am_opt = (distance_matrix => 1);
$am_opt{attribute_name} = delete $opt{attribute_name}
if exists $opt{attribute_name};
$am_opt{distance_matrix} = delete $opt{distance_matrix}
if $opt{distance_matrix};
( run in 0.832 second using v1.01-cache-2.11-cpan-65fba6d93b7 )