NOTE: The user needs to `delete[]` this pointer after it's not needed anymore. */ double * denseVector(int denseSize) const; /** Access the i'th element of the full storage vector. If the i'th is not stored, then zero is returned. The initial use of this method has some computational and storage overhead associated with it.
NOTE: This is very expensive. It is probably much better to use `denseVector()`. */ double operator[](int i) const; //@} /**@name Index methods */ //@{ /// Get value of maximum index int getMaxIndex() const; /// Get value of minimum index int getMinIndex() const; /// Throw an exception if there are duplicate indices void duplicateIndex(const char* methodName = NULL, const char * className = NULL) const; /** Return true if the i'th element of the full storage vector exists in the packed storage vector.*/ bool isExistingIndex(int i) const; /** Return the position of the i'th element of the full storage vector. If index does not exist then -1 is returned */ int findIndex(int i) const; //@} /**@name Comparison operators on two packed vectors */ //@{ /** Equal. Returns true if vectors have same length and corresponding element of each vector is equal. */ bool operator==(const CoinPackedVectorBase & rhs) const; /// Not equal bool operator!=(const CoinPackedVectorBase & rhs) const; #if 0 // LL: This should be implemented eventually. It is useful to have. /** Lexicographic comparisons of two packed vectors. Returns negative/0/positive depending on whether \c this is smaller/equal.greater than \c rhs */ int lexCompare(const CoinPackedVectorBase& rhs); #endif /** This method establishes an ordering on packed vectors. It is complete ordering, but not the same as lexicographic ordering. However, it is quick and dirty to compute and thus it is useful to keep packed vectors in a heap when all we care is to quickly check whether a particular vector is already in the heap or not. Returns negative/0/positive depending on whether \c this is smaller/equal.greater than \c rhs. */ int compare(const CoinPackedVectorBase& rhs) const; /** equivalent - If shallow packed vector A & B are equivalent, then they are still equivalent no matter how they are sorted. In this method the FloatEqual function operator can be specified. The default equivalence test is that the entries are relatively equal.