Felix Raimundo
b13fb99653
Add the equivalentTo to expression.
...
Change-Id: I773542d7434bb357976774f3cb746d41fdf74911
2016-04-18 18:48:56 +02:00
Felix Raimundo
47f361a667
Make the addition public.
...
Change-Id: I9b277f0a959f36453215de7dbb98b8f8dad69544
2016-04-18 18:48:56 +02:00
Felix Raimundo
39d6f9b1d5
make isIdenticalTo aware of commutativity.
...
Change-Id: I43c333d9aef9fe10ad042c56996a157c04c0830a
2016-04-11 12:57:49 +02:00
Felix Raimundo
2f7b1f4860
Add the cloneWithNewOperands method.
...
This allows to replace the operands of an expression with new ones.
Change-Id: I3c2d183bbdbcc43b776f7ce2a302216c52e494bd
2016-04-11 12:21:14 +02:00
Felix Raimundo
ac29d1e9aa
Add the isCommutative method to expression.
...
Change-Id: I657df96c5e24168ecd04470252549ed84eb2cfe3
2016-04-05 15:53:29 +02:00
Romain Goyet
b9722aa0d8
Merge branch 'master' of ssh://git.numworks.com:29418/CalcOS
...
Change-Id: I3a0f53c58707de1100412dc6572abe6b852e9cb2
2016-04-01 15:09:34 +02:00
Felix Raimundo
6238b5a110
Add the ability to match on values.
...
Change-Id: Id38aad5b64913c948966c980fb4415749b2c435d
2016-04-01 15:05:20 +02:00
Romain Goyet
de2f83e8bd
Poincare: Put the AST printing in its own file
...
Change-Id: I1793fa2057098f31a549faf6bf39e64c333b5b06
2016-04-01 15:02:31 +02:00
Felix Raimundo
ed2c4cfb59
First version of the simplifications.
...
Change-Id: Idbddb92b6bd098d6b862f5fc4abd741948e15194
2016-04-01 11:32:11 +02:00
Felix Raimundo
7ddd1fc112
WIP - Remove dead code / files.
...
Change-Id: I13a1a871b6ab746377c6b0e79ee887fb6c0e0e6d
2016-03-30 11:26:15 +02:00
Felix Raimundo
5e01cfe421
Add baseline for pretty printing.
...
Change-Id: I77e76cb4b6191992137dd83f366006115ae65661
2016-03-29 13:41:37 +02:00
Felix Raimundo
3710103f40
Change the layout creation.
...
The father now sets itself as teh father of its children.
ExpressionLayout do not know anything about expressions now.
Change-Id: I28954c78f3102eec056ebbc3c52ccd862a5ab8fd
2016-03-25 14:35:00 +01:00
Félix Raimundo
2744d942e1
Merge changes I44c1bed2,Ibcf1dd17,Id02daf67
...
* changes:
Use proper english name for sine.
Add parsing test for trigo functions.
Horizontal layout finished.
2016-03-25 11:09:20 +01:00
Félix Raimundo
d7d00fefd7
Merge changes I6b4d6be5,Ie87dc145,I87e12b9c,I5d37ed0a,Ia52f38da
...
* changes:
Update functions to use the clone interface.
Horizontal layout
Remove call to get_char to fix tests.
Rename text_input to utils, add a util in it.
Add the Function and trig functions classes and layout.
2016-03-25 11:09:17 +01:00
Felix Raimundo
144ec9d556
Use proper english name for sine.
...
Change-Id: I44c1bed203b126e0bd36be1efe00b7f5df9cff06
2016-03-24 18:40:41 +01:00
Romain Goyet
b79e7483f4
Poincare: Adding SimplifyAdditionMerge
...
Change-Id: I6f922cce8178d5313a46d611e7ab166c52282127
2016-03-24 17:47:04 +01:00
Felix Raimundo
4707459a19
Update functions to use the clone interface.
...
Change-Id: I6b4d6be5b1d963bc7d97851432e40844d3619d8d
2016-03-24 16:54:53 +01:00
Felix Raimundo
d105236da9
Add the Function and trig functions classes and layout.
...
We create an abstraction for functions with the function class.
Change-Id: Ia52f38da2ab3fb6781ad77c1b909676c53a4f424
2016-03-24 16:09:25 +01:00
Romain Goyet
c43211cb45
Poincare: Expression::isIdenticalTo
...
Change-Id: I4a28b5b771efc5a00f49aeaa725c264e87e96c88
2016-03-24 15:51:22 +01:00
Romain Goyet
32745b9fe4
Misc cleanups
...
Change-Id: Ie9b5c06a3db22109e92197e4627d72a16c6bf54a
2016-03-24 15:50:52 +01:00
Romain Goyet
202d110488
Add a BinaryOperation class
...
Parent of Fraction, Power, Subtraction
Change-Id: Ibb03e96062acd4870c5f10fe21eeea896a5927ec
2016-03-24 15:49:58 +01:00
Romain Goyet
aa3595ad54
Poincare: Add a LeafExpression class
...
Parent of Symbol, Integer, Float
Change-Id: I866ec888b007ea8e486f5627039f934bddcc9ace
2016-03-24 15:48:11 +01:00
Romain Goyet
0d7813dc7b
Poincare: Expressions can now be cloned
...
Change-Id: I5a291c56dd031ec5e7aa6fbfe09823807f1b0e3c
2016-03-24 13:35:16 +01:00
Romain Goyet
ae3f087a95
Poincare: CommutativeOperation can take an expression of any length
...
Change-Id: Icf86134c9d3daf14636b073c8215a4e614d2b3f6
2016-03-24 13:10:41 +01:00
Romain Goyet
6edb36cef3
Poincare: Expression parsing shouldn't modify the string
...
Change-Id: I29bd1a81fa0b88b7151e3a79a47d287e9775b357
2016-03-24 13:09:54 +01:00
Romain Goyet
3e5695de21
Poincare: Add a CommutativeOperation class
...
Change-Id: I420ff65050de513d7b7db94afed2e5bb9f044390
2016-03-24 11:42:08 +01:00
Romain Goyet
dfdaa54928
Poincare: Clean the Expression::Type
...
Change-Id: I3809a8b1b040314466554866555fb634c35156a5
2016-03-24 10:19:04 +01:00
Romain Goyet
2f77d70369
Poincare: Product can now have more than two factors
...
Change-Id: Ia9d606e1a3a1649265fdcfe5e2ba8579e7fd7c7b
2016-03-23 17:52:26 +01:00
Romain Goyet
d3b0841af6
Poincare: Add a simplifier
...
Change-Id: Iac53c9b7dda5cb284fe750bb84c92ce5d1fba497
2016-03-23 17:24:11 +01:00
Felix Raimundo
3c514a78e0
Change Substraction to Subtraction.
...
Only changed the files name last time.
Change-Id: I85a809f9ea349e1bec771c61a18d4b5e9b491fdc
2016-03-22 18:39:59 +01:00
Felix Raimundo
08ba297780
Adds the subtraction expression.
...
Change-Id: Ia0f14e8919df354f68cfee91776ccf12b452df64
2016-03-18 14:33:39 +01:00
Felix Raimundo
0059fe78fa
Updates the addition code to use attributes.
...
We use a left and right attribtes instead of a children table.
Change-Id: Ic11846bcf0763c717834124d626cb352a30e1045
2016-03-18 14:24:25 +01:00
Felix Raimundo
b33eb99067
Adds the power and parentheses to the parser.
...
Also removes some dead code and adds buttons in order to have parentehses.
Change-Id: Iaf6d678f765bb6a1c3405818738c51661aa43e12
2016-03-18 13:00:17 +01:00
Romain Goyet
15d91052f2
[Poincare] Handle symbol/context
2015-11-18 22:31:21 +01:00
Romain Goyet
2a29d0354b
[poincare] Parse variables
2015-09-29 23:09:01 +02:00
Romain Goyet
b6aded4d8f
[poincare] Expression deletion
2015-09-29 21:59:58 +02:00
Romain Goyet
94adb97bd9
[poincare] Proper virtual destructor for ExpressionLayout
2015-09-22 16:35:14 +02:00
Romain Goyet
781046491e
[poincare] absoluteOrigin
2015-09-22 12:14:28 +02:00
Romain Goyet
71bae0c7cf
[poincare] Proper layout engine
2015-09-21 23:58:33 +02:00
Romain Goyet
73052ed07f
[poincare] Integer addition and subtraction
2015-09-21 17:49:51 +02:00
Romain Goyet
9473d0d89e
[poincare] handle relative integer product
2015-09-21 14:49:54 +02:00
Romain Goyet
903d35701a
[poincare] Relative Integer
2015-09-21 14:40:00 +02:00
Romain Goyet
73de311edc
[poincare] integer comparison
2015-09-21 12:05:30 +02:00
Romain Goyet
fc08a651cc
[poincare] Separate the layout logic
2015-09-21 10:37:22 +02:00
Romain Goyet
986864afb9
[poincare] Cleanup
2015-09-20 19:02:53 +02:00
Romain Goyet
46e3e614bf
[poincare] approximate
2015-09-17 20:15:20 +02:00
Romain Goyet
98f6929b03
[poincare] integer memory is freed
2015-09-17 16:19:06 +02:00
Romain Goyet
1a88f2b392
[poincare] refactor Integer
2015-09-17 15:10:45 +02:00
Romain Goyet
98b3080062
[poincare] add const qualifier
2015-09-16 21:26:27 +02:00
Romain Goyet
6aedfb66e3
[Poincare] Proper Integer approximation
2015-09-16 19:14:11 +02:00