function representation in ginac

Roland Richter roland.richter at jk.uni-linz.ac.at
Thu Jan 11 11:22:44 CET 2001


 Dear all,

 I recently had a look at the ginac 'function' class and
 at the corresponding REGISTER_FUNCTION mechanism.
 (background: I want to use ginac to represent fuzzy
  membership functions, i.e. essentially functions R -> [0,1]).

 Newbie question:
 Why was the design made as it is?

 For instance, why are all functions stored in a 
 vector<function_options>, instead of deriving them from
 class function?

 Sure, when dealing with functions like exp, sin, ...,
 it is clear that there is just *one* instance of each such function.
 (Singleton pattern?)

 But how to deal with parametrized functions when parameters
 are specified at runtime? 

 For instance, it would be nice to implement splines s.t. it is 
 possible to specify two coordinates (x1,y1), (x2,y2) s.t.
 spline(x1) = y1, spline(x2) = y2, and first derivates are 0
 at x1 and x2 ...

 Does that fit into the framework, too?
 

 Any hints and comments are appreciated,

 - Roland


-
To UNSUBSCRIBE, email to ginac-list at ginac.de with a subject of "unsubscribe".



More information about the GiNaC-list mailing list