由于对称矩阵采用压缩存储上三角矩阵第一列一个元素第二列两个元素第j列j个元素上三角矩阵共有n (n+)/个元素我们将这些元素存储到一个向量B[n(n+)/+]中可以看到B[k]和矩阵中的元素aij之间存在着一一对应关系
则其对应关系可表示为( <=ij<=n <=k<=n(n+)/)
int MAX(int xint y)
{ return(x>y?x:y);
}
int MIN(int xint y)
{ return(x<y?x:y);
}
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []