Array operation for computing the dot product?

bearophile bearophileHUGS at lycos.com
Thu Feb 4 01:46:50 PST 2010


Chad J:
> This reminds me of a discussion we had a year or more ago about offering
> abstract operators purely for the purpose of overloading.  We can use
> things like (+), (*), (-), (&), and so on.  It'd probably be fine to use
> one for dot product.

This looks acceptable as dot product:
x (*) y
but to me it doesn't look that much better than the simple:
x.dot(y)

Bye,
bearophile



More information about the Digitalmars-d mailing list