Max Bruckner
291d620972
Pass local configuration to toTex functions
2015-05-16 13:27:48 +02:00
Max Bruckner
e383c1c2ce
Throw errors when trying to toTex/toString a Node interface
2015-05-16 13:21:39 +02:00
Max Bruckner
4159064a33
Node.toTex: remove dependency on FunctionNode
...
This is achieved by overriding parts of Node.toTex in FunctionNode.toTex
2015-05-16 13:21:38 +02:00
jos
0c1e9deeeb
Implemented configuration value {number: 'fraction'}. Added docs and example for fractions.
2015-05-12 14:40:47 +02:00
Max Bruckner
474a2330c5
ParenthesisNode: Bugfix: call the toString wrapper function
2015-05-09 21:22:29 +02:00
Jos de Jong
7d14e3349f
Merge pull request #360 from FSMaxB/ParenthesisNode_v2
...
ParenthesisNode and parenthesis configuration options for v2
2015-05-09 21:03:06 +02:00
Jos de Jong
34d8ab536f
Merge pull request #361 from rjbaucells/v2
...
Algebra updates / additions
2015-05-08 20:44:26 +02:00
Max Bruckner
aa7ca9178f
Implement 'all' parenthesis option
2015-05-08 09:07:15 +02:00
rjbaucells
e8111f3958
doc updates
2015-05-07 23:50:53 -04:00
rjbaucells
dd6335a6db
lsolve() and usolve()
2015-05-07 23:43:28 -04:00
Max Bruckner
5767f1f912
OperatorNode: Fix bug from wrong use of getIdentifier
...
1+(1+1) with parenthesis set to 'auto' triggered a bug because
getPrecedence gets the precedence of the content of a node, but
getIdentifier still returns the 'ParenthesisNode' identifier in case of
a ParenthesisNode.
2015-05-07 12:04:53 +02:00
Max Bruckner
2959858b99
operators: Use config when calculating precedence etc.
...
Use the parenthesis configuration to decide wether ParenthesisNodes
should be skipped or not.
2015-05-07 10:13:43 +02:00
Max Bruckner
60e2b5700a
ParenthesisNode: Make use of the parenthesis config option
2015-05-07 10:13:41 +02:00
Max Bruckner
6c2cd7f7b7
Node: add method 'getContent()'
...
The 'getContent' method returns the next node down the node tree that
isn't a ParenthesisNode.
2015-05-07 10:12:41 +02:00
Max Bruckner
dd0a5e3a68
Parse parentheses into ParenthesisNodes
2015-05-07 10:12:41 +02:00
Max Bruckner
ea04373028
New ParenthesisNode to represent parentheses in the node tree
2015-05-07 10:12:40 +02:00
Max Bruckner
bc2c29be8c
Make _toString functions call the wrapper
2015-05-07 10:12:32 +02:00
jos
06b9664b87
Removed more instanceof checks
2015-05-05 15:21:57 +02:00
jos
8c032f2593
Replaced all instanceof checks with x && xisMyType === true checks
2015-05-05 15:09:21 +02:00
jos
b32b89f94c
Moved help/docs related stuff to ./lib/expression
2015-05-05 14:01:38 +02:00
jos
7e3eda8603
Moved all data types and their construction functions into a folder of their own under ./lib/type
2015-05-05 13:51:24 +02:00
jos
758107428c
Moved collection.js and Matrix.js under ./lib/type/matrix, moved construction functions matrix.js and sparse.js to ./lib/type/matrix/function, and created an index file.
2015-05-05 12:00:07 +02:00
jos
8b06d04d48
Moved expression related functions under ./lib/expression/function
2015-05-05 11:52:18 +02:00
Jos de Jong
cd6f6df393
Merge pull request #346 from rjbaucells/sparse-arithmetic
...
Sparse arithmetic updates
2015-05-05 11:04:18 +02:00
Max Bruckner
472aba4e35
BlockNode: add whitespaces to the LaTeX output
2015-05-03 22:17:21 +02:00
rjbaucells
aa746f051f
Merge branch 'v2' of https://github.com/josdejong/mathjs into josdejong-v2
...
Conflicts:
lib/type/matrix/DenseMatrix.js
lib/type/matrix/SparseMatrix.js
2015-04-30 21:02:27 -04:00
jos
e348cb70a2
Refactored Range and Index. Reorganized index.js
2015-04-30 20:36:45 +02:00
Max Bruckner
6235fd6ce1
Make toString a wrapper around _toString
...
This enables preparating the node tree in `toString` before generating
the actual string output with `_toString` methods
2015-04-30 00:12:54 +02:00
Max Bruckner
dca94e67b7
Node.toTex: improve 'not implemented' error message to contain the type.
2015-04-29 23:59:31 +02:00
Max Bruckner
15eb602a8f
Remove workarounds from Node and ArrayNode
2015-04-29 12:12:46 +02:00
rjbaucells
b21569e251
v2 sync
2015-04-29 00:05:51 -04:00
rjbaucells
76ac065d63
Merge branch 'v2' of https://github.com/josdejong/mathjs into josdejong-v2
...
Conflicts:
lib/expression/docs/index.js
2015-04-29 00:05:18 -04:00
rjbaucells
2512b74b85
Matrix datatype
2015-04-28 20:11:32 -04:00
jos
1204259209
Refactored Complex and Unit into factory functions
2015-04-28 22:04:42 +02:00
jos
e5e2625838
Enclosed ResultSet in a factory function
2015-04-28 21:40:35 +02:00
jos
c424968173
Merge remote-tracking branch 'origin/v2' into v2
2015-04-28 21:02:57 +02:00
jos
de7f84ad3a
Name for a factory is now optional. All transform functions do no longer export something to the math namespace
2015-04-28 20:49:35 +02:00
jos
2b571b3e40
Created an index.js file for expression related stuff
2015-04-28 20:38:55 +02:00
jos
106c5969de
Refactored Help into a factory function
2015-04-28 20:37:14 +02:00
Max Bruckner
8282f424c2
Use the prototype for is<Node> instead of the constructor
2015-04-28 20:13:53 +02:00
Max Bruckner
1c76430dda
Get rid of 'instanceof' for Nodes (except for constructors)
2015-04-28 10:09:19 +02:00
Max Bruckner
250707b668
Convert the isNode function into a boolean property.
2015-04-28 09:56:01 +02:00
Max Bruckner
390a0060b4
Add is<NameOfNode> property to enable type checking across constructors
2015-04-28 09:14:53 +02:00
jos
444dc1c521
Created an index file for all transforms and for units
2015-04-27 20:20:33 +02:00
jos
e8c6dcf7c1
Refactored filter.transform, forEach.transform, and index.transform into typed-functions.
2015-04-27 20:14:07 +02:00
jos
811508906c
Refactored functions range, subset, concat.transform, map.transform, max.transform, mean.transform, min.transform, range.transform, subset.transform to typed-functions
2015-04-27 19:11:21 +02:00
jos
84512de60b
Added a few more index.js files. Removed caching mechanism for function transforms (will be improved upon later again)
2015-04-27 14:54:03 +02:00
Max Bruckner
e62ab0dae4
Proper toTex for units and symbols.
...
Symbols now don't use `\mathrm` anymore by default, but units do.
2015-04-27 11:08:31 +02:00
Max Bruckner
ca4a0bfda4
Change LaTeX output of string function
...
toTex shouldn't do operations like toString on the node tree
2015-04-27 10:09:42 +02:00
jos
d3d3212633
Refactored all nodes into factory functions (see #342 )
2015-04-26 21:25:31 +02:00