How Boost::uBLAS mapped_matrix works?

268 Views Asked by At

There are lots of references about Boost::uBLAS compressed_matrix and coordinate_matrix. But I found no explanation about mapped_matrix. How is it implemented?

Which strategy of sparse storage does it use?

Plus: can someone provide me some reference in papers or books?

1

There are 1 best solutions below

3
sehe On BEST ANSWER

Plus: can someone provide me some reference in papers or books?

There doesn't seem to be actual books for this library. The documentation is here

http://www.boost.org/doc/libs/1_66_0/libs/numeric/ublas/doc/matrix_sparse.html#mapped_matrix

On quick scan it answers your questions:

enter image description here

How is it implemented.

It's implemented as a container adapter. It only stores non-zero elements. These are stored in an associative container internally.

By default the underlying associative container is std::map, but it's customizable using the A template argument.

Wich strategy of sparse storage it uses?

It only stores non-zero elements. These are stored in an associative container internally. See above.

Additionally, you can note the precise way in which the element indices are transformed into a key for the associative container (depending on F: row-major or column-major organization) and what guarantees this holds for weak total ordering of elements in a sparse matrix compared to the corresponding dense matrix models. (See above).