The ability to perform a range search without changing the X range was
only there to accomodate the Yauto feature.
Change-Id: I8c2b61b447fbd3dc1f4e303dff06d1a8d6e7a4f2
The new zoom implemented for ContinuousFunction is now factorized inside
Function to benefit the Sequence class. The same things is done to code
added to Graph::GraphController, which is moved into
FunctionGraphController.
This removes the reimplementation of several methods, most notably
computeYRange, as the implementation for function is general enough to
work on sequences.
Change-Id: I9b8211354064f46c3fa3dde3191dcb39d627a1d2
The auto zoom did not display the X axis when drawing positive curves
with roots, such as sqrt(x).
Change-Id: Ic80fd3207691dc917f7b64c07d7745ab5df1daa3
Initial zoom for displaying curves is computed according to the
following rules :
- For polar and parametric curves, the algorithm has not changed.
Vertical and horizontal ranges are chosen in order to display the
full curve with orthonormal graduations.
- For cartesian curves, the horizontal range is chosen in order to
display all points of interest (roots, extrema, asymptotes...).
The vertical range is fitted to be able to display those points, but
also cuts out points outside of the function's order of magnitude.
Change-Id: Idf8233fc2e6586b85d34c4da152c83e75513d85c
Instead of being memoized all at once before display, functions values
are now stored at evaluation time. Fixed some quirks with caching
preparation.
Change-Id: I5d212c271c8c41a6dc9074a15c720f0bccf8ac40
The caches used for function values memoization are now stored in
ContinuousFunctionStore : there are now only a fixed number, instead of
one per function. This effectively enables caching only for the first
few functions on screen, while reducing the memory usage.
Change-Id: I2ade091717f73a14a756fe527c773db8e8627be7
When evaluating a ContinuousFunction for a float value, the function
will first try to ask its cache (if it has been filled beforehand).
Change-Id: I519d2d3dcf344ba63e30a0f011db2306c7141315
This is unfortunately required in several cases:
- Sometimes when we use either float and double (this should be changed)
- Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
- Because we mix pointer differences and ints
ExpressionModel::expressionReduced does already call isCircularlyDefined
and returns undef if true.
The isCircularlyDefined method is then made private.