solver
|
Helper class to ease the construction of a linear expression (e.g. More...
#include <Exprs.hpp>
Public Member Functions | |
LinExpr (double constant=0.0) | |
LinExpr (Var var, double coeff=1.0) | |
double | getValue () const |
size_t | size () const |
double & | getConstant () |
const Var & | getVar (int i) const |
double | getCoeff (int i) const |
const double & | getConstant () const |
void | clear () |
LinExpr | operator* (double factor) const |
LinExpr & | operator+= (const LinExpr &rhs) |
LinExpr & | operator+= (double a) |
LinExpr & | operator-= (double a) |
LinExpr & | operator-= (const LinExpr &rhs) |
LinExpr | operator/ (double a) |
LinExpr | operator+ (double a) |
LinExpr | operator- (double a) |
LinExpr | operator+ (Var var) |
LinExpr | operator- (Var var) |
LinExpr | operator+ (const LinExpr &rhs) const |
LinExpr | operator- (const LinExpr &rhs) const |
LinExpr | operator= (const LinExpr &rhs) |
LinExpr & | operator*= (double a) |
LinExpr & | operator/= (double a) |
Static Public Member Functions | |
static bool | isClean (const LinExpr &rhs) |
static LinExpr | clean (const LinExpr &rhs) |
Private Attributes | |
double | constant_ |
std::vector< Var > | vars_ |
std::vector< double > | coeffs_ |
Friends | |
LinExpr | operator+ (Var var) |
LinExpr | operator- (Var var) |
LinExpr | operator* (Var var, double a) |
LinExpr | operator* (double a, Var var) |
LinExpr | operator+ (Var x, Var y) |
LinExpr | operator- (Var x, Var y) |
LinExpr | operator/ (Var var, double a) |
LinExpr | operator+ (double a, Var var) |
LinExpr | operator+ (Var var, double a) |
LinExpr | operator- (double a, Var var) |
LinExpr | operator- (Var var, double a) |
LinExpr | operator+ (const LinExpr &rhs) |
LinExpr | operator- (const LinExpr &rhs) |
LinExpr | operator- (Var var, LinExpr rhs) |
LinExpr | operator+ (double a, const LinExpr &rhs) |
LinExpr | operator- (double a, const LinExpr &rhs) |
LinExpr | operator* (double factor, const LinExpr &rhs) |
std::ostream & | operator<< (std::ostream &stream, LinExpr expr) |
Helper class to ease the construction of a linear expression (e.g.
a*x = b)