我的Main
方法中有这段代码:
for(int i = 0; i < 2; i++){
double psd = JMath.sqrt((((4*cc)/(JMath.pow((1 + 6*frequency[i]*cc), (double) 5/3)))*df));
double cohC = H*JMath.sqrt((frequency[i]/A.averageHubWindSpeed)*(frequency[i]/A.averageHubWindSpeed) + (.12/Lc)*(.12/Lc));
BLAS.getInstance().sscal(packDistance.length, (float) cohC,packDistance, 1);
}
这种方式packDistance
被覆盖,因此 fori == 1
将sscal
cohC与源自at的packDistance相乘。相反,我想保留在循环外分配的相同原始值。sscal
i == 0
packDistance
我怎么能超越这个问题?