Léa Saviot
de2b3c22fe
[poincare] Use reduce instead of deepReduce in simplify
2018-11-23 12:04:06 +01:00
Léa Saviot
cb678e370e
[poincare] Escape when recursion too deep
2018-11-23 12:04:06 +01:00
Léa Saviot
54b2566b04
[poincare] Indent code to make it clearer
2018-11-23 12:04:06 +01:00
Léa Saviot
07c2d6a95e
[poincare] Interrupt simplification if current expression is matrix
...
Do not recursively check for matrices
2018-11-23 12:04:06 +01:00
Léa Saviot
861ba08198
Remove unneeded include
2018-11-23 12:04:06 +01:00
Léa Saviot
c7635c5e4d
[poincare] Encapsulate deepReduce in reduce
2018-11-23 12:04:06 +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
a859b69939
[poincare] No default type for Token constructor
2018-11-23 12:04:05 +01:00
Émilie Feral
8770c9010a
[poincare] Create Constant inheriting from SymbolAbstrac
...
pi, e and i are not symbols anymore but constant
2018-11-23 12:04:04 +01:00
Émilie Feral
e3d2b13758
[poincare] Fix Expression::getLinearCoefficients
2018-11-23 12:04:04 +01:00
Émilie Feral
03d0679d6f
[poincare] Symbol: rename shouldBeReplacedWhileReducing in !isConstant
2018-11-23 12:04:04 +01:00
Émilie Feral
9a18f5dbf9
[poincare] Symbol Pi, i, e aren't approximate
2018-11-23 12:04:04 +01:00
Léa Saviot
4d71a3a4c6
[apps/poincare] Do not replace symbols in result of 3+c->f(x)
2018-11-23 12:04:03 +01:00
Léa Saviot
af41c42a97
[poincare] Store symbol children are not replaced during reduction
2018-11-23 12:04:01 +01:00
Léa Saviot
5a9c0b1b84
[apps] GlobalCtxt::SetExpForFunctionRecord used in StorageCartesianFunction
2018-11-23 12:04:01 +01:00
Léa Saviot
97cba08b23
[apps] Clean GLobalContext
2018-11-23 12:04:01 +01:00
Léa Saviot
dd0d390a3f
[poincare] Fix Expression::ExpressionFromAddress
2018-11-23 12:04:00 +01:00
Léa Saviot
2793a622e2
[apps] Store function metadata in record
2018-11-23 12:04:00 +01:00
Léa Saviot
2442627e3c
[apps] Remove attributes from StorageExpressionModel and derivates
2018-11-23 12:04:00 +01:00
Léa Saviot
907eedd4bc
[poincare] Use SymbolAbstract in setExpressionForSymbol
2018-11-23 12:04:00 +01:00
Léa Saviot
63e5960ae1
[poincare] Handle empty record when creating its expression
2018-11-23 12:04:00 +01:00
Léa Saviot
4af3d27431
[poincare] ExpressionFromRecord is in Expression, not in GlobalContext
2018-11-23 12:04:00 +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
Léa Saviot
a7a719df4a
[poincare] Handle functions in replaceSymbolWithExp and similar methods
2018-11-23 12:03:59 +01:00
Léa Saviot
4b37163653
[poincare] Fix more "char * []" type problems
2018-11-23 12:03:59 +01:00
Émilie Feral
ccbcf18811
[poincare] VariableContext holds an Expression instead of a Float<T>
2018-11-23 12:03:59 +01:00
Émilie Feral
46427c59dd
[poincare] Fix Expression::getLinearCoefficients
2018-11-23 12:03:58 +01:00
Émilie Feral
256620854f
[poincare] Fix IsMatrix to be used as a ExpressionTest
2018-11-23 12:03:58 +01:00
Émilie Feral
904de27815
[poincare] Fix Expression::isMatrix and Expression::isApproximate
2018-11-23 12:03:58 +01:00
Émilie Feral
1fff98f1c4
[poincare] Change Expression methods' signature to work with const char
...
* symbol instead of char symbol
2018-11-23 12:03:58 +01:00
Émilie Feral
cc9995d4c2
[poincare] Change getLinearCoefficients to take a variable-sized
...
variables as paramaters
2018-11-23 12:03:58 +01:00
Émilie Feral
bc2ce86825
[poincare] Change signature: polynomialDegree,
...
getPolynomialCoefficients, getPolynomialReducedCoefficients
2018-11-23 12:03:58 +01:00
Émilie Feral
b6465ecba5
[poincare] Change replaceSymbolWithExpression signature
...
replaceSymbolWithExpression(char
symbol..)->replaceSymbolWithExpression(const char *..
2018-11-23 12:03:58 +01:00
Émilie Feral
540fab3908
[poincare] Symbol: first version with symbol of variable length
2018-11-23 12:03:58 +01:00
Émilie Feral
fdfa69a321
[poincare] Delete useless method
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
78ccb69b59
[poincare] Create Expression::reduceChildren and assert that deepReduce
...
is not called on a Matrix
2018-10-08 16:37:57 +02:00
Émilie Feral
e4b4fd7e52
[poincare] Clean wrong assertion
2018-10-05 11:46:59 +02:00
Émilie Feral
2297d1a7aa
[solver] Escape undefined equations
2018-10-05 11:46:59 +02:00
Émilie Feral
961a17b4e0
[poincare] Change replaceSymbolWithExpression implementation to be alike
...
deepReduce and deepBeautify
2018-09-26 16:19:09 +02:00
Émilie Feral
b7649bab8a
[poincare] deepReduce is authorized on non-matrix expressions only
2018-09-26 16:12:31 +02:00
Émilie Feral
68157e7c70
[poincare] getLinearCoefficients: the equation from which we look for
...
coefficients can be Undefined at some point (because it is the reduction
of 0*inf for instance)
2018-09-24 18:24:17 +02:00
Émilie Feral
365b145cf3
[poincare] Change names: LayoutReference-->Layout
2018-09-18 16:29:44 +02:00
Émilie Feral
d17b0f1afb
[poincare] Get rid of char table of variable size
2018-09-17 17:14:43 +02:00
Émilie Feral
e0495de6af
[poincare] Change name: TreeByReference --> TreeHandle
2018-09-14 17:22:36 +02:00
Émilie Feral
616e4c0bcc
[poincare] Change name: LayoutRef --> LayoutReference
2018-09-14 16:57:12 +02:00
Romain Goyet
47fe5d829a
[poincare] Use a re-entrant parser
...
This removes all global variables
2018-09-12 14:11:20 +02:00
Romain Goyet
1f69558787
[poincare] Deal with Bison's global variable by using a static var
...
We will eventually clean the buffer on the next run if we got
interrupted
2018-09-12 14:11:20 +02:00
Émilie Feral
bd5af83d96
[poincare] Fix TreeNode::log
2018-09-07 15:54:23 +02:00
Émilie Feral
7feef8f266
[poincare] Expression: approximateToEvaluation does not handle
...
Uninitialized Expression but approximate does
2018-09-07 15:54:23 +02:00