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