Re: OON: "Subclassing" algorithms

From: Konrad Hinsen (hinsen@ibs.ibs.fr)
Date: Thu Apr 24 1997 - 12:42:32 EST


> The general idea is that you put the general structure of an algorithm
> in a base class, and override virtual functions in subclasses to modify
> parts of the algorithm while leaving the rest intact.

Maybe I should stress my main worry more clearly: efficiency. I am
thinking about algorithm steps that are sufficiently fine-grained that
function call overhead, even more so via pointers (and that's what
virtual methods come down to), is significant. And I want global
optimization, with global subexpression elimination etc. for the
complete algorithm. So it had to happen at the source code level.

What I would need is a mechanism like C++ templates, but with
a subclassing capability (i.e. subclassing templates, not template
classes). Or as a good first step some automatic code generator
that takes stepwise algorithm definitions as input.

-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:05 EST