Initializing help system before first use

XPRBgetnextqterm

XPRBgetnextqterm


Purpose
Get the next quadratic term of a constraint.
Synopsis
const void *XPRBgetnextqterm(XPRBctr ctr, const void *ref, XPRBvar *var1, XPRBvar *var2, double *coeff);
Arguments
ctr 
Constraint whose terms are to be enumerated.
ref 
Reference pointer or NULL.
var1 
BCL reference to a variable. May be NULL if not required.
var2 
BCL reference to a variable. May be NULL if not required.
coeff 
Coefficient associated to the quadratic term var1 * var2. May be NULL if not required.
Return value
Reference pointer for the next call to XPRBgetnextqterm or NULL if there are no more terms.
Example
XPRBprob prob;
XPRBctr ctr;
XPRBvar var1, var2;
double coeff;
const void *ref;
   ...
ref = NULL;
while ((ref = XPRBgetnextqterm(ctr, ref, &var1, &var2, &coeff))
       != NULL) {
  XPRBprintf("Quadratic term %s * %s has coefficient %g\n",
    XPRBgetvarname(var1), XPRBgetvarname(var2), coeff);
}
This example prints all quadratic terms of a constraint.
Further information
This function can be used to enumerate the quadratic terms of a constraint. The second parameter serves to keep track of the current location inthe enumeration; if this parameter is NULL, the first term is returned. This function returns NULL if it is called with the reference to the last element. Otherwise, the returned value can be used as the input parameter ref to retrieve the following term of the same type.
Related topics

© 2001-2019 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.