compare path by weight, cost and path length
| 495 | |
| 496 | // compare path by weight, cost and path length |
| 497 | static int path_cmp |
| 498 | ( |
| 499 | const void *a, |
| 500 | const void *b, |
| 501 | void *udata |
| 502 | ) { |
| 503 | WeightedPath *da = (WeightedPath *)a; |
| 504 | WeightedPath *db = (WeightedPath *)b; |
| 505 | if(da->weight == db->weight) { |
| 506 | if(da->cost == db->cost) { |
| 507 | return Path_Len(da->path) - Path_Len(db->path); |
| 508 | } |
| 509 | return da->cost - db->cost; |
| 510 | } |
| 511 | return da->weight - db->weight; |
| 512 | } |
| 513 | |
| 514 | // get all minimal paths (all paths with the same weight) |
| 515 | static void SSpaths_all_minimal |
nothing calls this directly
no test coverage detected