29#ifndef _UNITVECTORBASE_H_
30#define _UNITVECTORBASE_H_
125 themem = std::move(rhs.themem);
144#ifdef ENABLE_CONSISTENCY_CHECKS
Sparse vector nonzero element.
bool isConsistent() const
Consistency check.
void add(int i, const R &v)
Append one nonzero (i,v).
int max() const
Maximal number of indices.
void set_size(int s)
Set size of the vector.
Nonzero< R > * mem() const
get pointer to internal memory.
int size() const
Number of used indices.
UnitVectorBase< R > & operator=(const UnitVectorBase< R > &rhs)
assignment
SVectorBase< R >::Element themem
memory for sparse vector entry
UnitVectorBase(int i=0)
construct i 'th unit vector.
bool isConsistent() const
consistency check
R value(int n) const
returns value = 1
UnitVectorBase(const UnitVectorBase< R > &rhs)
copy constructor
UnitVectorBase< R > & operator=(UnitVectorBase< R > &&rhs)
move assignment
~UnitVectorBase()
destructor
Everything should be within this namespace.
Debugging, floating point type and parameter definitions.
#define SPX_MSG_INCONSISTENT(name)