6 #ifndef CoinShallowPackedVector_H 7 #define CoinShallowPackedVector_H 11 # pragma warning(disable:4786) 84 virtual const int *
getIndices()
const {
return indices_; }
86 virtual const double *
getElements()
const {
return elements_; }
98 void setVector(
int size,
const int * indices,
const double * elements,
115 const int * indices,
const double * elements,
130 const int * indices_;
133 const double * elements_;
void print()
Print vector information.
virtual int getNumElements() const
Get length of indices and elements vectors.
void setVector(int size, const int *indices, const double *elements, bool testForDuplicateIndex=true)
just like the explicit constructor
virtual const int * getIndices() const
Get indices of elements.
bool testForDuplicateIndex() const
Returns true if the vector should be tested for duplicate indices when they can occur.
virtual const double * getElements() const
Get element values.
CoinShallowPackedVector(bool testForDuplicateIndex=true)
Default constructor.
Abstract base class for various sparse vectors.
friend void CoinShallowPackedVectorUnitTest()
A function that tests the methods in the CoinShallowPackedVector class.
CoinShallowPackedVector & operator=(const CoinShallowPackedVector &x)
Assignment operator.
virtual ~CoinShallowPackedVector()
Destructor.
void clear()
Reset the vector (as if were just created an empty vector)
void CoinShallowPackedVectorUnitTest()
A function that tests the methods in the CoinShallowPackedVector class.