# flopc::MP_index Class Reference
[Public interface]

Representation of an index. More...

`#include <MP_index.hpp>`

Inheritance diagram for flopc::MP_index:
[legend]
Collaboration diagram for flopc::MP_index:
[legend]

List of all members.

## Public Member Functions
| MP_index ()
| Default constructor.
int | evaluate () const
bool | isInstantiated () const
| interrogate state of instatiation of data.
void | assign (int i)
| Setter for the index.
void | unInstantiate ()
| unsetter for instatiated.
void | instantiate ()
| setter for instatiated.
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.
## Static Public Member Functions
static MP_index & | getEmpty ()
| returns a reference to the distinct "empty" index.
## Static Public Attributes
static MP_index & | Any
## Private Attributes
int | index
bool | instantiated
## Static Private Attributes
static MP_index & | Empty

## Detailed Description

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.

- these can be built stand-alone
- these are sometime constructed as needed.
- there is a special "empty" which is a unique constant. \ This constant is used when defaulting passed parameters for \ extra dimensions which are unused.

Definition at line 53 of file MP_index.hpp.

## Constructor & Destructor Documentation

flopc::MP_index::MP_index | ( |  | ) | `[inline]`

Default constructor.

Definition at line 56 of file MP_index.hpp.

## Member Function Documentation

int flopc::MP_index::evaluate | ( |  | ) | const`[inline, virtual]`

Implements flopc::MP_index_base.

Definition at line 57 of file MP_index.hpp.

bool flopc::MP_index::isInstantiated | ( |  | ) | const`[inline]`

interrogate state of instatiation of data.

Todo:
  should this be private?

Definition at line 63 of file MP_index.hpp.

void flopc::MP_index::assign | ( | int | i | ) | `[inline]`

Setter for the index.

Todo:

  should this be private?

  should this assert "instatiated"?

Definition at line 70 of file MP_index.hpp.

void flopc::MP_index::unInstantiate | ( |  | ) | `[inline]`

unsetter for instatiated.

Todo:
  should this be private?

Definition at line 76 of file MP_index.hpp.

void flopc::MP_index::instantiate | ( |  | ) | `[inline]`

setter for instatiated.

Todo:
  should this be private?

Definition at line 82 of file MP_index.hpp.

MP_index* flopc::MP_index::getIndex | ( |  | ) | const`[inline, virtual]`

getter for MP_index * data type.

Todo:

  should this be private?

  should this be virtual?

Implements flopc::MP_index_base.

Definition at line 89 of file MP_index.hpp.

virtual MP_domain flopc::MP_index::getDomain | ( | MP_set * | s | ) | const`[virtual]`

Getter for domain over which this index is applied.

Implements flopc::MP_index_base.

static MP_index& flopc::MP_index::getEmpty | ( |  | ) | `[static]`

returns a reference to the distinct "empty" index.

Reimplemented in flopc::MP_set.

## Member Data Documentation

MP_index& flopc::MP_index::Any`[static]`

Todo:

  should this be private?

  doc purpose.

Definition at line 97 of file MP_index.hpp.

MP_index& flopc::MP_index::Empty`[static, private]`

Reimplemented in flopc::MP_set.

Definition at line 102 of file MP_index.hpp.

int flopc::MP_index::index`[private]`

Definition at line 103 of file MP_index.hpp.

bool flopc::MP_index::instantiated`[private]`

Definition at line 104 of file MP_index.hpp.

The documentation for this class was generated from the following file:

- /home/coin/svn-release/Smi-0.93.1/FlopCpp/src/MP_index.hpp