18 #ifndef DECOMP_VAR_INCLUDED
19 #define DECOMP_VAR_INCLUDED
123 DecompVarList::const_iterator vi;
125 for (vi = vars.begin(); vi != vars.end(); vi++) {
126 if ((*vi)->getStrHash() == this->
getStrHash()) {
144 virtual void print(
double infinity,
145 std::ostream* os = &std::cout,
147 virtual void print(
double infinity,
149 const std::vector<std::string>& colNames,
150 const double* value = NULL)
const;
194 const double redCost,
195 const double origCost,
207 if (ind.size() > 0) {
218 const std::vector<double>& els,
219 const double redCost,
220 const double origCost) :
231 if (ind.size() > 0) {
242 const std::vector<double>& els,
243 const double redCost,
244 const double origCost,
256 if (ind.size() > 0) {
269 const double origCost) :
290 const double origCost,
312 const double origCost) :
333 const double origCost,
355 const double redCost,
356 const double origCost) :
377 const double redCost,
378 const double origCost,
398 const double* denseArray,
399 const double redCost,
400 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 ...
virtual void print(double infinity, std::ostream *os=&std::cout, DecompApp *app=0) const
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.
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)
const double COIN_DBL_MAX
DecompVar(const int denseLen, const double *denseArray, const double redCost, const double origCost, const DecompVarType varType)
bool isEquivalent(const DecompVar &dvar)
bool doesSatisfyBounds(int denseLen, double *denseArr, const DecompSubModel &model, const double *lbs, const double *ubs)
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
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)