Boost logo

Ublas :

Subject: Re: [ublas] [uBlas] Fastest way to change sing of matrix
From: oswin krause (oswin.krause_at_[hidden])
Date: 2013-04-15 13:56:28


Hi,

there is unfortunately only little information about A (e.g. is A big?
is it dense? sparse? is it a matrix, bounded_matrix or c_matrixr?). As i
assume A to be a small matrix:

noalias(A)=-A

fixes everything.

On 15.04.2013 18:36, dariomt_at_[hidden] wrote:
> Hi list,
>
> I need to change the sign of each element in a (very large) matrix.
>
> I know a way that is very slow
> A = -A;
>
> What is the fastest way to do this?
>
> Thanks in Advance
>
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: Oswin.Krause_at_[hidden]