Boost logo

Ublas :

Subject: Re: [ublas] whole ublas matrix as vector
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2009-09-06 15:11:41

Michael Norel schrieb:
> Hi all!
> I still need this functionality (matrix expression as vector expression)for intensive use of ublas.
Please check out the latest development version from SVN: see and have a look at
experimental/sparse_view.hpp, class c_array_view. This class should
fulfill the immutable part of storage array concept. Now only a class
fulfilling the immutable part of the vector concept must be developed
which can be used to present any storage array as a read only vector.

> I need to
> 1. compare 2 matrixes with some eplison threshold like "norm_2(m1-m2) < eps"
Why not using norm_inf or norm_1 for matrices?

> 2. check if the submatrix of matrix is zero like "norm_2(m1) > 0"
I'd also suggest to use norm_inf or even better a customer function that
aborts the check at the first non-zero element.
> 3. find the absolute maximum element of matrix like norm_inf(m1)
> and many others, where m1 and m2 is matrix expressions.
Could you prepare a list of the most used matrix functions? Maybe there
are others interested. Then we could easily add a matrix-tools header
which contains such methods.

There is a trac for boost:

Here you can view, comment and create new tickets. Feel free to create a
feature request for uBLAS. Try to add an example or pseudo-code to
express the expected usage.

> Where can a i post the functionality request for such adaptor? Or it is realy the right way to implement it myself?
The quickest way is always do it on yourself and to post the patch, an
example and a unittest here. Then I can review the code and commit it to
the repository.