Elementwise multiplication two matrices or PrimitiveDenseStores in ojAlgo

天涯浪子 提交于 2019-12-31 06:58:25

问题


Can anyone tell me how to multiply corresponding elements of two matrices in ojAlgo? Looking for block function for c[i][j] = a[i][j] * b[i][j]


回答1:


There are several ways to do that. Here's one alternative:

matrixA.operateOnMatching(MULTIPLY, matrixB).supplyTo(matrixC);

Where MULTIPLY comes from a static import (org.ojalgo.function.constant.PrimitiveMath).



来源:https://stackoverflow.com/questions/41665158/elementwise-multiplication-two-matrices-or-primitivedensestores-in-ojalgo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!