net.sourceforge.jsl
Class AbstractScoringSearch

java.lang.Object
  |
  +--net.sourceforge.jsl.AbstractOpenClosedListSearch
        |
        +--net.sourceforge.jsl.AbstractScoringSearch
All Implemented Interfaces:
ScoringSearch, Search
Direct Known Subclasses:
AStarSearch

public abstract class AbstractScoringSearch
extends AbstractOpenClosedListSearch
implements ScoringSearch

Abstract base class for a scoring search. Open list will be sorted accoring to score calculated for each node in the list. As an extension if two nodes have equal score the one having less current costs will be preferred.


Field Summary
 
Fields inherited from class net.sourceforge.jsl.AbstractOpenClosedListSearch
closedList, closeGoal, expandCnt, expandGoal, maxClosed, maxDepth, maxExpands, maxOpen, openList, seed, useHashSet
 
Constructor Summary
AbstractScoringSearch()
           
 
Method Summary
abstract  double score(SearchNode node)
          Calculates the score of the given node.
protected  void sortList()
           
protected  void writeState(SearchNode state)
           
protected  void writeStates(Collection states)
           
 
Methods inherited from class net.sourceforge.jsl.AbstractOpenClosedListSearch
checkForEmergencyStop, cutOff, expand, getClosedList, getCloseGoal, getExpandGoal, getMaxClosed, getMaxDepth, getMaxExpands, getMaxOpen, getOpenList, search, search, setCloseGoal, setExpandGoal, setMaxClosed, setMaxDepth, setMaxExpands, setMaxOpen, setSeed, setUseHashSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.jsl.Search
search, search, setSeed
 

Constructor Detail

AbstractScoringSearch

public AbstractScoringSearch()
Method Detail

score

public abstract double score(SearchNode node)
Description copied from interface: ScoringSearch
Calculates the score of the given node. The score indicates the preference for the expansion of a specidic node, the lower the score, the better.

Specified by:
score in interface ScoringSearch
Parameters:
node - the node to calculate the score for
Returns:
the score for the node in double precision

writeStates

protected void writeStates(Collection states)
Specified by:
writeStates in class AbstractOpenClosedListSearch

writeState

protected void writeState(SearchNode state)
Specified by:
writeState in class AbstractOpenClosedListSearch

sortList

protected void sortList()


Copyright © 2003-2004 Henrik Heine, Oliver Zeigermann. All Rights Reserved.