Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
mxparser-v.2.0.0.zip | 2015-12-31 | 2.2 MB | |
README.md | 2015-12-31 | 3.1 kB | |
Totals: 2 Items | 2.2 MB | 0 |
v.2.0.0 (2015-12-31):
Major update of the library providing more intuitive and much simpler to use API, no changes to the MathCollection.
Methods removed: setRecursiveMode(), disableRecursiveMode()
- No need to manually mark recursive mode, mXparser is recognizing this mode automatically.
New handy and super easy (natural to use) constructors:
- Constructors for user defined arguments (Argument / RecursiveArgument classes), user defined constant (Constant class), user defined functions (Function class).
Sample code:
Constant c = new Constant("c=5");
Constant c = new Constant("c=5+2");
Argument x = new Argument("x=5");
Constant c = new Constant("c=5+x", x);
Argument y = new Argument("y=2*x", x);
RecursiveArgument f = new RecursiveArgument("f(n)=n*f(n-1)");
Function f = new Function("f(x,y)=sin(x)+y");
Function f = new Function("f(n)=if( n>0, n*f(n-1), 1)");
New methods: addDefinitions(PrimitiveElement... elements), removeDefinitions(PrimitiveElement... elements)
- New class PrimitiveElement introduced only to simplify constructors of arguments, constants, functions and expressions.
- Classes Argument, RecursiveArgument, Constant, Functions inherits now from PrimitiveElement class, it means you can call one method for adding / removing definitions by passing comma separated list of elements that can be different type (supported types: Argument, RecursiveArgument, Constant, Function).
- Method addArguments(), addConstants(), addFunctions(),removeArguments(), removeConstants(), removeFunctions() are still public, but this will change in the future.
Sample code:
Constant c = new Constant("c=5");
Argument x = new Argument("x=10/2");
Expression e = new Expression("c+x");
e.addDefinitions(x,c);
Modified constructors for classes Argument, RecursiveArgument, Constant, Function
- Constructors relying on directly given argument / constant / function name are now checking given name according to the predefined regular expression (the name must start with letters, and then digits / underscores / letters are allowed).
- Constructors removed – all constructors relying on ArrayList/List of arguments, constants, functions or on varidic type Argument, Constant, Function were substituted based on comma separated prams list of PrimitiveElement type, where Argument, Constant, Functions extend / inherit PrimitiveElement).
C# library is now Common Language Specification Compliant, it means mXparser is available right now to many other .NET languages (providing exactly the same API), including:
- C#
- Visual Basic .NET
- C++/CLI
- F#
Other changes
- New extended list of regression tests (to cover new methods, constructors, etc...)
- Implemented Performance Tests
- Source code converted from cp150 to UTF-8
- Source code reorganization (some part of package level code of the Expression class was moved to the mXparser class)
- Some bugs fixed (for sure there are others)