On Fri May 28 16:17:18 2010, SHLOMIF wrote:
I'm hoping you've had time to look at this, because I have a much more
complex one which is missing an edge. (B->D seems missing.)
This example is a real example, other than changing the names. Lengths
are kept the same, because if I change the names to one-letter names, then
it works.
I'd try to take a look myself, but G::E's code isn't nearly as easy as its API :-
)
#!/usr/bin/perl
use Graph::Easy;
my $g = Graph::Easy->new();
my $st=Graph::Easy::Node->new('ZZZZZZ START');
my $end=Graph::Easy::Node->new('ZZZZZZ END');
my $A = Graph::Easy::Node->new('AAAAAAAAAAA');
my $B = Graph::Easy::Node->new('BBBBBB');
my $C = Graph::Easy::Node->new('CCCCCCCCCCCCCCCCCCC');
my $D = Graph::Easy::Node->new('DDDDDDDDDDDD');
my $E = Graph::Easy::Node->new('EEEEEEEEEEEEEEEE');
my $F = Graph::Easy::Node->new('FFFFFFFFFFFFFFFFFFFFFFFF');
my $G = Graph::Easy::Node->new('GGGGGGGGGGGGGGGGGGGGGGGG');
my $H = Graph::Easy::Node->new('HHHHHHHHHHHHHH');
my $I = Graph::Easy::Node->new('IIIIIIIIIIIIIIIII');
my $J = Graph::Easy::Node->new('JJJJJ');
my $K = Graph::Easy::Node->new('KKKKKKK');
$g->add_edge($E, $F);
$g->add_edge($A, $F);
$g->add_edge($B, $F);
$g->add_edge($H, $J);
$g->add_edge($I, $J);
$g->add_edge($A, $G);
$g->add_edge($B, $G);
$g->add_edge($A, $D);
$g->add_edge($B, $D);
$g->add_edge($A, $E);
$g->add_edge($C, $E);
$g->add_edge($D, $E);
$g->add_edge($B, $E);
$g->add_edge($F, $H);
$g->add_edge($A, $H);
$g->add_edge($G, $H);
$g->add_edge($D, $H);
$g->add_edge($B, $H);
$g->add_edge($st, $A);
$g->add_edge($H, $K);
$g->add_edge($J, $K);
$g->add_edge($st, $C);
$g->add_edge($H, $I);
$g->add_edge($st, $B);
$g->add_edge(K,$end);
binmode STDOUT, ':utf8';
print $g->as_boxart_file();