# flopc::MP_variable Class Reference
[Public interface]

Symantic representation of a variable. More...

`#include <MP_variable.hpp>`

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

List of all members.

## Public Member Functions
| MP_variable (const MP_set_base &s1=MP_set::getEmpty(), const MP_set_base &s2=MP_set::getEmpty(), const MP_set_base &s3=MP_set::getEmpty(), const MP_set_base &s4=MP_set::getEmpty(), const MP_set_base &s5=MP_set::getEmpty())
void | display (const std::string &s="")
| ~MP_variable ()
double | level (int i1=0, int i2=0, int i3=0, int i4=0, int i5=0)
| Returns the value of the variable given the specific index values.
const VariableRef & | operator() (const MP_index_exp &d1=MP_index_exp::getEmpty(), const MP_index_exp &d2=MP_index_exp::getEmpty(), const MP_index_exp &d3=MP_index_exp::getEmpty(), const MP_index_exp &d4=MP_index_exp::getEmpty(), const MP_index_exp &d5=MP_index_exp::getEmpty())
| Interal use only.
void | binary ()
| Call this method to turn the variable into a binary variable.
void | integer ()
| Call this method to turn the MP_variable into an integer variable.
## Public Attributes
MP_data | upperLimit
| Upper bound on the variable value.
MP_data | lowerLimit
| Lower bound on the variable value.
## Private Member Functions
void | operator() () const
## Private Attributes
const MP_set_base * | S1
const MP_set_base * | S2
const MP_set_base * | S3
const MP_set_base * | S4
const MP_set_base * | S5
MP_index | i1
MP_index | i2
MP_index | i3
MP_index | i4
MP_index | i5
MP_model * | M
variableType | type
int | offset
## Friends
class | MP_model
class | DisplayVariable
class | VariableRef

## Detailed Description

Symantic representation of a variable.

This is one of the main public interface classes. It should be directly declared by clients of the FlopC++. The parametersof construction are MP_set s which specify the indexes over which the variable is defined.

Definition at line 75 of file MP_variable.hpp.

## Constructor & Destructor Documentation

flopc::MP_variable::MP_variable | ( | const MP_set_base & | s1 = `MP_set::getEmpty()`,
|  | const MP_set_base & | s2 = `MP_set::getEmpty()`,
|  | const MP_set_base & | s3 = `MP_set::getEmpty()`,
|  | const MP_set_base & | s4 = `MP_set::getEmpty()`,
|  | const MP_set_base & | s5 = `MP_set::getEmpty()` |
| ) |  |  |

flopc::MP_variable::~MP_variable | ( |  | ) | `[inline]`

Definition at line 88 of file MP_variable.hpp.

## Member Function Documentation

void flopc::MP_variable::display | ( | const std::string & | s = `""` | ) |

double flopc::MP_variable::level | ( | int | i1 = `0`,
|  | int | i2 = `0`,
|  | int | i3 = `0`,
|  | int | i4 = `0`,
|  | int | i5 = `0` |
| ) |  |  |

Returns the value of the variable given the specific index values.

const VariableRef& flopc::MP_variable::operator() | ( | const MP_index_exp & | d1 = `MP_index_exp::getEmpty()`,
|  | const MP_index_exp & | d2 = `MP_index_exp::getEmpty()`,
|  | const MP_index_exp & | d3 = `MP_index_exp::getEmpty()`,
|  | const MP_index_exp & | d4 = `MP_index_exp::getEmpty()`,
|  | const MP_index_exp & | d5 = `MP_index_exp::getEmpty()` |
| ) |  |  | `[inline]`

Interal use only.

Definition at line 95 of file MP_variable.hpp.

void flopc::MP_variable::binary | ( |  | ) | `[inline]`

Call this method to turn the variable into a binary variable.

Definition at line 108 of file MP_variable.hpp.

void flopc::MP_variable::integer | ( |  | ) | `[inline]`

Call this method to turn the MP_variable into an integer variable.

Definition at line 114 of file MP_variable.hpp.

void flopc::MP_variable::operator() | ( |  | ) | const`[private, virtual]`

Implements flopc::Functor.

## Friends And Related Function Documentation

friend class MP_model`[friend]`

Definition at line 76 of file MP_variable.hpp.

friend class DisplayVariable`[friend]`

Definition at line 77 of file MP_variable.hpp.

friend class VariableRef`[friend]`

Definition at line 78 of file MP_variable.hpp.

## Member Data Documentation

MP_data flopc::MP_variable::upperLimit

Upper bound on the variable value.

Definition at line 119 of file MP_variable.hpp.

MP_data flopc::MP_variable::lowerLimit

Lower bound on the variable value.

Definition at line 121 of file MP_variable.hpp.

const MP_set_base* flopc::MP_variable::S1`[private]`

Definition at line 124 of file MP_variable.hpp.

const MP_set_base * flopc::MP_variable::S2`[private]`

Definition at line 124 of file MP_variable.hpp.

const MP_set_base * flopc::MP_variable::S3`[private]`

Definition at line 124 of file MP_variable.hpp.

const MP_set_base * flopc::MP_variable::S4`[private]`

Definition at line 124 of file MP_variable.hpp.

const MP_set_base * flopc::MP_variable::S5`[private]`

Definition at line 124 of file MP_variable.hpp.

MP_index flopc::MP_variable::i1`[private]`

Definition at line 125 of file MP_variable.hpp.

MP_index flopc::MP_variable::i2`[private]`

Definition at line 125 of file MP_variable.hpp.

MP_index flopc::MP_variable::i3`[private]`

Definition at line 125 of file MP_variable.hpp.

MP_index flopc::MP_variable::i4`[private]`

Definition at line 125 of file MP_variable.hpp.

MP_index flopc::MP_variable::i5`[private]`

Definition at line 125 of file MP_variable.hpp.

MP_model* flopc::MP_variable::M`[private]`

Definition at line 127 of file MP_variable.hpp.

variableType flopc::MP_variable::type`[private]`

Definition at line 128 of file MP_variable.hpp.

int flopc::MP_variable::offset`[private]`

Definition at line 129 of file MP_variable.hpp.

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

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