Switch to static methods for creating paths from nodes.
This commit is contained in:
parent
26180b8d4d
commit
7640fa34c7
@ -7,7 +7,6 @@ import java.util.ArrayList;
|
|||||||
import org.insa.graph.Graph;
|
import org.insa.graph.Graph;
|
||||||
import org.insa.graph.Node;
|
import org.insa.graph.Node;
|
||||||
import org.insa.graph.Path;
|
import org.insa.graph.Path;
|
||||||
import org.insa.graph.Path.CreationMode;
|
|
||||||
|
|
||||||
public class BinaryPathReader extends BinaryReader implements PathReader {
|
public class BinaryPathReader extends BinaryReader implements PathReader {
|
||||||
|
|
||||||
@ -46,7 +45,7 @@ public class BinaryPathReader extends BinaryReader implements PathReader {
|
|||||||
nodes.add(readNode(graph));
|
nodes.add(readNode(graph));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Path(graph, nodes, CreationMode.SHORTEST_TIME);
|
return Path.createFastestPathFromNodes(graph, nodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user