NlExpr.NlExpr()
Default constructor of a nonlinear expression.
Synopsis
NlExpr()
NlExpr.NlExpr()
Constructor of a nonlinear expression with a constant.
Synopsis
NlExpr(double constant)
Arguments
constant
: constant value in nonlinear expression object.
NlExpr.NlExpr()
Constructor of a nonlinear expression with a variable.
Synopsis
NlExpr(Var var)
Arguments
var
: the added variable.
NlExpr.NlExpr()
Constructor of a nonlinear expression with one linear term.
Synopsis
NlExpr(Var var, double coeff)
Arguments
var
: variable for the added term.
coeff
: coefficent for the added term.
NlExpr.NlExpr()
Constructor of a nonlinear expression with a linear expression.
Synopsis
NlExpr(Expr expr)
Arguments
expr
: the added linear expression.
NlExpr.NlExpr()
Constructor of a nonlinear expression with a quadratic expression.
Synopsis
NlExpr(QuadExpr expr)
Arguments
expr
: the added quadratic expression.
NlExpr.add()
Add itself by an expression.
Synopsis
NlExpr add(NlExpr expr, double mult)
Arguments
expr
: expression operand, including NlExpr, QuadExpr, Expr, Var.
mult
: constant multiplier.Return
nonlinear expression itself.
NlExpr.add()
Add itself by an expression.
Synopsis
NlExpr add(NlExpr expr)
Arguments
expr
: expression operand, including NlExpr, QuadExpr, Expr, Var and constant.Return
nonlinear expression itself.
NlExpr.addConstant()
Add constant to the nonlinear expression.
Synopsis
void addConstant(double constant)
Arguments
constant
: value to be added.
NlExpr.addLinExpr()
Add a linear expression to self.
Synopsis
void addLinExpr(Expr expr, double mult)
Arguments
expr
: linear expression to be added.
mult
: constant multiplier.
NlExpr.addNlExpr()
Add a nonlinear expression to self.
Synopsis
void addNlExpr(NlExpr expr, double mult)
Arguments
expr
: nonlinear expression to be added.
mult
: constant multiplier.
NlExpr.addQuadExpr()
Add a quadratic expression to self.
Synopsis
void addQuadExpr(QuadExpr expr, double mult)
Arguments
expr
: quadratic expression to be added.
mult
: constant multiplier.
NlExpr.addTerm()
Add a linear term to nonlinear expression object.
Synopsis
void addTerm(Var var, double coeff)
Arguments
var
: variable of new linear term.
coeff
: coefficient of new linear term.
NlExpr.addTerms()
Add linear terms to nonlinear expression object.
Synopsis
void addTerms(Var[] vars, double[] coeffs)
Arguments
vars
: variable array for added linear terms.
coeffs
: coefficient array for added linear terms.
NlExpr.addTerms()
Add linear terms to nonlinear expression object.
Synopsis
void addTerms(VarArray vars, double[] coeffs)
Arguments
vars
: variables for added linear terms.
coeffs
: coefficient array for added linear terms.
NlExpr.clear()
Clear nonlinear expression object.
Synopsis
void clear()
NlExpr.clone()
Deep copy nonlinear expression object.
Synopsis
NlExpr clone()
Return
cloned nonlinear expression object.
NlExpr.divide()
Divide itself by an expression.
Synopsis
NlExpr divide(NlExpr expr)
Arguments
expr
: expression operand, including NlExpr, QuadExpr, Expr, Var and constant.Return
nonlinear expression itself.
NlExpr.evaluate()
Evaluate nonlinear expression after solving.
Synopsis
double evaluate()
Return
value of nonlinear expression.
NlExpr.getConstant()
Get constant in nonlinear expression.
Synopsis
double getConstant()
Return
constant in nonlinear expression.
NlExpr.getLinExpr()
Get linear expression of nonlinear expression.
Synopsis
Expr getLinExpr()
Return
linear expression object.
NlExpr.multiply()
Multiply itself by an expression.
Synopsis
NlExpr multiply(NlExpr expr)
Arguments
expr
: expression operand, including NlExpr, QuadExpr, Expr, Var and constant.Return
nonlinear expression itself.
NlExpr.negate()
Negate itself.
Synopsis
NlExpr negate()
Return
nonlinear expression itself.
NlExpr.reserve()
Reserve capacity to contain at least n items.
Synopsis
void reserve(int n)
Arguments
n
: capacity of nonlinear constraint objects.
NlExpr.setConstant()
Set constant for the nonlinear expression.
Synopsis
void setConstant(double constant)
Arguments
constant
: the value of the constant.
NlExpr.size()
Get size of tokens in nonlinear expression.
Synopsis
long size()
Return
size of none-linear tokens.