Commit Graph

75 Commits

Author SHA1 Message Date
Léa Saviot
d5b07f1f90 [poincare] Implemment getUnit 2020-02-12 15:13:25 +01:00
Émilie Feral
3df80ed780 [poincare] ParameteredExpression: overrides getVariables to avoid
considering parameter as a variable
2020-02-12 15:13:25 +01:00
Léa Saviot
424ee9fa15 [poincare] Add SymbolicComputation parameter to the reduction context
This way, in solver, we can reduce expression without expanding symbols
2020-02-12 15:13:24 +01:00
Léa Saviot
0e64e89496 [apps/solver] Do not use symbol context if no solution found
Still replace the functions
2020-02-12 15:13:23 +01:00
Ruben Dashyan
dd80be026d [poincare] Rename shallowReplaceReplaceableSymbols to deep... 2020-02-12 15:13:15 +01:00
Ruben Dashyan
47ed5814a2 [poincare] Remove hasReplaceableSymbols 2020-02-12 15:13:15 +01:00
Émilie Feral
11b8ed72a1 [poincare] Do not infer ReductionTarget but give it as parameter of
denominator, addMissingFactors, factorizeSineAndCosine
2019-11-21 09:47:16 +01:00
Ruben Dashyan
77860aeee9 [poincare] Remove replaceUnknown
Unused anymore
2019-09-27 17:57:29 +02:00
Ruben Dashyan
d506bb4442 [poincare] Remove Expression::defaultReplaceUnknown
and substitute defaultReplaceSymbolWithExpression instead
2019-09-27 17:57:29 +02:00
Léa Saviot
61cf762eef [poincare] Expression::ReductionContext 2019-08-08 16:29:37 +02:00
Léa Saviot
3554f441c1 [poincare] Remove symbolic computation 2019-04-12 15:16:53 +02:00
Émilie Feral
653bdd6cdb [sequence] Add Poincare::Symbol::SpecialSymbols::UnknownN used in
Sequence
2019-04-12 15:16:52 +02:00
Émilie Feral
f6026254be [poincare] Add an argument ReductionTarget to shallowBeautify 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
ad8f0a73d9 [poincare] Fix Addition::shallowBeautify
B+A should be beautified in A+B
1+x should be beautified in x+1
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
38de794642 [poincare] Change signature setSign(Context, AngleUnit, ReductionTarget) 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
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
91163ae6f5 [poincare] Improve complexSquareNorm thanks to sign 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
be741415b0 [poincare] Fix comment 2019-01-10 11:42:03 +01:00
Émilie Feral
5dae60bc7e [poincare] Complex parts getters (realPart, imaginaryPart,
complexNorm...) simplify while building the complex part
2019-01-10 11:42:03 +01:00
Émilie Feral
fe6a5af47b [poincare] Change Expression::setSign signature 2019-01-10 11:42:03 +01:00
Émilie Feral
0c1e76c9c5 [poincare] Expression: add methods to get complex parts of expression 2019-01-10 11:42:02 +01:00
Léa Saviot
f6a5759a16 [poincare] Fix the replacement of unknowns in the storage
In the Graph app, define f(x) = cos(x) and g(x)=diff(f(x),x,x).
The graph and table are perfectly computed, but in the Calculation apps,
g(5) fails.
2018-12-19 09:40:37 +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
d126f6f9b2 [poincare] Get rid of Expression::reduceChildren which is very alike
deepReduceChildren
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
3273de4dac [poincare] Fix Expression::shallowReplaceReplaceableSymbols 2018-11-23 14:46:46 +01:00
Léa Saviot
d7d348deac [poincare] Fix ExpressionNode::shallowReplaceReplaceableSymbols 2018-11-23 12:04:10 +01:00
Émilie Feral
c01d66c77b [poincare] Change name: replaceReplaceableSymbols -->
shallowReplaceReplaceableSymbols
2018-11-23 12:04:08 +01:00
Léa Saviot
cb88dbc0a1 [poincare] Replacing iteratively only existing symbols 2018-11-23 12:04:06 +01:00
Léa Saviot
ada8f5f3c4 [poincare] Replace symbols with their expressions iteratively
... not recursively.
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
Léa Saviot
af41c42a97 [poincare] Store symbol children are not replaced during reduction 2018-11-23 12:04:01 +01:00
Léa Saviot
907eedd4bc [poincare] Use SymbolAbstract in setExpressionForSymbol 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
870cd926c1 [poincare] Fix getVariables argument type 2018-11-23 12:03:59 +01:00
Émilie Feral
8072520686 [poincare] Fix getLinearCoefficients, getVariables signature: the
variables table is a char * table
2018-11-23 12:03:58 +01:00
Émilie Feral
5beafd2bf3 [poincare] Change Expression::getVariables to get symbols with variable
sizes
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
Léa Saviot
3bbb8b39d1 [poincare] Add context argument to some ExpressionNode methods 2018-11-23 12:03:58 +01:00
Léa Saviot
0e5fb79212 [poincare] Use children() iterator instead of for(int i=0;i++) loop 2018-09-20 10:26:30 +02:00
Léa Saviot
ea948117a4 [poincare] Remove ExceptionNodes and UninitializedNodes 2018-09-05 17:54:08 +02:00
Émilie Feral
c6c71e2ed6 [poincare] Revert design of shallowReduce:
shallowReduce is supposed to be applied on Expression already attached
to their parent
2018-08-31 13:59:29 +02:00
Émilie Feral
ccda5c3831 [poincare] Redesign Expression and ExpressionNode to work with Reference 2018-08-30 16:08:09 +02:00
Émilie Feral
9fd3276563 [poincare] API Expression node v2 2018-08-30 15:06:38 +02:00