com.softsynth.jmsl.score.transcribe
Class SearchPathList

java.lang.Object
  extended by com.softsynth.jmsl.score.transcribe.SearchPathList

public class SearchPathList
extends java.lang.Object

Manage a list of competing SearchPaths. Supports the selection of the minimum cost search path and expansion of it.

Author:
Nick Didkovsky, Feb 10, 2002 , (c) 2002 Nick Didkovsky, All Rights reserved.

Constructor Summary
SearchPathList()
           
 
Method Summary
 void addSearchPath(SearchPath p)
           
 void expand(SearchPath winner)
          Select the lowest cost searchpath, and expand it with the BeatDivisions in the BeatDivisionLost for the next legal beat
 SearchPath getMinCostSearchPath()
           
 SearchPath getMinCostSearchPath(boolean mustReachNextLegalBeat)
           
 void initSearchPathList()
          build a list of one-move search paths starting on beat 0
 void setMeasureBeatDivisions(MeasureBeatDivisions measureBeatDivisions)
           
 void setNextLegalBeat(int nextLegalBeat)
          Set the next beat number that the heuristic search is expanding toward.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SearchPathList

public SearchPathList()
Method Detail

addSearchPath

public void addSearchPath(SearchPath p)

setMeasureBeatDivisions

public void setMeasureBeatDivisions(MeasureBeatDivisions measureBeatDivisions)

setNextLegalBeat

public void setNextLegalBeat(int nextLegalBeat)
Set the next beat number that the heuristic search is expanding toward. This is used to stall paths who currently extend beyond.


initSearchPathList

public void initSearchPathList()
build a list of one-move search paths starting on beat 0


getMinCostSearchPath

public SearchPath getMinCostSearchPath()
                                throws SearchPathListExpansionException
Throws:
SearchPathListExpansionException

getMinCostSearchPath

public SearchPath getMinCostSearchPath(boolean mustReachNextLegalBeat)
                                throws SearchPathListExpansionException
Returns:
the SearchPath with the lowest score up to this beat
Throws:
SearchPathListExpansionException

expand

public void expand(SearchPath winner)
            throws SearchPathListExpansionException
Select the lowest cost searchpath, and expand it with the BeatDivisions in the BeatDivisionLost for the next legal beat

Throws:
SearchPathListExpansionException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object