|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.optimization.RandomSearchAlgorithm.RandomSearcher
A searcher that performs a simple random search in the entire search space.
| Field Summary | |
protected double |
changeProbabilityBase
|
protected java.util.Random |
randomGenerator
|
protected java.util.Map |
values
|
| Constructor Summary | |
RandomSearchAlgorithm.RandomSearcher()
Constructor |
|
| Method Summary | |
void |
newScore(java.lang.Object sender,
Solution solution)
Notifies the receiver of a new score event. |
void |
newTopSolution(TrialPoint oldPoint,
TrialPoint newPoint)
An event indicating that a new solution has been found which is better than the previous best solution according to the score given by the evaluator. |
TrialPoint |
nextPoint()
Get the next trial point. |
TrialPoint |
nextPoint(int expectedNumToChange)
Get the next trial point given the expected number of variables to change. |
TrialPoint |
nextTrialPoint()
Get the next trial point. |
protected double |
proposeValue(Variable variable)
Propose a new value for the variable by selecting a random value in the variable's search range. |
void |
reset()
reset for searching from scratch; forget history |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Random randomGenerator
protected double changeProbabilityBase
protected java.util.Map values
| Constructor Detail |
public RandomSearchAlgorithm.RandomSearcher()
| Method Detail |
public void reset()
reset in interface RandomSearchAlgorithm.Searcher
public void newTopSolution(TrialPoint oldPoint,
TrialPoint newPoint)
newTopSolution in interface RandomSearchAlgorithm.SearcheroldPoint - The old best point.newPoint - The new best point.public TrialPoint nextTrialPoint()
nextTrialPoint in interface RandomSearchAlgorithm.Searcherpublic TrialPoint nextPoint()
public TrialPoint nextPoint(int expectedNumToChange)
expectedNumToChange - The average number of variables that we expect to change.
protected double proposeValue(Variable variable)
variable - the variable for which to propose a new value
public void newScore(java.lang.Object sender,
Solution solution)
newScore in interface gov.sns.tools.optimization.ScoreMonitorsender - The object posting the event.solution - The solution posted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||