Department of Scientific Computing   
Institute for Numerical Simulation   
University of Bonn   
Documentation
Download
Programming References
Bug Reports / Suggestions
FAQ
Authors
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SubFunction Struct Reference

Assume you have a DIM-variate function F with arguments x[0],...,x[DIM-1], but you need a (DIM-1)-variate function whose arguments are the x[.] except e.g. x[1] which shall always take the value, say 3.32. Using SubFunction one can derive such a function from F. You may set the parameters in the following way:

SubFunction SF ;
double v[4]={NULL , DIM , 1, 3.32};
*((Function **)v) = &F
SF.SetParameters(v) ;

This is a little bit dirty pointer arithmetics, but nevertheless legal as long as sizeof(double)>=sizeof(Function *). More...

#include <Function.hpp>

Inheritance diagram for SubFunction::

Function List of all members.

Public Methods

void SetParameters (double *p)
 Set additional parameters to (*this), which parameters depends on the particular specialization.

double Eval (double *x)
 Evaluate function in *x.


The documentation for this struct was generated from the following file:
Generated at Mon Aug 19 10:02:33 2002 for AWFD by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001