Go to the documentation of this file.
10 #define _MP_index_hpp_
179 int evaluate()
const {
180 return left->evaluate()*int(right->evaluate());
183 return left->getIndex();
202 int evaluate()
const {
203 return left->evaluate()+int(right->evaluate());
206 return left->getIndex();
225 int evaluate()
const {
226 return left->evaluate()-int(right->evaluate());
229 return left->getIndex();
virtual void display() const
friend MP_index_exp operator*(MP_index &i, const Constant &j)
returns an index expression from a product between an MP_index and a Constant.
Constant operator*(const Constant &a, const Constant &b)
Returns the product of two constants.
Reference counted class for all "constant" types of data.
MP_index()
Default constructor.
bool isInstantiated() const
interrogate state of instatiation of data.
Range over which some other constuct is defined.
void assign(int i)
Setter for the index.
Utility for doing reference counted pointers.
MP_index_exp(MP_index_base *r)
For internal use.
friend MP_index_exp operator+(MP_index &i, const Constant &j)
returns an index expression from a sum between an MP_index and a Constant.
Constant operator-(const Constant &a, const Constant &b)
Returns the difference of two constants.
void unInstantiate()
unsetter for instatiated.
virtual MP_domain getDomain(MP_set *s) const
Getter for domain over which this index is applied.
Internal representation of a index.
MP_index * getIndex() const
getter for MP_index * data type.
Constant operator+(const Constant &a, const Constant &b)
Returns the sum of two constants.
Internal representation of an index expression.
void instantiate()
setter for instatiated.
virtual MP_domain getDomain(MP_set *s) const =0
Internal representation of an index expression.
All flopc++ code is contained within the flopc namespace.
static const MP_index_exp & getEmpty()
Return the unique empty expression.
virtual MP_index * getIndex() const =0
Representation of a set for indexing into some other construct.
Representation of an expression involving an index.
Representation of an index.
static MP_index & getEmpty()
returns a reference to the distinct "empty" index.
Internal representation of an index expression.
virtual int evaluate() const =0
friend MP_index_exp operator-(MP_index &i, const Constant &j)
Internal representation of a "set".