首页 > 代码库 > 稀疏矩阵

稀疏矩阵

memset(c,0,sizeof(c));for(i=1;i<=n;i++)for(j=1;j<=n;j++){if(a[i][j]==0)continue;for(k=1;k<=n;k++)c[i][k]=c[i][k]+a[i][j]*b[j][k];}