R中的AMD(近似最小度)算法

AMD(approximate minimum degree) algorithm in R

在matlab中P = amd(A) returns稀疏矩阵A的近似最小度置换向量,在R中我们有相同的命令吗?

尝试 Matrix 包中的 chol 函数...不确定这是否正是您要查找的内容,但它来自该包的文档(“Returns(并存储)Cholesky 分解x 的。如果 pivot 为真,则使用近似最小度 (AMD) 算法对 x 的行和列进行重新排序,以减少 fill-in.")

> library(Matrix)
> M2 <- toeplitz(as(c(1,.5, rep(0,12), -.1), "sparseVector"))
> C2 <- chol(M2, pivot=TRUE)
> C2
15 x 15 sparse Matrix of class "dtCMatrix"


 [1,] 1 0.5000000 .         .         .         .         .         .         .        
 [2,] . 0.8660254 0.5773503 .         .         .         .         .         .        
 [3,] . .         0.8164966 0.6123724 .         .         .         .         .        
 [4,] . .         .         0.7905694 0.6324555 .         .         .         .        
 [5,] . .         .         .         0.7745967 0.6454972 .         .         .        
 [6,] . .         .         .         .         0.7637626 0.6546537 .         .