|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.bme.smile.commons.optimize.GoldenSectionSearch1D
public class GoldenSectionSearch1D
Class GoldenSectionSearch1D Uses the gold section search algorithm to find the minima of a 1D function
Constructor Summary | |
---|---|
GoldenSectionSearch1D()
Default constructor Sets iterations to 1000 |
|
GoldenSectionSearch1D(int maxIter)
Constructor that allows setting the maximum number of iterations. |
Method Summary | |
---|---|
double |
getExtrema()
Gets the extrema that was found |
int |
getIterations()
Gets the number of iterations done. |
java.util.ArrayList<double[]> |
getLog()
Gets the logged data |
void |
initialize(Optimizable1DContinuous function)
Sets up the optimization. |
void |
logData(boolean turnOn,
int maxSteps)
Turns on logging for each iteration of the optimization. |
boolean |
optimize(boolean findMinima)
Optimizes the function |
java.lang.String |
statusMessage()
Gets the status message from the optimizing process |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GoldenSectionSearch1D()
public GoldenSectionSearch1D(int maxIter)
max
- iterations desiredMethod Detail |
---|
public void logData(boolean turnOn, int maxSteps)
turnOn
- true if logging, false if notmaxSteps
- maximum number of steps to logpublic java.util.ArrayList<double[]> getLog()
public double getExtrema()
getExtrema
in interface Optimizer1DContinuous
public int getIterations()
getIterations
in interface Optimizer1DContinuous
public void initialize(Optimizable1DContinuous function)
initialize
in interface Optimizer1DContinuous
function
- to be optimizedpublic boolean optimize(boolean findMinima)
optimize
in interface Optimizer1DContinuous
findMinima
- true if looking for minimum, false for maximum
public java.lang.String statusMessage()
statusMessage
in interface Optimizer1DContinuous
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |