I was wondering if there is a feature in the Apache Math Commons library for element-wise multiplication similar to the one used in MATLAB being that the resulting matrix C
is equal to each value in matrix A
multiplied by the corresponding value in matrix B
. I want to avoid writing my own version because I know linear algebra packages are highly optimized for these kinds of operations and I don't want to lose performance on my own implementation if one already exists (that's optimized).
In MATLAB: C = A.*B
and A
's dimensions must equal B
's.
RealMatrix
interface and didn't find anything. After you did that take a look here. – Dev-iL