19 #ifndef DECOMP_VAR_INCLUDED
20 #define DECOMP_VAR_INCLUDED
124 DecompVarList::const_iterator vi;
126 for (vi = vars.begin(); vi != vars.end(); vi++) {
127 if ((*vi)->getStrHash() == this->
getStrHash()) {
145 virtual void print(std::ostream* os = &std::cout,
147 virtual void print(std::ostream* os,
148 const std::vector<std::string>& colNames,
149 const double* value = NULL)
const;
193 const double redCost,
194 const double origCost,
206 if (ind.size() > 0) {
217 const std::vector<double>& els,
218 const double redCost,
219 const double origCost) :
230 if (ind.size() > 0) {
241 const std::vector<double>& els,
242 const double redCost,
243 const double origCost,
255 if (ind.size() > 0) {
268 const double origCost) :
289 const double origCost,
311 const double origCost) :
332 const double origCost,
354 const double redCost,
355 const double origCost) :
376 const double redCost,
377 const double origCost,
397 const double* denseArray,
398 const double redCost,
399 const double origCost,
#define DECOMP_TEST_DUPINDEX
CoinPackedVector * UtilPackedVectorFromDense(const int len, const double *dense, const double etol)
void setConstant(int size, const int *inds, double elems, bool testForDuplicateIndex=COIN_DEFAULT_VALUE_FOR_DUPLICATE)
Elements set to have the same scalar value.
DecompVar(const std::vector< int > &ind, const std::vector< double > &els, const double redCost, const double origCost, const DecompVarType varType)
bool isEquivalent(const CoinPackedVectorBase &rhs, const FloatEqual &eq) const
equivalent - If shallow packed vector A & B are equivalent, then they are still equivalent no matter ...
void resetEffectiveness()
DecompVar(const int len, const int *ind, const double els, const double origCost)
double getReducedCost() const
int getEffectiveness() const
DecompVar(const int len, const int *ind, const double *els, const double redCost, const double origCost, const DecompVarType varType)
void setVarType(const DecompVarType varType)
double getOriginalCost() const
void setVector(int size, const int *inds, const double *elems, bool testForDuplicateIndex=COIN_DEFAULT_VALUE_FOR_DUPLICATE)
Set vector size, indices, and elements.
DecompVar(const std::vector< int > &ind, const std::vector< double > &els, const double redCost, const double origCost)
void sortIncrIndex()
Sort the packed storage vector.
DecompVar(const int len, const int *ind, const double *els, const double origCost, const DecompVarType varType)
void setColMasterIndex(const int colIndex)
virtual int getNumElements() const
Get the size.
bool doesSatisfyBounds(int denseLen, double *denseArr, const DecompAlgoModel &model, const double *lbs, const double *ubs)
DecompVar(const int len, const int *ind, const double els, const double origCost, const DecompVarType varType)
void setReducedCost(const double redCost)
void setBlockId(const int blockId)
int getColMasterIndex() const
const double DecompEpsilon
void increaseEffCnt()
Increase the effectiveness count by 1 (or to 1 if it was negative).
double getUpperBound() const
DecompVar & operator=(const DecompVar &rhs)
void fillDenseArr(int len, double *arr)
bool isDuplicate(const DecompVarList &vars)
DecompVar(const int len, const int *ind, const double *els, const double redCost, const double origCost)
double twoNorm() const
Return the 2-norm of the vector.
std::string getStrHash() const
DecompVar(const DecompVar &source)
DecompVar(const int denseLen, const double *denseArray, const double redCost, const double origCost, const DecompVarType varType)
bool isEquivalent(const DecompVar &dvar)
void decreaseEffCnt()
Decrease the effectiveness count by 1 (or to -1 if it was positive).
double getLowerBound() const
DecompVar(const std::vector< int > &ind, const double els, const double redCost, const double origCost, const DecompVarType varType)
DecompVarType getVarType() const
virtual void print(std::ostream *os=&std::cout, DecompApp *app=0) const
DecompVar(const int len, const int *ind, const double *els, const double origCost)
std::list< DecompVar * > DecompVarList
void setOriginalCost(const double origCost)
The main application class.
string UtilCreateStringHash(const int len, const double *els, const int precision=6)