📄 hdmtrace.c
字号:
double hdmtrace(M1,iM1,M2,iM2,n)/* M1 and M2 are hermitian matrices, hdmtrace produces the trace of theproduct of the two matrices, which is real */double M1[],M2[],iM1[],iM2[];int n;{ int j,k,jM,kM; double sum; sum=0; for(j=0,jM=0;j<n;j++,jM+=n) { for(k=0,kM=0;k<n;k++,kM+=n) { sum+=(M1[jM+k]*M2[kM+j]-iM1[jM+k]*iM2[kM+j]); } } return(sum);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -