[apps] Graph: change name: brentAlgorithm->brentMinimum

This commit is contained in:
Émilie Feral
2018-01-18 15:54:39 +01:00
committed by EmilieNumworks
parent 29a2525b56
commit 4761a9acdd
2 changed files with 4 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ CartesianFunction::Point CartesianFunction::nextMinimumOfFunction(double start,
double x = start;
do {
bracketMinimum(x, step, max, bracket, evaluate, context);
result = brentAlgorithm(bracket[0], bracket[2], evaluate, context);
result = brentMinimum(bracket[0], bracket[2], evaluate, context);
x = bracket[1];
} while (std::isnan(result.abscissa) && (step > 0.0 ? x <= max : x >= max));
@@ -100,11 +100,11 @@ char CartesianFunction::symbol() const {
return 'x';
}
CartesianFunction::Point CartesianFunction::brentAlgorithm(double ax, double bx, Evaluation evaluate, Context * context) const {
CartesianFunction::Point CartesianFunction::brentMinimum(double ax, double bx, Evaluation evaluate, Context * context) const {
/* Bibliography: R. P. Brent, Algorithms for finding zeros and extrema of
* functions without calculating derivatives */
if (ax > bx) {
return brentAlgorithm(bx, ax, evaluate, context);
return brentMinimum(bx, ax, evaluate, context);
}
double e = 0.0;
double a = ax;