Commit Graph

64 Commits

Author SHA1 Message Date
Gabriel Ozouf
937979503a [shared/continous_function] Detach cache of inactive function
When a function that had previously been cached is deactivated, its
cache can be used by another function. When the function is reactivated,
if it tries to reuse its previous cache, it will be filled with values
from another function, and will not be cleared. By detaching the cache
of a function that becomes inactive, we ensure that the next time this
function is cached, the chache will be cleared.

e.g. Define to functions f(x)=x, g(x)=-x, draw them both.
     Deactivate f, the redraw the graph
     Reactivate f, the draw again
2020-12-02 16:50:17 +01:00
Gabriel Ozouf
6be5e7d62c [apps/shared] Change Zoom API
Moved some code around to decrease redundancy and put more of the logic
into Poincare::Zoom

Change-Id: I4804cf39493ac7f2f0b3c4eb554e5c15c3cef1c9
2020-11-04 15:58:18 +01:00
Gabriel Ozouf
29714b401e [shared/function] Create an orthonormal range
When the function does not have any points of interest, fall back to an
orthonormal range.

Change-Id: I90e4bcfae80ebd37f95d404a4a63121c93cf7cff
2020-11-04 15:58:15 +01:00
Gabriel Ozouf
ad6edffc07 [poincare/zoom] Remove tuneXRange argument
The ability to perform a range search without changing the X range was
only there to accomodate the Yauto feature.

Change-Id: I8c2b61b447fbd3dc1f4e303dff06d1a8d6e7a4f2
2020-11-04 15:58:14 +01:00
Gabriel Ozouf
d2b36be846 [poincare/zoom] Move automatic zoom to Poincare
Change-Id: I7a70ab54b33b9150682cc4f999ff4999a8288b7f
2020-11-04 15:58:07 +01:00
Gabriel Ozouf
a6db9688cd [apps/function] Factorize zoom in Function class
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
2020-11-04 15:30:53 +01:00
Hugo Saint-Vignes
5bc19af196 [apps/shared] Revert to pack record
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
2020-11-04 14:45:35 +01:00
Hugo Saint-Vignes
0a2ededfcf [apps/shared] Remove packed data members for RecordDataBuffer
Change-Id: I04ea5ccb4c15bda975bf5af178f07092c0387312
2020-11-04 14:45:34 +01:00
Ruben Dashyan
b54d5a31ba [apps/shared/function] BaseNameCompliant returns a NameNotCompliantError
instead of a boolean
2020-02-12 15:13:26 +01:00
Ruben Dashyan
473d12f165 [apps/shared/function] Fix typo
introduced in
[ion/unicode/codepoint] Rename is[(Lower|Upper)Case]Letter to isLatin[(Small|Capital)]Letter
2020-02-12 15:13:26 +01:00
Ruben Dashyan
179ce5d5d5 [ion/unicode/codepoint] Rename is[(Lower|Upper)Case]Letter to isLatin[(Small|Capital)]Letter
to conform with unicode terminology
2020-02-12 15:13:23 +01:00
Ruben Dashyan
575b911da9 [ion/unicode] Split isDigit into isDecimalDigit, isBinaryDigit, isHexadecimalDigit 2020-02-12 15:13:23 +01:00
Ruben Dashyan
9b0b4e3096 [ion/unicode] Define and use CodePoint const methods
isLowerCaseLetter
isUpperCaseLetter
isLetter
isDigit

Remove similar ones from UTF8Helper and from Poincare::Tokenizer.
2020-02-12 15:13:23 +01:00
Ruben Dashyan
fd2961018c [apps] In Shared::Function, rename FunctionRecordDataBuffer to RecordDataBuffer 2019-09-20 17:11:42 +02:00
Léa Saviot
8726f1d621 [apps/graph] Display parametric name in the middle of values cell 2019-09-05 15:43:55 +02:00
Ruben Dashyan
9417a52167 [apps/*/function] Sequence implements parameterMessageName 2019-09-05 11:58:51 +02:00
Léa Saviot
4436967c57 [apps/go_to_param_cntrlr] Change parameter name according to func 2019-09-03 15:04:01 +02:00
Léa Saviot
fa413edc61 [apps/graph] fix banner view for polar and parametric 2019-08-30 15:04:27 +02:00
Ruben Dashyan
27b9ede90b [apps/shared/function] nameWithArgument handles 2-char-long argument CodePoints 2019-08-29 11:07:22 +02:00
Ruben Dashyan
c2b8781983 [apps/*/function] Move implementation of evaluateAtAbscissa to CartesianFunction 2019-08-29 11:07:21 +02:00
Ruben Dashyan
5e365104ae [apps/shared/function] Factor templatedApproximateAtAbscissa 2019-08-29 11:07:21 +02:00
Ruben Dashyan
b665e841ad [apps] Remove arg parameter in Shared::Function::nameWithArgument and Shared::CartesianFunction::derivativeNameWithArgument 2019-08-29 11:07:21 +02:00
Léa Saviot
c2b4d2b760 [strlcpy] Assertions on len parameter 2019-08-08 17:22:06 +02:00
Émilie Feral
2861a35840 Clean some warnings 2019-08-08 16:29:38 +02:00
Léa Saviot
61cf762eef [poincare] Expression::ReductionContext 2019-08-08 16:29:37 +02:00
Émilie Feral
8b926612a2 Revert "[ion] Namespace Ion::UTF8Helper and Ion::UTF8Decoder"
This reverts commit 23da0d3f2c.
2019-05-03 16:29:28 +02:00
Émilie Feral
23da0d3f2c [ion] Namespace Ion::UTF8Helper and Ion::UTF8Decoder 2019-04-29 18:01:30 +02:00
Léa Saviot
82d5ff7799 [ion/unicode] Clean special code points 2019-04-12 15:16:53 +02:00
Émilie Feral
71195240e2 [shared] Change name of classes:
FunctionRecordData --> FunctionRecordDataBuffer
CartesianFunctionRecordData --> CartesianFunctionRecordDataBuffer
SequenceRecordData --> SequenceRecordDataBuffer
2019-04-12 15:16:52 +02:00
Émilie Feral
3c1e35ec04 [shared] Rename classes:
ExpressionModelHandle --> ExpressionModel
SingleExpressionModelHandle --> ExpressionModelHandle
StorageFunction --> Function
StorageCartesianFunction --> CartesianFunction
StorageFunctionApp --> FunctionApp
2019-04-12 15:16:52 +02:00
Émilie Feral
3ce406fde1 [shared] Clean unused classes 2019-04-12 15:16:52 +02:00
Émilie Feral
ecf3f2ea0f [poincare] Create a a flag on Expression that is set when the
approximation encouters a complex value

All approximation methods take the complex format into account.
2019-01-10 11:42:04 +01:00
Émilie Feral
17e63a5b07 [shared] Fix references to Poincare 2018-08-10 13:18:46 +02:00
Émilie Feral
e61a408a0a [poincare] Get rid of AngleUnit::Default 2018-07-18 17:09:07 +02:00
Émilie Feral
fccebdcc06 [poincare] Move maximum/roots solver from CartesianFunction to Poincare::Expression (part I) 2018-06-07 13:46:19 +02:00
Émilie Feral
b266c4cbd1 [shared] Make a parent class to Function: ExpressionModel (factorize
code for furtur model Equation)
2018-06-07 13:46:17 +02:00
Émilie Feral
6de71ae145 [poincare] Clean: convertFloatToText should be in PrintFloat instead of
Complex
2018-03-21 15:57:19 +01:00
Émilie Feral
59fdcde548 [poincare] Avoid returning partial simplification when the
simplification process has been interrupted
2018-01-30 16:17:03 +01:00
Émilie Feral
2c06727f36 [apps] Simplify expressions in sequence and function applications
Change-Id: I2708934d3b5c90e8692e50d939b3a13028b8615e
2017-11-24 14:39:06 +01:00
Émilie Feral
fda382cc0d [poincare] Change name: evaluate->approximate
Change-Id: I649a7c640190713dcf063a4148decd6038e62796
2017-11-24 13:31:44 +01:00
Émilie Feral
76cbd2678d [poincare] Change names: approximate->approximateToScalar
Change-Id: I701451b35909bb577dd729e0ea76a405b9543f23
2017-11-24 12:06:35 +01:00
Romain Goyet
52bdf4a41f Merge branch 'cas_with_app_copy' into python_console 2017-11-21 18:44:38 +01:00
Émilie Feral
6c51c584f2 [apps] Change Calculation to hold an exact and an approximate output
Change-Id: I1805839e17cd42b82f06ce0a320d20b49cd2a6cd
2017-11-21 17:37:25 +01:00
Jacob Young
17ac54cad5 Use cmath in c++ files. 2017-10-13 18:08:15 +02:00
Émilie Feral
23629b0939 [poincare] Restructuration of poincare (no duplication of children
storage)

Change-Id: Ia10c3cc83e10d238750c6954b7c093d26b762c94
2017-09-21 13:49:06 +02:00
Émilie Feral
be8a0c6df3 [apps] Replace sizeInBits>>2 sizeInBits/sizeof(uint32_t) in checksums
Change-Id: I4f96514caa4552d2158bb9ebdc328a6453554934
2017-08-25 14:18:27 +02:00
Émilie Feral
82e212e771 [poincare] Template for double
Change-Id: I7404bd5cefc9ef78a5dbd572c3874a557cded28e
2017-08-16 09:55:29 +02:00
Émilie Feral
d2c55eb7d0 [apps/graph][apps/sequence] In values controller, memoize the number of
columns to improve performance

Change-Id: Ie3c545d0198a2f23575bd22fdbf56e9c6b8ff2b8
2017-06-02 14:07:40 +02:00
Émilie Feral
832af9f9f4 [apps/sequence][apps/graph] Checksum takes into account whether the
function is active and its name

Change-Id: I790d9a793c512a686f21f1db4fc0848a16baea5c
2017-05-29 11:41:39 +02:00
Émilie Feral
ba7d740a10 [apps/sequence][apps/graph] CRC should be called on sizes multiple of 4
Change-Id: I4a55c14e1418f730051252cabef324833279747f
2017-05-24 14:38:32 +02:00