[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freepooma-devel] Multiplying a Matrix by a Vector
From: |
Richard Guenther |
Subject: |
Re: [Freepooma-devel] Multiplying a Matrix by a Vector |
Date: |
Sat, 4 Feb 2006 13:01:08 +0100 (CET) |
On Fri, 3 Feb 2006, Felipe Sodré Silva wrote:
Is there any operator or function that multiplies a Matrix by a Vector ?
If you are refering to the Tiny/ Vector and TinyMatrix classes (or the
Tensor class) then yes, there are the dot() functions
// vector dot(vector,TinyMatrix)
// vector dot(TinyMatrix,vector)
// TinyMatrix outerProductAsTinyMatrix(vector,vector)
and the respective Tensor variants
// vector dot(vector,tensor)
// vector dot(tensor,vector)
// tensor outerProduct(vector,vector)
If you refer to multiplying a 2d Array with a 1d Array treating them as
matrix and vector then no, there's no such function. Doing these kind
of computations efficiently on Arrays would require some new
infrastructure for general tensor operations on Engines. If you are
trying to do this kind of computations I usually suggest to look at
the PETSc library which was developed exactly for this purpose.
Richard.