11#ifndef COUENNESPARSEBNDVEC_HPP
12#define COUENNESPARSEBNDVEC_HPP
56 dInd_ =
new unsigned int [size_];
57 sInd_ =
new unsigned int [size_];
58 data_ =
new T [size_];
67 for (
register unsigned int i=0; i<n_; i++) {
69 register unsigned int ind = (dInd_ [i] = src.dInd_ [i]);
70 data_ [ind] = src.data_ [ind];
93 register unsigned int &sind = sInd_ [index];
96 (dInd_ [sind] != index))
97 dInd_ [sind = n_++] = index;
void resize(unsigned int newsize)
Resize.
T * data()
Return data in DENSE format – use with care.
unsigned int nElements()
Return current size.
~CouenneSparseBndVec()
Destructor.
T & operator[](register unsigned int index)
Access – the only chance for garbage to be returned (and for valgrind to complain) is when object[ind...
CouenneSparseBndVec(unsigned int size)
Constructor.
CouenneSparseBndVec(CouenneSparseBndVec &src)
Copy constructor.
unsigned int * indices()
Return indices in DENSE format – for use with data()
void reset()
Reset (eeeeasy!)
general include file for different compilers