Commit Graph

60 Commits

Author SHA1 Message Date
É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
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
Léa Saviot
db1eb1072f [poincare/determinant] Try to compute exactly for dim > 3 2019-08-08 17:22:04 +02:00
Émilie Feral
fd25b678ce [poincare] Split Multiplication into MultiplicationExplicite and
MultiplicationImplicite
2019-08-08 17:22:02 +02:00
Léa Saviot
de8b124808 [poincare] Determinant::shallowReduce computes for dimension <= 3 2019-08-08 16:29:38 +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
Léa Saviot
3554f441c1 [poincare] Remove symbolic computation 2019-04-12 15:16:53 +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
4841542750 [poincare] Add ComplexFormat argument to the approximation routine 2019-01-10 11:42:05 +01:00
Émilie Feral
5e434a4c33 [poincare] Get rid of useless arguments in shallowReduce 2019-01-10 11:42:04 +01:00
Émilie Feral
26e2e9be0d [poincare] Add complex format as an argument of simplification 2019-01-10 11:42:04 +01:00
Émilie Feral
58eab04c5f [poincare] Expression: add an argument to reduce routine.
Reduction can be done for:
- the user
- a top-down computation
- a bottom-up computation
2018-11-30 09:53:31 +01:00
Émilie Feral
cf92eb8506 [poincare] Discard useless argument 'replaceSymbols' from simplification
routine
2018-11-30 09:53:31 +01:00
Léa Saviot
8a272458de [poincare] recursivelyMatches takes replaceSymbols parameter
This fixes:
[7]->a
1+2->a
The second operation would get interrupted because 'a' is a matrix if
symbols are replaced
2018-11-23 12:04:07 +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
Léa Saviot
3809ef222d [poincare] deep and shallow Reduce have a "replace symbol" bool param 2018-11-23 12:03:59 +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
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
Léa Saviot
5764ee535d [poincare] Update derivative, division and determinant 2018-08-31 15:43:53 +02:00
Léa Saviot
cb9b498c9f [poincare] Change Node::shallowReduce call to Expression's 2018-08-31 14:05:08 +02:00
Léa Saviot
c9084816d7 [poincare] Change shallowReduce signature 2018-08-31 14:04:05 +02:00
Léa Saviot
c97f3cc929 [poincare] In Node::shallowReduce, pass futureParent to the Expression 2018-08-31 11:11:16 +02:00
Léa Saviot
832ccfaf23 [poincare] shallowReduce has additional argument and is not const 2018-08-31 11:03:41 +02:00
Émilie Feral
79dffb89c6 [poincare] Fix Determinant 2018-08-27 14:00:33 +02:00
Émilie Feral
556ea6b269 [poincare] Expression::Type --> ExpressionNode::Type 2018-08-24 13:13:37 +02:00
Léa Saviot
0a806a582a [poincare] Refactor operand() to childAtIndex() 2018-08-24 09:54:33 +02:00
Léa Saviot
351370862d [poincare] Refactor editableOperand to childAtIndex 2018-08-24 09:47:44 +02:00
Léa Saviot
fe77449ea4 [poincare] Refactor the first lines of shallowReduce 2018-08-24 09:45:34 +02:00
Léa Saviot
9e0702a13c [poincare] Refactor to make shallowReduce const 2018-08-23 17:08:47 +02:00
Émilie Feral
f06fe953ce [poincare] Change call to Expression::shallowReduce to
Expression::defaultShallowReduce to avoid infinite loop
2018-08-17 12:10:37 +02:00
Romain Goyet
56fb29786e [poincare] ExpressionReference becomes Expression 2018-08-08 13:34:16 +02:00
Romain Goyet
b44e643b18 [poincare] EvaluationReference becomes Evaluation 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
dd0bc491f6 [poincare] Replace Poincare::Complex by std::complex 2018-07-18 16:32:49 +02:00
Émilie Feral
7ebc0cc7a3 [poincare] Re-implement determinant and inverse on Matrix to use
rowCanonize
2018-06-07 13:46:18 +02:00
Émilie Feral
fda382cc0d [poincare] Change name: evaluate->approximate
Change-Id: I649a7c640190713dcf063a4148decd6038e62796
2017-11-24 13:31:44 +01:00
Émilie Feral
37dd3db06e [poincare] Do not simplify expressions with matrix
Change-Id: I0b4c5fabf3e0669c50ecefc95a2896e945b8c5d9
2017-11-17 13:34:47 +01:00
Émilie Feral
b3f8156cfe [poincare] Fix Expression::IsMatrix
Change-Id: I7956ba5c293431f91020e2211245da8fafdd5e1b
2017-11-17 13:34:47 +01:00