【发布时间】:2012-05-29 22:27:46
【问题描述】:
按照cMinor的初始线程make efficient the copy of symmetric matrix in c-sharp。
我会对如何使用矩阵的数组实现而不是经典的矩阵来构建具有一个线向量和一个列向量的对称方阵乘法的一些输入非常感兴趣
long s = 0;
List<double> columnVector = new List<double>(N);
List<double> lineVector = new List<double>(N);
//- init. vectors and symmetric square matrix m
for (int i=0; i < N; i++)
{
for(int j=0; j < N; j++){
s += lineVector[i] * columnVector[j] * m[i,j];
}
}
感谢您的意见!
【问题讨论】:
标签: c# performance vector matrix matrix-multiplication