Initializing help system before first use

XSLPadduserfunction, XPRSnlpadduserfunction

Purpose
Add user function definitions to an SLP problem.
Topic area
Synopsis
int XPRS_CC XSLPadduserfunction(XSLPprob prob, const char * funcname, int functype, int nin, int nout, int options, XPRSfunctionptr function,void * data, int * p_type);
Arguments
prob 
The current SLP problem.
funcname 
The name of the function as it appears in text formula expressions.
functype 
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.
nin 
Number of arguments the user function takes.
nout 
Number of return arguments for the function.
options 
options as a bitmap to the user function
XSLP_INSTANCEFUNCTION 
always instantiate the function.
function 
Pointer of the user function to call.
data 
Context pointer to provide the user function with.
p_type 
The token id of the user function added, to be used in the Value array when defining formulas and using with XSLP_FUN.
Further information

The type XPRSfunctionptr is a generic function pointer.

The function declarations expected for the user functions are defined by the functype 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-2025 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.