cad.simcad.pathfinding.astar
Class AlgoAssociation
java.lang.Object
|
+--cad.simcad.pathfinding.astar.AlgoAssociation
- All Implemented Interfaces:
- java.util.Comparator
- public class AlgoAssociation
- extends java.lang.Object
- implements java.util.Comparator
a ligthweight object internally used by AStar
- Version:
- Author:
- Charles-Philip Bentley
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
_mp
protected PathPlace _mp
_d
protected double _d
_id
protected int _id
AlgoAssociation
public AlgoAssociation(PathPlace mp,
double d,
int id)
- Creates new TempCell
getCost
public double getCost()
setId
public void setId(int id)
getId
public int getId()
getPathPlace
public PathPlace getPathPlace()
compare
public int compare(java.lang.Object ppOne,
java.lang.Object ppTwo)
- Compare two AlgoAssociations.
Returns -1 if first AlgoAssociations is has a lower cost
Returns 1 if first AlgoAssociations is has a higher cost
returns 0 if Object One is the Object two
This method prefers AlgoAssociations that were inserted last
- Specified by:
compare
in interface java.util.Comparator
With the help of www.sourceforge.net and www.info.ucl.ac.be