compare path by weight, cost and path length
| 504 | |
| 505 | // compare path by weight, cost and path length |
| 506 | static int path_cmp |
| 507 | ( |
| 508 | const void *a, |
| 509 | const void *b, |
| 510 | void *udata |
| 511 | ) { |
| 512 | WeightedPath *da = (WeightedPath *)a; |
| 513 | WeightedPath *db = (WeightedPath *)b; |
| 514 | if(da->weight == db->weight) { |
| 515 | if(da->cost == db->cost) { |
| 516 | return Path_Len(da->path) - Path_Len(db->path); |
| 517 | } |
| 518 | return da->cost - db->cost; |
| 519 | } |
| 520 | return da->weight - db->weight; |
| 521 | } |
| 522 | |
| 523 | // get all minimal paths (all paths with the same weight) |
| 524 | static void SPpaths_all_minimal |
nothing calls this directly
no test coverage detected