From 26a662bb1bfdfdda49d1fdca0667455fc1d43955 Mon Sep 17 00:00:00 2001 From: Paul ALNET Date: Sat, 25 May 2024 14:57:01 +0200 Subject: [PATCH] refactor(marathon): remove unused imports & variables --- .../graphs/algorithm/marathon/MarathonAlgorithm.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/marathon/MarathonAlgorithm.java b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/marathon/MarathonAlgorithm.java index cd2a419..a5297e3 100644 --- a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/marathon/MarathonAlgorithm.java +++ b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/marathon/MarathonAlgorithm.java @@ -1,24 +1,17 @@ package org.insa.graphs.algorithm.marathon; -import java.util.ArrayList; -import java.util.Collections; import java.util.List; -import org.insa.graphs.algorithm.AbstractAlgorithm; import org.insa.graphs.algorithm.ArcInspector; import org.insa.graphs.algorithm.ArcInspectorFactory; -import org.insa.graphs.algorithm.AbstractSolution.Status; import org.insa.graphs.algorithm.shortestpath.DijkstraAlgorithm; import org.insa.graphs.algorithm.shortestpath.Label; import org.insa.graphs.algorithm.shortestpath.ShortestPathAlgorithm; import org.insa.graphs.algorithm.shortestpath.ShortestPathData; -import org.insa.graphs.algorithm.shortestpath.ShortestPathObserver; import org.insa.graphs.algorithm.shortestpath.ShortestPathSolution; -import org.insa.graphs.algorithm.utils.BinaryHeap; import org.insa.graphs.model.Arc; import org.insa.graphs.model.Graph; import org.insa.graphs.model.Node; -import org.insa.graphs.model.Path; import java.util.Random; @@ -44,9 +37,7 @@ public class MarathonAlgorithm extends ShortestPathAlgorithm { @Override protected ShortestPathSolution doRun() { final ShortestPathData data = getInputData(); - ShortestPathSolution solution = null; final Graph graph = data.getGraph(); - final int nbNodes = graph.size(); DijkstraAlgorithm dijkstra = new DijkstraAlgorithm(data); ShortestPathSolution path = dijkstra.run(); @@ -54,7 +45,6 @@ public class MarathonAlgorithm extends ShortestPathAlgorithm { while (path.getPath().getLength() < getDistance()) { // Recuperation indices // TODO : A MODIFIER POUR AMELIORER LA COHERENCE DU CHEMIN - int longueurPath = path.getPath().size(); List pathMax = path.getPath().getArcs(); float max = 0; int indiceArcToRemove = 0; //Math.abs(rand.nextInt() % (longueurPath - 1));