SCM

SCM Repository

[matrix] View of /pkg/Matrix/NAMESPACE
ViewVC logotype

View of /pkg/Matrix/NAMESPACE

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3069 - (download) (annotate)
Thu Mar 26 10:00:49 2015 UTC (4 years, 7 months ago) by mmaechler
File size: 8046 byte(s)
Fixed FIXME: Csparse o dense - matrix products: now *all*  t() happen in C,
partly thanks to our new  chm_transpose_dense() function.
Csparse o Csparse : now have `boolArith` argument {not entirely finished}
New %&% : Boolean Arithmetic Matrix products      {not entirely finished}
C level: <sparse pattern> o <sparse numeric> : now return numeric "by default" / pattern "on demand"
useDynLib(Matrix, .registration=TRUE)

## Import non-base functions we need explicitly,
## notably for which we define methods:
importFrom("lattice", levelplot, panel.levelplot.raster)
importFrom("graphics", image)
importFrom("utils", head, tail, assignInNamespace)
importFrom("stats", cov2cor, toeplitz, update#, vcov
	   )

importFrom("grid", grid.rect, gpar, grob)# others via 'grid::'

## try to import all we need, but not more
importFrom("methods",
	   ## still needed {group generics needed to be explicitly imported} ?
	   Ops, Arith, Compare, Logic, Math, Math2, Summary, Complex,
	   ## generics for which we export new methods:
	   cbind2, rbind2, coerce, show
	   , kronecker
	   ## things we call,.. necessary when Matrix is loaded, but not attached, as in
	   ## Rscript --vanilla -e 'require(methods);(M <- Matrix::Matrix(0:1,3,3));as(M,"sparseMatrix")'
	   , callGeneric, as, is, extends, new
	   , getClass, getClassDef, validObject
	   , setClass, setClassUnion, setMethod, setOldClass
	   , setValidity, slot, "slot<-", .hasSlot
	   , signature, representation, prototype)


## Generics and functions defined in this package
export("%&%",
       "Cholesky", ".SuiteSparse_version",
       "Diagonal", ".symDiagonal", ".sparseDiagonal",
       "Hilbert", "KhatriRao",
       "Matrix",
       "spMatrix",
       "sparseMatrix", "rsparsematrix",
       "Schur",
       "abIseq", "abIseq1", "rep2abI",
       "band",
       "bandSparse",
       "bdiag", ".bdiag",
## no longer; implicit generics now
       ## "colMeans", "colSums", ## these needed a "..." added
       ## "rowMeans", "rowSums",
       "condest", "onenormest",
       "det",# << "identical" as base - but with correct determinant()
       ## "mkDet", # <- useful in other packages (Rmpfr, gmp) .. hmm --> 'stats' ?
       ## FIXME: why exactly these and not e.g. dsp2dsy and many more?
       ".dsy2mat", ".dsy2dsp", ".dxC2mat", ".T2Cmat", "..2dge", ".dense2sy",
       ".diag.dsC",# -> R/dsCMatrix.R --has FIXME
       ".solve.dgC.chol", ".solve.dgC.qr",
       "diagN2U", "diagU2N", ".diagU2N", ".diag2tT", ".diag2sT", ".diag2mat",
       "drop0",
       "expand",
       "expm",
       "facmul", "fac2sparse", "fac2Sparse",
       "forceSymmetric",
       "T2graph", "graph2T", ## <- 'graph' package (and class) related
       "anyDuplicatedT", "uniqTsparse",
       "isTriangular",
       "isDiagonal",
       "isLDL",
       "is.null.DN",
       "invPerm",
       "lu",
       "nearPD",
       "nnzero",
       "formatSpMatrix", "formatSparseM", ".formatSparseSimple",
       "printSpMatrix",
       "printSpMatrix2",
       "qrR",
       "rankMatrix",
       "readHB",
       "readMM",
       "sparse.model.matrix",
       "sparseVector",
       "symmpart",
       "skewpart",
       "tcrossprod",
       "tril", "triu",
       "updown",
       "pack", "unpack"
       , ".updateCHMfactor"
       , ".validateCsparse"
       , "writeMM"
       )
if(getRversion() < "2.15.0")
    export(".M.classEnv")

## substitute for using  cbind() / rbind()
## .Deprecated() for R version >= 3.2.0 [2015-04]:
export("cBind",
       "rBind")


exportClasses(
    ## Class unions:
	      "index",
	      "replValue", # if we don't export it, things fail in dispatch
	      "atomicVector",
	      "number",
	      "xsparseVector", # the class union of all 'x' slot sparseVector's
              ## not exported (but exporting does not help for method dispatch bug!)
              ## "numLike",
              ## "xMatrix",
              ## "mMatrix",

    ## all others:
## LOGIC      "logic",
	      "abIndex", "rleDiff",

	      ## --- 'Matrix' mother and all its daughters : ---------------
	      "Matrix",
	      ## also intermediate `virtual' ones:
	      "dMatrix",
	      "lMatrix",
	      "nMatrix",
	      ## not yet used, but as sub-classes;
	      ## must provide them for 'hierarchy-analysis':
	      "iMatrix",
	      "zMatrix",

	      "denseMatrix",
	      "sparseMatrix",

	      "compMatrix",
	      "diagonalMatrix",
	      "generalMatrix",
	      "symmetricMatrix",
	      "triangularMatrix",

	      "dsparseMatrix",
	      "lsparseMatrix",
	      "nsparseMatrix",
	      "TsparseMatrix",
	      "CsparseMatrix",
	      "RsparseMatrix",
	      "ddenseMatrix",
	      "ldenseMatrix",
	      "ndenseMatrix",

	      "dgCMatrix",
	      "dgRMatrix",
	      "dgTMatrix",
	      "dgeMatrix",
	      "dpoMatrix",
	      "dppMatrix",
	      "dsCMatrix",
	      "dsRMatrix",
	      "dsTMatrix",
	      "dspMatrix",
	      "dsyMatrix",
	      "dtCMatrix",
	      "dtRMatrix",
	      "dtTMatrix",
	      "dtpMatrix",
	      "dtrMatrix",
	      "ddiMatrix",
	      "lgeMatrix",
	      "lspMatrix",
	      "lsyMatrix",
	      "ltpMatrix",
	      "ltrMatrix",
	      "ldiMatrix",
	      "ngeMatrix",
	      "nspMatrix",
	      "nsyMatrix",
	      "ntpMatrix",
	      "ntrMatrix",

	      "lgCMatrix",
	      "lgRMatrix",
	      "lgTMatrix",
	      "lsCMatrix",
	      "lsRMatrix",
	      "lsTMatrix",
	      "ltCMatrix",
	      "ltRMatrix",
	      "ltTMatrix",

	      "ngCMatrix",
	      "ngRMatrix",
	      "ngTMatrix",
	      "nsCMatrix",
	      "nsRMatrix",
	      "nsTMatrix",
	      "ntCMatrix",
	      "ntRMatrix",
	      "ntTMatrix",

	      "indMatrix", "pMatrix",

	      "corMatrix", # unused

	      ## --- inheriting "Matrix", but also factorizations:
	      "BunchKaufman",
	      "pBunchKaufman",
	      "Cholesky",
	      "pCholesky",
	      ## "LDL",

	      ## --- 'MatrixFactorization' mother and all its daughters : ---

	      "MatrixFactorization",
	      "CholeskyFactorization",

	      "LU",
	      "denseLU",
	      "sparseLU",

	      "CHMfactor",
	      "CHMsuper",
	      "CHMsimpl",
	      "dCHMsuper",
	      "dCHMsimpl",
	      "nCHMsuper",# unused
	      "nCHMsimpl",# unused

	      "sparseQR",
##	      "SPQR",

	      "Schur",

	      "sparseVector", ## --- and daughters : ---
	      "dsparseVector",
	      "isparseVector",
	      "lsparseVector",
	      "nsparseVector",
	      "zsparseVector"
	      )



exportMethods(## for both own and "other" generics:

	      ## Group Methods
	      "Arith",
	      "Compare",
	      "Logic",
	      "Math",
	      "Math2",
	      "Ops",
	      "Summary",

	      ## re-export S4 methods, for "stats"-S3-generics:
	      "cov2cor",
	      "toeplitz",
	      "update",

	      "!",
	      "+",# for dgT(Matrix) only
	      "%*%",

	      "all",
	      "any",
	      "all.equal",

	      "BunchKaufman",
	      "Cholesky",
	      "Schur",
	      "as.array",
	      "as.matrix",
	      "as.vector",
	      "as.numeric",
	      "as.integer",
	      "as.logical",
	      "band",
	      "chol",
	      "chol2inv",
	      "colMeans",
	      "colSums",
	      "coerce",
	      "crossprod",
	      "determinant",
	      "diag", "diag<-",
	      "diff",
	      "dim",
	      "dim<-",
	      "dimnames",
	      "dimnames<-",
	      "drop",
	      "expand",
	      "expm",
	      "format",
	      "head",
	      "image",
	      "forceSymmetric",
	      "isSymmetric",
	      "is.na",
	      "is.finite", "is.infinite",
	      "kronecker",
	      "length",
	      "mean",
	      "norm",
	      "nnzero",
	      "print",# print(x, ...) when show(x) is not sufficient
	      "qr",
	      "qr.R", "qr.Q",
	      "qr.qy",
	      "qr.qty",
	      "qr.coef",
	      "qr.resid",
	      "qr.fitted",
	      "rep",
	      "rcond",
	      "rowMeans",
	      "rowSums",
	      "show",
	      "solve",
##               "spqr",
	      "summary",
	      "symmpart",
	      "skewpart",
	      "t",
	      "tail",
	      "tcrossprod",
	      "tril",
	      "triu",
	      "updown",
	      "unname",
	      "which",
	      "zapsmall"
	      )
if(getRversion() >= "3.1.0")
exportMethods("anyNA")


exportMethods("rbind2")
exportMethods("cbind2")

S3method(print, sparseSummary)
S3method(print, diagSummary)
S3method(c, abIndex)# < for now -- S4 method on c() seems "difficult"

## So that such dispatch also works inside base functions:
S3method(as.array, Matrix)
S3method(as.matrix, Matrix)
S3method(as.vector, Matrix)

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge