jos
8cfabebdfb
Oops. committed missing files
2015-03-31 22:23:32 +02:00
jos
8a68bb56e4
Merged math.js v1.5 into v2. Format support of functions eye and diag still needs to be fixed
2015-03-31 22:07:47 +02:00
jos
5cab0641e9
Simplified the factory structure a little bit. Reworked reviver and BigNumber to factories
2015-03-26 21:03:55 +01:00
Rogelio J. Baucells
0d34992080
Merge pull request #23 from josdejong/develop
...
Sync
2015-03-19 00:06:26 -04:00
Max Bruckner
e04dfd26bc
Rename customFuncions to callbacks
2015-03-17 18:30:26 +01:00
Max Bruckner
47f76f35ac
Limit custom toTex with multiple callbacks to FunctionNodes
...
Now only FunctionNode's toTex can be overwritten mit a map of callbacks
2015-03-17 18:14:14 +01:00
Max Bruckner
a973482ef2
Fix bug in fix of breaking change
...
Without this fix, the type passed to ArrayNode.toTex would stay there
forever until you change it back manually instead of being used only
once.
2015-03-14 09:09:07 +01:00
Max Bruckner
af763aa996
Fix breaking change (Node.toTex should return an empty string)
2015-03-13 21:23:14 +01:00
Max Bruckner
c9d20285e9
Fix breaking change ( passing type to ArrayNode.toTex )
2015-03-13 21:23:14 +01:00
Max Bruckner
0fee9173c8
Enable custom toTex functions
2015-03-13 21:23:14 +01:00
Max Bruckner
35ce7f7fb4
Make Node.toTex a wrapper like Node.compile
...
Node.prototype.toTex is now a wrapper that calls the node's _toTex
2015-03-13 21:23:14 +01:00
Max Bruckner
37c1363c2d
Pass callbacks to toTex functions
2015-03-13 21:23:13 +01:00
Rogelio J. Baucells
2077c39885
Matrix inheritance implementation
2015-03-10 15:28:19 -04:00
Jos de Jong
81e56601d2
Merge branch 'develop' into v2
2015-03-09 20:19:12 +00:00
jos
9efd1fb4fb
Call Chain.createProxy externally, removes dependency on math namespace from Chain
2015-03-06 17:11:26 +01:00
Rogelio J. Baucells
da377b9fb7
Parser fixes
2015-03-04 14:39:53 -05:00
Rogelio J. Baucells
b4463d9ef3
Initial require() changes
2015-03-04 13:53:32 -05:00
Max Bruckner
6a9c2df38c
Update FunctionAssignmentNode to better handle parenthesis
2015-03-01 17:10:09 +01:00
Max Bruckner
bb2bfc939c
Update AssignmentNode to better handle parenthesis
2015-03-01 17:02:42 +01:00
Max Bruckner
b2d868c2ed
Update OperatorNode's toTex to better handle parens
...
Use the new infrastructure in OperatorNode's toTex
2015-03-01 16:34:09 +01:00
Max Bruckner
b5ce799e9d
New generic toString for AssignmentNode
2015-03-01 10:35:04 +01:00
Max Bruckner
1f2f42012c
New generic toString for FunctionAssignmentNode
2015-03-01 10:35:04 +01:00
Max Bruckner
b1a438fd7f
New generic toString for RangeNode
2015-03-01 10:35:03 +01:00
Max Bruckner
9489fbf9dc
New generic toString for ConditionalNode
2015-03-01 10:35:03 +01:00
Max Bruckner
1ac3319656
OperatorNode: validate input
2015-03-01 10:35:03 +01:00
Max Bruckner
0e5a6e5a38
New generic toString for OperatorNode
2015-03-01 10:35:03 +01:00
Max Bruckner
946df4d4b2
Function to calculate all necessary parentheses
...
calculateNecessaryParentheses takes an OperatorNode and it's arguments
and calculates which of those arguments need to be put in parentheses
based on precedence and associativity.
2015-03-01 10:35:03 +01:00
Max Bruckner
2e51086fda
Function to check associativity between operators
...
'isAssociativeWith(a,b)' to check if a is associative with b.
Example:
'+' is associative with '-' because (a+b)-c=a+(b-c)
2015-03-01 10:35:03 +01:00
Max Bruckner
91c0dd6b6d
Function getAssociativity
...
Function to get the left/right associativity of an operator
2015-03-01 10:35:03 +01:00
Max Bruckner
9a3c3f9f95
Function getPrecedence to get operator precedence.
2015-03-01 10:35:03 +01:00
Max Bruckner
6aa8b764f4
List of operator precedence and their properties.
2015-03-01 10:35:03 +01:00
Max Bruckner
d593e749e9
New function getIdentifier() for Nodes
...
getIdentifier() returns a String that contains the name of the node and
the function associated with it ( in case of FunctionNode and
OperatorNode ).
2015-03-01 10:35:03 +01:00
jos
27b436d108
Released version 1.4.0
2015-02-28 22:02:12 +01:00
Jos de Jong
4669542079
Merge pull request #277 from FSMaxB/totex-fix
...
Fix missing brackets in LaTeX output (bug #273 )
2015-02-20 12:41:41 +00:00
jos
70a476c357
Replaced all require('decimal.js') with require('../type/BigNumber'), containing the toJSON and fromJSON methods for BigNumber
2015-02-18 20:41:27 +01:00
Max Bruckner
183d15fcfe
OperatorNode: remove unnecessary elseif
2015-02-14 02:36:57 +01:00
Max Bruckner
bbe22a9055
fix: no brackets with single operators (bug #273 )
...
* Use brackets after unary minus followed by an OperatorNode with + or -
- "-(a+b)", "-(a-b)"
* Use brackets in fron of postfix operators like '!' (for OperatorNode)
- "(a*b)!", "(a+b)!"
2015-02-14 02:36:38 +01:00
Max Bruckner
23b1890f7e
fix indentation of previous commit
2015-02-14 01:48:54 +01:00
Max Bruckner
9b6d7ead9f
Fix missing brackets in LaTeX output (bug #273 )
...
When creating the LaTeX output for expressions like 1-(1+1) or 1-(1-1),
the bracket's where missing.
2015-02-13 16:51:40 +01:00
jos
beb4e2e536
Released version 1.3.0
2015-02-09 21:43:00 +01:00
jos
86bcd55352
Changed the way transforms are registered internally, making Node.compile faster, and enabling lazy-loading constants
2015-01-13 10:48:52 +01:00
jos
79f4d7fbe3
Some minor fixes in the docs
2014-12-30 19:57:34 +01:00
jos
97163135b2
Implemented xor operator ^| in the expression parser
2014-12-25 15:45:54 +01:00
jos
73b67bfc09
Removed logical not operator ! (so now we just have logical operators and, not, or, xor).
2014-12-25 14:21:16 +01:00
jos
2614ca6203
Added docs for xor, removed docs of _divide
2014-12-25 14:11:15 +01:00
jos
5a3e55f39b
Added docs on bitwise and logical functions for expression parser
2014-12-23 21:25:34 +01:00
jos
af08c269f3
Added operators &, |, <<, >>, >>> not, and, or to the expression parser
2014-12-23 16:25:32 +01:00
jos
5f4603bfcb
Added docs for gamma function
2014-12-23 14:21:44 +01:00
Favian Contreras
2a5b242091
Added boolean not to parser, and added corresponding test cases.
2014-12-17 01:14:33 -08:00
Favian Contreras
6c1197f646
Added '~' to the parser.
2014-12-15 03:43:10 -08:00