
On Tue, Jul 06, 2004 at 10:24:49AM -0500, David B. Held wrote:
"David Abrahams" <dave@boost-consulting.com> wrote in message news:uoemxdu50.fsf@boost-consulting.com...
Walter Landry <wlandry@ucsd.edu> writes:
David Abrahams <dave@boost-consulting.com> wrote:
* prod should be named operator*; this is a linear algebra library after all.
Actually, operator* can be thought of as either an inner product or an outer product. I'm not familiar with the innards of uBLAS, but that is a problem common to most linear algebra libraries.
IIUC in the domain of linear algebra when mathemeticians write
AB
for 2D matrices A and B, they mean ordinary matrix multiplication (I think inner product) yielding another 2D matrix, and that's what operator* should mean in a linear algebra library. If you want an outer product yielding a 4D matrix I think you're basically outside the domain of linear algebra.
Actually, taking a look at mathworld.wolfram.com and a few other sites, I have reached the tentative conclusion that outer products can only be formed over vectors, not matrices. Matrix multiplication is well-defined and unambiguous, whereas vector multiplication comes in at least four varieties: dot product, cross product (also called the "outer product"), perpendicular dot product, and vector direct product.
You forgot the "Kronecker product" which is the tensor product explicitly written down for matrices. Let A = (a_{i,j}) be an m by n matrix and B a p by q matrix. Then the Kronecker product A x B is the following block matrix / a_{1,1}B ... a_{1,n}B \ | . . | A x B = | . . | | . . | \ a_{m,1}B ... a_{m,n}B / The Kronecker product has its place in linear algebra, but I agree that in a C++ library operator* should be reserved for the "common" matrix product. Christoph -- http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/cludwig.html LiDIA: http://www.informatik.tu-darmstadt.de/TI/LiDIA/Welcome.html