Boost logo

Ublas :

From: Michele De Stefano (micdestefano_at_[hidden])
Date: 2008-08-04 02:31:56


I think this function is not needed.
If you use the compressed matrix (row major or column major storage)
you can obtain what you want using the methods index1_data and
index2_data. This is the most efficient way to do what you want.
Obviously, you have to know the Compressed Row Storage (CRS) and
Compressed Column Storage (CCS) formats (look here:
http://www.cs.utk.edu/~dongarra/etemplates/node372.html).

Bye.
Michele

2008/8/3 Leon Gu <leongu_at_[hidden]>:
> Does anyone have an ublas implementation of the matlab find() function?
> It'll be very useful for vectorizing a wide variety of algorithms. Given a
> vector/matrix, the function returns an index array of
> the nonzero elements,
>
> template <typename vector_type>
> indirect_array<vector_type> ublas_find(const vector_type& data)
>
> Leon
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>