From Genome Analysis Wiki
Jump to navigationJump to search
2 bytes added
, 20:57, 19 February 2011
Line 373: |
Line 373: |
| | | |
| === Additional example of containing negative weights === | | === Additional example of containing negative weights === |
− | $ cat ./sampleInput2.txt | + | $ cat ./sampleInput2.txt |
| 0 3 8 NIL -4 | | 0 3 8 NIL -4 |
| NIL 0 NIL 1 7 | | NIL 0 NIL 1 7 |
Line 379: |
Line 379: |
| 2 NIL -5 0 NIL | | 2 NIL -5 0 NIL |
| NIL NIL NIL 6 0 | | NIL NIL NIL 6 0 |
− | | + | |
− | $ ./floydWarshall ./sampleInput2.txt | + | $ ./floydWarshall ./sampleInput2.txt |
| ---------- Initial D Matrix --------------------------------- | | ---------- Initial D Matrix --------------------------------- |
| 0 3 8 NIL -4 | | 0 3 8 NIL -4 |
Line 473: |
Line 473: |
| Optimal path for 2 <- 4 (d = 1) : 2 <-(-5)-- 3 <-(6)-- 4 | | Optimal path for 2 <- 4 (d = 1) : 2 <-(-5)-- 3 <-(6)-- 4 |
| Optimal path for 3 <- 4 (d = 6) : 3 <-(6)-- 4 | | Optimal path for 3 <- 4 (d = 6) : 3 <-(6)-- 4 |
− |
| |
| | | |
| === Source code from Homework 2 - Problem 3 === | | === Source code from Homework 2 - Problem 3 === |