[GiNaC-devel] function classes

Jens Vollinga vollinga at physik.uni-wuppertal.de
Thu Apr 13 16:29:02 CEST 2006


Hi,

a long time ago I posted on this list an idea about function classes. 
Finally I some working code to demonstrate this idea (patch for HEAD 
attached). Apart for some minor issues maybe this code might well go 
into CVS, I think. But before spoiling the ginac code base, I'd like to 
ask for opinions or suggestions from the other developers.

Things I don't like too much about it are:
- function classes have to follow a naming scheme like sin_function, 
cos_function, etc. Reasons to have such a naming scheme: 1. cmath puts 
its functions mercilessly into the global namespace. 2. function names 
and function method names must not be the same. This is important for 
conjugate for example. 3. To avoid problems with the built-in global 
ginac functions with numeric arguments.
- in order to make input_parser work, there has to be a look-up between 
function names and some kind of factory. This kind of reproduces the old 
function system within the new function class system (the patch (ab)uses 
class_info mechanism to save these information).

I am currently not sure whether it is worth introducing this new 
function system because of the problems mentioned above, the code 
incompatibility it introduces and maybe some other disadvantages not 
foreseen by me.

Regards,
Jens
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
Url: http://www.cebix.net/pipermail/ginac-devel/attachments/20060413/21eccf4f/patch-0001.ksh


More information about the GiNaC-devel mailing list