buildqtls
| buildqtls | 
  Purpose
 
 
 Generate data required for loading a quadratic expression.
 
 
  Synopsis
 
 int buildqtls(XPRMcontext ctx, void *nlctx, XPRMnlctr qctr, int onlyqterms, int *nbterm, XPRMnlqterm *qtls, double *cstt);
 
  Arguments
 
 | 
     ctx 
     | 
     Mosel's execution context
     | 
| 
     nlctx 
     | 
     mmnl execution context
     | 
| 
     qctr 
     | 
     Quadratric constraint or objective to process
     | 
| 
     onlyqterms 
     | 
     Ignore linear terms
     | 
| 
     nbterm 
     | 
     Reference where the number of qterms is returned
     | 
| 
     qtls 
     | 
     Reference where the list of qterms is returned
     | 
| 
     cstt 
     | 
     Reference where the constant terms is returned
     | 
  Return value
 
 
 0 if the expression is constant, 1 for a linear, 2 for a quadratic, 4 for a nonlinear expression and -1 in case of error
 
  Further information
 
 
 1. This function computes the list of quadratic terms of a quadratic expression. If the option
 onlyqterms is not specified then linear terms are also included in the list (the second variable reference of a linear term is
 NULL).
 
 
 2. The list
 qtls is allocated by the routine: each call to
 buildqtls must be followed by a call to
 freeqtls in order to release the allocated memory.
 
 
  Related topics
 
  
