function representation in ginac

Alexander Frink frink at thep.physik.uni-mainz.de
Thu Feb 1 11:52:56 CET 2001


On Wed, 31 Jan 2001, Richard B. Kreckel wrote:
> > Further each GiNaC class unfortunately needs some supporting
> > code (copy(), destroy(), duplicate() etc.) which would have to be
> > generated for each class representing a function again and again
> > blowing up code size.
> 
> I do not see why all this could not be done by virtual functions.
> Am I to be missing some obvious point?

You need at least duplicate(), a default constructor and a
constructor from the function arguments. For consistency all
other GiNaC classes also have a destructor, copy(), destroy(),
a copy constructor and operator=(), which are not mandatory
if the derived class does not add any new members.
Further you need to implement the type info stuff.
All this is not too much code.
But still I do not see what you could do with classes
instead of the current scheme.

Alex

-- 
Alexander Frink                      E-Mail: Alexander.Frink at Uni-Mainz.DE
Institut fuer Physik                 Phone:  +49-6131-3923391
Johannes-Gutenberg-Universitaet
D-55099 Mainz, Germany

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



More information about the GiNaC-list mailing list