 |
OR-Tools
8.0
|
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 & operator+=(const LinearExpr &rhs)
The class for variables of a Mathematical Programming (MP) model.
LinearExpr & operator-=(const LinearExpr &rhs)
LinearRange operator==(const LinearExpr &lhs, const LinearExpr &rhs)
LinearExpr & operator/=(double rhs)
LinearExpr operator-() const
const absl::flat_hash_map< const MPVariable *, double > & terms() const
static LinearExpr NotVar(LinearExpr var)
Returns 1-var.
double SolutionValue() const
Evaluates the value of this expression at the solution found.
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
LinearExpr operator-(LinearExpr lhs, const LinearExpr &rhs)
LinearExpr & operator*=(double rhs)
An expression of the form:
LinearExpr models a quantity that is linear in the decision variables (MPVariable) of an optimization...
LinearExpr operator*(LinearExpr lhs, double rhs)
LinearExpr operator/(LinearExpr lhs, double rhs)
double lower_bound() const
LinearRange operator>=(const LinearExpr &lhs, const LinearExpr &rhs)
std::ostream & operator<<(std::ostream &out, const Assignment &assignment)
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)