0

How does one perform element wise operations (specifically multiplication) on a matrix in ojAlgo ?

Supposed that I have a storeA and storeB and would like to perform a binary operation f on each of the elements of A and B as the input respectively and obtain the output storeC.

Example

[1 2 3]
[4 5 6] -- A

[1 3 9]
[2 4 6] -- B

f - multiply

[1 6 27]
[8 20 36] -- C

What are the approaches that I can take ?

YAMAZAKI1996
  • 35
  • 1
  • 10
  • 1
    https://stackoverflow.com/questions/41665158/elementwise-multiplication-two-matrices-or-primitivedensestores-in-ojalgo/41666822#41666822 – apete May 06 '19 at 06:35
  • Thanks. btw is there any way we could write our own unary/binary functions and supply it as the arguments to operateOnMatching ? – YAMAZAKI1996 May 06 '19 at 07:49
  • Yes, of course, they're interfaces. You can implement them however you want. – apete May 06 '19 at 13:55

0 Answers0