Class AbstractScoringSearch

All Implemented Interfaces:
ScoringSearch, Search
Direct Known Subclasses:

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
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


public AbstractScoringSearch()
Method Detail


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
node - the node to calculate the score for
the score for the node in double precision


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


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


protected void sortList()

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