Boost logo

Ublas :

From: Nuno Sucena Almeida (slug_at_[hidden])
Date: 2007-09-10 09:41:17


Hi,

        try something similar to the following or check my post in the same thread:

http://thread.gmane.org/gmane.comp.lib.boost.ublas/3546/focus=3551

        and substitute return std::abs(t) for your own function. Don't forget to
rename the operator. I wouldn't call it sqrt(matrix) though, but instead
sqrt_element(matrix), as Gunter suggested.

                                                                Nuno

On Monday 10 September 2007, Mei, Longyu wrote:
> I want to do sqrt on matrix. For example if I have a matrix A [4, 9,
> 16], after the sqrt(A), the expected result should be a matrix B [2, 3,
> 4]. Can ublas does this on one function call? Thanks

-- 
http://aeminium.org/slug/