This is one of the main public interface classes. One uses this in the context of a constraint, objective, variable, or data. It is usually used in conjunction with an MP_set, or a subset, but can be used without one. It is the range over which the other construct is defined. More...
#include <MP_domain.hpp>
Inheritance diagram for flopc::MP_domain:
Public Member Functions | |
MP_domain () | |
~MP_domain () | |
MP_domain (MP_domain_base *r) | |
MP_domain | such_that (const MP_boolean &b) |
Special conditional creation of a subset. | |
void | Forall (const Functor *op) const |
Special conditional operation on the domain. | |
size_t | size () const |
returns number of elements in the domain. | |
Static Public Member Functions | |
static const MP_domain & | getEmpty () |
returns a reference to the "empty" set. | |
Private Attributes | |
std::vector< MP_boolean > | condition |
Handle< MP_domain_base * > | last |
Static Private Attributes | |
static const MP_domain * | Empty = NULL |
Friends | |
class | MP_constraint |
class | MP_index_exp |
MP_domain | operator * (const MP_domain &a, const MP_domain &b) |
This is one of the main public interface classes. One uses this in the context of a constraint, objective, variable, or data. It is usually used in conjunction with an MP_set, or a subset, but can be used without one. It is the range over which the other construct is defined.
Definition at line 61 of file MP_domain.hpp.
MP_domain::MP_domain | ( | ) |
a set which points to nothing.
Definition at line 74 of file MP_domain.cpp.
Referenced by getEmpty().
MP_domain::~MP_domain | ( | ) |
Definition at line 76 of file MP_domain.cpp.
MP_domain::MP_domain | ( | MP_domain_base * | r | ) |
void MP_domain::Forall | ( | const Functor * | op | ) | const |
Special conditional operation on the domain.
This method will call the functor for each member of the MP_domain.
Definition at line 85 of file MP_domain.cpp.
References condition, last, and flopc::Handle< T >::operator->().
Referenced by flopc::Constant_product::evaluate(), flopc::Constant_sum::evaluate(), flopc::Constant_min::evaluate(), flopc::Constant_max::evaluate(), flopc::forall(), flopc::Expression_constant::generate(), flopc::Expression_sum::level(), and flopc::operator<<=().
const MP_domain & MP_domain::getEmpty | ( | ) | [static] |
returns a reference to the "empty" set.
Definition at line 48 of file MP_domain.cpp.
References Empty, flopc::MP_set::getEmpty(), and MP_domain().
Referenced by flopc::MP_model::addRow(), flopc::MP_model::attach(), flopc::forall(), flopc::SUBSETREF::getDomain(), flopc::MP_index_constant::getDomain(), and flopc::operator *().
size_t MP_domain::size | ( | ) | const |
returns number of elements in the domain.
Definition at line 98 of file MP_domain.cpp.
References flopc::Handle< T >::operator->().
MP_domain MP_domain::such_that | ( | const MP_boolean & | b | ) |
Special conditional creation of a subset.
This method allows for a test for inclusion of a condition during construction of a subset. The output MP_domain will include references where the condition is satisfied.
Definition at line 78 of file MP_domain.cpp.
References condition.
Referenced by flopc::MP_set::such_that().
friend class MP_constraint [friend] |
Definition at line 64 of file MP_domain.hpp.
friend class MP_index_exp [friend] |
Definition at line 65 of file MP_domain.hpp.
operator which creates a new domain as the pairwise combinations of two input domains.
Definition at line 125 of file MP_domain.cpp.
std::vector<MP_boolean> flopc::MP_domain::condition [private] |
Definition at line 95 of file MP_domain.hpp.
Referenced by Forall(), flopc::operator *(), and such_that().
const MP_domain * MP_domain::Empty = NULL [static, private] |
Handle<MP_domain_base*> flopc::MP_domain::last [private] |