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