(i, j int)
| 304 | } |
| 305 | |
| 306 | func (a nodeQueue) Less(i, j int) bool { |
| 307 | x, y := a[i], a[j] |
| 308 | // nodes are prioritized by number of incoming dependencies (1st key) |
| 309 | // and source order (2nd key) |
| 310 | if x.ndeps != y.ndeps { |
| 311 | return x.ndeps < y.ndeps |
| 312 | } |
| 313 | return x.obj.order() < y.obj.order() |
| 314 | } |
| 315 | |
| 316 | func (a *nodeQueue) Push(x interface{}) { |
| 317 | panic("unreachable") |