bug-libmatheval
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-libmatheval] GNU libmatheval 1.1.0 is out


From: Aleksandar Samardzic
Subject: Re: [Bug-libmatheval] GNU libmatheval 1.1.0 is out
Date: Sat, 24 May 2008 08:07:55 +0200
User-agent: Mutt/1.4.2.3i

On Fri, May 23, 2008 at 09:03:06AM +0200, Emilie Marchandise wrote:
> >I currently use matheval as a great library in for my CFD
> >developments.
> >I recently hardly tried to add in the symbol table a in new function
> >(smoothed heaviside function over a width epsilon) in the library
> >wich is a function of two parameters "heav_smooth(x,epsilon)",
> >function which I have implemented in xmath.cpp(h)
> >However, I was not able to make it run: several problems occured
> >- the parser did not recognize the "comma" in the definition of the
> >function
> >- the evaluator_create(char *string) in matheval could not do the job.
> >Have you already tried to add such a function of several parameters
> >in your library or could you give me a clue such I could solve the
> >problem ?
> >The problem might come from the parser and scanner.l for with I am
> >really not familiar ..

Libmatheval is, at the moment, based around of concept that mathematical
functions are functions of single variable, so more invasive changes
would be needed in order to support something like you described: you
would need to start from the structure defining the function in
lib/node.h, and to change argument representation from single node to
the list of nodes, and then all affected code in the rest of libmatheval
would have to be changed too, as well as parser adjusted to recognize
comma-separated list of expressions as arguments, instead of single
expression only...

Alternatively - how exactly are you calculating this function?  Maybe
this, that you said you would put in xmath.cpp, could be somehow written
"inline", as an expression in libmatheval supported notation?

Regards,
Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]