dsRMatrix-class(Matrix)
dsRMatrix-class()所属R语言包:Matrix
Symmetric Sparse Compressed Row Matrices
对称稀疏压缩行矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The dsRMatrix class is a class of symmetric, sparse matrices in the compressed, row-oriented format. In this implementation the non-zero elements in the rows are sorted into increasing column order.
dsRMatrix类是对称,稀疏矩阵压缩类,面向行的格式。在此实现行的非零元素增加列顺序排序。
类的对象----------Objects from the Class----------
These "..RMatrix" classes are currently still mostly unimplemented!
这些"..RMatrix"类目前仍大多未实现!
Objects can be created by calls of the form new("dsRMatrix", ...).
创建对象可以通过电话的形式new("dsRMatrix", ...)。
插槽----------Slots----------
uplo: A character object indicating if the upper triangle ("U") or the lower triangle ("L") is
uplo:一个字符对象表示,如果上三角("U")或更低的三角形("L")
j: Object of class "integer" of length nnzero (number of non-zero elements). These are the row
j:对象类"integer"长度nnzero(非零元素的数目)。这些行
p: Object of class "integer" of pointers, one for each row, to the initial (zero-based) index of elements in
p:Object类的"integer"指针,每行一个,初始(从零开始)元素的索引
factors: Object of class "list" - a list
factors:Object类的"list" - 列表
x: Object of class "numeric" - the non-zero
x类"numeric"对象 - 非零
Dim: Object of class "integer" - the dimensions of the matrix - must be an integer vector with exactly two
Dim"integer" - 矩阵的尺寸 - 必须是一个整数向量正好有两个:对象类
Dimnames: List of length two, see Matrix.
Dimnames:长度为二的名单,请参阅Matrix。
延伸----------Extends----------
Classes RsparseMatrix, dsparseMatrix and symmetricMatrix, directly.
类RsparseMatrix,dsparseMatrix和symmetricMatrix,直接。
Class "dMatrix", by class "dsparseMatrix", class "sparseMatrix", by class "dsparseMatrix" or "RsparseMatrix"; class "compMatrix" by class "symmetricMatrix" and of course, class "Matrix".
类"dMatrix",按类"dsparseMatrix",类"sparseMatrix",类"dsparseMatrix"或"RsparseMatrix";类类"compMatrix"由"symmetricMatrix"“当然,类"Matrix"。
方法----------Methods----------
forceSymmetric signature(x = "dsRMatrix", uplo = "missing"):
forceSymmetricsignature(x = "dsRMatrix", uplo = "missing"):
forceSymmetric signature(x = "dsRMatrix", uplo = "character"): if uplo == x@uplo, this trivially returns x;
forceSymmetricsignature(x = "dsRMatrix", uplo = "character")如果uplo == x@uplo,这个平凡返回x;
coerce signature(from = "dsCMatrix", to = "dsRMatrix")
强制signature(from = "dsCMatrix", to = "dsRMatrix")
参见----------See Also----------
the classes dgCMatrix, dgTMatrix, and dgeMatrix.
类dgCMatrix,dgTMatrix,dgeMatrix。
举例----------Examples----------
(m0 <- new("dsRMatrix"))
m2 <- new("dsRMatrix", Dim = c(2L,2L),
x = c(3,1), j = c(1L,1L), p = 0:2)
m2
stopifnot(colSums(as(m2, "TsparseMatrix")) == 3:4)
str(m2)
(ds2 <- forceSymmetric(diag(2))) # dsy*[DSY *]
dR <- as(ds2, "RsparseMatrix")
dR # dsRMatrix[dsRMatrix]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|