QuadExpr.QuadExpr()

Constructor of a constant quadratic expression with constant 0.0

Synopsis

QuadExpr()

QuadExpr.QuadExpr()

Constructor of a constant quadratic expression.

Synopsis

QuadExpr(double constant)

Arguments

constant: constant value in expression object.

QuadExpr.QuadExpr()

Constructor of a quadratic expression with one term.

Synopsis

QuadExpr(Var var)

Arguments

var: variable for the added term.

QuadExpr.QuadExpr()

Constructor of a quadratic expression with one term.

Synopsis

QuadExpr(Var var, double coeff)

Arguments

var: variable for the added term.

coeff: coefficent for the added term.

QuadExpr.QuadExpr()

Constructor of a quadratic expression with a linear expression.

Synopsis

QuadExpr(Expr expr)

Arguments

expr: linear expression added to the quadratic expression.

QuadExpr.QuadExpr()

Constructor of a quadratic expression with two linear expression.

Synopsis

QuadExpr(Expr expr, Var var)

Arguments

expr: one linear expression.

var: another variable.

QuadExpr.QuadExpr()

Constructor of a quadratic expression with two linear expression.

Synopsis

QuadExpr(Expr left, Expr right)

Arguments

left: one linear expression.

right: another linear expression.

QuadExpr.addConstant()

Add a constant to the quadratic expression.

Synopsis

void addConstant(double constant)

Arguments

constant: value to be added.

QuadExpr.addLinExpr()

Add a linear expression to self.

Synopsis

void addLinExpr(Expr expr)

Arguments

expr: linear expression to be added.

QuadExpr.addLinExpr()

Add a linear expression to self.

Synopsis

void addLinExpr(Expr expr, double mult)

Arguments

expr: linear expression to be added.

mult: multiplier constant.

QuadExpr.addQuadExpr()

Add a quadratic expression to self.

Synopsis

void addQuadExpr(QuadExpr expr)

Arguments

expr: quadratic expression to be added.

QuadExpr.addQuadExpr()

Add a quadratic expression to self.

Synopsis

void addQuadExpr(QuadExpr expr, double mult)

Arguments

expr: quadratic expression to be added.

mult: multiplier constant.

QuadExpr.addTerm()

Add a term to quadratic expression object.

Synopsis

void addTerm(Var var, double coeff)

Arguments

var: a variable of new term.

coeff: coefficient of new term.

QuadExpr.addTerm()

Add a quadratic term to expression object.

Synopsis

void addTerm(

Var var1,

Var var2,

double coeff)

Arguments

var1: first variable of new quadratic term.

var2: second variable of new quadratic term.

coeff: coefficient of new quadratic term.

QuadExpr.addTerms()

Add linear terms to quadratic expression object.

Synopsis

void addTerms(Var[] vars, double coeff)

Arguments

vars: variables of added linear terms.

coeff: one coefficient for added linear terms.

QuadExpr.addTerms()

Add linear terms to quadratic expression object.

Synopsis

void addTerms(Var[] vars, double[] coeffs)

Arguments

vars: variables of added linear terms.

coeffs: coefficients of added linear terms.

QuadExpr.addTerms()

Add linear terms to quadratic expression object.

Synopsis

void addTerms(VarArray vars, double coeff)

Arguments

vars: variables of added linear terms.

coeff: one coefficient for added linear terms.

QuadExpr.addTerms()

Add linear terms to quadratic expression object.

Synopsis

void addTerms(VarArray vars, double[] coeffs)

Arguments

vars: variables of added terms.

coeffs: coefficients of added terms.

QuadExpr.addTerms()

Add quadratic terms to expression object.

Synopsis

void addTerms(

VarArray vars1,

VarArray vars2,

double[] coeffs)

Arguments

vars1: first set of variables for added quadratic terms.

vars2: second set of variables for added quadratic terms.

coeffs: coefficient array for added quadratic terms.

QuadExpr.addTerms()

Add quadratic terms to expression object.

Synopsis

void addTerms(

Var[] vars1,

Var[] vars2,

double[] coeffs)

Arguments

vars1: first set of variables for added quadratic terms.

vars2: second set of variables for added quadratic terms.

coeffs: coefficient array for added quadratic terms.

QuadExpr.clone()

Deep copy quadratic expression object.

Synopsis

QuadExpr clone()

Return

cloned quadratic expression object.

QuadExpr.evaluate()

evaluate quadratic expression after solving

Synopsis

double evaluate()

Return

value of quadratic expression

QuadExpr.getCoeff()

Get coefficient from the i-th term in quadratic expression.

Synopsis

double getCoeff(int i)

Arguments

i: index of the term.

Return

coefficient of the i-th term in quadratic expression object.

QuadExpr.getConstant()

Get constant in quadratic expression.

Synopsis

double getConstant()

Return

constant in quadratic expression.

QuadExpr.getLinExpr()

Get linear expression in quadratic expression.

Synopsis

Expr getLinExpr()

Return

linear expression object.

QuadExpr.getVar1()

Get first variable from the i-th term in quadratic expression.

Synopsis

Var getVar1(int i)

Arguments

i: index of the term.

Return

first variable of the i-th term in quadratic expression object.

QuadExpr.getVar2()

Get second variable from the i-th term in quadratic expression.

Synopsis

Var getVar2(int i)

Arguments

i: index of the term.

Return

second variable of the i-th term in quadratic expression object.

QuadExpr.remove()

Remove idx-th term from quadratic expression object.

Synopsis

void remove(int idx)

Arguments

idx: index of the term to be removed.

QuadExpr.remove()

Remove the term associated with variable from quadratic expression.

Synopsis

void remove(Var var)

Arguments

var: a variable whose term should be removed.

QuadExpr.setCoeff()

Set coefficient of the i-th term in quadratic expression.

Synopsis

void setCoeff(int i, double val)

Arguments

i: index of the quadratic term.

val: coefficient of the term.

QuadExpr.setConstant()

Set constant for the quadratic expression.

Synopsis

void setConstant(double constant)

Arguments

constant: the value of the constant.

QuadExpr.size()

Get number of terms in quadratic expression.

Synopsis

long size()

Return

number of quadratic terms.