creation Label.java
This commit is contained in:
parent
75097d40da
commit
8764d891d3
2 changed files with 37 additions and 3 deletions
|
@ -0,0 +1,37 @@
|
|||
package org.insa.graphs.algorithm.shortestpath;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.insa.graphs.algorithm.AbstractSolution.Status;
|
||||
import org.insa.graphs.model.Arc;
|
||||
import org.insa.graphs.model.Graph;
|
||||
import org.insa.graphs.model.Node;
|
||||
import org.insa.graphs.model.Path;
|
||||
|
||||
|
||||
public class Label {
|
||||
|
||||
/* Sommet associé à ce label (sommet ou numéro de sommet) */
|
||||
Node sommetCourant ;
|
||||
|
||||
/* Booléen vrai lorque le coût min de ce sommet est définitivement connu par l'algorithme */
|
||||
Boolean marque ;
|
||||
|
||||
/* Valeur courante du plus court chemin depuis l'origine vers le sommet */
|
||||
double coutRealise ;
|
||||
|
||||
/* correspond au sommet précédent sur le chemin correspondant au plus court chemin courant */
|
||||
Arc pere ;
|
||||
|
||||
}
|
||||
|
||||
public Label(Node sommetCourant, Boolean marque, int coutRealise, Arc pere) {
|
||||
this.sommetCourant = sommetCourant ;
|
||||
this.marque = marque ;
|
||||
this.coutRealise = coutRealise ;
|
||||
this.pere = pere ;
|
||||
}
|
||||
|
||||
|
|
@ -30,7 +30,6 @@ public class Path {
|
|||
* @throws IllegalArgumentException If the list of nodes is not valid, i.e. two
|
||||
* consecutive nodes in the list are not connected in the graph.
|
||||
*
|
||||
* @deprecated Need to be implemented.
|
||||
*/
|
||||
public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes)
|
||||
throws IllegalArgumentException {
|
||||
|
@ -86,7 +85,6 @@ public class Path {
|
|||
* @throws IllegalArgumentException If the list of nodes is not valid, i.e. two
|
||||
* consecutive nodes in the list are not connected in the graph.
|
||||
*
|
||||
* @deprecated Need to be implemented.
|
||||
*/
|
||||
public static Path createShortestPathFromNodes(Graph graph, List<Node> nodes)
|
||||
throws IllegalArgumentException {
|
||||
|
@ -267,7 +265,6 @@ public class Path {
|
|||
*
|
||||
* @return true if the path is valid, false otherwise.
|
||||
*
|
||||
* @deprecated Need to be implemented.
|
||||
*/
|
||||
public boolean isValid() {
|
||||
|
||||
|
|
Loading…
Reference in a new issue