Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
GRBQuadExpr::addTerms()
Add new terms into a quadratic expression.
void | addTerms ( | const double* | coeffs, |
const GRBVar* | vars, | ||
int | count ) |
Add new linear terms into a quadratic expression.
Arguments:
coeffs: Coefficients for new linear terms.
vars: Variables for new linear terms.
count: Number of linear terms to add to the quadratic expression.
void | addTerms ( | const double* | coeffs, |
const GRBVar* | vars1, | ||
const GRBVar* | vars2, | ||
int | count ) |
Add new quadratic terms into a quadratic expression.
Arguments:
coeffs: Coefficients for new quadratic terms.
vars1: First variables for new quadratic terms.
vars2: Second variables for new quadratic terms.
count: Number of quadratic terms to add to the quadratic expression.
![](/wp-content/plugins/hd_documentations/content/images/documentation-ampl-guide.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-cloud.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-example-tour.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-quick-start.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-reference-manuals.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-remote-services.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-linux.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-mac-osx.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-windows.webp?x70725)