QuadTerm
A quadratic term. More...
#include <xpress_objects.hpp>

Public Member Functions |
|||||
QuadTerm (xpress::objects::Variable variable1, xpress::objects::Variable variable2, double coefficient) | |||||
Create a term. |
|||||
virtual auto | div (double arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the quotient of this and arg .
|
|||||
auto | div (xpress::objects::ConstantExpression arg) const -> xpress::objects::QuadTerm | ||||
Create a expression that represents the quotient of this and arg . |
|||||
virtual auto | div (xpress::objects::Expression arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the quotient of this and arg .
|
|||||
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).
|
|||||
auto | getCoefficient () const -> double | ||||
The coefficient for variable in this term [get]. |
|||||
auto | getVariable1 () const -> xpress::objects::Variable | ||||
The first variable in the term [get]. |
|||||
auto | getVariable2 () const -> xpress::objects::Variable | ||||
The second variable in the term [get]. |
|||||
auto | mul (ConstantExpression arg) const -> xpress::objects::QuadTerm | ||||
Create a expression that represents the product of this and arg . |
|||||
virtual auto | mul (double arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the product of this and arg .
|
|||||
virtual auto | mul (xpress::objects::Expression arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the product of this and arg .
|
|||||
virtual auto | toString () const -> std::string override | ||||
Get a string representation of this expression.
|
|||||
virtual auto | uminus () const -> xpress::objects::Expression override | ||||
Create a expression that represents the unary minus of this one.
|
|||||
Public Member Functions inherited from xpress::objects::AbstractExpression | |||||
virtual auto | eq (double rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create an "equals" constraint with this expression as left-hand side.
|
|||||
virtual auto | eq (Expression const &rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create an "equals" constraint with this expression as left-hand side.
|
|||||
virtual auto | geq (double rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create a "greater than or equal" constraint with this expression as left-hand side.
|
|||||
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.
|
|||||
virtual auto | in (double lb, double ub) -> xpress::objects::InequalityDefinition override | ||||
Create a range constraint that bounds this expression from below and above.
|
|||||
virtual auto | leq (double rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create a "less than or equal" constraint with this expression as left-hand side.
|
|||||
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.
|
|||||
Public Member Functions inherited from xpress::objects::Expression | |||||
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 | 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 . |
|||||
Static Public Member Functions |
|
static auto | qTerm (xpress::objects::Variable variable1, xpress::objects::Variable variable2) -> xpress::objects::QuadTerm |
Convenience function to create a single quadratic term. |
|
static auto | qTerm (xpress::objects::Variable variable1, xpress::objects::Variable variable2, double coefficient) -> xpress::objects::QuadTerm |
Convenience function to create a single quadratic term. |
|
static auto | toString (xpress::objects::Variable v1, xpress::objects::Variable v2, double coef) -> std::string |
Convert a quadratic term to a string. |
|
Detailed Description
A quadratic term.
- Since
- 44.00
Constructor & Destructor Documentation
QuadTerm()
|
inline |
Create a term.
- Parameters
-
variable1 First variable in the term. variable2 Second variable in the term. coefficient Coefficient for variable1
*variable2
.
- Since
- 44.00
Member Function Documentation
div() [1/3]
|
inlineoverridevirtual |
Create a expression that represents the quotient of this
and arg
.
- Parameters
-
arg Divisor.
- Returns
-
Quotient of
this
andarg
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
div() [2/3]
|
inline |
Create a expression that represents the quotient of this
and arg
.
- Parameters
-
arg Divisor.
- Returns
- The expression.
- Since
- 44.00
div() [3/3]
|
inlineoverridevirtual |
Create a expression that represents the quotient of this
and arg
.
- Parameters
-
arg Divisor.
- Returns
-
Quotient of
this
andarg
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
evaluate()
|
inlineoverridevirtual |
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
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
getCoefficient()
|
inline |
The coefficient for variable
in this term [get].
- Since
- 44.00
getVariable1()
|
inline |
The first variable in the term [get].
- Since
- 44.00
getVariable2()
|
inline |
The second variable in the term [get].
- Since
- 44.00
mul() [1/3]
|
inline |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
- The expression.
- Since
- 44.00
mul() [2/3]
|
inlineoverridevirtual |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
-
Product of
this
andarg
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
mul() [3/3]
|
inlineoverridevirtual |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
-
Product of
this
andarg
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
qTerm() [1/2]
|
inlinestatic |
Convenience function to create a single quadratic term.
Creates the term 1 * variable1 * variable2
.
- Parameters
-
variable1 First variable for term. variable2 Second variable for term.
- Returns
- The newly created term.
- Since
- 44.00
qTerm() [2/2]
|
inlinestatic |
Convenience function to create a single quadratic term.
- Parameters
-
variable1 First variable for term. variable2 Second variable for term. coefficient Coefficient for term.
- Returns
- The newly created term.
- Since
- 44.00
toString() [1/2]
|
inlineoverridevirtual |
Get a string representation of this expression.
- Returns
- A string representing this expression.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
toString() [2/2]
|
inlinestatic |
Convert a quadratic term to a string.
Note that while the QuadTerm
class does not allow XpressProblem::NULL_VARIABLE
as either of the variables, this function allows those variables to indicate constant or linear terms.
- Parameters
-
v1 First variable in quadratic term. v2 Second variable in quadratic term. coef Coeffcient for quadratic term.
- Returns
-
String representation of
coef*v1*v2
.
- Since
- 44.00
uminus()
|
inlineoverridevirtual |
Create a expression that represents the unary minus of this one.
- Returns
-
Expression representing
-this
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
The documentation for this class was generated from the following file:
- xpress_objects.hpp
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.