8 #ifndef _MP_domain_hpp_ 9 #define _MP_domain_hpp_ 44 virtual size_t size()
const ;
147 std::vector<int> elm(nbr);
148 for (
int i=0; i<nbr; i++) {
149 elm[i] = D->I[i]->evaluate();
171 const std::vector<MP_index*> &i) : S(s), I(i){}
177 return S->evaluate(I);
196 bool allBound =
true;
197 for (
int j=0; j<nbr; j++) {
198 if (I[j]->isInstantiated() ==
true) {
208 if (allBound ==
true) {
211 std::map<std::vector<int>,
int>::const_iterator i;
213 for (i = S->elements.begin(); i != S->elements.end(); i++) {
217 for (
int j=0; j<nbr; j++) {
218 if (isBound[j] ==
true) {
219 if (I[j]->
evaluate() != i->first[j]) {
224 I[j]->assign(i->first[j]);
232 for (
int j=0; j<nbr; j++) {
233 if (isBound[j] ==
false) {
235 I[j]->unInstantiate();
247 std::vector<MP_index*>
I;
virtual const MP_set_base * getSet() const =0
Handle< MP_domain_base * > last
static MP_index & getEmpty()
returns a reference to the distinct "empty" index.
static const MP_domain * Empty
Internal representation of a "set".
virtual MP_index * getIndex() const =0
friend MP_domain operator*(const MP_domain &a, const MP_domain &b)
Representation of an index.This is one of the main public interface classes. It is used to iterate th...
MP_domain_subset< nbr > * D
Utility for doing reference counted pointers.
Representation of an expression involving an index.This is one of the main public interface classes...
Range over which some other constuct is defined.This is one of the main public interface classes...
MP_index * getIndex() const
getter for obtaining the index used in construction
Reference to a set of index values.
MP_set_base * getSet() const
getter for obtaining the set used in construction
Range over which some other constuct is defined. Uses subsetting.This is one of the main public inter...
std::vector< MP_boolean > condition
All flopc++ code is contained within the flopc namespace.
Reference counted class for all "boolean" types of data.This contains counters to ConstantBase pointe...
Functor * makeInsertFunctor() const
Range over which some other constuct is defined.This is one of the main public interface classes...
virtual Functor * makeInsertFunctor() const
MP_domain getDomain(MP_set *s) const
std::vector< MP_index * > I
insertFunctor(MP_domain_subset< nbr > *d)
void forall(const MP_domain &d, const Functor &f)
Global function for performing a Functor on each member of a MP_domain.
Function object. Often used.
Representation of a set for indexing into some other construct.This is one of the main public interfa...
virtual void operator()() const =0
Internal representation of a "set".
virtual MP_domain getDomain(MP_set *s) const =0
virtual int evaluate() const =0
Internal representation of a index.
virtual size_t size() const
virtual ~MP_domain_base()
Semantic representation of a linear constraint.This is one of the main public interface classes...
Inserter for construction of a subset.