12345678910111213141516171819202122232425262728293031323334 |
- package org.insa.graphs.algorithm.shortestpath;
-
- import org.insa.graphs.model.Arc;
- import org.insa.graphs.model.Node;
-
- public class LabelStar extends Label{
-
- protected float estim;
-
- public LabelStar(Node sommet, Arc padre, float prix, float estimation) {
- super(sommet, padre, prix);
- this.estim=estimation;
- }
-
- public LabelStar(Node sommet, Arc padre, float prix, float estimation, boolean mark) {
- super(sommet, padre, prix, mark);
- this.estim=estimation;
- }
-
- public float getEstimation() {
- return this.estim;//même remarque que pour son pendant dans Label
- }
-
- public float getTotalCost() {
- return this.cout+this.estim;
- }
-
- //...
- public void setEstimation(Node destination) {
- this.estim=(float)destination.getPoint().distanceTo(this.sommet_courant.getPoint());
- }
-
- //note: pourquoi l'icône de ce fichier de eclipse est-elle un peu différente?
- }
|