Need VBase3 operator* (const VBase3& scalar)

What about this naming:

v1 = VBase3(a, b, c)
v2 = VBase3(d, e, f)
v3 = v1.hadamard(v2)

The “component wise” multiplication already has a name in mathematics: The Hadamard product, also known as Schur product or entrywise product. It’s defined for n-by-m matrices, but a vector is just a special kind of matrix, a n-by-1 or 1-by-n matrix.

I kind of like that, since there’s a mathematical tradition behind it; but I don’t know how widely-known the name will be.

David

I just finished a semester of numerical analysis, focusing on linear systems, and I don’t recall seeing the term “Hadamard” anywhere. Granted, componentwise multiplication isn’t too interesting a topic, so it wasn’t discussed at length. Or at all. Anyhoo, I agree with everything David said.

I considered bringing up hadamard myself, but I think that would be too confusing for users who are looking for a componentwise multiplication. It’s not exactly something that is taught in an average linear algebra class.

If we do use “hadamard”, then we must make it clear that we’re talking about a “hadamard product”, as that’s not unambiguous. There’s also the hadamard product and the hadamard matrix.