 |
OR-Tools
8.1
|
Go to the documentation of this file.
14 #ifndef OR_TOOLS_LINEAR_SOLVER_LINEAR_EXPR_H_
15 #define OR_TOOLS_LINEAR_SOLVER_LINEAR_EXPR_H_
82 #include "absl/container/flat_hash_map.h"
142 double offset()
const {
return offset_; }
143 const absl::flat_hash_map<const MPVariable*, double>&
terms()
const {
162 absl::flat_hash_map<const MPVariable*, double> terms_;
165 std::ostream&
operator<<(std::ostream& stream,
const LinearExpr& linear_expr);
174 LinearExpr
operator+(LinearExpr lhs,
const LinearExpr& rhs);
175 LinearExpr
operator-(LinearExpr lhs,
const LinearExpr& rhs);
176 LinearExpr
operator*(LinearExpr lhs,
double rhs);
177 LinearExpr
operator/(LinearExpr lhs,
double rhs);
178 LinearExpr
operator*(
double lhs, LinearExpr rhs);
216 LinearRange
operator<=(
const LinearExpr& lhs,
const LinearExpr& rhs);
217 LinearRange
operator==(
const LinearExpr& lhs,
const LinearExpr& rhs);
218 LinearRange
operator>=(
const LinearExpr& lhs,
const LinearExpr& rhs);
225 #endif // OR_TOOLS_LINEAR_SOLVER_LINEAR_EXPR_H_
LinearRange operator<=(const LinearExpr &lhs, const LinearExpr &rhs)
LinearExpr models a quantity that is linear in the decision variables (MPVariable) of an optimization...
LinearRange operator==(const LinearExpr &lhs, const LinearExpr &rhs)
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
LinearExpr operator-(LinearExpr lhs, const LinearExpr &rhs)
static LinearExpr NotVar(LinearExpr var)
Returns 1-var.
double lower_bound() const
double SolutionValue() const
Evaluates the value of this expression at the solution found.
std::ostream & operator<<(std::ostream &out, const Assignment &assignment)
LinearExpr operator*(LinearExpr lhs, double rhs)
An expression of the form:
LinearExpr operator/(LinearExpr lhs, double rhs)
LinearExpr & operator/=(double rhs)
const absl::flat_hash_map< const MPVariable *, double > & terms() const
LinearExpr operator-() const
The class for variables of a Mathematical Programming (MP) model.
LinearRange operator>=(const LinearExpr &lhs, const LinearExpr &rhs)
LinearExpr & operator-=(const LinearExpr &rhs)
double upper_bound() const
const LinearExpr & linear_expr() const
std::string ToString() const
A human readable representation of this.
LinearExpr operator+(LinearExpr lhs, const LinearExpr &rhs)
LinearExpr & operator*=(double rhs)
LinearExpr & operator+=(const LinearExpr &rhs)