mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-05 12:16:13 +02:00
ONOS-7490 Fixed NPE in Suurballe graph search.
Change-Id: Ib84e788988961e3802b8a09b8702df1f75380ae3
This commit is contained in:
parent
3516f0682b
commit
3702f9bdfd
@ -69,8 +69,10 @@ public class SuurballeGraphSearch<V extends Vertex, E extends Edge<V>> extends D
|
||||
public Weight weight(E edge) {
|
||||
return edge instanceof ReverseEdge ?
|
||||
weightf.getInitialWeight() :
|
||||
weightf.weight(edge).merge(firstDijkstra.cost(edge.src()))
|
||||
.subtract(firstDijkstra.cost(edge.dst()));
|
||||
(weightf.weight(edge).isNegative() ?
|
||||
new ScalarWeight(-1.0) :
|
||||
weightf.weight(edge).merge(firstDijkstra.cost(edge.src()))
|
||||
.subtract(firstDijkstra.cost(edge.dst())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user