FLOPC++
|
Representation of an index.This is one of the main public interface classes. It is used to iterate through, or index into an MP_domain. It is also used to share the 'current' index offsets between expressions which share an index. More...
#include <MP_index.hpp>
Public Member Functions | |
MP_index () | |
Default constructor. | |
int | evaluate () const |
Static Public Member Functions | |
static MP_index & | getEmpty () |
returns a reference to the distinct "empty" index. | |
static MP_index & | Any () |
returns a reference to the distinct "wildcard" index. | |
Private Member Functions | |
bool | isInstantiated () const |
void | assign (int i) |
void | unInstantiate () |
void | instantiate () |
MP_index * | getIndex () const |
virtual MP_domain | getDomain (MP_set *s) const |
Getter for domain over which this index is applied. | |
Private Attributes | |
int | index |
bool | instantiated |
Static Private Attributes | |
static MP_index & | Empty = *new MP_index() |
static MP_index & | Any_index = *new MP_index() |
Friends | |
class | MP_domain_set |
class | MP_domain_subset |
Representation of an index.
This is one of the main public interface classes. It is used to iterate through, or index into an MP_domain. It is also used to share the 'current' index offsets between expressions which share an index.
Definition at line 53 of file MP_index.hpp.
flopc::MP_index::MP_index | ( | ) | [inline] |
Default constructor.
Definition at line 58 of file MP_index.hpp.
MP_index & flopc::MP_index::Any | ( | ) | [static] |
returns a reference to the distinct "wildcard" index.
Definition at line 23 of file MP_index.cpp.
References Any_index.
void flopc::MP_index::assign | ( | int | i | ) | [inline, private] |
Setter for the index.
Definition at line 75 of file MP_index.hpp.
References index.
Referenced by flopc::MP_domain_set::operator()().
int flopc::MP_index::evaluate | ( | ) | const [inline, virtual] |
Implements flopc::MP_index_base.
Definition at line 59 of file MP_index.hpp.
References index.
Referenced by flopc::MP_domain_set::evaluate(), flopc::VariableRef::level(), flopc::MP_variable::operator()(), and flopc::MP_data::operator()().
Getter for domain over which this index is applied.
Implements flopc::MP_index_base.
Definition at line 89 of file MP_index.cpp.
References MP_domain_set.
MP_index & flopc::MP_index::getEmpty | ( | ) | [static] |
returns a reference to the distinct "empty" index.
Reimplemented in flopc::MP_set.
Definition at line 20 of file MP_index.cpp.
References Empty.
Referenced by flopc::MP_domain_subset< nbr >::operator()().
MP_index* flopc::MP_index::getIndex | ( | ) | const [inline, private, virtual] |
getter for MP_index * data type.
Implements flopc::MP_index_base.
Definition at line 91 of file MP_index.hpp.
void flopc::MP_index::instantiate | ( | ) | [inline, private] |
setter for instatiated.
Definition at line 85 of file MP_index.hpp.
References instantiated.
Referenced by flopc::MP_domain_set::operator()().
bool flopc::MP_index::isInstantiated | ( | ) | const [inline, private] |
interrogate state of instatiation of data.
Definition at line 69 of file MP_index.hpp.
References instantiated.
Referenced by flopc::MP_domain_set::operator()().
void flopc::MP_index::unInstantiate | ( | ) | [inline, private] |
unsetter for instatiated.
Definition at line 80 of file MP_index.hpp.
References instantiated.
Referenced by flopc::MP_domain_set::operator()().
friend class MP_domain_set [friend] |
Definition at line 54 of file MP_index.hpp.
Referenced by getDomain(), flopc::MP_set::operator MP_domain(), and flopc::MP_set::such_that().
friend class MP_domain_subset [friend] |
Definition at line 55 of file MP_index.hpp.
MP_index & flopc::MP_index::Any_index = *new MP_index() [static, private] |
Definition at line 98 of file MP_index.hpp.
Referenced by Any().
MP_index & flopc::MP_index::Empty = *new MP_index() [static, private] |
Reimplemented in flopc::MP_set.
Definition at line 97 of file MP_index.hpp.
Referenced by getEmpty().
int flopc::MP_index::index [private] |
Definition at line 99 of file MP_index.hpp.
Referenced by assign(), and evaluate().
bool flopc::MP_index::instantiated [private] |
Definition at line 100 of file MP_index.hpp.
Referenced by instantiate(), isInstantiated(), and unInstantiate().