Léa Saviot
5df60e946a
[poincare] shallowBeautify can modify the reduction context
...
UnitConvert must set UnitConversion to None, otherwise the unit asked
for in the conversion might get changed after being properly set in
UnitConvert::shallowBeautify.
2020-11-09 15:50:27 +01:00
Émilie Feral
7142f9545e
[poincare] Finish replacing approximateContext
2020-11-04 15:58:41 +01:00
Ruben Dashyan
4a6b633c74
[poincare] Fix commit "Reducing an Expression which hasUnit in its children returns Undefined in general"
2020-02-12 15:13:25 +01:00
Ruben Dashyan
cc280373d0
[poincare] Reducing an Expression which hasUnit in its children returns Undefined in general
2020-02-12 15:13:25 +01:00
Émilie Feral
4e948ce533
[poincare] Change Factor approximation to return undef on non real
...
values
2020-02-12 15:13:22 +01:00
Romain Goyet
a34ecd2769
[poincare] Use std::move when needed
...
When returning a subclass of an Expression as an Expression, make sure
to use std::move, otherwise the compiler cannot proceeed to copy
ellision.
2019-10-16 10:01:14 +02:00
Émilie Feral
eb0f6153c5
[poincare] When reducing expressions, we check if an expression is a
...
matrix to know if it can be permuted in a multiplication for example.
This check has to be 'recursive'/'deep' to detect cases like "cos(3×confidence(cos(2)/25,3))"
2019-08-14 09:38:27 +02:00
Émilie Feral
9fbec16db4
[poincare] Merge MultiplicationImplicit and MultiplicationExplicit (they
...
were required if we wanted to parse into two distincts expression 2π and
2*π but don't)
2019-08-08 17:22:05 +02:00
Émilie Feral
c1cd0302b8
[poincare] Fix typo: explicite --> explicit, implicite --> implicit
2019-08-08 17:22:04 +02:00
Émilie Feral
d985872951
[poincare] Rational: make a method 'isInteger'
2019-08-08 17:22:02 +02:00
Émilie Feral
fd25b678ce
[poincare] Split Multiplication into MultiplicationExplicite and
...
MultiplicationImplicite
2019-08-08 17:22:02 +02:00
Léa Saviot
26be1e4b0d
[poincare] Use SortedIsMatrix when necessary
2019-08-08 16:29:38 +02:00
Léa Saviot
956cfc2bc4
[poincare] Expression:replaceWithUndefinedInPlace
2019-08-08 16:29:37 +02:00
Léa Saviot
c60cda3fb2
[poincare] Continue handling matrices in shallowReduce
2019-08-08 16:29:37 +02:00
Léa Saviot
61cf762eef
[poincare] Expression::ReductionContext
2019-08-08 16:29:37 +02:00
Léa Saviot
51ee5d8e21
[poincare] More matrix simplification when map/undefined
2019-08-08 16:24: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
Émilie Feral
ac6f23684d
[poincare] Clean Expression and Layout builders
...
Before: Opposite(Opposite(Rational(1))) misleadingly created the
expression "-1"; now, Opposite::Builder(Opposite::Builder(Rational(1)))
creates "--1"
2019-02-21 11:29:35 +01:00
Émilie Feral
f6026254be
[poincare] Add an argument ReductionTarget to shallowBeautify
2019-01-10 11:42:05 +01:00
Émilie Feral
26e2e9be0d
[poincare] Add complex format as an argument of simplification
2019-01-10 11:42:04 +01:00
Ruben Dashyan
9c5ea70c24
[poincare] Make derived Expression s_functionHelper constexpr
2018-11-23 12:04:05 +01:00
Ruben Dashyan
61b1b8a09d
[poincare] Add Expression::FunctionHelper class
...
That class is meant to contain data about named functions (e.g. sin,
tan...) in one place: their name, their number of children and a pointer to
a builder. The derived class corresponding to each such function
contains a private instance (m_functionHelper) and a getter.
The previous parser is removed, along with unecessary
constructors (used by the previous parsers).
2018-11-23 12:04:05 +01:00
Ruben Dashyan
cda6f522f0
[poincare] New static NumberOfChildren() method in Expression subclasses
2018-11-23 12:04:05 +01:00
Ruben Dashyan
23c07e02ca
[poincare] New static Name() method in Expression subclasses
...
Replaces the name() method in ExpressionNode subclasses.
When necessary, the createLayout and serialize methods in thoses
subclasses were moved to their .cpp file.
2018-11-23 12:04:05 +01:00
Émilie Feral
0e1fd1bad7
[poincare] Arithmetic::PrimeFactorization return the number of prime
...
factors found
2018-09-20 15:55:22 +02: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
9d53906a0b
[poincare] Un-inline the default Expression (and Layout...) constructors
2018-09-07 10:18:55 +02:00
Léa Saviot
e3a09286ac
[poincare] Remove AllocationFailures
2018-09-05 16:19:11 +02:00
Émilie Feral
c762b31bc2
[poincare] Replace the overriding of operator T() by an inline function
...
to cast Expression in Derived Expression
2018-09-05 13:46:39 +02:00
Émilie Feral
b482ba3403
[poincare] Fix several bugs: clone forgotten etc
2018-09-04 14:52:30 +02:00
Émilie Feral
abc9b96380
[poincare] squashUnaryHierarchy is done in-place
2018-09-04 14:52:24 +02:00
Léa Saviot
9312ff6cd6
[poincare] Update class Factor
2018-08-31 16:19:59 +02:00
Léa Saviot
3bad7fb70d
[poincarE] Refactor shallowBeautify, it is not const anymore
2018-08-31 11:08:30 +02:00
Émilie Feral
9f5e953104
[poincare] Fix Factor
2018-08-27 16:35:45 +02:00
Émilie Feral
556ea6b269
[poincare] Expression::Type --> ExpressionNode::Type
2018-08-24 13:13:37 +02:00
Léa Saviot
351370862d
[poincare] Refactor editableOperand to childAtIndex
2018-08-24 09:47:44 +02:00
Romain Goyet
56fb29786e
[poincare] ExpressionReference becomes Expression
2018-08-08 13:34:16 +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
Émilie Feral
1b6d798eef
[poincare] Fix memory leak
2018-02-01 12:19:33 +01:00
Émilie Feral
45684d439b
[poincare] Arithmetic::PrimeFactorization returns special cases when the
...
factorization fails. factor(integer) can fail and returns Undefined
2018-01-23 10:24:52 +01:00
Émilie Feral
b9dce68f04
[poincare] Create class Factor
2018-01-23 10:24:52 +01:00