3D Math Data structures/SIMD

Janice Caron caron800 at googlemail.com
Fri Dec 21 14:09:25 PST 2007


On 12/21/07, Lukas Pinkowski <Lukas.Pinkowski at web.de> wrote:
> > What's wrong with Vector!(3,float), Matrix!(4,4,real),
> > Matrix!(3,4,cdouble), etc.?
>
> They are not builtin types.

And this is a problem because...?


> Multiplication should be component-wise
> multiplication, exactly like addition is component-wise addition

Now that's just nonsense! Matrix multiplication should be matrix
multiplication, and nothing else. For example, multiplying a (square)
matrix by the identity matrix (of the same size) should leave it
unchanged, not zero every element not on the main diagonal!

Likewise, vector multiplication must mean vector multiplication, and
nothing else. (Arguably, there are two forms of vector multiplication
- dot product and cross product - however, cross product only has
meaning in three-dimensions, whereas dot product has meaning in any
number of dimensions, so dot production is more general).

Componentwise multiplication... Pah! That's just not mathemathical.
(Imagine doing that for complex numbers instead of proper complex
multiplication!) No thanks! I'd want my multiplications to actually
give the right answer!



More information about the Digitalmars-d mailing list