Romain Goyet
84768472bd
Explicit std::min/max template usage
...
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
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0
Use std::min and std::max
2020-04-14 09:31:02 -04:00
Ruben Dashyan
87c1f4f39c
[poincare] Remove redundancy
...
TreeNode::serialize(char * buffer, int bufferSize, ...) returns
the number of chars it did write in buffer, null-terminating char
excluded.
strlcpy(char * dst, const char * src, size_t len) returns the length of
src.
Hence the min.
The case where bufferSize equals 0 does not need to be handled separately
since it is already contained in the min.
2020-02-12 15:13:16 +01:00
Léa Saviot
49a508ea62
[poincare] Fix serializations
...
They should return the number of written chars
2019-08-08 17:22:05 +02:00
Léa Saviot
61cf762eef
[poincare] Expression::ReductionContext
2019-08-08 16:29:37 +02:00
Léa Saviot
43031928c3
Remove max/min inline from KDCoordinate header
2019-04-12 15:16:51 +02:00
Émilie Feral
24c9617a89
[poincare] Templatize TreeHandle Builders
2019-02-21 11:29:35 +01:00
Émilie Feral
7b5f3c570d
[poincare] Change the way Expression are built
2019-02-21 11:29:35 +01:00
Léa Saviot
0bf3e678d9
[poincare] Add tests and asserts about sign, such as sign(0)==0
2019-01-21 11:22:55 +01:00
Émilie Feral
26e2e9be0d
[poincare] Add complex format as an argument of simplification
2019-01-10 11:42:04 +01:00
Émilie Feral
38de794642
[poincare] Change signature setSign(Context, AngleUnit, ReductionTarget)
2019-01-10 11:42:03 +01:00
Émilie Feral
9e2b709fcb
[poincare] Change sign() signature to sign(context, angleUnit)
2019-01-10 11:42:03 +01:00
Émilie Feral
fe6a5af47b
[poincare] Change Expression::setSign signature
2019-01-10 11:42:03 +01:00
Léa Saviot
5e404736b3
[poincare] LayoutHelper::String second parameter is a length, not size
2018-11-23 12:04:08 +01:00
Léa Saviot
63e83c246b
[poincare] Undefined::Name() gives "undef"
2018-11-23 12:04:08 +01:00
Émilie Feral
bc2ce86825
[poincare] Change signature: polynomialDegree,
...
getPolynomialCoefficients, getPolynomialReducedCoefficients
2018-11-23 12:03:58 +01:00
Léa Saviot
3bbb8b39d1
[poincare] Add context argument to some ExpressionNode methods
2018-11-23 12:03:58 +01:00
Émilie Feral
365b145cf3
[poincare] Change names: LayoutReference-->Layout
2018-09-18 16:29:44 +02:00
Émilie Feral
616e4c0bcc
[poincare] Change name: LayoutRef --> LayoutReference
2018-09-14 16:57:12 +02:00
Léa Saviot
e3a09286ac
[poincare] Remove AllocationFailures
2018-09-05 16:19:11 +02:00
Émilie Feral
3302bdf282
[poincare] Missing template declaration
2018-09-04 14:52:31 +02:00
Léa Saviot
aa1f4a9f9c
[poincare] Expression(Node)::setSign is not const
2018-08-31 10:39:03 +02:00
Léa Saviot
7d9c6618eb
[poincare] Override setSign on all Numbers
2018-08-20 11:26:07 +02:00
Émilie Feral
5fd415eb9e
[poincare] Register Static Allocation Failure if required
2018-08-09 17:16:22 +02:00
Émilie Feral
aaa20a58fa
[poincare] Implement SerializationHelper and
...
SerializationHelperInterface. WriteTextInBuffer->serialize
2018-08-08 15:31:40 +02:00
Émilie Feral
cb4bb4f8f0
[poincare] Engine-->Helper and break LayoutHelper into LayoutHelper and
...
SerializationHelper
2018-08-08 14:00:52 +02:00
Romain Goyet
cca0cb6ba6
[poincare] WIP for OppositeReference to Opposite
2018-08-08 12:15:18 +02:00
Émilie Feral
a8a5c41d66
[poincare] AllocationFailureExpressionNode is a templated class +
...
example on Undefined
2018-08-08 09:49:57 +02:00
Romain Goyet
c29afba2bd
[poincare] Move UndefinedReference to Undefined
2018-08-07 17:20:57 +02:00
Émilie Feral
54f9ea2d46
[poincare] Redesign of Expression: first attempt
2018-08-02 15:46:31 +02:00
Émilie Feral
48f890ef93
[poincare] AngleUnit, FormatComplex and PrintFloatMode are now
...
enumeration of Preferences class
2018-07-30 13:48:04 +02:00
Léa Saviot
a3032e5ec3
Merge branch Tree into master
2018-07-19 14:01:02 +02:00
Émilie Feral
2e7c08241a
[poincare] Change writeTextInBuffer signature (parameters are float
...
display mode and number of significant digits)
2018-07-18 16:32:50 +02:00
Émilie Feral
b8af15f1ab
[poincare] change createLayout signature
...
- CreateLayout depends on the float display mode and the number of
significant digits
- Float display mode does not have a default value anymore
2018-07-18 16:32:50 +02:00
Émilie Feral
dd0bc491f6
[poincare] Replace Poincare::Complex by std::complex
2018-07-18 16:32:49 +02:00
Léa Saviot
4eac450787
[poincare] Put layouts on expressions
2018-07-13 13:07:51 +02:00
Léa Saviot
f579e95815
[poincare] Start removing ExpressionLayout
2018-07-03 17:33:06 +02:00
Léa Saviot
c4b5d4cf40
Merge branch 'SaisieJolieRebase1201' into SaisieJolieMerge10Apr
...
Change-Id: I802dbb9f7c0eebf75a1b6cd21ddd194e89b53752
2018-04-10 17:21:54 +02:00
Émilie Feral
1b10cbdbb3
[poincare] Add a method: Expression::polynomialDegree
2018-03-22 10:48:06 +01:00
Émilie Feral
6de71ae145
[poincare] Clean: convertFloatToText should be in PrintFloat instead of
...
Complex
2018-03-21 15:57:19 +01:00
Émilie Feral
26af09843e
[poincare] Enable writeTextInBuffer to work with different numbers of
...
significant digits
2018-01-30 19:14:42 +01:00
Léa Saviot
55044d8e0b
[poincare] Update Expression's privateCreateLayout().
...
We use the new layouts and no longer the old ones such as StringLayout
or BaselineRelativeLayout.
Change-Id: Ic15167b694c3adab46f348c8f823ce19b3e5ef33
2018-01-15 11:58:05 +01:00
Léa Saviot
f49168d779
[poincare] Use editable String and BaselineRelative layouts.
...
Change-Id: I978c4aa43772b294251b948fc20bb0d8b8b05a08
2018-01-15 11:58:01 +01:00
Émilie Feral
fda382cc0d
[poincare] Change name: evaluate->approximate
...
Change-Id: I649a7c640190713dcf063a4148decd6038e62796
2017-11-24 13:31:44 +01:00
Émilie Feral
53c66baa16
[poincare] Re-enable matrix in simplified expression-> handle matrix in
...
evaluate
Change-Id: I455845398f0799b9e25fd192ada7478c872ab892
2017-11-17 13:34:46 +01:00
Émilie Feral
d5fc8d139f
[poincare] First version of Simplification with matrix (no tests yet!)
...
Change-Id: I28ad4750ad31995836b23725f7d715669fcb7ae2
2017-11-10 15:22:33 +01:00
Émilie Feral
a96c7052f5
[poincare] Fix bug in Undefined
...
Change-Id: I41ccf8ca0779c7cc398b6ca8722c42cde6948863
2017-10-25 18:18:58 +02:00
Émilie Feral
80a06054bb
[poincare] Implement writeTextInBuffer for all expressions
...
Change-Id: I3777bd893621459dc0fb7df3cf6c0f9d20ff5c7b
2017-10-25 18:18:58 +02:00
Émilie Feral
1ede897a37
[poincare] Create a class undefined
...
Change-Id: I0d30b907179f38b77ed65136fddede6e16fb08e1
2017-10-06 12:03:54 +02:00