I would like to apply a function on two matrices like there is a +
for the addition of two matrices. Something like matrix1.map2(matrix2) { (valM1, valM2) => valM1 + valM2 }
giving a result matrix.
Asked
Active
Viewed 44 times
0

Dmytro Mitin
- 48,194
- 3
- 28
- 66

Sven
- 85
- 2
- 9
-
and what is the problem?, do you want to extend the Matrix type with a new function? – Emiliano Martinez Jan 16 '23 at 10:08
-
I thought there would have been something general available already. I might have to extend. – Sven Jan 16 '23 at 10:26
-
In what kind of function are you thinking about? – Emiliano Martinez Jan 16 '23 at 13:41
-
doesn't matter. I guess Breeze follows the algebraic rules rather being multi purpose. I thought of something like: ((a,b) => if a > 0 then a else b} – Sven Jan 16 '23 at 15:45