Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends

flopc::MP_variable Class Reference
[Public interface]

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. More...

#include <MP_variable.hpp>

Inheritance diagram for flopc::MP_variable:
flopc::RowMajor flopc::Functor flopc::Named flopc::MP_binary_variable

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 VariableRefoperator() (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_baseS1
const MP_set_baseS2
const MP_set_baseS3
const MP_set_baseS4
const MP_set_baseS5
MP_index i1
MP_index i2
MP_index i3
MP_index i4
MP_index i5
MP_modelM
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 35 of file MP_variable.hpp.


Constructor & Destructor Documentation

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 48 of file MP_variable.hpp.


Member Function Documentation

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

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

Definition at line 68 of file MP_variable.hpp.

References flopc::MP_data::initialize(), type, and upperLimit.

Referenced by flopc::MP_binary_variable::MP_binary_variable().

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

Definition at line 56 of file MP_variable.cpp.

References i1, i2, i3, i4, i5, offset, S2, S3, S4, and S5.

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

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

Definition at line 74 of file MP_variable.hpp.

References type.

double 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.

Definition at line 38 of file MP_variable.cpp.

References flopc::RowMajor::f(), M, offset, and flopc::MP_model::Solver.

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 55 of file MP_variable.hpp.

References VariableRef.

void MP_variable::operator() (  )  const [private]

Friends And Related Function Documentation

friend class DisplayVariable [friend]

Definition at line 37 of file MP_variable.hpp.

friend class MP_model [friend]

Definition at line 36 of file MP_variable.hpp.

friend class VariableRef [friend]

Definition at line 38 of file MP_variable.hpp.

Referenced by operator()().


Member Data Documentation

Definition at line 85 of file MP_variable.hpp.

Referenced by display(), and operator()().

Definition at line 85 of file MP_variable.hpp.

Referenced by display(), and operator()().

Definition at line 85 of file MP_variable.hpp.

Referenced by display(), and operator()().

Definition at line 85 of file MP_variable.hpp.

Referenced by display(), and operator()().

Definition at line 85 of file MP_variable.hpp.

Referenced by display(), and operator()().

Lower bound on the variable value.

Definition at line 81 of file MP_variable.hpp.

Referenced by MP_variable().

Definition at line 88 of file MP_variable.hpp.

Referenced by binary(), integer(), and MP_variable().

Upper bound on the variable value.

Definition at line 79 of file MP_variable.hpp.

Referenced by binary(), and MP_variable().


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