Google OR-Tools: ortools/linear_solver/linear_expr.h Source File
14#ifndef ORTOOLS_LINEAR_SOLVER_LINEAR_EXPR_H_
15#define ORTOOLS_LINEAR_SOLVER_LINEAR_EXPR_H_
82#include "absl/container/flat_hash_map.h"
118 LinearExpr(double constant);
142 double offset() const { return offset_; }
158 std::string ToString() const;
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);
Definition linear_expr.h:114
double SolutionValue() const
LinearExpr operator-() const
LinearExpr & operator/=(double rhs)
const absl::flat_hash_map< const MPVariable *, double > & terms() const
Definition linear_expr.h:143
std::string ToString() const
LinearExpr & operator+=(const LinearExpr &rhs)
static LinearExpr NotVar(LinearExpr var)
LinearExpr & operator-=(const LinearExpr &rhs)
LinearExpr & operator*=(double rhs)
double offset() const
Definition linear_expr.h:142
double upper_bound() const
Definition linear_expr.h:207
const LinearExpr & linear_expr() const
Definition linear_expr.h:206
LinearRange()
Definition linear_expr.h:194
double lower_bound() const
Definition linear_expr.h:205
The class for variables of a Mathematical Programming (MP) model.
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)