XSLPadduserfunction
XSLPadduserfunction |
int XPRS_CC XSLPadduserfunction(XSLPprob Prob, const char * FunctionName, int FunctionType, int nInput, int nOutput, int Options, void * FunctionPointer,void * UserContext, int * FunctionTokenId);
Prob
|
The current SLP problem.
|
||||||||||||
FunctionName
|
The name of the function as it appears in text formula expressions.
|
||||||||||||
FunctionType
|
The type of the user function, one of
|
||||||||||||
nInput
|
Number of arguments the user function takes.
|
||||||||||||
nOutput
|
Number of return arguments for the function.
|
||||||||||||
Options
|
Options as a bitmap to the user function
|
||||||||||||
FunctionPointer
|
Pointer of the suer function to call.
|
||||||||||||
UserContext
|
Context pointer to provide the user function with.
|
||||||||||||
FunctionTokenId
|
The token id of the user function added, to be used in the Value array when defining formulas and using with XSLP_USERFUNCTION.
|
The function declarations expected for the user functions are defined by the FunctionType argument.
The function of type XSLP_USERFUNCTION_MAP expects a function in the form of 'double XPRS_CC F(double Value, void *Context)'.
The function of type XSLP_USERFUNCTION_VECMAP expects a function in the form of 'double XPRS_CC F(double *Value, void *Context)'.
The function of type XSLP_USERFUNCTION_MULTIMAP expects a function in the form of 'int XPRS_CC F(double *Value, double *Out, void *Context)'.
The function of type XSLP_USERFUNCTION_MAPDELTA expects a function in the form of 'int XPRS_CC F(double Value, double Delta, double *Evaluation, double *Partial, void *Context)'.
The function of type XSLP_USERFUNCTION_VECMAPDELTA expects a function in the form of 'int XPRS_CC F(double *Value, double *Deltas, double *Evaluation, double *Partials, void *Context)'.
The function of type XSLP_USERFUNCTION_MULTIMAPDELTA expects a function in the form of 'int XPRS_CC F(double *Value, double *Deltas, double *Out, void *Context)'.