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_;
165std::ostream&
operator<<(std::ostream& stream,
const LinearExpr& linear_expr);
174LinearExpr
operator+(LinearExpr lhs,
const LinearExpr& rhs);
175LinearExpr
operator-(LinearExpr lhs,
const LinearExpr& rhs);
176LinearExpr
operator*(LinearExpr lhs,
double rhs);
177LinearExpr
operator/(LinearExpr lhs,
double rhs);
178LinearExpr
operator*(
double lhs, LinearExpr rhs);
216LinearRange
operator<=(
const LinearExpr& lhs,
const LinearExpr& rhs);
217LinearRange
operator==(
const LinearExpr& lhs,
const LinearExpr& rhs);
218LinearRange
operator>=(
const LinearExpr& lhs,
const LinearExpr& rhs);
double SolutionValue() const
LinearExpr operator-() const
LinearExpr & operator/=(double rhs)
const absl::flat_hash_map< const MPVariable *, double > & terms() const
std::string ToString() const
LinearExpr & operator+=(const LinearExpr &rhs)
static LinearExpr NotVar(LinearExpr var)
static
LinearExpr & operator-=(const LinearExpr &rhs)
LinearExpr & operator*=(double rhs)
double upper_bound() const
const LinearExpr & linear_expr() const
double lower_bound() const
The class for variables of a Mathematical Programming (MP) model.
In SWIG mode, we don't want anything besides these top-level includes.
LinearRange operator==(const LinearExpr &lhs, const LinearExpr &rhs)
LinearExpr operator*(LinearExpr lhs, double rhs)
LinearExpr operator-(LinearExpr lhs, const LinearExpr &rhs)
LinearRange operator<=(const LinearExpr &lhs, const LinearExpr &rhs)
std::ostream & operator<<(std::ostream &out, const Assignment &assignment)
LinearExpr operator+(LinearExpr lhs, const LinearExpr &rhs)
LinearExpr operator/(LinearExpr lhs, double rhs)
LinearRange operator>=(const LinearExpr &lhs, const LinearExpr &rhs)