lu(Matrix)
lu()所属R语言包:Matrix
(Generalized) Triangular Decomposition of a Matrix
(广义)矩阵的三角分解
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes (generalized) triangular decompositions of square and other dense matrices.
计算(广义)广场和其他密集矩阵的三角分解。
用法----------Usage----------
lu(x, ...)
## S4 method for signature 'matrix'
lu(x, warnSing = TRUE, ...)
## S4 method for signature 'dgeMatrix'
lu(x, warnSing = TRUE, ...)
## S4 method for signature 'dgCMatrix'
lu(x, errSing = TRUE, order = TRUE, tol = 1, ...)
参数----------Arguments----------
参数:x
a dense or sparse matrix, in the latter case of square dimension. No missing values or IEEE special values are allowed.
一个密集或稀疏矩阵,在后一种情况下,方维。没有遗漏值或IEEE特殊值是不允许的。
参数:warnSing
(when x is a "denseMatrix") logical specifying if a warning should be signalled when x is singular.
(当x是"denseMatrix")逻辑指定如果warning应示意时x是奇异的。
参数:errSing
(when x is a "sparseMatrix") logical specifying if an error (see stop) should be signalled when x is singular. When x is singular, lu(x, errSing=FALSE) returns NA instead of an LU decomposition. No warning is signalled and the useR should be careful in that case.
(当x是"sparseMatrix")逻辑指定如果一个错误(stop)应发出信号时x是奇异的。当x是奇异的,lu(x, errSing=FALSE)返回NA代替LU分解。没有警告信号,在这种情况下,用户应该小心。
参数:order
logical or integer, used to chose which will-reducing permutation technique will be used internally. Do not change unless you know what you are doing.
逻辑或整数,用来选择将减少置换技术将在内部使用。不改变,除非你知道你在做什么。
参数:tol
positive number indicating the pivoting tolerance used in cs_lu. Do only change with much care.
正数说明cs_lu枢轴容忍。不要只改变多照顾。
参数:...
further arguments passed to or from other methods.
通过进一步的论据或其他方法。
Details
详情----------Details----------
lu() is a generic function with special methods for different types of matrices. Use showMethods("lu") to list all the methods for the lu generic.
lu()是一个特殊的方法,为不同类型的矩阵通用功能。使用showMethods("lu")lu通用列出所有的方法。
The method for class dgeMatrix (and all dense matrices) is based on LAPACK's "dgetrf" subroutine. It returns a decomposition also for singular and non-square matrices.
类dgeMatrix(和所有稠密矩阵)方法的基础上的LAPACK的"dgetrf"子程序。它返回的分解,也为奇异和非正方形矩阵。
The method for class dgCMatrix (and all sparse matrices) is based on functions from the CSparse library. It signals an error (or returns NA, when errSing = FALSE, see above) when the decomposition algorithm fails, as when x is (too close to) singular.
类的方法dgCMatrix(稀疏矩阵)根据从CSparse库的功能。它标志着一个错误(或回报NA,errSing = FALSE,见上文)分解算法失败时,作为当x是()奇异太近。
值----------Value----------
An object of class "LU", i.e., "denseLU" (see its separate help page), or "sparseLU", see sparseLU; this is a representation of a triangular decomposition of x.
对象,类"LU",即"denseLU"(见单独的帮助页面),或"sparseLU",看到sparseLU,这是一个代表性的三角分解的x。
参考文献----------References----------
Matrix Computations, 2nd edition, Johns Hopkins, Baltimore.
http://www.cise.ufl.edu/research/sparse/CSparse/
Direct Methods for Sparse Linear Systems, SIAM Series “Fundamentals of Algorithms”.
参见----------See Also----------
Class definitions LU and sparseLU and function expand; qr, chol.
LU和sparseLU“功能类定义expand;qr,chol。
举例----------Examples----------
##--- Dense -------------------------[#---密集-------------------------]
x <- Matrix(rnorm(9), 3, 3)
lu(x)
dim(x2 <- round(10 * x[,-3]))# non-square[非方形]
expand(lu2 <- lu(x2))
##--- Sparse (see more in ?"sparseLU-class")----- % ./sparseLU-class.Rd[#---稀疏(见吗?“sparseLU”级)-----%。/ sparseLU class.Rd]
pm <- as(readMM(system.file("external/pores_1.mtx",
package = "Matrix")),
"CsparseMatrix")
str(pmLU <- lu(pm)) # p is a 0-based permutation of the rows[p为0的行基于置换]
# q is a 0-based permutation of the columns[q是一列0基于置换]
## permute rows and columns of original matrix[#置位的原矩阵的行和列]
ppm <- pm[pmLU@p + 1L, pmLU@q + 1L]
pLU <- drop0(pmLU@L %*% pmLU@U) # L %*% U -- dropping extra zeros[%L *%铀 - 删除多余的零]
## equal up to "rounding"[#等于“四舍五入”]
ppm[1:14, 1:5]
pLU[1:14, 1:5]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|