From: Ian Jackson Date: Thu, 6 Feb 2014 01:19:31 +0000 (+0000) Subject: graphviz: annotate dropped weakest Schwartz set edges X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=appendix-a6.git;a=commitdiff_plain;h=fb329ed397f6f1a7c1ba50870f77b142e0d23446 graphviz: annotate dropped weakest Schwartz set edges --- diff --git a/compute b/compute index 58b3587..72e5259 100755 --- a/compute +++ b/compute @@ -339,12 +339,12 @@ foreach my $ix (0..$#ch) { our $schwartz; -for (;;) { +for (my $dropiter = 1; ; $dropiter++) { # loop from A6(5) print "defeats graph: $defeats\n"; - print "\nTransitive closure A.6(5)\n"; + print "\nTransitive closure A.6(5) (iteration $dropiter)\n"; my $tdefeats = $defeats->transitive_closure(); @@ -400,6 +400,11 @@ for (;;) { my ($ca,$cb) = @$weakest; print "a weakest defeat is $ca > $cb\n"; $defeats->delete_edge($ca,$cb); + my $label = $showg->get_edge_attribute($ca,$cb,'label'); + $label .= "\ndropped - weakest in iter.$dropiter"; + $showg->set_edge_attribute($ca,$cb,'label',$label); + $showg->set_edge_attribute($ca,$cb,'style','dotted'); + $showg->set_edge_attribute($ca,$cb,'graphviz',{constraint=>0}); } print "\nDefeats within the Schwartz set, go round again\n";