|
|
QuadTermList () |
|
Create a empty expression.
|
|
|
QuadTermList (double c) |
|
Create a expression that represents a constant term.
|
|
|
QuadTermList (double c, int capacity) |
|
Create a expression with a constant term and an initial capacity.
|
|
virtual auto |
addConstant (double c) -> QuadTermList &override |
|
Add a value to the constant term of this expression.
-
Parameters
-
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
addTerm (double const &coefficient, Variable const &variable) -> QuadTermList &override |
|
Add a term to this expression.If the expression already has a coefficient for variable then the old and the coefficients will be added.
-
Parameters
-
coefficient |
Coefficient to add for variable . |
variable |
Variable. |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
addTerm (double const &coefficient, Variable const &variable1, Variable const &variable2) -> QuadTermList &override |
|
Add a term to this expression.If the expression already has a coefficient for variable1*variable2 then the old and the coefficients will be added.
-
Parameters
-
coefficient |
Coefficient to add for variable1*variable2 . |
variable1 |
First variable. |
variable2 |
Second variable. |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
auto |
addTerm (LinTerm const &term) -> QuadExpression & |
|
Add term to this expression.
|
|
auto |
addTerm (QuadTerm const &term) -> QuadExpression & |
|
Add term to this expression.
|
|
virtual auto |
addTerm (Variable const &variable, double const &coefficient) -> QuadTermList &override |
|
Add a term to this expression.If the expression already has a coefficient for variable then the old and the coefficients will be added.
-
Parameters
-
variable |
Variable. |
coefficient |
Coefficient to add for variable . |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
addTerm (Variable const &variable1, Variable const &variable2, double const &coefficient) -> QuadTermList &override |
|
Add a term to this expression.If the expression already has a coefficient for variable1*variable2 then the old and the coefficients will be added.
-
Parameters
-
variable1 |
First variable. |
variable2 |
Second variable. |
coefficient |
Coefficient to add for variable1*variable2 . |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
addTerm (Variable const &x) -> QuadTermList &override |
|
Add term 1.0*x to this expression.If the expression already has a coefficient for x then the old and the coefficients will be added.
-
Parameters
-
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
addTerm (Variable const &x1, Variable const &x2) -> QuadTermList &override |
|
Add term 1.0*x1*x2 to this expression.If the expression already has a coefficient for x then the old and the coefficients will be added.
-
Parameters
-
x1 |
First variable. |
x2 |
Second variable. |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
addTerms (LinExpression const &expr) -> QuadTermList &override |
|
Add another linear expression to this expression.
-
Parameters
-
expr |
The expression to add |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
addTerms (LinExpression const &expr, double const &factor) -> QuadTermList &override |
|
Add another linear expression to this expression.
-
Parameters
-
expr |
The expression to add. |
factor |
Factor by which to multiply elements in expr before adding. |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
addTerms (QuadExpression const &expr) -> QuadTermList &override |
|
Add another quadratic expression to this expression.
-
Parameters
-
expr |
The expression to add |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
addTerms (QuadExpression const &expr, double const &factor) -> QuadTermList &override |
|
Add another quadratic expression to this expression.
-
Parameters
-
expr |
The expression to add. |
factor |
Factor by which to multiply elements in expr before adding. |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
template<typename Strm0 , typename Strm1 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type, typename Strm1IsStream = typename std::enable_if<xpress::is_stream<Strm1>::value>::type> |
auto |
addTerms (Strm0 const &variables, Strm1 const &coefficients) -> QuadExpression & |
|
Add multiple linear terms to this expression.
|
|
template<typename Strm0 , typename Strm1 , typename Strm2 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type, typename Strm1IsStream = typename std::enable_if<xpress::is_stream<Strm1>::value>::type, typename Strm2IsStream = typename std::enable_if<xpress::is_stream<Strm2>::value>::type> |
auto |
addTerms (Strm0 const &variables1, Strm1 const &variables2, Strm2 const &coefficients) -> QuadExpression & |
|
Add multiple quadratic terms to this expression.
|
|
auto |
addTerms (xpress::SizedArray< Variable const > const &variables, xpress::SizedArray< double const > const &coefficients, int offset, int count) -> QuadExpression & |
|
Add multiple terms to this expression.
|
|
auto |
addTerms (xpress::SizedArray< Variable const > const &variables1, xpress::SizedArray< Variable const > const &variables2, xpress::SizedArray< double const > const &coefficients, int offset, int count) -> QuadExpression & |
|
Add multiple terms to this expression.
|
|
auto |
compress () const -> void |
|
Compress duplicate terms.
|
|
virtual auto |
deepCopy () -> xpress::objects::QuadExpression override |
|
Get a deep copy of this expression.
-
Returns
-
A deep copy of this expression.
-
Since
-
44.00
|
|
virtual auto |
deepCopy (double factor) -> xpress::objects::QuadExpression override |
|
Get a deep copy of this expression multiplied by a constant.
-
Parameters
-
factor |
Factor to scale this with. |
-
Returns
-
A deep copy of this expression multiplied by
factor .
-
Since
-
44.00
|
|
virtual auto |
evaluate (xpress::SizedArray< double const > const &solution) const -> double override |
|
Compute the value of this expression with respect to the given solution vector (which is not required to be feasible).
-
Parameters
-
solution |
Solution values for which the expression is evaluated. |
-
Returns
-
The value of this expression evaluated at
solution .
-
Since
-
44.00
|
|
virtual auto |
extract (double factor, xpress::XPRSProblem::RowCreator *creator) const -> bool override |
|
virtual auto |
getConstant () const -> double override |
|
Get the constant value in this expression.
-
Returns
-
The constant value in this expression.
-
Since
-
44.00
|
|
auto |
reserve (int l) -> QuadTermList & |
|
Reserve a maximum number of elements in this expression.
|
|
virtual auto |
reset () -> QuadTermList &override |
|
Clear this expression.Removes all terms and sets the constant to 0.
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
setConstant (double c) -> QuadTermList &override |
|
Set the constant term in this expression.Any existing constant term will be overwritten.
-
Parameters
-
c |
New constant term for this expression |
-
Returns
-
Always returns
this .
-
Since
-
44.00
|
|
virtual auto |
toString () const -> std::string override |
|
Get a string representation of this expression.
-
Returns
-
A string representing this expression.
-
Since
-
44.00
|
|
auto |
addTerm (LinTerm const &term) -> QuadExpression & |
|
Add term to this expression.
|
|
auto |
addTerm (QuadTerm const &term) -> QuadExpression & |
|
Add term to this expression.
|
|
template<typename Strm0 , typename Strm1 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type, typename Strm1IsStream = typename std::enable_if<xpress::is_stream<Strm1>::value>::type> |
auto |
addTerms (Strm0 const &variables, Strm1 const &coefficients) -> QuadExpression & |
|
Add multiple linear terms to this expression.
|
|
template<typename Strm0 , typename Strm1 , typename Strm2 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type, typename Strm1IsStream = typename std::enable_if<xpress::is_stream<Strm1>::value>::type, typename Strm2IsStream = typename std::enable_if<xpress::is_stream<Strm2>::value>::type> |
auto |
addTerms (Strm0 const &variables1, Strm1 const &variables2, Strm2 const &coefficients) -> QuadExpression & |
|
Add multiple quadratic terms to this expression.
|
|
auto |
addTerms (xpress::SizedArray< Variable const > const &variables, xpress::SizedArray< double const > const &coefficients, int offset, int count) -> QuadExpression & |
|
Add multiple terms to this expression.
|
|
auto |
addTerms (xpress::SizedArray< Variable const > const &variables1, xpress::SizedArray< Variable const > const &variables2, xpress::SizedArray< double const > const &coefficients, int offset, int count) -> QuadExpression & |
|
Add multiple terms to this expression.
|
|
virtual auto |
eq (double rhs) const -> xpress::objects::InequalityDefinition override |
|
Create an "equals" constraint with this expression as left-hand side.
-
Parameters
-
rhs |
Right-hand side of constraint. |
-
Returns
-
The constraint.
-
Since
-
44.00
|
|
virtual auto |
eq (Expression const &rhs) const -> xpress::objects::InequalityDefinition override |
|
Create an "equals" constraint with this expression as left-hand side.
-
Parameters
-
rhs |
Right-hand side of constraint. |
-
Returns
-
The constraint.
-
Since
-
44.00
|
|
virtual auto |
geq (double rhs) const -> xpress::objects::InequalityDefinition override |
|
Create a "greater than or equal" constraint with this expression as left-hand side.
-
Parameters
-
rhs |
Right-hand side of constraint. |
-
Returns
-
The constraint.
-
Since
-
44.00
|
|
virtual auto |
geq (Expression const &rhs) const -> xpress::objects::InequalityDefinition override |
|
Create a "greater than or equal" constraint with this expression as left-hand side.
-
Parameters
-
rhs |
Right-hand side of constraint. |
-
Returns
-
The constraint.
-
Since
-
44.00
|
|
virtual auto |
in (double lb, double ub) -> xpress::objects::InequalityDefinition override |
|
Create a range constraint that bounds this expression from below and above.
-
Parameters
-
lb |
Lower bound for this expression. |
ub |
Upper bound for this expression. |
-
Returns
-
The constraint.
-
Since
-
44.00
|
|
virtual auto |
leq (double rhs) const -> xpress::objects::InequalityDefinition override |
|
Create a "less than or equal" constraint with this expression as left-hand side.
-
Parameters
-
rhs |
Right-hand side of constraint. |
-
Returns
-
The constraint.
-
Since
-
44.00
|
|
virtual auto |
leq (Expression const &rhs) const -> xpress::objects::InequalityDefinition override |
|
Create a "less than or equal" constraint with this expression as left-hand side.
-
Parameters
-
rhs |
Right-hand side of constraint. |
-
Returns
-
The constraint.
-
Since
-
44.00
|
|
virtual auto |
div (double arg) const -> xpress::objects::Expression |
|
Create a expression that represents the quotient of this and arg .
|
|
virtual auto |
div (Expression arg) const -> xpress::objects::Expression |
|
Create a expression that represents the quotient of this and arg .
|
|
virtual auto |
minus (double arg) const -> xpress::objects::Expression |
|
Create a expression that represents the difference of this and arg .
|
|
virtual auto |
minus (xpress::objects::Expression arg) const -> xpress::objects::Expression |
|
Create a expression that represents the difference of this and arg .
|
|
virtual auto |
mul (double arg) const -> xpress::objects::Expression |
|
Create a expression that represents the product of this and arg .
|
|
virtual auto |
mul (Expression arg) const -> xpress::objects::Expression |
|
Create a expression that represents the product of this and arg .
|
|
virtual auto |
plus (double arg) const -> xpress::objects::Expression |
|
Create a expression that represents the sum of this and arg .
|
|
virtual auto |
plus (xpress::objects::Expression arg) const -> xpress::objects::Expression |
|
Create a expression that represents the sum of this and arg .
|
|
virtual auto |
uminus () const -> xpress::objects::Expression |
|
Create a expression that represents the unary minus of this one.
|
|