The computation of Sequence's graph default Y range used to rely on
Yauto. As this feature does not exist anymore, this work is now done int
Sequence::GraphController::interestingRanges.
Change-Id: Idba8560d5f25d0bf34dd0e1dd98c2af67f427709
The graph range used to be reset to default whenever all functions were
modified. As we no longer want to reset the range without the user's
input, we do not need to track whether the functions changed at all.
/!\ As of this commit, there is no longer a way to restore the default
zoom, until a new automatic zoom button is added.
Change-Id: Ie74e8fd61e13055fa6ce2b2d1e883182d4ecffce
- Create a first-order recursive sequence
- Select u_n -> Sequence type
--> The second line will be selected, as expected.
Change-Id: I2025ebaa9a7b49ee33ff5e63a4c767a858b46850
Sequences can now be defined using specific terms form other sequences :
Un = n
Vn = u(3)
Initial values can also depend on other sequences.
Should there be a circular dependency, the sequences concerned will
display "undef" as value
Change-Id: I6fe1f3ff7b500f35d480ddefb42de729c327432e
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
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
Method InteractiveCurveViewRange::panToMakePointVisible now moves the
range of a whole number of pixels when panning horizontally. This allows
the cache of cartesian functions not to be invalidated.
Change-Id: Idb9904fef134dd13458e1f2287b0fe5145e8aec7
It appeared that without the packed keyword, the compiler did not handle
access to unaligned record data members, which leads to crashes on the
device.
Change-Id: I401f075e7f62458a4733baa8d81983d4be34b730
SequenceTitleCell::reloadCell now triggers a layoutSubviews, causing the
vertical alignment to be recomputed. This solves issues regarding the
alignment of a sequence's name and definition, such as :
- typing u_n = v_n ; v_n would be displayed above u_n
- typing u_n = (1/3)/2 then changing to u_n = 1/(2/3) without erasing
the formula first. u_n would no longer be aligned with the = sign.
Change-Id: I4a771d96ea79e42e2f4822e93f9f1cbbcf867610
tableViewDidChangeSelectionAndDidScroll method and implement it for
Calculation::HistoryController
This fixes the following bug: In the calculation application, input 1,
OK, 1/2/3/4/5/6/7/8, OK, up, up, left, down, up. The selection failed.
In file: epsilon/apps/graph/base.nl.i18n some text would look better if placed slightly to the left. I'm talking about lines 23 and 24: SelectLowerBound and SelectUpperBound
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
Fixes the following bug:
In the graph tab of the Sequence app, compute the sum of the terms of
a sequence from 1 to 9 and then from 1 to 10. The Layout is memoized
after the first time and mispositioned the second time since it is
not recomputed.