Giter Club home page Giter Club logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
> 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.