Initializing help system before first use

XSLPadduserfunction

XSLPadduserfunction


Purpose
Add user function definitions to an SLP problem.
Synopsis
int XPRS_CC XSLPadduserfunction(XSLPprob Prob, const char * FunctionName, int FunctionType, int nInput, int  nOutput, void * FunctionPointer,void * UserContext, int * FunctionTokenId);
Arguments
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
1 (XSLP_USERFUNCTION_MAP) 
function takes double, returns double.
2 (XSLP_USERFUNCTION_VECMAP) 
function takes double array, returns double.
3 (XSLP_USERFUNCTION_MULTIMAP) 
function takes double array, returns double array.
4 (XSLP_USERFUNCTION_MAPDELTA) 
function takes double, returns double and delta.
5 (XSLP_USERFUNCTION_VECMAPDELTA) 
function takes double array, returns double and deltas.
6 (XSLP_USERFUNCTION_MULTIMAPDELTA) 
function takes double array, returns double array and deltas.
nInput 
Number of arguments the user function takes.
nOutput 
Number of return arguments for the 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.
Further information

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)'.


Related topics

© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.