Public Member Functions | |
| BisectionExtremeFinder1D (const FloatMathFunction &, bool max, int itermax, float tol, const Interval< float > &startinterval, const Interval< float > *limitinterval) | |
| virtual | ~BisectionExtremeFinder1D () |
| void | reStart (const Interval< float > &startinterval, const Interval< float > *limitinterval) |
| float | extremePos () const |
| float | extremeVal () const |
| int | nrIter () const |
| int | nextStep () |
Protected Attributes | |
| Interval< float > * | limits |
| int | iter |
| const float | tol |
| const bool | max |
| const int | itermax |
| Interval< float > | current |
| float | startfuncval |
| float | stopfuncval |
| float | centerfuncval |
| bool | isok |
| const FloatMathFunction & | func |
| BisectionExtremeFinder1D::BisectionExtremeFinder1D | ( | const FloatMathFunction & | , | |
| bool | max, | |||
| int | itermax, | |||
| float | tol, | |||
| const Interval< float > & | startinterval, | |||
| const Interval< float > * | limitinterval | |||
| ) |
| func | The function, f(x) where the extreme value shoud be found | |
| max | Specifies wether a min or max value should be found | |
| itermax | Maximum number of iterations | |
| tol | Tolerance on the function variable (x) | |
| startinterval | The interval of x that the search will be inited by. Note that the search can go outside of this interval. | |
| limitinterval | Set to true if only solutions within the interval is permitted |
| virtual BisectionExtremeFinder1D::~BisectionExtremeFinder1D | ( | ) | [virtual] |
| float BisectionExtremeFinder1D::extremePos | ( | ) | const |
| float BisectionExtremeFinder1D::extremeVal | ( | ) | const |
| int BisectionExtremeFinder1D::nextStep | ( | ) | [virtual] |
Will move the current extremePos one step towards the solution.
| 0 | Finished | |
| 1 | More to do | |
| -1 | Error (no extreme found or itermax reached The extreme value) |
Implements SequentialTask.
| int BisectionExtremeFinder1D::nrIter | ( | ) | const |
| void BisectionExtremeFinder1D::reStart | ( | const Interval< float > & | startinterval, | |
| const Interval< float > * | limitinterval | |||
| ) |
| startinterval | The interval of x that the search will be inited by. Note that the search can go outside of this interval. | |
| limitinterval | Set to true if only solutions within the interval is permitted |
float BisectionExtremeFinder1D::centerfuncval [protected] |
Interval<float> BisectionExtremeFinder1D::current [protected] |
const FloatMathFunction& BisectionExtremeFinder1D::func [protected] |
bool BisectionExtremeFinder1D::isok [protected] |
int BisectionExtremeFinder1D::iter [protected] |
const int BisectionExtremeFinder1D::itermax [protected] |
Interval<float>* BisectionExtremeFinder1D::limits [protected] |
const bool BisectionExtremeFinder1D::max [protected] |
float BisectionExtremeFinder1D::startfuncval [protected] |
float BisectionExtremeFinder1D::stopfuncval [protected] |
const float BisectionExtremeFinder1D::tol [protected] |
1.7.1