sparseLU-class(Matrix)
sparseLU-class()所属R语言包:Matrix
Sparse LU decomposition of a square sparse matrix
一个正方形的稀疏矩阵稀疏LU分解
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Objects of this class contain the components of the LU
这个类的对象包含陆组件
类的对象----------Objects from the Class----------
Objects can be created by calls of the form new("sparseLU", ...) but are more commonly created by function lu() applied to a sparse matrix, such as a matrix of class dgCMatrix.
对象可以创建调用的形式new("sparseLU", ...)但更常见的功能lu()如类dgCMatrix矩阵,稀疏矩阵的创建。
插槽----------Slots----------
L: Object of class "dtCMatrix", the lower
L:Object类的"dtCMatrix",低
U: Object of class "dtCMatrix", the upper
U:Object类的"dtCMatrix",上
p: Object of class "integer", permutation
p类"integer",置换对象
q: Object of class "integer", permutation
q类"integer",置换对象
Dim: the dimension of the original matrix; inherited
Dim:继承原始矩阵的维数;
延伸----------Extends----------
Class "LU", directly. Class "MatrixFactorization", by class "LU".
类"LU",直接。类"MatrixFactorization"类"LU"。
方法----------Methods----------
expand signature(x = "sparseLU") Returns a list with components P, L, U, and Q, where P and Q represent fill-reducing permutations, and L, and U the lower and upper triangular matrices of the decomposition. The original matrix
扩大signature(x = "sparseLU")返回组件列表P,L,U,Q,其中P和Q代表填写排列,减少和L,U分解上下三角矩阵原矩阵
注意----------Note----------
The decomposition is of the form
分解的形式是
where all matrices are sparse and of size n by n. The matrices P, its transpose P', and Q are permutation matrices, L is lower triangular and U is upper triangular.
所有矩阵都是稀疏的大小n by n。矩阵P,其转P',Q置换矩阵,L是下三角和U是上三角。
参见----------See Also----------
lu, solve, dgCMatrix
lu,solve,dgCMatrix
举例----------Examples----------
## Extending the one in examples(lu), calling the matrix A,[#扩展的一个例子(LU),调用矩阵A,]
## and confirming the factorization identities :[#分解身份确认:]
A <- as(readMM(system.file("external/pores_1.mtx",
package = "Matrix")),
"CsparseMatrix")
str(luA <- lu(A)) # p is a 0-based permutation of the rows[p为0的行基于置换]
# q is a 0-based permutation of the columns[q是一列0基于置换]
xA <- expand(luA)
## which is simply doing[#这是简单地做]
stopifnot(identical(xA$ L, luA@L),
identical(xA$ U, luA@U),
identical(xA$ P, as(luA@p +1L, "pMatrix")),
identical(xA$ Q, as(luA@q +1L, "pMatrix")))
P.LUQ <- with(xA, t(P) %*% L %*% U %*% Q)
stopifnot(all.equal(A, P.LUQ, tol = 1e-12))
## permute rows and columns of original matrix[#置位的原矩阵的行和列]
pA <- A[luA@p + 1L, luA@q + 1L]
stopifnot(identical(pA, with(xA, P %*% A %*% t(Q))))
pLU <- drop0(luA@L %*% luA@U) # L %*% U -- dropping extra zeros[%L *%铀 - 删除多余的零]
stopifnot(all.equal(pA, pLU))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|