Subject: | Does not handle Vertices of "0" |
Date: | Fri, 28 Feb 2014 23:40:30 +0000 |
To: | "bug-Paths-Graph [...] rt.cpan.org" <bug-Paths-Graph [...] rt.cpan.org> |
From: | "Fedyk, Don" <don.fedyk [...] hp.com> |
Hi
I was using paths::graph on the following array to do an all pairs shortest path. The values of cost from any node (vertices) to node 0 are wrong (off by one). (but node 0 to any node are right.)
Graph array dump. Then shortest paths output follows.
$VAR1 = {
'11' => {
'18' => 1,
'9' => 1,
'10' => 1,
'5' => 1
},
'21' => {
'22' => 1,
'23' => 1,
'12' => 1
},
'7' => {
'8' => 1,
'6' => 1,
'10' => 1
},
'17' => {
'10' => 1,
'23' => 1,
'16' => 1,
'15' => 1
},
'2' => {
'8' => 1,
'1' => 1,
'0' => 1
},
'22' => {
'21' => 1,
'23' => 1,
'19' => 1
},
'1' => {
'4' => 1,
'18' => 1,
'0' => 1,
'2' => 1
},
'18' => {
'11' => 1,
'1' => 1,
'19' => 1,
'20' => 1,
'15' => 1
},
'0' => {
'1' => 1,
'9' => 1,
'2' => 1
},
'23' => {
'22' => 1,
'21' => 1,
'17' => 1
},
'16' => {
'13' => 1,
'17' => 1,
'15' => 1
},
'13' => {
'9' => 1,
'16' => 1,
'12' => 1,
'14' => 1
},
'6' => {
'8' => 1,
'3' => 1,
'7' => 1
},
'3' => {
'6' => 1,
'4' => 1,
'5' => 1
},
'9' => {
'11' => 1,
'0' => 1,
'13' => 1,
'10' => 1
},
'12' => {
'21' => 1,
'13' => 1,
'14' => 1
},
'20' => {
'18' => 1,
'19' => 1,
'14' => 1
},
'14' => {
'13' => 1,
'12' => 1,
'20' => 1
},
'15' => {
'18' => 1,
'16' => 1,
'17' => 1
},
'8' => {
'6' => 1,
'7' => 1,
'2' => 1
},
'4' => {
'1' => 1,
'3' => 1,
'5' => 1
},
'19' => {
'22' => 1,
'18' => 1,
'20' => 1
},
'10' => {
'11' => 1,
'7' => 1,
'9' => 1,
'17' => 1
},
'5' => {
'11' => 1,
'4' => 1,
'3' => 1
}
};
Shortest Path:0->1 Cost:1
Shortest Path:0->2 Cost:1
Shortest Path:0->1->4->3 Cost:3
Shortest Path:0->1->4 Cost:2
Shortest Path:0->1->4->5 Cost:3
Shortest Path:0->9->11->5 Cost:3
Shortest Path:0->2->8->6 Cost:3
Shortest Path:0->9->10->7 Cost:3
Shortest Path:0->2->8->7 Cost:3
Shortest Path:0->2->8 Cost:2
Shortest Path:0->9 Cost:1
Shortest Path:0->9->10 Cost:2
Shortest Path:0->9->11 Cost:2
Shortest Path:0->9->13->12 Cost:3
Shortest Path:0->9->13 Cost:2
Shortest Path:0->9->13->14 Cost:3
Shortest Path:0->1->18->15 Cost:3
Shortest Path:0->9->13->16 Cost:3
Shortest Path:0->9->10->17 Cost:3
Shortest Path:0->1->18 Cost:2
Shortest Path:0->1->18->19 Cost:3
Shortest Path:0->1->18->20 Cost:3
Shortest Path:0->9->13->12->21 Cost:4
Shortest Path:0->1->18->19->22 Cost:4
Shortest Path:0->9->10->17->23 Cost:4
Shortest Path:1->2->0 Cost:1
Shortest Path:1->2 Cost:1
Shortest Path:1->4->3 Cost:2
Shortest Path:1->4 Cost:1
Shortest Path:1->4->5 Cost:2
Shortest Path:1->4->3->6 Cost:3
Shortest Path:1->2->8->6 Cost:3
Shortest Path:1->2->8->7 Cost:3
Shortest Path:1->2->8 Cost:2
Shortest Path:1->18->11->9 Cost:3
Shortest Path:1->18->11->10 Cost:3
Shortest Path:1->18->11 Cost:2
Shortest Path:1->18->20->14->12 Cost:4
Shortest Path:1->18->11->9->13 Cost:4
Shortest Path:1->18->20->14->13 Cost:4
Shortest Path:1->18->15->16->13 Cost:4
Shortest Path:1->18->20->14 Cost:3
Shortest Path:1->18->15 Cost:2
Shortest Path:1->18->15->16 Cost:3
Shortest Path:1->18->15->17 Cost:3
Shortest Path:1->18 Cost:1
Shortest Path:1->18->19 Cost:2
Shortest Path:1->18->20 Cost:2
Shortest Path:1->18->19->22->21 Cost:4
Shortest Path:1->18->19->22 Cost:3
Shortest Path:1->18->19->22->23 Cost:4
Shortest Path:1->18->15->17->23 Cost:4
Shortest Path:2->0 Cost:0
Shortest Path:2->1 Cost:1
Shortest Path:2->8->6->3 Cost:3
Shortest Path:2->1->4->3 Cost:3
Shortest Path:2->1->4 Cost:2
Shortest Path:2->1->4->5 Cost:3
Shortest Path:2->8->6 Cost:2
Shortest Path:2->8->7 Cost:2
Shortest Path:2->8 Cost:1
Shortest Path:2->8->7->10->9 Cost:4
Shortest Path:2->1->18->11->9 Cost:4
Shortest Path:2->8->7->10 Cost:3
Shortest Path:2->1->18->11 Cost:3
Shortest Path:2->1->18->20->14->12 Cost:5
Shortest Path:2->8->7->10->9->13 Cost:5
Shortest Path:2->1->18->11->9->13 Cost:5
Shortest Path:2->1->18->20->14->13 Cost:5
Shortest Path:2->1->18->15->16->13 Cost:5
Shortest Path:2->1->18->20->14 Cost:4
Shortest Path:2->1->18->15 Cost:3
Shortest Path:2->1->18->15->16 Cost:4
Shortest Path:2->8->7->10->17 Cost:4
Shortest Path:2->1->18->15->17 Cost:4
Shortest Path:2->1->18 Cost:2
Shortest Path:2->1->18->19 Cost:3
Shortest Path:2->1->18->20 Cost:3
Shortest Path:2->1->18->19->22->21 Cost:5
Shortest Path:2->1->18->19->22 Cost:4
Shortest Path:2->8->7->10->17->23 Cost:5
Shortest Path:2->1->18->19->22->23 Cost:5
Shortest Path:2->1->18->15->17->23 Cost:5
Shortest Path:3->4->1->0 Cost:2
Shortest Path:3->4->1 Cost:2
Shortest Path:3->6->8->2 Cost:3
Shortest Path:3->4->1->2 Cost:3
Shortest Path:3->4 Cost:1
Shortest Path:3->5 Cost:1
Shortest Path:3->6 Cost:1
Shortest Path:3->6->7 Cost:2
Shortest Path:3->6->8 Cost:2
Shortest Path:3->5->11->9 Cost:3
Shortest Path:3->6->7->10 Cost:3
Shortest Path:3->5->11->10 Cost:3
Shortest Path:3->5->11 Cost:2
Shortest Path:3->5->11->9->13->12 Cost:5
Shortest Path:3->5->11->9->13 Cost:4
Shortest Path:3->4->1->18->20->14 Cost:5
Shortest Path:3->5->11->18->20->14 Cost:5
Shortest Path:3->5->11->9->13->14 Cost:5
Shortest Path:3->4->1->18->15 Cost:4
Shortest Path:3->5->11->18->15 Cost:4
Shortest Path:3->6->7->10->17->16 Cost:5
Shortest Path:3->4->1->18->15->16 Cost:5
Shortest Path:3->5->11->18->15->16 Cost:5
Shortest Path:3->5->11->9->13->16 Cost:5
Shortest Path:3->5->11->10->17->16 Cost:5
Shortest Path:3->6->7->10->17 Cost:4
Shortest Path:3->5->11->10->17 Cost:4
Shortest Path:3->4->1->18 Cost:3
Shortest Path:3->5->11->18 Cost:3
Shortest Path:3->4->1->18->19 Cost:4
Shortest Path:3->5->11->18->19 Cost:4
Shortest Path:3->4->1->18->20 Cost:4
Shortest Path:3->5->11->18->20 Cost:4
Shortest Path:3->6->7->10->17->23->21 Cost:6
Shortest Path:3->4->1->18->19->22->21 Cost:6
Shortest Path:3->5->11->18->19->22->21 Cost:6
Shortest Path:3->5->11->9->13->12->21 Cost:6
Shortest Path:3->5->11->10->17->23->21 Cost:6
Shortest Path:3->4->1->18->19->22 Cost:5
Shortest Path:3->5->11->18->19->22 Cost:5
Shortest Path:3->6->7->10->17->23 Cost:5
Shortest Path:3->5->11->10->17->23 Cost:5
Shortest Path:4->1->0 Cost:1
Shortest Path:4->1 Cost:1
Shortest Path:4->1->2 Cost:2
Shortest Path:4->3 Cost:1
Shortest Path:4->5 Cost:1
Shortest Path:4->3->6 Cost:2
Shortest Path:4->3->6->7 Cost:3
Shortest Path:4->1->2->8 Cost:3
Shortest Path:4->3->6->8 Cost:3
Shortest Path:4->5->11->9 Cost:3
Shortest Path:4->5->11->10 Cost:3
Shortest Path:4->5->11 Cost:2
Shortest Path:4->1->18->20->14->12 Cost:5
Shortest Path:4->5->11->9->13->12 Cost:5
Shortest Path:4->5->11->9->13 Cost:4
Shortest Path:4->1->18->20->14 Cost:4
Shortest Path:4->1->18->15 Cost:3
Shortest Path:4->1->18->15->16 Cost:4
Shortest Path:4->1->18->15->17 Cost:4
Shortest Path:4->5->11->10->17 Cost:4
Shortest Path:4->1->18 Cost:2
Shortest Path:4->1->18->19 Cost:3
Shortest Path:4->1->18->20 Cost:3
Shortest Path:4->1->18->19->22->21 Cost:5
Shortest Path:4->1->18->19->22 Cost:4
Shortest Path:4->1->18->19->22->23 Cost:5
Shortest Path:4->1->18->15->17->23 Cost:5
Shortest Path:4->5->11->10->17->23 Cost:5
Shortest Path:5->11->9->0 Cost:2
Shortest Path:5->4->1->0 Cost:2
Shortest Path:5->4->1 Cost:2
Shortest Path:5->4->1->2 Cost:3
Shortest Path:5->3 Cost:1
Shortest Path:5->4 Cost:1
Shortest Path:5->3->6 Cost:2
Shortest Path:5->11->10->7 Cost:3
Shortest Path:5->3->6->7 Cost:3
Shortest Path:5->3->6->8 Cost:3
Shortest Path:5->11->9 Cost:2
Shortest Path:5->11->10 Cost:2
Shortest Path:5->11 Cost:1
Shortest Path:5->11->9->13->12 Cost:4
Shortest Path:5->11->9->13 Cost:3
Shortest Path:5->11->18->20->14 Cost:4
Shortest Path:5->11->9->13->14 Cost:4
Shortest Path:5->11->18->15 Cost:3
Shortest Path:5->11->18->15->16 Cost:4
Shortest Path:5->11->9->13->16 Cost:4
Shortest Path:5->11->10->17->16 Cost:4
Shortest Path:5->11->10->17 Cost:3
Shortest Path:5->11->18 Cost:2
Shortest Path:5->11->18->19 Cost:3
Shortest Path:5->11->18->20 Cost:3
Shortest Path:5->11->18->19->22->21 Cost:5
Shortest Path:5->11->9->13->12->21 Cost:5
Shortest Path:5->11->10->17->23->21 Cost:5
Shortest Path:5->11->18->19->22 Cost:4
Shortest Path:5->11->10->17->23 Cost:4
Shortest Path:6->8->2->0 Cost:2
Shortest Path:6->8->2->1 Cost:3
Shortest Path:6->3->4->1 Cost:3
Shortest Path:6->8->2 Cost:2
Shortest Path:6->3 Cost:1
Shortest Path:6->3->4 Cost:2
Shortest Path:6->3->5 Cost:2
Shortest Path:6->7 Cost:1
Shortest Path:6->8 Cost:1
Shortest Path:6->7->10->9 Cost:3
Shortest Path:6->7->10 Cost:2
Shortest Path:6->3->5->11 Cost:3
Shortest Path:6->7->10->11 Cost:3
Shortest Path:6->7->10->9->13->12 Cost:5
Shortest Path:6->7->10->9->13 Cost:4
Shortest Path:6->7->10->9->13->14 Cost:5
Shortest Path:6->7->10->17->15 Cost:4
Shortest Path:6->7->10->17->16 Cost:4
Shortest Path:6->7->10->17 Cost:3
Shortest Path:6->8->2->1->18 Cost:4
Shortest Path:6->3->4->1->18 Cost:4
Shortest Path:6->3->5->11->18 Cost:4
Shortest Path:6->7->10->11->18 Cost:4
Shortest Path:6->8->2->1->18->19 Cost:5
Shortest Path:6->3->4->1->18->19 Cost:5
Shortest Path:6->3->5->11->18->19 Cost:5
Shortest Path:6->7->10->11->18->19 Cost:5
Shortest Path:6->8->2->1->18->20 Cost:5
Shortest Path:6->3->4->1->18->20 Cost:5
Shortest Path:6->3->5->11->18->20 Cost:5
Shortest Path:6->7->10->11->18->20 Cost:5
Shortest Path:6->7->10->17->23->21 Cost:5
Shortest Path:6->7->10->17->23->22 Cost:5
Shortest Path:6->7->10->17->23 Cost:4
Shortest Path:7->8->2->0 Cost:2
Shortest Path:7->10->9->0 Cost:2
Shortest Path:7->8->2->1 Cost:3
Shortest Path:7->8->2 Cost:2
Shortest Path:7->6->3 Cost:2
Etc...
Don
Message body is not shown because it is too large.