mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
[apps/graph] Move function min and max computation from the controller
to the model CartesianFunction and take into account function domain
This commit is contained in:
@@ -274,6 +274,14 @@ Coordinate2D<T> CartesianFunction::templatedApproximateAtParameter(T t, Poincare
|
||||
PoincareHelpers::ApproximateWithValueForSymbol(e.childAtIndex(1), unknown, t, context));
|
||||
}
|
||||
|
||||
Coordinate2D<double> CartesianFunction::nextMinimumFrom(double start, double step, double max, Context * context) const {
|
||||
return nextPointOfInterestFrom(start, step, max, context, [](Expression e, char * symbol, double start, double step, double max, Context * context) { return PoincareHelpers::NextMinimum(e, symbol, start, step, max, context); });
|
||||
}
|
||||
|
||||
Coordinate2D<double> CartesianFunction::nextMaximumFrom(double start, double step, double max, Context * context) const {
|
||||
return nextPointOfInterestFrom(start, step, max, context, [](Expression e, char * symbol, double start, double step, double max, Context * context) { return PoincareHelpers::NextMaximum(e, symbol, start, step, max, context); });
|
||||
}
|
||||
|
||||
Coordinate2D<double> CartesianFunction::nextRootFrom(double start, double step, double max, Context * context) const {
|
||||
return nextPointOfInterestFrom(start, step, max, context, [](Expression e, char * symbol, double start, double step, double max, Context * context) { return Coordinate2D<double>(PoincareHelpers::NextRoot(e, symbol, start, step, max, context), 0.0); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user