Multiplying two or more arrays effectively

末鹿安然 提交于 2019-12-11 19:38:22

问题


I have arrays of Doubles which need to be multiplied with each other and with some constant value(s).

Array1 = [1.002, 1.009, 1.016 , 1.019]
Array2 = [106, 109, 113 , 119]
Constant1 = 6.54

The output what I need is an array and derived by multiplying the above input data:

ResultArray = [694.626, 719.276, 750.844, 793.047]

In the application there is a massive amount of these calculations and speed is the key. With .NET what is the optimal way to get the ResultArray?

来源:https://stackoverflow.com/questions/16581737/multiplying-two-or-more-arrays-effectively

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