LinTerm
A linear term. More...
#include <xpress_objects.hpp>

Public Member Functions |
|||||
LinTerm (Variable variable, double coefficient) | |||||
Create a term. |
|||||
auto | div (ConstantExpression arg) const -> xpress::objects::LinTerm | ||||
Create a expression that represents the quotient of this and arg . |
|||||
virtual auto | div (double arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the quotient of this and arg .
|
|||||
virtual auto | div (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 | getVariable () const -> xpress::objects::Variable | ||||
The variable in the term [get]. |
|||||
auto | mul (ConstantExpression arg) const -> xpress::objects::LinTerm | ||||
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 .
|
|||||
auto | mul (LinTerm arg) const -> xpress::objects::QuadTerm | ||||
Create a expression that represents the product of this and arg . |
|||||
auto | mul (Variable arg) const -> xpress::objects::QuadTerm | ||||
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 .
|
|||||
auto | square () const -> xpress::objects::QuadTerm | ||||
Multiply this term by itself. |
|||||
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 | lTerm (Variable variable) -> xpress::objects::LinTerm |
Convenience function to create a single linear term. |
|
static auto | lTerm (xpress::objects::Variable variable, double coefficient) -> xpress::objects::LinTerm |
Convenience function to create a single linear term. |
|
static auto | toString (xpress::objects::Variable v, double coef) -> std::string |
Convert a linear term to a string. |
|
Detailed Description
A linear term.
- Since
- 44.00
Constructor & Destructor Documentation
LinTerm()
|
inline |
Create a term.
- Parameters
-
variable objects.Variable in the term. coefficient Coefficient for variable
.
- Since
- 44.00
Member Function Documentation
div() [1/3]
|
inline |
Create a expression that represents the quotient of this
and arg
.
- Parameters
-
arg Divisor.
- Returns
- The expression.
- Since
- 44.00
div() [2/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() [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
getVariable()
|
inline |
The variable in the term [get].
- Since
- 44.00
lTerm() [1/2]
|
inlinestatic |
Convenience function to create a single linear term.
Creates the term 1 * variable
.
- Parameters
-
variable objects.Variable for term.
- Returns
- The newly created term.
- Since
- 44.00
lTerm() [2/2]
|
inlinestatic |
Convenience function to create a single linear term.
- Parameters
-
variable objects.Variable for term. coefficient Coefficient for term.
- Returns
- The newly created term.
- Since
- 44.00
mul() [1/5]
|
inline |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
- The expression.
- Since
- 44.00
mul() [2/5]
|
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/5]
|
inline |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
- The expression.
- Since
- 44.00
mul() [4/5]
|
inline |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
- The expression.
- Since
- 44.00
mul() [5/5]
|
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.
square()
|
inline |
Multiply this term by itself.
- Returns
- The product of this term with itself.
- 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 linear term to a string.
Note that while the LinTerm
class does not allow XpressProblem::NULL_VARIABLE
as variable, this function allows this variable to indicate constantterms.
- Parameters
-
v Variable in linear term. coef Coeffcient in linear term.
- Returns
-
String representation of
coef*v
.
- 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.