Detailed Description

a sparse vector of values of type T of variable size. The non zero values are stored as two seperate arrays: an index array and a value array. The index array is always sorted and there is at most one entry for each index. Inserting an element can be time consuming. If the vector contains a few zero entries, then it is better to have a normal vector. If the vector has a very high dimension with a few non-zero values, then this vector is very memory efficient (at the cost of a few more computations).

For a -dimensional compressed vector and the non-zero elements are mapped to consecutive elements of the index and value container, i.e. for elements and of these containers holds .

Supported parameters for the adapted array (indices and values) are unbounded_array<> , bounded_array<> and std::vector<>.

Template Parameters:

T

the type of object stored in the vector (like double, float, complex, etc...)

IB

the index base of the compressed vector. Default is 0. Other supported value is 1

IA

the type of adapted array for indices. Default is unbounded_array<std::size_t>