Commit Graph

60 Commits

Author SHA1 Message Date
Émilie Feral
7142f9545e [poincare] Finish replacing approximateContext 2020-11-04 15:58:41 +01:00
Émilie Feral
75dc415e27 [poincare] Step I: add a parameter to approximation routines to indicate
if we're within a reduction routine
2020-11-04 15:58:40 +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
Léa Saviot
26be1e4b0d [poincare] Use SortedIsMatrix when necessary 2019-08-08 16:29:38 +02:00
Léa Saviot
7cf3ce4fee [poincare] Expression::mapOnMatrixChild -> mapOnMatrixFirstChild 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
de2d9f7c57 [poincare] SerializationHelper::Map -> Expression::mapOnMatrixChild 2019-08-08 16:24:51 +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
Léa Saviot
b6eb663f53 [ion/kandinsky] Move unicode to ion 2019-04-12 15:16:51 +02:00
Léa Saviot
63d7155376 Remove Ion::Charset 2019-04-12 15:16:50 +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
Léa Saviot
e5f0959239 [poincare] Static Expression methods start with uppercase 2019-01-10 11:42:05 +01: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
26e2e9be0d [poincare] Add complex format as an argument of simplification 2019-01-10 11:42:04 +01:00
Émilie Feral
1f247b731d [poincare] Discard useless parameters of sign and isReal methods 2019-01-10 11:42:04 +01:00
Émilie Feral
5c98ff15cd [poincare] Clean AbsoluteValue and ComplexArgument 2019-01-10 11:42:03 +01:00
Émilie Feral
6794f8c802 [poincare] Add comments 2019-01-10 11:42:03 +01:00
Émilie Feral
8a00aa16cc [poincare] Clean: remove complexCartesian and complexPolar methods 2019-01-10 11:42:03 +01:00
Émilie Feral
2f8a65d04c [poincare] Improve shallowReduce of AbsoluteValue, ComplexArgument,
ImaginaryPart, RealPart
2019-01-10 11:42:03 +01:00
Émilie Feral
c62922ec5c [poincare] Change complex getters design: extract real and imaginary
parts at the same time in complexCartesian and norm and arg in
complexPolar
2019-01-10 11:42:03 +01:00
Émilie Feral
64aebcf16d [poincare] Implement shallowReduce of ComplexArgument, AbsoluteValue,
RealPart and ImaginaryPart
2019-01-10 11:42:03 +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
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
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
a46d7c0869 [poincare] Update ComplexArgument and ConfidenceInterval 2018-08-31 15:25:05 +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
Léa Saviot
a24d317b0f [poincare] ComplexArgument 2018-08-27 10:59:33 +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
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
Émilie Feral
cb4bb4f8f0 [poincare] Engine-->Helper and break LayoutHelper into LayoutHelper and
SerializationHelper
2018-08-08 14:00:52 +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