# flopc::MP_set Class Reference
[Public interface]

Representation of a set for indexing into some other construct. More...

`#include <MP_set.hpp>`

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

List of all members.

## Public Member Functions
| MP_set (int i=0)
| constructs a set with specific cardinality.
MP_domain | operator() (const MP_index_exp &i) const
| Constructs an MP_domain on the stack given an index expression into the set.
| operator MP_domain () const
| constructs an MP_domain from the MP_set.
MP_domain | such_that (const MP_boolean &b)
| constructs a domain by subsetting this MP_set where the MP_boolean evaluates to 'true'
void | cyclic ()
| setter for 'cyclic' property
virtual int | size () const
| getter for the cardinality of this MP_set.
int | last ()
## Static Public Member Functions
static MP_set & | getEmpty ()
| gets the distinct 'empty' MP_set.
## Private Attributes
int | cardinality
## Static Private Attributes
static MP_set | Empty

## Detailed Description

Representation of a set for indexing into some other construct.

This is one of the main public interface classes. One uses this when constructing MP_domains, and subsets. It is frequent that one would directly construct sets of indices, then use expressions to subset or slice the data.

Note:
  term: cardinality is the number of elements in the set.
  term: dimension is the number of indices used to reference into it.
  there is a distince 'empty' MP_set

Definition at line 78 of file MP_set.hpp.

## Constructor & Destructor Documentation

flopc::MP_set::MP_set | ( | int | i = `0` | ) | `[inline]`

constructs a set with specific cardinality.

Definition at line 81 of file MP_set.hpp.

## Member Function Documentation

MP_domain flopc::MP_set::operator() | ( | const MP_index_exp & | i | ) | const`[inline, virtual]`

Constructs an MP_domain on the stack given an index expression into the set.

Todo:
  is the internal use?

Implements flopc::MP_set_base.

Definition at line 86 of file MP_set.hpp.

flopc::MP_set::operator MP_domain | ( |  | ) | const`[inline, virtual]`

constructs an MP_domain from the MP_set.

Implements flopc::MP_set_base.

Definition at line 90 of file MP_set.hpp.

MP_domain flopc::MP_set::such_that | ( | const MP_boolean & | b | ) | `[inline]`

constructs a domain by subsetting this MP_set where the MP_boolean evaluates to 'true'

Definition at line 96 of file MP_set.hpp.

void flopc::MP_set::cyclic | ( |  | ) | `[inline]`

setter for 'cyclic' property

Todo:
  better explain the use of cyclic.

Definition at line 102 of file MP_set.hpp.

virtual int flopc::MP_set::size | ( |  | ) | const`[inline, virtual]`

getter for the cardinality of this MP_set.

Implements flopc::MP_set_base.

Reimplemented in flopc::MP_subset< nbr >.

Definition at line 106 of file MP_set.hpp.

int flopc::MP_set::last | ( |  | ) | `[inline]`

Definition at line 109 of file MP_set.hpp.

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

gets the distinct 'empty' MP_set.

Reimplemented from flopc::MP_index.

## Member Data Documentation

MP_set flopc::MP_set::Empty`[static, private]`

Reimplemented from flopc::MP_index.

Definition at line 115 of file MP_set.hpp.

int flopc::MP_set::cardinality`[private]`

Definition at line 116 of file MP_set.hpp.

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

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