10 #define _MP_index_hpp_
180 return left->evaluate()*int(
right->evaluate());
183 return left->getIndex();
203 return left->evaluate()+int(
right->evaluate());
206 return left->getIndex();
226 return left->evaluate()-int(
right->evaluate());
229 return left->getIndex();
virtual MP_domain getDomain(MP_set *s) const
Getter for domain over which this index is applied.
Internal representation of an index expression.
Internal representation of an index expression.
MP_index * getIndex() const
friend MP_index_exp operator*(MP_index &i, const Constant &j)
virtual MP_index * getIndex() const =0
static MP_index & getEmpty()
returns a reference to the distinct "empty" index.
virtual MP_domain getDomain(MP_set *s) const
Representation of an index.This is one of the main public interface classes. It is used to iterate th...
Internal representation of a "set".
MP_index_sum(MP_index &i, const Constant &j)
Utility for doing reference counted pointers.
Constant operator+(const Constant &a, const Constant &b)
Returns the sum of two constants.This is used in the formation of an expression.
Internal representation of an index expression.
Representation of an expression involving an index.This is one of the main public interface classes...
virtual MP_domain getDomain(MP_set *s) const
MP_index * getIndex() const
static const MP_index_exp & getEmpty()
Return the unique empty expression.
MP_index * getIndex() const
bool isInstantiated() const
Constant operator-(const Constant &a, const Constant &b)
Returns the difference of two constants.This is used in the formation of an expression.
virtual void display() const
MP_index_mult(MP_index &i, const Constant &j)
Range over which some other constuct is defined.This is one of the main public interface classes...
MP_index_dif(MP_index &i, const Constant &j)
MP_index_exp(MP_index_base *r)
For internal use.
Representation of a set for indexing into some other construct.This is one of the main public interfa...
Reference counted class for all "constant" types of data.
Constant operator*(const Constant &a, const Constant &b)
Returns the product of two constants.This is used in the formation of an expression.
virtual MP_domain getDomain(MP_set *s) const
virtual MP_domain getDomain(MP_set *s) const =0
virtual int evaluate() const =0
Internal representation of a index.
MP_index * getIndex() const
friend MP_index_exp operator-(MP_index &i, const Constant &j)
static MP_index_exp Empty
friend MP_index_exp operator+(MP_index &i, const Constant &j)
MP_index()
Default constructor.