Class SearchPathList
java.lang.Object
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
Constructors Constructor Description SearchPathList()
-
Method Summary
Modifier and Type Method Description 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 beatSearchPath
getMinCostSearchPath()
SearchPath
getMinCostSearchPath(boolean mustReachNextLegalBeat)
void
initSearchPathList()
build a list of one-move search paths starting on beat 0void
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 Details
-
SearchPathList
public SearchPathList()
-
-
Method Details
-
addSearchPath
-
setMeasureBeatDivisions
-
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
- Throws:
SearchPathListExpansionException
-
getMinCostSearchPath
public SearchPath getMinCostSearchPath(boolean mustReachNextLegalBeat) throws SearchPathListExpansionException- Returns:
- the SearchPath with the lowest score up to this beat
- Throws:
SearchPathListExpansionException
-
expand
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 classjava.lang.Object
-