Commit Graph

124 Commits

Author SHA1 Message Date
Émilie Feral
85fcc9c705 [poincare] Create the method getPolynomialCoefficients on Expression 2018-06-07 13:46:18 +02:00
Émilie Feral
1cac2693c3 [poincare] Implement getVariables on Expression 2018-06-07 13:46:18 +02:00
Léa Saviot
08f3c834c6 [poincare] Remove un-needed assert.
Change-Id: I2eb568d440f2e4f484d0ff358a55f4ba782c263b
2018-04-20 11:18:19 +02:00
Émilie Feral
a9e8cc3f35 [poincare] fix characteristicXRange to take into account radian unit 2018-04-10 11:26:43 +02:00
Émilie Feral
660775903f [poincare] Add method Expression::characteristicXRange 2018-03-22 10:48:06 +01:00
Émilie Feral
1b10cbdbb3 [poincare] Add a method: Expression::polynomialDegree 2018-03-22 10:48:06 +01:00
Émilie Feral
6de71ae145 [poincare] Clean: convertFloatToText should be in PrintFloat instead of
Complex
2018-03-21 15:57:19 +01:00
Émilie Feral
4731cbd6e0 [poincare] Fix parenthesis addition on Complex object
Implement 'needParenthesisWithParent' instead of 'operandNeedParenthesis'
2018-01-30 16:17:03 +01:00
Émilie Feral
006a36c63c [poincare] Fix operandNeedParenthesis 2018-01-30 16:17:03 +01:00
Émilie Feral
59fdcde548 [poincare] Avoid returning partial simplification when the
simplification process has been interrupted
2018-01-30 16:17:03 +01:00
Émilie Feral
0963254e03 [poincare] Fix confusion between Symbol::hasAnExactRepresentation and Symbol::isApproximative 2018-01-23 10:25:09 +01:00
Émilie Feral
785c6a7329 [poincare] When replacing ans, add parenthesis if necessary 2018-01-16 15:17:16 +01:00
Émilie Feral
775432efdc [poincare][apps] Replace Ans symbol when preprocessing the calculation 2018-01-16 15:17:16 +01:00
Émilie Feral
17fc7998a2 [apps] Calculation: Ans is exact only when the expression hold is exact 2018-01-16 15:17:16 +01:00
Léa Saviot
cb7b48adb6 [poincare] ExpressionArray is now a class, not a method.
Before, it was a method of Expression and returned a static array.
However, we have no guarantee that the function will not be called again
while the array is being used, thus erasing the previous array.

Change-Id: Ic640cee7edeb3b2805febde6287414a1497a5b4c
2018-01-16 12:18:48 +01:00
Émilie Feral
4cbe8fbf52 [poincare] Stopping the process inside a SimplificationOrfer call is not
always enable

Change-Id: Iad4cc54d4f9b139e967ead8ee6f8e9635cc39351
2017-12-04 17:57:19 +01:00
Émilie Feral
a20e6ee2ed [poincare] Enable interrupting some methods in Simplify that are called
recursively

Change-Id: I5b8c0de51617a3a36b3c8bc673de66dc60e74483
2017-12-01 17:22:05 +01:00
Émilie Feral
36e8898178 [poincare] Consider symbols M* as matrix expressions
Change-Id: I0050fa16119b883c67a5098a215ddb5932ce0f2f
2017-11-27 11:03:06 +01:00
Émilie Feral
2c06727f36 [apps] Simplify expressions in sequence and function applications
Change-Id: I2708934d3b5c90e8692e50d939b3a13028b8615e
2017-11-24 14:39:06 +01:00
Émilie Feral
fda382cc0d [poincare] Change name: evaluate->approximate
Change-Id: I649a7c640190713dcf063a4148decd6038e62796
2017-11-24 13:31:44 +01:00
Émilie Feral
76cbd2678d [poincare] Change names: approximate->approximateToScalar
Change-Id: I701451b35909bb577dd729e0ea76a405b9543f23
2017-11-24 12:06:35 +01:00
Émilie Feral
e6762bb25c [poincare] Merge Hierarchy into Expression class
Change-Id: Iea40f14e76dede947ffff1c63d53f6727d730e49
2017-11-24 11:53:39 +01:00
Romain Goyet
52bdf4a41f Merge branch 'cas_with_app_copy' into python_console 2017-11-21 18:44:38 +01:00
Émilie Feral
2d44374f09 [poincare] Fix bug in TermIsARationalSquareRootOrRational: check that
the only operands of the multiplication are a rational and a square root

Change-Id: I16418363c883798eb7a4056d0fae7d29eb459936
2017-11-20 15:34:10 +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
Émilie Feral
53c66baa16 [poincare] Re-enable matrix in simplified expression-> handle matrix in
evaluate

Change-Id: I455845398f0799b9e25fd192ada7478c872ab892
2017-11-17 13:34:46 +01:00
Émilie Feral
378b54820d [poincare] Fix bug in recursively match
Change-Id: Iae03ed3440bd1f1ca39aef04f57bd36dc7bf036a
2017-11-10 23:58:28 +01:00
Émilie Feral
d5fc8d139f [poincare] First version of Simplification with matrix (no tests yet!)
Change-Id: I28ad4750ad31995836b23725f7d715669fcb7ae2
2017-11-10 15:22:33 +01:00
Émilie Feral
8aa4444337 [poincare] Rather check for undefined operand in shallowReduce instead
of in deepReduce

Change-Id: I6db09297c75867178d83f27909f915b53ec161c9
2017-11-10 15:13:44 +01:00
Émilie Feral
12b20321d1 [poincare] Resolve bug when getting rid of square root at denominator
Change-Id: I0b1a6c92c55cfb42a5be70cf9250b4906020c6f9
2017-11-07 14:19:06 +01:00
Émilie Feral
b1567cf9f3 [poincare] Add an assertion in deepReduce/ deepBeautify, this must have
a parent

Change-Id: Ia23be0c62734811923133793dd5bee0859b64ca8
2017-11-06 10:32:38 +01:00
Émilie Feral
f0af91321a [poincare] Change name: simplify->reduce
Change-Id: I7291c9f46406cc0f4b612090422aaecad45115c8
2017-11-03 15:38:23 +01:00
Émilie Feral
dee9ec62c1 [poincare] Change name: simplify--> Simplify
Change-Id: I6430468ce12fe1debe5023b0a1215726b17d9f50
2017-11-03 15:33:39 +01:00
Émilie Feral
3c2876aa25 [poincare] Add a method to Reduce
Change-Id: I831b9c98dff6c15ddbf4111bd9715776b0f7bc5d
2017-11-03 15:33:12 +01:00
Émilie Feral
9636f087cc [poincare] Clean
Change-Id: Ibbdd8479337ab1204c6a53255205255e02290c17
2017-10-31 15:01:16 +01:00
Émilie Feral
13ef08d628 [poincare] Change Expression::compareTo to SimplificationOrder
Change-Id: I0f3dff0a0933f55164573623253ee24f1a85d2a7
2017-10-31 11:25:12 +01:00
Émilie Feral
8fefc092b1 [poincare] Change name and API of containType
Change-Id: I57617c13a810400a13de774b0abc23db9adf9d15
2017-10-30 18:04:52 +01:00
Émilie Feral
dbddba007e [poincare] Change names of simplify and beautify and made them private
Change-Id: I1a261cd272e524746896601cd28dd311c5e874c7
2017-10-30 17:57:26 +01:00
Émilie Feral
fd3605a4ba [poincare] Create a method editableOperand in expression to avoid
const_cast

Change-Id: Icd5531eb7693ced0214a4be6d0c9f6d1220afea5
2017-10-30 17:09:09 +01:00
Émilie Feral
6781a83054 [poincare] Test for Undefined operand before calling immediateSimplify
Change-Id: I4baf8e004cc62700b8ad026dcd8be0ae8ebefbeb
2017-10-26 10:01:14 +02:00
Émilie Feral
217a44c049 [poincare] Add context and angle unit as simplify parameters
Change-Id: I0167bf968da7cfd521676a7ace05792e5b560284
2017-10-25 18:19:00 +02:00
Émilie Feral
a0ca7009ba [poincare] Implement Expression::containType
Change-Id: Ifa894768191cd75a5a529b50fd540e0bb2a10dc5
2017-10-25 18:18:59 +02:00
Romain Goyet
f34146be5e [poincare] Comment-out unused code 2017-10-19 17:31:40 +02:00
Émilie Feral
ad9cf7d322 [poincare] Fix bug in expression
Change-Id: Ia91399388a00cbbec32b7b0a3e2859e68ee2fe42
2017-10-13 18:26:45 +02:00
Émilie Feral
0743e91ed5 [poincare] Create a header for SimplificationRoot
Change-Id: I83f23c0b7b036e193510eb2c31943e9b6c32a2bc
2017-10-13 17:42:21 +02:00
Émilie Feral
0c1af71950 [poincare] Homogenize beautify and simplify implementation
Change-Id: Id8fabad0534c7ab075738fd7ff2e99d4f6e6bb06
2017-10-13 11:30:11 +02:00
Émilie Feral
2cfaed4366 [poincare] Change default immediate simplify
Change-Id: I427b3b6d50bc47bf3fe2d64df263d40f9ecf79e0
2017-10-12 14:51:17 +02:00
Émilie Feral
64b3824119 [poincare] immediateSimplify should return Expression *
Change-Id: Ib0464cca0095095e022788c3a9c183eec600cf88
2017-10-12 11:47:52 +02:00
Émilie Feral
90db4e0bd9 [poincare] Change design of immediateBeautify
Change-Id: Ifb30b89b30af1df7eca855cc2cea2da75206fc96
2017-10-11 15:36:54 +02:00