11 #ifndef COUENNESPARSEBNDVEC_HPP
12 #define COUENNESPARSEBNDVEC_HPP
67 for (
register unsigned int i=0; i<
n_; i++) {
69 register unsigned int ind = (
dInd_ [i] = src.
dInd_ [i]);
93 register unsigned int &sind =
sInd_ [index];
96 (
dInd_ [sind] != index))
unsigned int * sInd_
indices vector, sparse (lots of garbage in between entries)
void resize(unsigned int newsize)
Resize.
unsigned int nElements()
Return current size.
void reset()
Reset (eeeeasy!)
CouenneSparseBndVec(CouenneSparseBndVec &src)
Copy constructor.
T * data_
data vector, sparse (lots of garbage in between entries)
T * data()
Return data in DENSE format – use with care.
unsigned int n_
current number of elements
unsigned int * dInd_
indices vector, dense (garbage exists past n_)
CouenneSparseBndVec(unsigned int size)
Constructor.
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()
Destructor.
unsigned int * indices()
Return indices in DENSE format – for use with data()
unsigned int size_
Implements a fast sparse+dense vector data structure, with a size of n and a number k of nonzero elem...