(no description yet)
More...
#include <c_function.hpp>
|
virtual returnValue | AD_backward (double *seed, double *df) |
|
virtual returnValue | AD_backward (int number, double *seed, double *df) |
|
virtual returnValue | AD_backward2 (int number, double *seed1, double *seed2, double *df, double *ddf) |
|
virtual returnValue | AD_forward (double *x, double *seed, double *f, double *df) |
|
virtual returnValue | AD_forward (int number, double *seed, double *df) |
|
virtual returnValue | AD_forward (int number, double *x, double *seed, double *f, double *df) |
|
virtual returnValue | AD_forward2 (int number, double *seed1, double *seed2, double *df, double *ddf) |
|
| CFunction () |
|
| CFunction (uint dim, cFcnPtr cFcn_) |
|
| CFunction (uint dim, cFcnPtr cFcn_, cFcnDPtr cFcnDForward_, cFcnDPtr cFcnDBackward_) |
|
| CFunction (const CFunction &rhs) |
|
virtual returnValue | clearBuffer () |
|
virtual returnValue | evaluate (double *x, double *result) |
|
virtual returnValue | evaluate (double *x, double *result, PrintLevel printL) |
|
virtual returnValue | evaluate (int number, double *x, double *result) |
|
virtual void | evaluateCFunction (double *x, double *result) |
|
virtual uint | getDim () const |
|
virtual Expression | operator() (const Expression &arg) |
|
CFunction & | operator= (const CFunction &rhs) |
|
virtual returnValue | setUserData (void *user_data_) |
|
virtual | ~CFunction () |
|
(no description yet)
...
- Author
- Boris Houska, Hans Joachim Ferreau
Definition at line 54 of file c_function.hpp.
Constructor which takes a C-function pointer.
- Parameters
-
Definition at line 61 of file c_function.cpp.
Constructor which takes a C-function pointer as well as
function pointers for the corresponding derivatives.
- Parameters
-
cFcnDForward_ | function pointer |
cFcnDBackward_ | function pointer to forward derivatives function pointer to backward derivatives |
Definition at line 74 of file c_function.cpp.
CFunction::CFunction |
( |
const CFunction & |
rhs | ) |
|
CFunction::~CFunction |
( |
| ) |
|
|
virtual |
returnValue CFunction::AD_backward |
( |
double * |
seed, |
|
|
double * |
df |
|
) |
| |
|
virtual |
Automatic Differentiation in backward mode.
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
seed | the seed |
df | the derivative of the expression |
Definition at line 398 of file c_function.cpp.
returnValue CFunction::AD_backward |
( |
int |
number, |
|
|
double * |
seed, |
|
|
double * |
df |
|
) |
| |
|
virtual |
Automatic Differentiation in backward mode based on
buffered values
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
number | the buffer position |
seed | the seed |
df | the derivative of the expression |
Definition at line 404 of file c_function.cpp.
returnValue CFunction::AD_backward2 |
( |
int |
number, |
|
|
double * |
seed1, |
|
|
double * |
seed2, |
|
|
double * |
df, |
|
|
double * |
ddf |
|
) |
| |
|
virtual |
Automatic Differentiation in backward mode for 2nd order
derivatives based on buffered values.
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
number | the buffer position |
seed1 | the seed1 |
seed2 | the seed2 |
df | the 1st derivative of the expression |
ddf | the 2nd derivative of the expression |
Definition at line 513 of file c_function.cpp.
returnValue CFunction::AD_forward |
( |
double * |
x, |
|
|
double * |
seed, |
|
|
double * |
f, |
|
|
double * |
df |
|
) |
| |
|
virtual |
Automatic Differentiation in forward mode.
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
x | The evaluation point x |
seed | the seed |
f | the value of the expression at x |
df | the derivative of the expression |
Definition at line 267 of file c_function.cpp.
returnValue CFunction::AD_forward |
( |
int |
number, |
|
|
double * |
seed, |
|
|
double * |
df |
|
) |
| |
|
virtual |
Automatic Differentiation in forward mode.
This function uses the intermediate
results from a buffer
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
number | storage position |
seed | the seed |
df | the derivative of the expression |
Definition at line 351 of file c_function.cpp.
returnValue CFunction::AD_forward |
( |
int |
number, |
|
|
double * |
x, |
|
|
double * |
seed, |
|
|
double * |
f, |
|
|
double * |
df |
|
) |
| |
|
virtual |
Automatic Differentiation in forward mode.
This function stores the intermediate
results in a buffer (needed for 2nd order automatic
differentiation in backward mode)
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
number | storage position |
x | The evaluation point x |
seed | the seed |
f | the value of the expression at x |
df | the derivative of the expression |
Definition at line 300 of file c_function.cpp.
returnValue CFunction::AD_forward2 |
( |
int |
number, |
|
|
double * |
seed1, |
|
|
double * |
seed2, |
|
|
double * |
df, |
|
|
double * |
ddf |
|
) |
| |
|
virtual |
Automatic Differentiation in forward mode for
2nd derivatives.
This function uses intermediate
results from a buffer.
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
number | the buffer position |
seed1 | the seed |
seed2 | the seed for the first derivative |
df | the derivative of the expression |
ddf | the 2nd derivative of the expression |
Definition at line 426 of file c_function.cpp.
Clears the buffer and resets the buffer size
to 1.
- Returns
- SUCCESFUL_RETURN
Definition at line 518 of file c_function.cpp.
void CFunction::copy |
( |
const CFunction & |
arg | ) |
|
|
protected |
void CFunction::deleteAll |
( |
| ) |
|
|
protected |
returnValue CFunction::evaluate |
( |
double * |
x, |
|
|
double * |
result |
|
) |
| |
|
virtual |
Evaluates the expression
- Returns
- SUCCESSFUL_RETURN
RET_NAN
- Parameters
-
x | the input variable x |
result | the result |
Definition at line 205 of file c_function.cpp.
Evaluates the expression and also prints
the intermediate results with a specified
print level.
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
x | the input variable x |
result | the result |
printL | the print level |
Definition at line 223 of file c_function.cpp.
returnValue CFunction::evaluate |
( |
int |
number, |
|
|
double * |
x, |
|
|
double * |
result |
|
) |
| |
|
virtual |
Evaluates the expression and stores the intermediate
results in a buffer (needed for automatic differentiation
in backward mode)
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
number | storage position |
x | the input variable x |
result | the result |
Definition at line 239 of file c_function.cpp.
void CFunction::evaluateCFunction |
( |
double * |
x, |
|
|
double * |
result |
|
) |
| |
|
virtual |
Possible user implementation of a C function
- Returns
- (void)
- Parameters
-
x | the input variable x |
result | the result |
Definition at line 215 of file c_function.cpp.
uint CFunction::getDim |
( |
| ) |
const |
|
virtual |
Returns the dimension of the symbolic expression
- Returns
- The requested dimension.
Definition at line 199 of file c_function.cpp.
returnValue CFunction::setUserData |
( |
void * |
user_data_ | ) |
|
|
virtual |
Specify a pointer to be passed to the c-function
during every call.
This pointer can e.g. point to to measurements,
to an object of any class or to a struct.
- Returns
- SUCCESFUL_RETURN
RET_NAN
- Parameters
-
user_data_ | the user-defined pointer |
Definition at line 539 of file c_function.cpp.
double** CFunction::seedStore |
|
protected |
void* CFunction::user_data |
|
protected |
pointer specified by the setUserData function, passed to the c function when being called
Definition at line 294 of file c_function.hpp.
double** CFunction::xStore |
|
protected |
The documentation for this class was generated from the following files: