Rev 512 | Rev 718 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
# Ensure that the methods package is available.onLoad <- function(lib, pkg) {require("methods", character = TRUE, quietly = TRUE)}# Virtual class of all Matrix objectssetClass("Matrix")# general double-precision matricessetClass("geMatrix",representation(x = "numeric", Dim = "integer",rcond = "numeric", factorization = "list"),prototype = prototype(x = numeric(0), Dim = as.integer(c(0,0)),rcond = numeric(0),factorization = list()),contains = "Matrix",validity = function(object) {.Call("geMatrix_validate", object, PACKAGE="Matrix")})# Dense, non-packed, triangular matricessetClass("trMatrix",representation(uplo = "character", diag = "character"),contains = "geMatrix",prototype = prototype(uplo = "U", diag = "N"),validity = function(object) {.Call("trMatrix_validate", object, PACKAGE="Matrix")})# Dense, packed, triangular matrices# setClass("tpMatrix", representation(...))# Dense, non-packed symmetric matricessetClass("syMatrix",representation(uplo = "character"),prototype = prototype(uplo = "U",x = numeric(0), Dim = as.integer(c(0,0)),rcond = numeric(0), factorization = list()),contains = "geMatrix",validity = function(object) {.Call("syMatrix_validate", object, PACKAGE="Matrix")})# Dense, packed, symmetric matrices# setClass("spMatrix", representation(...))# Dense, non-packed, postive-definite, symmetric matricessetClass("poMatrix", contains = "syMatrix",prototype = prototype(uplo = "U",x = numeric(0), Dim = as.integer(c(0,0)),rcond = numeric(0), factorization = list()))# Sparse general matrix in sorted compressed sparse column formatsetClass("cscMatrix",representation(p = "integer", i = "integer", x = "numeric",Dim = "integer", factorization = "list"),prototype = prototype(p = as.integer(0), i = integer(0),x = numeric(0), Dim = as.integer(c(0, 0))),validity = function(object).Call("csc_validate", object, PACKAGE="Matrix"))# Sparse triangular matrix in sorted compressed sparse column formatsetClass("tscMatrix",representation(uplo = "character", diag = "character"),prototype = prototype(p = as.integer(0), i = integer(0),x = numeric(0), Dim = as.integer(c(0, 0)),uplo = 'L', diag = 'N'),contains = "cscMatrix",validity = function(object).Call("tsc_validate", object, PACKAGE="Matrix"))# Sparse symmetric matrix in compressed sparse column format.# Only one triangle is stored, uplo indicates if it is the lower or uppersetClass("sscMatrix",representation = representation(uplo = "character"),prototype = prototype(p = as.integer(0), i = integer(0),x = numeric(0), Dim = as.integer(c(0, 0)),uplo = 'L'),contains = "cscMatrix",validity = function(object).Call("sscMatrix_validate", object, PACKAGE="Matrix"))# Sparse general matrix in triplet formatsetClass("tripletMatrix",representation(i = "integer", j = "integer", x = "numeric",Dim = "integer"),prototype = prototype(i = integer(0), j = integer(0),x = numeric(0), Dim = as.integer(c(0,0))),validity = function(object).Call("triplet_validate", object, PACKAGE="Matrix"))setClass("determinant",representation(modulus ="numeric",logarithm = "logical",sign = "integer",call = "call"))setClass("LU", representation(x = "numeric", Dim = "integer",pivot = "integer"),validity = function(object).Call("LU_validate", object, PACKAGE = "Matrix"))setClass("Cholesky", contains = "trMatrix")setClass("sscChol",representation = representation(perm = "integer", Parent = "integer",D = "numeric"),contains = "tscMatrix",prototype = prototype(p = as.integer(0), i = integer(0),x = numeric(0), Dim = as.integer(c(0, 0)),uplo = 'L', perm = integer(0), Parent = integer(0),D = numeric(0)),validity = function(object).Call("sscChol_validate", object, PACKAGE = "Matrix"))setClass("sscCrosstab", representation =representation(Gp = "integer", perm = "integer"),contains = "sscMatrix",validity = function(object).Call("sscCrosstab_validate", object, PACKAGE = "Matrix"))setClass("ssclme", representation =representation(D = "numeric", # Diagonal of D in LDL'DIsqrt = "numeric", # inverse square root of DDim = "integer", # Dimensions of Z'Z and LDL'Gp = "integer", # Pointers to groups of columns of ZLi = "integer", # Row indices of LLp = "integer", # Column pointers of LLx = "numeric", # Non-zero, off-diagonals of LOmega = "list", # List of symmetric matricesParent = "integer", # Elimination tree of LRXX = "matrix", # Augmented RXX component or inverseRZX = "matrix", # Augmented RZX component or inverseXtX = "matrix", # Original X'X matrixZtX = "matrix", # Original Z'X matrixbVar = "list", # Diagonal blocks on (Z'Z+W)^{-1}deviance = "numeric", # Current deviance (ML and REML)devComp = "numeric", # Components of deviancei = "integer", # Row indices of Z'Znc = "integer", # number of columns in model matricesp = "integer", # Pointers to columns of Z'Zstatus = "logical", # record if factored, if invertedx = "numeric" # Non-zeroes in upper triangle of Z'Z),validity = function(object).Call("ssclme_validate", object, PACKAGE = "Matrix"))# positive-definite symmetric matrices as matricessetClass("pdmatrix", contains="matrix")# factors of positive-definite symmetric matricessetClass("pdfactor", representation("matrix", logDet = "numeric"))# correlation matrices and standard deviationssetClass("corrmatrix", representation("matrix", stdDev = "numeric"))## Compressed sparse column matrix in blockssetClass("cscBlocked", representation(p = "integer", i = "integer", x = "array"))## Representation of a linear mixed effects modelsetClass("lmeRep",representation(D = "list", # list of diagonal factors (lower triangle)L = "list", # list of blocks of LLinv = "list", # list of blocks of L^{-1}Omega = "list", # list of relative precision matricesRXX = "matrix", # Augmented RXX component or its inverseRZX = "matrix", # Augmented RZX component or its inverseXtX = "matrix", # Original X'X matrixZZx = "list", # list of blocks of Z'ZZtX = "matrix", # Original Z'X matrixcnames = "list",# column names of model matricesdevComp = "numeric", # Components of deviancedeviance = "numeric", # Current deviance (ML and REML)levels = "list",# names of levels of grouping factorsnc = "integer", # number of columns in (augmented)# model matrices and number of observationsstatus = "logical",call = "call" # omit this after debugging phase),validity = function(object).Call("lmeRep_validate", object, PACKAGE = "Matrix"))