Comments (2)
I don't want dependencies to any 3rd party library since this would be a major
PITA. "Header only" in terms of boost usually means it depends on 100+ other
boost header files. Apart from this boost::any is not a numeric type does not
know how to add, subtract or multiply two instances of boost::any. Its not that
i could add boost::any and the parser would magically know how to multiply two
matrices wrapped in boost::any.
Original comment by [email protected]
on 14 Jul 2014 at 8:35
- Changed state: Invalid
from muparserx.
> would magically know how to multiply two matrices wrapped in boost::any
That part wouldn't change, you would still have code like:
IValue& Value::operator*=(const IValue &val)
{
if (IsScalar() && val.IsScalar()) {
...
but with support for many more types, e.g. (untested):
boost::any& boost::any::operator*=(const boost::any& rhs)
if (this->type() == rhs.type() && this->type() == typeid(Matrix))
...
I would anyway prefer to use Eigen matrices which support all operators and
also use expression templates to eliminate temporaries from expressions. Now
the parsing of external types might be more difficult to implement. I guess
what I'm after is the possibility for the user to specify the type to use for
e.g. matrices so that this type would be used for storing the values of parsed
matrix expressions. In that case muparser wouldn't have to have any code for
math expressions, perhaps just do the check above to ensure both types are
equal and call their own operators. The current matrix class could be e.g. the
default template parameter to Value or IValue. Just something to consider in
the long run...
Original comment by [email protected]
on 15 Jul 2014 at 2:31
from muparserx.
Related Issues (20)
- Tag for release 4.0.9 HOT 2
- Missing header HOT 1
- README says that the version is 4.0.9 but the last tag is 4.0.8 HOT 2
- how to switch rad or gra when use trigonometric function HOT 2
- Incorrect Assignment Multiplication HOT 1
- Inconsistent Use of Signedness for Binary and Hex Numbers
- Feature Request: Add an Octal Value Reader
- logic operator lack shor-circuit feature
- 4.0.10 FTBFS HOT 1
- constant starting with letter 'o' HOT 5
- Example fails on macOS HOT 7
- int to bool conversion HOT 3
- type checking HOT 1
- xor is listed in the documentation but not implemented HOT 3
- Is it possible to directly represent a matrix instead of using many lines to define it? HOT 4
- FunTan and FunSin error HOT 2
- Is matrix algebra in SetExpr possible? HOT 2
- UnknownException when defining variables with dot (.) HOT 3
- Integer test causes floating point exceptions? HOT 1
- Assuming clang as the only compiler on Apple plaform. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from muparserx.