Polynomials.
#include <polynomial.h>
Public Member Functions | |
polynomial () | |
Creates a polynomial with no entries. | |
polynomial (const var &v) | |
Creates the polynomial v . | |
polynomial (const monomial &m) | |
Creates the polynomial m . | |
polynomial (const row &r) | |
Creates the polynomial r . | |
std::list< monomial > | get_p () const |
Returns the list of all monomials. | |
double | value (solution &sol) |
void | normalize (bool clean=false) |
Normalizes the polynomial. | |
polynomial & | operator+= (const polynomial &p) |
Adds p to the polynomial. | |
polynomial | operator+ (const polynomial &p) |
Creates the polynomial ![]() | |
polynomial & | operator+= (const monomial &m) |
Adds m to the polynomial. | |
polynomial | operator+ (const monomial &m) |
Creates the polynomial ![]() | |
polynomial & | operator+= (const row &r) |
Adds r to the polynomial. | |
polynomial | operator+ (const row &r) |
Creates the polynomial ![]() | |
polynomial & | operator+= (const var &v) |
Adds v to the polynomial. | |
polynomial | operator+ (const var &v) |
Creates the polynomial ![]() | |
polynomial & | operator-= (const polynomial &p) |
Subtracts p from the polynomial. | |
polynomial | operator- (const polynomial &p) |
Creates the polynomial ![]() | |
polynomial & | operator-= (const monomial &m) |
Subtracts m from the polynomial. | |
polynomial | operator- (const monomial &m) |
Creates the polynomial ![]() | |
polynomial & | operator-= (const row &r) |
Subtracts r from the polynomial. | |
polynomial | operator- (const row &r) |
Creates the polynomial ![]() | |
polynomial & | operator-= (const var &v) |
Subtracts v from the polynomial. | |
polynomial | operator- (const var &v) |
Creates the polynomial ![]() | |
polynomial & | operator*= (double d) |
Multiplies the polynomial by d . | |
polynomial | operator* (double d) |
Creates the polynomial ![]() | |
polynomial | operator* (const monomial &m) |
Creates the polynomial ![]() | |
polynomial & | operator*= (const monomial &m) |
Multiplies the polynomial by m . | |
polynomial | operator* (const polynomial &p) |
Creates the polynomial ![]() | |
polynomial & | operator*= (const polynomial &p) |
Multiplies the polynomial by p . | |
polynomial | operator* (const var &v) |
Creates the polynomial ![]() | |
polynomial & | operator*= (const var &v) |
Multiplies the polynomial by v . | |
polynomial | operator* (const row &r) |
Creates the polynomial ![]() | |
polynomial & | operator*= (const row &r) |
Multiplies the polynomial by r . | |
pol_constraint | operator<= (double rhs) |
Creates the polynomial constraint ![]() | |
pol_constraint | operator>= (double rhs) |
Creates the polynomial constraint ![]() | |
pol_constraint | operator== (double rhs) |
Creates the polynomial constraint ![]() |
Definition at line 22 of file polynomial.h.
SCIL::polynomial::polynomial | ( | const row & | r | ) | [inline] |
Caution: Constant term of r
is ignored!
Definition at line 41 of file polynomial.h.
References SCIL::row::begin(), and SCIL::row::end().
void SCIL::polynomial::normalize | ( | bool | clean = false |
) |
Normalizes to
, where
are monomials.
Referenced by SCIL::ILP_Problem::add_polynomial().
polynomial SCIL::polynomial::operator* | ( | const row & | r | ) |
Caution: Constant term of r
is ignored!
polynomial& SCIL::polynomial::operator*= | ( | const row & | r | ) |
Caution: Constant term of r
is ignored!
polynomial SCIL::polynomial::operator+ | ( | const row & | r | ) |
Caution: Constant term of r
is ignored!
polynomial& SCIL::polynomial::operator+= | ( | const row & | r | ) |
Caution: Constant term of r
is ignored!
polynomial SCIL::polynomial::operator- | ( | const row & | r | ) |
Caution: Constant term of r
is ignored!
polynomial& SCIL::polynomial::operator-= | ( | const row & | r | ) |
Caution: Constant term of r
is ignored!