cad.simcad.pathfinding.astar
Class AStarBasic

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--cad.simcad.pathfinding.astar.AStarAlgo
              |
              +--cad.simcad.pathfinding.astar.AStarBasic
All Implemented Interfaces:
PathFinder, java.lang.Runnable
Direct Known Subclasses:
AStarBasicHeur, AStarFudge, AStarSpeedOptimized

public class AStarBasic
extends AStarAlgo

This class should be used for testing purpose. It is not optimized for speed But on the other hand it offers testing services seach as slowing down the algirthm, exhaustive computing statistics.

Version:
1.0
Author:
Charles-Philip Bentley

Field Summary
protected  AlgoProperties _ap
           
protected  double _averageStepTime
           
protected  java.util.Properties _computed
           
protected  int _count
           
protected  int _fasterWaysFound
           
protected  long _loopStart
           
protected  long _loopTime
           
protected  int _numberOfPlacesTouched
           
protected  int _openMaxSize
           
protected  long _referenceBuildingTime
           
protected  int _stepSpeed
           
protected  long _stepTime
           
protected  boolean _useFudgeForBuilding
          value telling if we have to use the fudge technique when building the path true by default
 
Fields inherited from class cad.simcad.pathfinding.astar.AStarAlgo
_algoType, _assoId, _closed, _cp, _finish, _loop, _mapTable, _myMap, _open, _pu, _rebuildingFudgeFactor, _start, _state, FOUND, NO_PATH, NOT_FOUND
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AStarBasic(PathFindable map, Path p, AlgoProperties ap)
          Creates new AStarBasic The map on which to search the path, an incomplete path, the pause value for each step of the aglorithm
 
Method Summary
 void endAlgorithm()
           
protected  void incrementFasterWays()
           
protected  void incrementPlacesTouched()
           
protected  void initializeStatVariables()
           
protected  void openMaxSize()
          Stat function checking the maximum size of the datastructure
 void run()
          Run method invoked by the constructor
protected  void setComputedProperties()
          This method is used internaly to write down the computed statistics
protected  void slowStep(long diff)
           
protected  void step()
           
 
Methods inherited from class cad.simcad.pathfinding.astar.AStarAlgo
buildReferences, buildReferencesFudged, firePathComputation, firePathPlaceChange, getFudgedLowestAdjacent, getLowestAdjacent, getShortestPath, getShortestPath, isApplicable, isSequential
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_stepSpeed

protected int _stepSpeed

_ap

protected AlgoProperties _ap

_computed

protected java.util.Properties _computed

_numberOfPlacesTouched

protected int _numberOfPlacesTouched

_fasterWaysFound

protected int _fasterWaysFound

_count

protected int _count

_openMaxSize

protected int _openMaxSize

_stepTime

protected long _stepTime

_loopStart

protected long _loopStart

_loopTime

protected long _loopTime

_referenceBuildingTime

protected long _referenceBuildingTime

_averageStepTime

protected double _averageStepTime

_useFudgeForBuilding

protected boolean _useFudgeForBuilding
value telling if we have to use the fudge technique when building the path true by default

Constructor Detail

AStarBasic

public AStarBasic(PathFindable map,
                  Path p,
                  AlgoProperties ap)
Creates new AStarBasic The map on which to search the path, an incomplete path, the pause value for each step of the aglorithm

Method Detail

setComputedProperties

protected void setComputedProperties()
This method is used internaly to write down the computed statistics

Post:
all the available stats are written in the datastructure.

initializeStatVariables

protected void initializeStatVariables()

endAlgorithm

public void endAlgorithm()

run

public void run()
Run method invoked by the constructor

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class AStarAlgo

slowStep

protected void slowStep(long diff)

step

protected void step()

openMaxSize

protected void openMaxSize()
Stat function checking the maximum size of the datastructure


incrementFasterWays

protected void incrementFasterWays()

incrementPlacesTouched

protected void incrementPlacesTouched()

Logo

With the help of www.sourceforge.net and www.info.ucl.ac.be