mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 13:50:28 +01:00
[apps] Move some methods from Shared::CartesianFunction to GraphControllers
This commit is contained in:
committed by
Léa Saviot
parent
2866a8f861
commit
1d0668a84c
@@ -104,34 +104,6 @@ double CartesianFunction::sumBetweenBounds(double start, double end, Poincare::C
|
||||
return PoincareHelpers::ApproximateToScalar<double>(integral, context);
|
||||
}
|
||||
|
||||
Coordinate2D CartesianFunction::nextMinimumFrom(double start, double step, double max, Context * context) const {
|
||||
constexpr int bufferSize = CodePoint::MaxCodePointCharLength + 1;
|
||||
char unknownX[bufferSize];
|
||||
SerializationHelper::CodePoint(unknownX, bufferSize, UCodePointUnknownX);
|
||||
return PoincareHelpers::NextMinimum(expressionReduced(context), unknownX, start, step, max, context);
|
||||
}
|
||||
|
||||
Coordinate2D CartesianFunction::nextMaximumFrom(double start, double step, double max, Context * context) const {
|
||||
constexpr int bufferSize = CodePoint::MaxCodePointCharLength + 1;
|
||||
char unknownX[bufferSize];
|
||||
SerializationHelper::CodePoint(unknownX, bufferSize, UCodePointUnknownX);
|
||||
return PoincareHelpers::NextMaximum(expressionReduced(context), unknownX, start, step, max, context);
|
||||
}
|
||||
|
||||
double CartesianFunction::nextRootFrom(double start, double step, double max, Context * context) const {
|
||||
constexpr int bufferSize = CodePoint::MaxCodePointCharLength + 1;
|
||||
char unknownX[bufferSize];
|
||||
SerializationHelper::CodePoint(unknownX, bufferSize, UCodePointUnknownX);
|
||||
return PoincareHelpers::NextRoot(expressionReduced(context), unknownX, start, step, max, context);
|
||||
}
|
||||
|
||||
Coordinate2D CartesianFunction::nextIntersectionFrom(double start, double step, double max, Poincare::Context * context, Expression e) const {
|
||||
constexpr int bufferSize = CodePoint::MaxCodePointCharLength + 1;
|
||||
char unknownX[bufferSize];
|
||||
SerializationHelper::CodePoint(unknownX, bufferSize, UCodePointUnknownX);
|
||||
return PoincareHelpers::NextIntersection(expressionReduced(context), unknownX, start, step, max, context, e);
|
||||
}
|
||||
|
||||
void * CartesianFunction::Model::expressionAddress(const Ion::Storage::Record * record) const {
|
||||
return (char *)record->value().buffer+sizeof(CartesianFunctionRecordDataBuffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user