->${ \$methmap->{is_connected} });
is( $g0->${ \$methmap->{connected_components} }(), 1);
isnt($g0->${ \$methmap->{connected_component_by_vertex} }('a'), undef);
is( "@{[ $g0->${ \$methmap
$g0->${ \$methmap->{connected_components} }(), 2);
isnt($g0->${ \$methmap->{connected_component_by_vertex} }($_), undef) for qw(a b);
isnt($g0->${ \$methmap->{connected_component_by_vertex} }(
ndex} }(1) ], (1..3);
is( @$_, 1 ) for @c1;
is( "@{$c1[0]}", "@{$c1[$_]}" ) for 1, 2;
isnt( "@{$c0[0]}", "@{$c1[0]}" );
ok( ("@{$c0[0]}" eq "a" && "@{$c1[0]}" eq "b") ||
("@{$c0[0]}"
explain $got;
if ($args->[0] == _REF) {
my $m2 = Graph::_deep_copy_best($m);
$m2->reindex;
isnt( $m2->${ \$map->{has} }($m2->[ _i ][0]), undef, $label );
}
is $m->_set_path_attr(@$path_
el;
ok $m->_del_path_attrs(@$path_maybe_id), $label;
ok( $m->has_any_paths, $label );
isnt( $m->${ \$map->{has} }(@$path_maybe_id), undef, $label );
$m->${ \$map->{set} }(@$path_maybe_
econd time
is( $m->_get_path_count($path), $maybe_count, $label );
my @ids = $m->ids;
isnt 0+@ids, 0, $label;
ok( $m->${ \$map->{del} }(@$path_maybe_id), $label ) for 1..$maybe_count;
is($h, $g);
ok($g->eq($h));
ok($h->eq($g));
isnt($i, "b-c,c-e,e-f,a,d");
isnt("b-c,c-e,e-f,a,d", $i);
ok($i->ne("b-c,c-e,e-f,a,d"));
isnt($g, $i);
isnt($i, $g);
ok($g->ne($i));
ok($i->ne($g));
eq 'openbsd' && $] < 5.020;
is ($g4a, $g4b);
is ($g4c, $g4d);
}
isnt($g4a, $g4c);
isnt($g4a, $g4d);
isnt($g4a, $g4e);
isnt($g4c, $g4e);
my $g5 = Graph->random_graph(vertices => 10,
edg
use strict; use warnings;
use Test::More tests => 2;
use Graph;
isnt($SIG{__DIE__}, \&Graph::__carp_confess, '$SIG{__DIE__}' );
isnt($SIG{__WARN__}, \&Graph::__carp_confess, '$SIG{__WARN__}');
"@{$c1[0]}", "@{$c1[$_]}" ) for 1..4;
is( "@{$c2[0]}", "@{$c2[$_]}" ) for 1..4;
isnt( "@{$c0[0]}", "@{$c1[0]}" );
isnt( "@{$c0[0]}", "@{$c2[0]}" );
is( $g3->biconnected_component_by_index(5), undef
$g->delete_vertex('a') );
gen_changed( $g->[1] );
ok( $g->delete_vertex('b') );
gen_changed( $g->[1] ); # delete vertex
my $gen_old;
sub gen_changed {
isnt $_[0], $gen_old;
$gen_old = $_[0],;
}
ongly_connected_component_by_vertex('0'),
$g4->strongly_connected_component_by_vertex('2'));
isnt($g4->strongly_connected_component_by_vertex('0'),
$g4->strongly_connected_component_by_verte