Subject: Re: [ublas] view row vector as column vector
From: sguazt (marco.guazzone_at_[hidden])
Date: 2011-02-18 15:15:04
On Fri, Feb 18, 2011 at 8:42 PM, Matwey V. Kornilov
> prod( M, row( A, 1 ) )
> prod( M, column( A, 1 ) )
> because both column and row are vectors.
> Neal Becker wrote:
>> I need to multiply a matrix by a vector. What would be an efficient way
>> to do
>> H * v^t (v transpose).
In ublas, when you want to multiply a matrix by a vector, there's no
difference between a vector and its transpose.
So you can use the "prod" function directly on v -
The "prod" function is efficient because makes use of "expression
templates" ; so the product is done only on the element you really