scsolver::ConstantTermStorage Class Reference

List of all members.

Public Member Functions

 ConstantTermStorage ()
 ~ConstantTermStorage () throw ()
void setValue (const CellAddress &addr, double value)
double getValue (const CellAddress &addr)

Private Member Functions

void getKeyFromAddress (const CellAddress &addr, size_t &key, bool &isNewKey)

Private Attributes

map< size_t, double > m_List
vector< cell_address_tm_AddrKeys


Detailed Description

Store the constant term by cell address. The constant term in a given cell is the value remaining even after the values of all decision variables are set to zero.

Definition at line 82 of file solvemodel.cxx.


Constructor & Destructor Documentation

scsolver::ConstantTermStorage::ConstantTermStorage (  )  [inline]

Definition at line 85 of file solvemodel.cxx.

scsolver::ConstantTermStorage::~ConstantTermStorage (  )  throw () [inline]

Definition at line 86 of file solvemodel.cxx.


Member Function Documentation

void scsolver::ConstantTermStorage::setValue ( const CellAddress &  addr,
double  value 
) [inline]

Definition at line 88 of file solvemodel.cxx.

References getKeyFromAddress(), and m_List.

Referenced by scsolver::SolveModelImpl::parseConstraints().

double scsolver::ConstantTermStorage::getValue ( const CellAddress &  addr  )  [inline]

Definition at line 105 of file solvemodel.cxx.

References getKeyFromAddress(), and m_List.

Referenced by scsolver::SolveModelImpl::parseConstraints().

void scsolver::ConstantTermStorage::getKeyFromAddress ( const CellAddress &  addr,
size_t &  key,
bool &  isNewKey 
) [inline, private]

Given a set of sheet, column and row IDs, return a single number that is unique to that number set. In other words, this method always returns identical number when the same cell address is given.

Parameters:
addr cell address
key (reference) unique number for the cell address
isNewKey (reference) true is the cell address is new

Definition at line 133 of file solvemodel.cxx.

References scsolver::cell_address_t::column, m_AddrKeys, scsolver::cell_address_t::row, and scsolver::cell_address_t::sheet.

Referenced by getValue(), and setValue().


Member Data Documentation

map<size_t, double> scsolver::ConstantTermStorage::m_List [private]

Definition at line 120 of file solvemodel.cxx.

Referenced by getValue(), and setValue().

vector<cell_address_t> scsolver::ConstantTermStorage::m_AddrKeys [private]

Definition at line 121 of file solvemodel.cxx.

Referenced by getKeyFromAddress().


The documentation for this class was generated from the following file:
Generated on Mon Jul 28 09:13:49 2008 for scsolver by  doxygen 1.5.3