revert(model): Path.concatenate

This commit is contained in:
Paul Alnet 2024-05-25 14:47:56 +02:00
parent 8f7639cea4
commit d0e970b2ab

View file

@ -115,7 +115,7 @@ public class Path {
* map do not match, or the end of a path is not the beginning of the
* next).
*/
public static Path concatenate(int indice, Path... paths) throws IllegalArgumentException {
public static Path concatenate(Path... paths) throws IllegalArgumentException {
if (paths.length == 0) {
throw new IllegalArgumentException("Cannot concatenate an empty list of paths.");
}
@ -128,7 +128,7 @@ public class Path {
}
ArrayList<Arc> arcs = new ArrayList<>();
for (Path path: paths) {
arcs.addAll(indice, path.getArcs());
arcs.addAll(path.getArcs());
}
Path path = new Path(paths[0].getGraph(), arcs);
if (!path.isValid()) {