#include <functions.hh>


Public Types | |
| typedef double(* | c_function_t )(double) |
| The type of arguments it accepts. | |
Public Member Functions | |
| CFunc (Session *s, const char *n, c_function_t func, FuncDef *derivat=NULL) | |
| virtual double | evaluate (const double *vars, const double *args) |
| The function doing the actual job... | |
| void | set_derivative (FuncDef *d) |
| virtual void | destroy_anonymous_derivatives () |
| Delete the derivative if anonymous. | |
| virtual FuncDef * | derivative (int nb) |
| Gets the derivative. | |
Protected Attributes | |
| c_function_t | func |
| The C function to be called. | |
| FuncDef * | deriv |
A basic C function with one parameter
| void SCalc::CFunc::set_derivative | ( | FuncDef * | d | ) | [inline] |
We can set the derivative later, as this can come in really useful...
References deriv.
FuncDef* SCalc::CFunc::deriv [protected] |
The derivative. A pointer to a function. If NULL, then the function has to take care to provide it when necessary (or fail) and to free it when it dies.
Reimplemented in SCalc::CFuncParam.
Referenced by derivative(), and set_derivative().
1.7.1