Matrix/0000755000176200001440000000000013203335572011521 5ustar liggesusersMatrix/TODO0000644000176200001440000005077513201345103012214 0ustar liggesusers##-*- mode: org -*- * Very *Urgent* ** TODO as(m, "sparseMatrix") must work when length(m) > max.int for 'matrix' m --> "~/R/MM/Pkg-ex/Matrix/large-mat-to-sparse.R" ** TODO Using "long vectors" (i.e. 64 bit indices vectors) in CHOLMOD --> cholmod_l_*() *** e.g. segfault in crossprod() Csparse_crossprod -> cholmod_att() * *Urgent* in some sense --------------------------------------------------- ** DONE qr.coef() has *wrong* (column)names, even in full-rank case: see man/qr-methods.Rd ("FIXME"); maybe related to ** DONE qr.R(), qrR() etc have *wrong* currently *lose* column/row names {compared to base R's qr.R}, see, drop0(R. <- qr.R(qx), tol=1e-15) # columns are int b1 c1 c2 b2 c3 {in man/qr-methods.Rd} ** DONE should as.matrix() eventually become a no-op, as for Rmpfr::"mpfrMatrix" ?? -- *NO!* *** Big advantages: **** 1) Functions such as base::scale.default() will work automagically **** 2) If sM <- as.matrix() .. then identical(as.matrix(sM) , sM) -- not currently !! *** Bigger drawbacks: Really I have to define Matrix methods for base functions that just worked perfectly via as.matrix **** 1a) eigen() base::eigen uses as.matrix() = asRbasematrix(); is not generic; called from nearPD() ==> I've introduced "Matrix" S4 methods (and hence made eigen() S4 generic) **** 1b) svd() same as eigen(); also called from norm(*, "2") {as eigen()} would also need "Matrix" S4 methods **** 1c) qr() needs additional dgeMatrix methods (as base::qr.default uses as.matrix()) and now warns, also, e.g., from rcond() **** 2) base :: lower.tri() and upper.tri() also use as.matrix() but are not generic => would need to make them S4 genric ***** for now: just redefinition in inst/test-tools-Matrix.R notably for CheckMatrix(), but also for use in diverse ./tests/*.R. ***** For R-devel (-> 3.5.0 in April 2018): lower.tri() / upper.tri() do *not* use as.matrix() **** 3) Documented in more than one place that base functions work thanks to as.matrix() *** How to go there: For a while as.matrix() should give deprecation warning: use as(*,"matrix") and ---- give substitute .asmatrix(), but that's not faster; simply calls as(*,"matrix") **** In R/Auxiliaries.R .Matrix.avoiding.as.matrix <- TRUE -- for experiments only **** turn off warning via options(Matrix.quiet.as.matrix = TRUE) ** TODO S[sel,] and S[,sel] <- value should work for sparse S and NA-containing sel. ** TODO nnzero() is too slow for a large CsparseMatrix ** TODO sparse.model.matrix(.) bug with NA's & na.action = "na.pass" => ~/R/MM/Pkg-ex/Matrix/sparse.model-bugs_EB.R ** TODO sparse.model.matrix(~ poly(x,3)) gives wrong column names => ~/R/MM/Pkg-ex/Matrix/sparse.model-bugs_EB.R ** TODO lu() should preserve dimnames in a way such that lu(A) ~= PLU =.= A can rebuild A. R/ ** TODO M[] indexing should work (but with a warning: use *dense*!) ** TODO doxygen (seed inst/Doxyfile and ../../www/doxygen/UPDATE_me.sh) now _fails_ partly, e.g., for ------- e.g., for src/Csparse.c, Csp_dense_products(...) around lines 600 ** TODO src/CHOLMOD/MatrixOps/cholmod_symmetry.c is "cool" and fast; Definitely should use it for solve() {it seems MATLAB does}; alternatively also is_sym() [in src/cs_utils.c], see below. ** TODO diagonalMatrix inherits from sparseMatrix, *BUT* "ddiMatrix" does not inherit from "dsparseMatrix", nor does "ldiMatrix" from "lparseMatrix". Seems an undesirable inconsistency. Try changing setClass("ddiMatrix", contains = c("diagonalMatrix", "dMatrix")) to setClass("ddiMatrix", contains = c("diagonalMatrix", "dsparseMatrix")) ** TODO Look at Paul Bailey's problem -- CHOLMOD error (even seg.fault for him) --> ~/R/MM/Pkg-ex/Matrix/sparseOrderedLogit.R ** TODO BunchKaufman() [and Schur()] should also get a "matrix" method, so people like RP may stop whining about its non-availability in "base R" (2015-07-09) ** TODO BunchKaufman()'s result is not really useful yet {but it is used on C level e.g. for solve(). Should define expand() method or similar, see man/BunchKaufman-methods.Rd and R/dsyMatrix.R (at end). ** TODO src/cs_utils.c : I think is_sym() [only used in Matrix_cs_to_SEXP()] can be made sped up: leave the for loops, as soon as is_lower == is_upper == 0. ** TODO kronecker(, ) should return symmetricMatrix, notably when one of the arguments is diagonal ** DONE %*% , crossprod() & tcrossprod() often return a pattern, i.e., nsparseMatrix as well *because* cholmod_ssmult() just does that even if only *one* of the two matrices is a pattern matrix. The latter case is really wrong. The above behavior seems many years old.. and sometimes is interesting and good, using Boolean arithmetic: T+T := T|T = T For 1.2-0, changed the result to return *numeric* when *one* of the two matrices is not nsparse. ==> Provide the previous functionality via a Matrix package R function: ==> We've introduced '%&%' for Matrix 1.2-0 and 'boolArith = TRUE' for crossprod/tcrossprod. ** TODO (%*% (t)crossprod, see above) Should we always return *numeric*, i.e., behave the same as for 'ndenseMatrix' or 'lsparseMatrix' or traditional logical matrices? ** DONE norm(matrix(1:4,2), type="2") should work as in base __AND__ we shold support type="2" (-> svd()) ** DONE [t]crossprod() could/should become more lenient with *vector*s: adapt R-devel (= R 3.2.0)'s rules: see misc/products-Mv.R and *.Rout -- now tests/matprod.R ("3.2.0") *** DONE for sparseVector o (sparse)vector *** DONE consider analagous changes to base-R ** DONE m %*% M (crossprod, ..) with 0-dim. result give garbage ** DONE M[i,j] should *not* drop dimnames (R-forge bug 2556, see ~/R/MM/Pkg-ex/Matrix/dimnames-prod.R) ** DONE "Math"/"Math2" *fail* entirely for sparseVectors ** DONE rbind2(, ) did not work, now is completely wrong !! (e.g. , ) * New smallish ideas, relatively urgent for MM ----------------------------- ** DONE generalize new "indMatrix" class, to allow 0 repetitions of some samples, i.e., columns of all 0 s. It's mathematically more natural --> typically will be useful. ** DONE polnish translation (e-mail!) ** DONE FIXME(2) and (3) in R/products.R: t(.Call(Csparse_dense_*)) ** TODO cor() and cov() at least for y=NULL ("no y"). -> ~/R/MM/Pkg-ex/Matrix/cor_sparse-propos.R <- http://stackoverflow.com/questions/5888287/ -> ~/R/MM/Pkg-ex/Matrix/cor_cos.R and ~/R/MM/Pkg-ex/Matrix/cor_cos_testing Provide cor.sparse() and other association measures for sparse matrices. ** TODO Add larger collection of *random matrix generator* functions, typically *sparse* ones: Have rsparseMatrix() [exported] already; then rspMat(), rUnitTri(), mkLDL() [!] in inst/test-tools-Matrix.R ; then, e.g., rBlockTri() in man/bdiag.Rd. (man/* ?; tests/* ) ** TODO port isSeq() to C [ R/Auxiliaries.R ] ** TODO Investigate the "band changing (and getting) ideas 'band<-' etc, from Jeremy D Silver, per posts to R-devel on Aug.26,2011 {MM: ~/R/MM/Pkg-ex/Matrix/bands-Jeremy_Silver-ex.R } *** TODO Similarly (maybe covered by his suggestion?): provide *inverse* of bandSparse() in the sense that if 'dg.mat' is a ("LINPACK/EISPACK"-format) dense (n x K) matrix containing K diagonals, and BS <- bandSparse(.., diagonals=dg.mat); dg.m <- getbands(BS,..) would exactly return the 'dg.mat' matrix. ** TODO finalize and activate the _unused_ code in src/t_sparseVector.c ** TODO cbind2() / rbind2() for sparseMatrices: dimnames propagation should happen in C, see R/bind2.R and src/Csparse.c (Csparse_horzcat etc). ** TODO use getOption("Matrix.quiet") in more places [--> less messages/warnings] ** DONE Check for DimNames propagation in coercion and other operations. *** DONE for (%*%, crossprod, tcrossprod), now systematically checked in tests/matprod.R *** DONE For colSums(), rowSums() [R-forge bug # 6018] --> 'FIXME' in R/colSums.R ** TODO Report the problem in the Linux ldexp manual page. The second and third calls in the Synopsis should be to ldexpf and ldexpl. ** TODO provide methods for "dspMatrix" and "dppMatrix"! 2012-07: DONE with Ops, etc, also pack() / unpack(); not yet: "Math" ** TODO combine the C functions for multiplication by special forms and solution wrt special forms by using a 'right' argument and a 'classed' argument. [done with dgeMatrix_matrix_mm(); not yet for other classes; and for _crossprod()] ** DONE Cache '@factors' components also from R, e.g., for "Tsparse.." via .set.factors() ** TODO chol() and Cholesky() caching unfinished: the *name* [Ss][Pp][Dd]Cholesky depends on (perm, LDL, super) arguments: *** DONE .chkName.CHM(name, perm, LDL, super) and .CHM.factor.name() *** TODO use the above ** TODO partly DONE; new arg 'cache=FALSE': allow cache=FALSE to disable the caching ** TODO 0-based vs 1-based indexing: grep -nHE -e '[01]-(orig|ind|base)' *.R Can I find a *uniform* language '1-based indexing' or '0-origin indexing' ? *** More systemtic possible via new argumnet 'orig_1' in m_encodeInd(), m_encodeInd2() -> src/Mutils.c * Generalization of Existing Classes and Methods --------------------------- ** DONE "Math2" , "Math", "Summary": keep diagonal, triangular and symmetric Matrices when appropriate: particularly desirable for "Math2": round(), signif() ** TODO "Arith" (and Ops ?): keep diagonal, triangular and symmetric Matrices where appropr. ** TODO For triangular matrices, ensure the four rules of "triangular matrix algebra" (Golub+Van Loan 1996, 3.1.8, p.93)" *** DONE since 2008-03-06 for Csparse *** DONE since 2010-07-23 for %*% *** TODO e.g. for %*% ** TODO "d" <-> "l" coercion for all "[TCR]" sparse matrices is really trivial: "d" -> "l" : drops the 'x' slot "l" -> "d" : construct an 'x' slot of all '1' We currently have many of these conversions explicitly, e.g. setAs("dsTMatrix", "lsTMatrix", function(from) new("lsTMatrix", i = from@i, j = from@j, uplo = from@uplo, Dim = from@Dim, Dimnames = from@Dimnames)) but I would rather want to automatically construct all these coercion methods at once by a ``method constructor'', i.e., for all "dsparse*" -> "lsparse*" and vice versa. How can one do this {in a documented way} ? ** TODO Think of constructing setAs(...) calls automatically in order to basically enable all ``sensible'' as(fromMatrix, toMatrix) calls, possibly using canCoerce(.) ** TODO When we have a packed matrix, it's a waste to go through "full" to "sparse": ==> implement setAs("dspMatrix", "sparseMatrix") setAs("dppMatrix", "sparseMatrix") setAs("dtpMatrix", "sparseMatrix") and the same for "lsp" , "ltp" and "nsp" , "ntp" ! ** TODO tcrossprod(x, y) : do provide methods for y != NULL calling Lapack's DGEMM for "dense" [2005-12-xx: done for dgeMatrix at least] ** TODO Factorizations: LU done; also Schur() for *sparse* Matrices. ** TODO use .Call(Csparse_drop, M, tol) in more places, both with 'tol = 0.' to drop "values that happen to be 0" and for zapsmall() methods for Csparse* ** TODO implement .Call(Csparse_scale, ....) interfacing to cholmod_scale() in src/CHOLMOD/Include/cholmod_matrixops.h : for another function specifically for multiplying a cholmod_sparse object by a diagonal matrix. Use it in %*% and [t]crossprod methods. ** TODO make sure *all* group methods have (maybe "bail-out") setMethod for "Matrix". e.g. zapsmall() fails "badly" ** TODO %*% {also in crossprod/tcrossprod} currently always returns , since --> Csparse_dense_prod --> cholmod_sdmult and that does only return dense. When the sparse matrix is very sparse, i.e. has many rows with only zero entries, it would make much sense to return sparse. ** TODO ! loses symmetry, both for dense and sparse matrices. !M where M is "sparseMatrix", currently always gives dense. This only makes sense when M is ``really sparse''. ** TODO diag(m) <- val currently automatically works via m[cbind(i,i)] <- val This (`[<-` method) is now "smart" for diagonalMatrix, but needs also to be for triangularMatrix, and probably also "dense*general*Matrix" since the above currently goes via "matrix" and back instead of using the 'x' slot directly; in particular, the triangular* "class property" is lost! [current ??] ** TODO The "[<-" now uses src/t_Csparse_subassign.c and no longer explodes memory. *However* it is still too slow when the replacment region is large. * Cholesky(), chol() etc --------------------------------------------------- ** chol() should ``work'': proper result or "good" error message. (mostly done ?) ** example(Cholesky, echo=FALSE) ; cm <- chol(mtm); str(cm); str(mtm) shows that chol() does not seem to make use of an already present factorization and rather uses one with more '0' in x slot. ** examples for solve( Cholesky(.), b, system = c("A", "LDLt"....)) probably rather in man/CHMfactor-class.Rd than man/Cholesky.Rd ** LDL() looks relatively easy; via "tCsparse_diag()" {diagonal entries of *triangular* Csparse} --> see comment in determinant() in R/dsCMatrix.R, will give faster determinant ** Allow Cholesky(A,..) when A is not symmetric *AND* we really _mean_ to factorize AA' ( + beta * I) ** update(Cholesky(..), *): make *also* use of the possibility to update with non-symmetric A and then AA' + mult * I is really meant. .updateCHMfactor() ## allows that already(?) ** TODO add examples (and tests!) for update(, ..) and Cholesky(......, Imult), also tests for hidden {hence no examples} ldetL2up() { R/CHMfactor.R }; see ex in man/wrld_1deg.Rd MM: See e.g. ~/R/MM/Pkg-ex/Matrix/CholUpdate.R -- for solve(, ) ** TODO implement fast diag() via calling new src/Csparse.c's diag_tC_ptr() . - diag_tC_ptr() functionality now exported via R/dsCMatrix.R .diag.dsC() : the name is silly, but functionality nice. See (hidden) example in man/Cholesky.Rd ** TODO chol() gives "temporarily disabled" but should give the *symbolic* factorization; similarly Cholesky(.) is not enabled * "Basic" new functionality -- "nice to have" (non-urgent) ----------------- ** TODO tr(A %*% B) {and even tr(A %*% B %*% C) ...} are also needed frequently in some computations {conditional normal distr. ...}. Since this can be done faster than by sum(diag(A %*% B)) even for traditional matrices, e.g. sum(A * t(B)) or {sometimes even faster for "full" mat} crossprod(as.vector(A), as.vector(t(B))) and even more so for, e.g. %*% {used in Soeren's 'gR' computations}, we should also provide a generic and methods. ** TODO diag(A %*% B) might look like a "generalization" of tr(A %*% B), but as the above tricks show, is not really. Still, it's well worth to provide diag.prod(A, B): Well, if A %*% B is square, diag(A %*% B) === colSums(t(A) * B) and we should probably teach people about that ! ** TODO eigen() should become generic, and get a method at least for diagonal, but also for symmetric -> dsyMatrix [LAPACK dsyev() uses UPLO !], but also simply for dgeMatrix (without going via tradition matrices). What about Sparse? There's fill-in, but it may still be sensible, e.g. mlist <- list(1, 2:3, diag(x=5:3), 27, cbind(1,3:6), 100:101) ee <- eigen(tcrossprod(bdiag(lapply(mlist, as.matrix)))) Matrix( signif(ee$vectors, 3) ) * Everything else aka "Miscellaneous" -------------------------------------- ** TODO qr.R(qr(x)) may differ for the "same" matrix, depending on it being sparse or dense: "qr.R() may differ from qr.R() because of permutations" *** TODO column names are *not* produced, whereas dense qr.R(.) *has* column names. *** DONE We provide `qrR()` .. but not entirely happily: Users are still a bit frustrated and it currently influences rcond() as well. ** TODO rcond() for square currently goes via *dense* -- BAD -- can we go via qr() in any case? In some cases, e.g. lmer()'s "Lambda" (block triangular, small blocks) rcond(L) := 1 / (norm(L) * norm(solve(L))) is simple {and remains sparse, as solve(L) is still block triangular} ** facmul() has no single method defined; it looks like a good idea though (instead of the infamous qr.qy, qr.qty,.... functions) ** TODO symmpart() and skewpart() for *sparse* matrices still use (x +/- t(x))/2 and could be made more efficient. Consider going via asTuniq() or something very close to .Arith.Csparse() in R/Ops.R For a traditional "matrix" object, we should speedup, using C code .. ** TODO many setAs(*, "[dl]..Matrix") are still needed, as long as e.g. replCmat() uses as_CspClass() and drop0(.) which itself call as_CspClass() quite a bit. --> try to replace these by as(*, "CsparseMatrix"); forceSymmetric, etc. ** writeMM(obj, file=stdout()) creates file "1" since file is silently assumed to be a string, i.e. cannot be a connection. An R (instead of C) version should be pretty simple, and would work with connections automatically ["lsparse" become either "real" or "pattern", "depending if they have NAs or not]. ** o still works via sparse in some cases, but could return in the same cases where o does. ** look at solve.QP.compact() in \pkg{quadprog} and how to do that using our sparse matrices. Maybe this needs to be re-implemented using CHOLMOD routines. ** We allow "over-allocated" (i,x)-slots for CsparseMatrix objects, as per Csparse_validate() and the tests in tests/validObj.R. This is as in CHOLMOD/CSparse, where nzmax (>= .@p[n]) corresponds to length(.@i), and makes sense e.g. for M[.,.] <- v assignments which could allocate in chunks and would not need to re-allocate anything in many cases. HOWEVER, replCmat() in R/Csparse.R is still far from making use of that. ** DONE Thanks to base::rbind, cbind now doing S4 dispatch on C level: no Need anymore:... [[actually the contrary: do deprecate rbind2() etc eventually!]] advertize rbind2() / cbind2() and (rather?) rBind() / cBind() ------ ----- in all vignettes / talks / ... !! People erronously try rbind/cbind see that they don't work and then reinvent the wheel! --> Consider using the new 'dotMethods' functionality to define cbind() and rbind() versions that work with Matrix. The "Rmpfr" package does that now. ** TODO In all(M1 == M2) for sparse large matrices M1, M2 (e.g. M2 <- M1 !), the intermediate 'M1 == M2' typically is dense, hence potentially using humongous amount of memory. We should/could devise something like allCompare(M1, M2, `==`) which would remain sparse in all its computations. -------- ** Reconsider the linkages in the include files for the SuiteSparse packages. It may be better simply to add all the src//Include directories to the include path for all compilations. I don't think there is a big overhead. Right now we need to modify the include file src/SPQR/Include/SuiteSparseQR_C.h so that it does not expect to have src/UFsparse and src/CHOLMOD/Include on the include path. Maybe just those two should be added to the include path. ** (systematically check that LAPACK-calling functions check for 0-dimensional input themselves; LAPACK gives an integer error code) ** the f[,5762] <- thisCol now go via Csparse_subassign() call ... [ in tests/indexing.R ]. Still would be nice to be able to use abIndex (see replTmat in R/Tsparse.R) ** {IS THIS CURRENT?} Sept. 2009: Subject: chol2inv() |-> solve() when testing and documenting chol2inv(), I found that it's pretty simple to also define a method for "CHMfactor" objects, namely simply the solve(*, Diagonal(.) "A") method. This is not particularly exciting, and also does *not*, I think help for defining a chol2inv() method for *sparse* (upper) triangular matrices. ** sort(, partial=..), needed, for mean(*, trim = .) or median(). Note that defining xtfrm() does not "help" (as sort() then goes via dense index). See "mean" in R/Matrix.R ** TODO How can we ensure that inst/include/cholmod.h remains correct and equivalent to src/CHOLMOD/Include/cholmod_core.h and siblings ??? {currently need to do this manually (Emacs M-x compare-windows) for the typedefs} ** DONE SMALL_4_Alloca := 10000; check all uses of alloca()/Alloca() in src/*.[ch] ensuring that the *size* allocated cannot grow with the vector/matrix/nnzero sizes of the input. [see the change needed in svn r2770 in src/dtCMatrix.c !] Matrix/po/0000755000176200001440000000000013203323431012126 5ustar liggesusersMatrix/po/update-me.sh0000755000176200001440000000177612551420500014361 0ustar liggesusers#!/bin/sh # #__>> Keep in sync with ~/R/Pkgs/cluster/po/update-me.sh <<__ # ## Script for updating package-specific *.pot files ## written such that it should work for any package # R=${R:-R} thisdir=`dirname $0` ; cd $thisdir; thisdir=`pwd` echo "R = '$R' (`$R --version | head -1`) preliminary thisdir='$thisdir'" pkgDIR=`dirname $thisdir` pkg=`basename $pkgDIR` echo ' --> pkgDIR='$pkgDIR' ; pkg='$pkg # echo ''; echo '## FIXME ## use new Scheme from R 3.0.x on' # cd `$R RHOME`/po # make pkg-update PKG=$pkg PKGDIR=$pkgDIR L=update.log Rcd="require('tools'); update_pkg_po('$pkgDIR')" ## -------------------------------- as of R 3.0.0 echo $Rcd > $L echo $Rcd | $R --slave 2>&1 | tee -a $L echo 'end{make pkg-update}' ; echo '' echo 'Test with (e.g.)' echo ' LANGUAGE=de R --no-environ --no-save' ; echo '' echo 'and then something like' echo ' Matrix(1:6, 2,3) %*% Matrix(1:4, 2)'; echo '' echo 'Commit with something like' echo " svn ci -m'translation updates' po inst/po"; echo '' Matrix/po/R-Matrix.pot0000644000176200001440000003675613047321304014341 0ustar liggesusersmsgid "" msgstr "" "Project-Id-Version: Matrix 1.2-9\n" "POT-Creation-Date: 2017-02-10 12:21\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" msgid "invalid 'mod': %s" msgstr "" msgid "not-yet-implemented method for %s(<%s>).\n ->> Ask the package authors to implement the missing feature." msgstr "" msgid "not-yet-implemented method for %s(<%s>, <%s>).\n ->> Ask the package authors to implement the missing feature." msgstr "" msgid "'x' is not positive definite -- chol() undefined." msgstr "" msgid "Matrices must have same dimensions in %s" msgstr "" msgid "non-conformable matrix dimensions in %s" msgstr "" msgid "dimnames [%d] mismatch in %s" msgstr "" msgid "names(dimnames()) must be NULL or of length two" msgstr "" msgid "Matrices must have same number of rows in %s" msgstr "" msgid "Matrices must have same number of columns in %s" msgstr "" msgid "[[ suppressing %d column names %s ... ]]" msgstr "" msgid "[[ suppressing %d column names %s ]]" msgstr "" msgid "'x' must be \"sparseMatrix\"" msgstr "" msgid "not yet implemented for class %s" msgstr "" msgid "not a triangular matrix" msgstr "" msgid "not a symmetric matrix; consider forceSymmetric() or symmpart()" msgstr "" msgid "not yet implemented for matrix with typeof %s" msgstr "" msgid "not yet implemented for %s" msgstr "" msgid "general Matrix class not yet implemented for %s" msgstr "" msgid "Quadratic matrix '%s' (=: A) is not formally\n\tsymmetric. Will be treated as\tA A'" msgstr "" msgid "'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a \"CHMfactor\"" msgstr "" msgid "update must be TRUE/FALSE or '+' or '-'" msgstr "" msgid "Matrix-internal error in [i,,d]; please report" msgstr "" msgid "nothing to replace with" msgstr "" msgid "number of items to replace is not a multiple of replacement length" msgstr "" msgid "too many replacement values" msgstr "" msgid "i1[1] == 0 ==> C-level verbosity will not happen!" msgstr "" msgid "using\t \"old code\" part in Csparse subassignment" msgstr "" msgid "using\"old code\" part in Csparse subassignment\n >>> please report to Matrix-authors@r-project.org" msgstr "" msgid "Cholesky() -> *symbolic* factorization -- not yet implemented" msgstr "" msgid "Not a valid format" msgstr "" msgid "'file' must be a character string or connection" msgstr "" msgid "Invalid storage type: %s" msgstr "" msgid "Only numeric sparse matrices allowed" msgstr "" msgid "Invalid storage format: %s" msgstr "" msgid "Invalid assembled indicator: %s" msgstr "" msgid "file is not a MatrixMarket file" msgstr "" msgid "type '%s' not recognized" msgstr "" msgid "representation '%s' not recognized" msgstr "" msgid "element type '%s' not recognized" msgstr "" msgid "symmetry form '%s' not recognized" msgstr "" msgid "readMM(): row\t values 'i' are not in 1:nr" msgstr "" msgid "readMM(): column values 'j' are not in 1:nc" msgstr "" msgid "symmetry form 'skew-symmetric' not yet implemented for reading" msgstr "" msgid "symmetry form 'hermitian' not yet implemented for reading" msgstr "" msgid "symmetry form '%s' is not yet implemented" msgstr "" msgid "element type 'complex' not yet implemented" msgstr "" msgid "'%s()' is not yet implemented for element type '%s'" msgstr "" msgid "'%s()' is not yet implemented for representation '%s'" msgstr "" msgid "trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)" msgstr "" msgid "'V' is not a square matrix" msgstr "" msgid "diag(.) had 0 or NA entries; non-finite result is doubtful" msgstr "" msgid "invalid dimnames given for %s object" msgstr "" msgid "dimnames(.) <- NULL: translated to \ndimnames(.) <- list(NULL,NULL) <==> unname(.)" msgstr "" msgid "'nrow', 'ncol', etc, are disregarded when 'data' is \"Matrix\" already" msgstr "" msgid "invalid 'data'" msgstr "" msgid "'nrow', 'ncol', etc, are disregarded for matrix 'data'" msgstr "" msgid "complex matrices not yet implemented in Matrix package" msgstr "" msgid "using slow kronecker() method" msgstr "" msgid "Cholesky(A) called for 'A' of class \"%s\";\n\t it is currently defined for sparseMatrix only; consider using chol() instead" msgstr "" msgid "'lag' and 'differences' must be integers >= 1" msgstr "" msgid "invalid or not-yet-implemented 'Matrix' subsetting" msgstr "" msgid "[ ] : .M.sub.i.logical() maybe inefficient" msgstr "" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?" msgstr "" msgid "m[ ]: inefficiently indexing single elements" msgstr "" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?" msgstr "" msgid ".M.sub.i.2col(): 'i' has no integer column number;\n should never happen; please report" msgstr "" msgid "such indexing must be by logical or 2-column numeric matrix" msgstr "" msgid ".M.repl.i.2col(): 'i' has no integer column number;\n should never happen; please report" msgstr "" msgid ".M.repl.i.2col(): drop 'matrix' case ..." msgstr "" msgid "negative values are not allowed in a matrix subscript" msgstr "" msgid "NAs are not allowed in subscripted assignments" msgstr "" msgid "m[ ] <- v: inefficiently treating single elements" msgstr "" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?" msgstr "" msgid "RHS 'value' (class %s) matches 'ANY', but must match matrix class %s" msgstr "" msgid "not-yet-implemented 'Matrix[<-' method" msgstr "" msgid "inefficient method used for \"- e1\"" msgstr "" msgid "dim [product %d] do not match the length of object [%d]" msgstr "" msgid "internal bug in \"Compare\" method (Cmp.Mat.atomic); please report" msgstr "" msgid "Cmp.Mat.atomic() should not be called for diagonalMatrix" msgstr "" msgid "Matrices must have same number of rows for arithmetic" msgstr "" msgid "number of rows are not compatible for %s" msgstr "" msgid "length of 2nd arg does not match dimension of first" msgstr "" msgid "length of 1st arg does not match dimension of 2nd" msgstr "" msgid "internal bug in \"Logic\" method (Logic.Mat.atomic); please report" msgstr "" msgid "Logic.Mat.atomic() should not be called for diagonalMatrix" msgstr "" msgid "vector too long in Matrix - vector operation" msgstr "" msgid "longer object length\n\tis not a multiple of shorter object length" msgstr "" msgid " %s %s is undefined" msgstr "" msgid "%s %s is undefined" msgstr "" msgid "longer object length is not a multiple of shorter object length" msgstr "" msgid "invalid class: %s" msgstr "" msgid "programming error: min() should have dispatched w/ 1st arg much earlier" msgstr "" msgid "in Summary(, .): %s(<%s>, <%s>,...)" msgstr "" msgid "in Summary(, .): %s(<%s>, <%s>)" msgstr "" msgid "not-yet-implemented coercion to \"TsparseMatrix\"" msgstr "" msgid "you cannot mix negative and positive indices" msgstr "" msgid "index larger than maximal %d" msgstr "" msgid "'NA' indices are not (yet?) supported for sparse Matrices" msgstr "" msgid "logical subscript too long (%d, should be %d)" msgstr "" msgid "no 'dimnames[[.]]': cannot use character indexing" msgstr "" msgid "invalid character indexing" msgstr "" msgid "Matrix-internal error in [i,,d]; please report" msgstr "" msgid "FIXME: NOT YET FINISHED IMPLEMENTATION" msgstr "" msgid "internal bug: missing 'i' in replTmat(): please report" msgstr "" msgid "[ ] indexing not allowed: forgot a \",\" ?" msgstr "" msgid "internal bug: matrix 'i' in replTmat(): please report" msgstr "" msgid "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE." msgstr "" msgid "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "" msgid "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE." msgstr "" msgid "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "" msgid "x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrix" msgstr "" msgid "nargs() = %d should never happen; please report." msgstr "" msgid "row indices must be <= nrow(.) which is %d" msgstr "" msgid "column indices must be <= ncol(.) which is %d" msgstr "" msgid "'force' must be (coercable to) TRUE or FALSE" msgstr "" msgid "invalid (to - from)/by in seq(.)" msgstr "" msgid "wrong sign in 'by' argument" msgstr "" msgid "'by' argument is much too small" msgstr "" msgid "length must be non-negative number" msgstr "" msgid "too many arguments" msgstr "" msgid "c(,..) of different kinds, coercing all to 'rleDiff'" msgstr "" msgid "[i] is not yet implemented" msgstr "" msgid "all() is not yet implemented" msgstr "" msgid "sum() is not yet implemented" msgstr "" msgid "prod() is not yet implemented" msgstr "" msgid "not yet implemented" msgstr "" msgid "x / 0 for an x with sign-change\n no longer representable as 'rleDiff'" msgstr "" msgid " --> is not yet implemented" msgstr "" msgid " --> is not yet implemented" msgstr "" msgid "'diagonals' matrix must have %d columns (= length(k) )" msgstr "" msgid "'diagonals' must have the same length (%d) as 'k'" msgstr "" msgid "matrix can only be symmetric if square, but n != m" msgstr "" msgid "for symmetric band matrix, only specify upper or lower triangle\n hence, all k must have the same sign" msgstr "" msgid "the %d-th (sub)-diagonal (k = %d) is too short; filling with NA's" msgstr "" msgid "resulting x-slot has different type than x's or y's" msgstr "" msgid "'A' must be a square matrix" msgstr "" msgid "must either specify 'A' or the functions 'A.x' and 'At.x'" msgstr "" msgid "when 'A' is specified, 'A.x' and 'At.x' are disregarded" msgstr "" msgid "not converged in %d iterations" msgstr "" msgid "hit a cycle (1) -- stop iterations" msgstr "" msgid "hit a cycle (2) -- stop iterations" msgstr "" msgid "not enough new vecs -- stop iterations" msgstr "" msgid "diagonalMatrix in .dense2C() -- should never happen, please report!" msgstr "" msgid "undefined method for class %s" msgstr "" msgid "dim(.) value must be numeric of length 2" msgstr "" msgid "dimensions don't match the number of cells" msgstr "" msgid "invalid nargs()= %d" msgstr "" msgid "LU computationally singular: ratio of extreme entries in |diag(U)| = %9.4g" msgstr "" msgid "RHS 'b' has wrong number of rows:" msgstr "" msgid "RHS 'b' has wrong length" msgstr "" msgid "cannot coerce non-symmetric \"dgTMatrix\" to \"dsCMatrix\" class" msgstr "" msgid "the matrix is not triangular" msgstr "" msgid "'lwd' must be NULL or non-negative numeric" msgstr "" msgid "'x' has invalid data type" msgstr "" msgid "length(x) must be either 1 or #{cols}" msgstr "" msgid "some arguments are not matrices" msgstr "" msgid "%s kind not yet implemented" msgstr "" msgid "non-square matrix" msgstr "" msgid "matrix with non-zero off-diagonals cannot be coerced to \"diagonalMatrix\"" msgstr "" msgid "matrix is not diagonal" msgstr "" msgid "Internal bug: nargs()=%d; please report" msgstr "" msgid "chol() is undefined for diagonal matrix with negative entries" msgstr "" msgid "non-matching dimensions" msgstr "" msgid "incompatible matrix dimensions" msgstr "" msgid "intermediate 'r' is of type %s" msgstr "" msgid "not yet implemented .. please report" msgstr "" msgid "not a positive definite matrix" msgstr "" msgid "as(.,\"dsCMatrix\") is deprecated (since 2008); do use as(., \"symmetricMatrix\")" msgstr "" msgid "inefficient coercion (lost triangularity); please report" msgstr "" msgid "coercion to \"indMatrix\" only works from integer numeric" msgstr "" msgid "coercion from list(i1,...,ik, d) to \"indMatrix\" failed.\n All entries must be integer valued and the number of columns, d, not smaller\n than the maximal index i*." msgstr "" msgid "the number of non-zero entries differs from nrow(.)" msgstr "" msgid "must have exactly one non-zero entry per row" msgstr "" msgid "kronecker method must use default 'FUN'" msgstr "" msgid "replacing \"indMatrix\" entries is not allowed, as rarely sensible" msgstr "" msgid "Matrix seems negative semi-definite" msgstr "" msgid "'nearPD()' did not converge in %d iterations" msgstr "" msgid "cannot coerce 'NA's to \"nsparseMatrix\"" msgstr "" msgid "temporarily disabled" msgstr "" msgid "coercion to \"pMatrix\" only works from integer numeric" msgstr "" msgid "not a square matrix" msgstr "" msgid "not-yet-implemented method for <%s> %%*%% <%s>" msgstr "" msgid "non-conformable arguments" msgstr "" msgid "'boolArith = %d' not yet implemented" msgstr "" msgid "rankMatrix(, method = '%s') coerces to dense matrix.\n Probably should rather use method = 'qr' !?" msgstr "" msgid "rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)" msgstr "" msgid "model frame and formula mismatch in model.matrix()" msgstr "" msgid "invalid 'contrasts.arg' argument" msgstr "" msgid "variable '%s' is absent, its contrast will be ignored" msgstr "" msgid "only 2-dimensional tables can be directly coerced to sparse matrices" msgstr "" msgid "exactly one of 'i', 'j', or 'p' must be missing from call" msgstr "" msgid "'p' must be a non-decreasing vector (0, ...)" msgstr "" msgid "NA's in (i,j) are not allowed" msgstr "" msgid "Both 'symmetric' and 'triangular', i.e. asking for diagonal matrix. Use 'Diagonal()' instead" msgstr "" msgid "symmetric matrix must be square" msgstr "" msgid "triangular matrix must be square" msgstr "" msgid "triangular matrix must have all i >= j or i <= j" msgstr "" msgid "length(i) is not a multiple of length(x)" msgstr "" msgid "only square matrices can be used as incidence matrices for graphs" msgstr "" msgid "Matrix-internal error in [i,,d]; please report" msgstr "" msgid "invalid 'col.names' string: %s" msgstr "" msgid "uniDiag=TRUE, but not all diagonal entries are 1" msgstr "" msgid "uniDiag=TRUE, not all entries in diagonal coded as 1" msgstr "" msgid "in show(); maybe adjust 'options(max.print= *, width = *)'" msgstr "" msgid "suppressing columns and rows" msgstr "" msgid "suppressing rows" msgstr "" msgid "suppressing columns" msgstr "" msgid "logic programming error in printSpMatrix2(), please report" msgstr "" msgid "invalid 'type'" msgstr "" msgid "rcond(.) via sparse -> dense coercion" msgstr "" msgid "'V' is not a *square* matrix" msgstr "" msgid "number of non zeros is smaller than 'nnz' because of duplicated (i,j)s" msgstr "" msgid "qr.R() may differ from qr.R() because of permutations. Possibly use our qrR() instead" msgstr "" msgid "cannot coerce 'NA's to \"nsparseVector\"" msgstr "" msgid "'x' must inherit from \"sparseVector\"" msgstr "" msgid "'ncol' must be >= 0" msgstr "" msgid "'nrow' must be >= 0" msgstr "" msgid "Must specify 'nrow' when 'symmetric' is true" msgstr "" msgid "'nrow' and 'ncol' must be the same when 'symmetric' is true" msgstr "" msgid "'x' must have length nrow^2 when 'symmetric' is true" msgstr "" msgid "'ncol' is not a factor of length(x)" msgstr "" msgid "'nrow' is not a factor of length(x)" msgstr "" msgid "Class %s is not yet implemented" msgstr "" msgid "index must be numeric, logical or sparseVector for indexing sparseVectors" msgstr "" msgid "'times >= 0' is required" msgstr "" msgid "(un)packing only applies to dense matrices, class(x)='%s'" msgstr "" msgid "'x' is not symmetric nor triangular" msgstr "" msgid "extra argument %s will be disregarded in\n %s" msgid_plural "extra arguments %s will be disregarded in\n %s" msgstr[0] "" msgstr[1] "" Matrix/po/R-fr.po0000644000176200001440000007324413047321304013311 0ustar liggesusersmsgid "" msgstr "" "Project-Id-Version: Matrix 1.1-1\n" "POT-Creation-Date: 2017-02-10 12:21\n" "PO-Revision-Date: 2014-03-30 09:07+0100\n" "Last-Translator: Philippe Grosjean \n" "Language-Team: none\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.6.4\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" msgid "invalid 'mod': %s" msgstr "'mod' incorrect : %s" msgid "" "not-yet-implemented method for %s(<%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "méthode non encore implémentée pour %s(<%s>).\n" " ->> Demandez à l'auteur du package d'implémenter cette fonction manquante." msgid "" "not-yet-implemented method for %s(<%s>, <%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "méthode non encore implémentée pour %s(<%s>, <%s>).\n" " ->> Demandez à l'auteur du package d'implémenter cette fonction manquante." msgid "'x' is not positive definite -- chol() undefined." msgstr "'x' n'est pas positif fini --chol() non défini." msgid "Matrices must have same dimensions in %s" msgstr "Les matrices doivent avoir les mêmes dimensions en %s" msgid "non-conformable matrix dimensions in %s" msgstr "matrices de dimensions incompatibles dans %s" msgid "dimnames [%d] mismatch in %s" msgstr "dimnames [%d] incohérentes dans %s" msgid "names(dimnames()) must be NULL or of length two" msgstr "" msgid "Matrices must have same number of rows in %s" msgstr "Les matrices doivent avoir le même nombre de lignes dans %s" msgid "Matrices must have same number of columns in %s" msgstr "Les matrices doivent avoir le même nombre de colonnes dans %s" msgid "[[ suppressing %d column names %s ... ]]" msgstr "[[ suppression de %d noms de colonnes %s … ]]" msgid "[[ suppressing %d column names %s ]]" msgstr "[[ suppression de %d noms de colonnes %s ]]" msgid "'x' must be \"sparseMatrix\"" msgstr "'x' doit être \"sparseMatrix\"" msgid "not yet implemented for class %s" msgstr "pas encore implémenté pour une classe %s" msgid "not a triangular matrix" msgstr "ce n'est pas une matrice triangulaire" msgid "not a symmetric matrix; consider forceSymmetric() or symmpart()" msgstr "" "ce n'est pas une matrice symétrique ; considérez forceSymmetric() ou " "symmpart()" msgid "not yet implemented for matrix with typeof %s" msgstr "pas encore implémenté pour une matrice avec typeof %s" msgid "not yet implemented for %s" msgstr "pas encore implémenté pour %s" msgid "general Matrix class not yet implemented for %s" msgstr "classe Matrix générale pas encore implémentée pour %s" msgid "" "Quadratic matrix '%s' (=: A) is not formally\n" "\tsymmetric. Will be treated as\tA A'" msgstr "" "La matrice quadratique '%s' (=: A) n'est pas formellement\n" "\tsymétrique. Elle sera traitée comme \tA A'" msgid "" "'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a \"CHMfactor\"" msgstr "" "'update' doit être une valeur logique ou '+' ou '-' ; 'C' doit être une " "matrice, et 'L' un \"CHMfactor\"" msgid "update must be TRUE/FALSE or '+' or '-'" msgstr "update doit être TRUE/FALSE ou '+' ou '-'" msgid "Matrix-internal error in [i,,d]; please report" msgstr "" "Erreur interne d'objet Matrix dans [i,,d] ; veuillez envoyer un " "rapport" msgid "nothing to replace with" msgstr "rien à remplacer avec" msgid "number of items to replace is not a multiple of replacement length" msgstr "" "le nombre d'items à remplacer n'est pas un multiple de la longueur de " "remplacement" msgid "too many replacement values" msgstr "trop de valeurs de remplacement" msgid "i1[1] == 0 ==> C-level verbosity will not happen!" msgstr "" "i1[1] == 0 ==> au niveau C, aucune information détaillée ne sera affichée !" msgid "using\t \"old code\" part in Csparse subassignment" msgstr "" "utilisation d'une partie\t d'\"ancien code\" dans une sous-assignation " "Csparse" msgid "" "using\"old code\" part in Csparse subassignment\n" " >>> please report to Matrix-authors@r-project.org" msgstr "" "utilisation d'une partie d'\"ancien code\" dans une sous-assignation " "Csparse\n" " >>> veuillez envoyer un rapport à Matrix-authors@r-project.org, s'il-vous-" "plait" msgid "" "Cholesky() -> *symbolic* factorization -- not yet implemented" msgstr "" "Cholesky() -> factorisation *symbolique* -- pas encore implémentée" msgid "Not a valid format" msgstr "Pas un format acceptable" msgid "'file' must be a character string or connection" msgstr "'file' doit être une chaîne de caractères ou une connexion" msgid "Invalid storage type: %s" msgstr "type de stockage incorrect : %s" msgid "Only numeric sparse matrices allowed" msgstr "Seules les matrices éparses numériques sont autorisées" msgid "Invalid storage format: %s" msgstr "format de stockage incorrect : %s" msgid "Invalid assembled indicator: %s" msgstr "Indicateur d'assemblage incorrect : %s" msgid "file is not a MatrixMarket file" msgstr "le fichier n'est pas un fichier MatrixMarket" msgid "type '%s' not recognized" msgstr "type '%s' non reconnu" msgid "representation '%s' not recognized" msgstr "représentation '%s' non reconnu" msgid "element type '%s' not recognized" msgstr "type d'élément '%s' non reconnu" msgid "symmetry form '%s' not recognized" msgstr "la symétrie n'est pas reconnue pour '%s'" msgid "readMM(): row\t values 'i' are not in 1:nr" msgstr "readMM() : ligne\t valeurs 'i' ne sont pas comprises entre 1:nr" msgid "readMM(): column values 'j' are not in 1:nc" msgstr "readMM() : colonne valeurs 'j' ne sont pas comprises entre 1:nc" msgid "symmetry form 'skew-symmetric' not yet implemented for reading" msgstr "" "la forme de symétrie 'skew-symmetric' pas encore implémentée pour la lecture" msgid "symmetry form 'hermitian' not yet implemented for reading" msgstr "" "la forme de symétrie 'hermitian' pas encore implémentée pour la lecture" msgid "symmetry form '%s' is not yet implemented" msgstr "la forme de symétrie '%s' pas encore implémentée" msgid "element type 'complex' not yet implemented" msgstr "le type d'élément 'complex' pas encore implémenté" msgid "'%s()' is not yet implemented for element type '%s'" msgstr "'%s()' n'est pas implémenté pour le type d'élément '%s'" msgid "'%s()' is not yet implemented for representation '%s'" msgstr "'%s' n'est pas implémenté pour la représentation '%s'" msgid "trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)" msgstr "" "moyenne élaguée du 'sparseVector' -- utilisation suboptimale de as.numeric()" msgid "'V' is not a square matrix" msgstr "'V' n'est pas une matrice carrée" msgid "diag(.) had 0 or NA entries; non-finite result is doubtful" msgstr "diag(.) avait 0 ou NA données ; un résultat non fini est douteux" msgid "invalid dimnames given for %s object" msgstr "dimnames incorrects fournis pour l'objet %s" msgid "" "dimnames(.) <- NULL: translated to \n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" msgstr "" "dimnames(.) <- NULL : traduit en \n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" msgid "'nrow', 'ncol', etc, are disregarded when 'data' is \"Matrix\" already" msgstr "" "'nrow', 'ncol', etc, ne devrazient pas être utilisés lorsque 'data' est déjà " "un objet \"Matrix\"" msgid "invalid 'data'" msgstr "'data' incorrect" msgid "'nrow', 'ncol', etc, are disregarded for matrix 'data'" msgstr "'nrow', 'ncol', etc, ne sont pas utilisés pour la matrice 'data'" msgid "complex matrices not yet implemented in Matrix package" msgstr "les matrices complexes ne sont pas implémentées dans le package Matrix" msgid "using slow kronecker() method" msgstr "utilisation d'une méthode lente kronecker()" msgid "" "Cholesky(A) called for 'A' of class \"%s\";\n" "\t it is currently defined for sparseMatrix only; consider using chol() " "instead" msgstr "" "Cholesky(A) appelé pour 'A' de classe \"%s\" :\n" "\t est actuellement défini pour sparseMatrix seulement ; considérez utiliser " "chol() à la place" msgid "'lag' and 'differences' must be integers >= 1" msgstr "'lag' et 'differences' doivent être des entiers >= 1" msgid "invalid or not-yet-implemented 'Matrix' subsetting" msgstr "extraction d'un sous-ensemble de 'Matrix' incorrect ou non implémenté" msgid "[ ] : .M.sub.i.logical() maybe inefficient" msgstr "[ ] : .M.sub.i.logical() peu être inefficace" msgid "" "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?" msgstr "" "nargs() = %d. Arguments additionnels dans '[…]' inacceptables (i.logical) ?" msgid "m[ ]: inefficiently indexing single elements" msgstr "m[ ] : indice sur un seul élément inefficace " msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?" msgstr "" "nargs() = %d. Arguments additionnels dans '[ .. ]' incorrects (i.2col) ?" msgid "" ".M.sub.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.sub.i.2col() : 'i' n'a pas un nombre de colonnes entier ;\n" " ceci ne devrait jamais se produire. Veuillez envoyer un rapport de bug" msgid "such indexing must be by logical or 2-column numeric matrix" msgstr "" "un tel indiçage doit être réalisé avec un vecteur logique ou une matrice " "numérique à deux colonnes" msgid "" ".M.repl.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.repl.i.2col() : 'i' n'a\tpas un nombre entier de colonnes ;\n" " ceci ne devrait pas se produite. Veuillez envoyer un rapport de bug" msgid ".M.repl.i.2col(): drop 'matrix' case ..." msgstr ".M.repl.i.2col() : le cas 'matrix' est laissé tombé ..." msgid "negative values are not allowed in a matrix subscript" msgstr "" "les valeurs négatives ne sont pas permises dans les indices de matrices" msgid "NAs are not allowed in subscripted assignments" msgstr "les NAs ne sont pas autorisés dans les assignations avec indices" msgid "m[ ] <- v: inefficiently treating single elements" msgstr "m[ ] <- v : traitement inefficace d'éléments uniques" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?" msgstr "nargs() = %d. Arguments supplémentaires dans '[ .. ]' illégaux ?" msgid "RHS 'value' (class %s) matches 'ANY', but must match matrix class %s" msgstr "" "la 'value' du membre de gauche de l'équation (classe %s) correspond à 'ANY', " "mais doit correspondre à la classe de matrice %s" msgid "not-yet-implemented 'Matrix[<-' method" msgstr "méthode 'Matrix[<-' non encore implémentée" msgid "inefficient method used for \"- e1\"" msgstr "méthode inefficace utilisée pour \"- e1\"" msgid "dim [product %d] do not match the length of object [%d]" msgstr "dim [product %d] ne correspond pas à la longueur de l'objet [%d]" msgid "internal bug in \"Compare\" method (Cmp.Mat.atomic); please report" msgstr "" "bug interne dans la méthode \"Compare\" (Cmp.Mat.atomic) ; veuillez reporter " "ceci" msgid "Cmp.Mat.atomic() should not be called for diagonalMatrix" msgstr "Cmp.Mat.atomic() ne devrait pas être appelé pour diagonalMatrix" msgid "Matrices must have same number of rows for arithmetic" msgstr "" "Les matrices doivent avoir le même nombre de lignes pour des opérations " "arithmétiques" msgid "number of rows are not compatible for %s" msgstr "nombre de lignes incompatibles pour %s" msgid "length of 2nd arg does not match dimension of first" msgstr "la longueur du 2ème arg ne correspond pas à la dimension du premier" msgid "length of 1st arg does not match dimension of 2nd" msgstr "la longueur du 1er arg ne correspond pas à la dimension du second" msgid "internal bug in \"Logic\" method (Logic.Mat.atomic); please report" msgstr "" "bug interne dans la méthode \"Logic\" (Logic.Mat.atomic) ; veuillez reporter " "ceci" msgid "Logic.Mat.atomic() should not be called for diagonalMatrix" msgstr "Logic.Mat.atomic() ne devrait pas être appelé pour diagonalMatrix" msgid "vector too long in Matrix - vector operation" msgstr "vecteur trop long dans une opération Matrix - vecteur" msgid "" "longer object length\n" "\tis not a multiple of shorter object length" msgstr "" "la longueur de l'objet le plus long\n" "\tn'est pas un multiple de la longueur de l'objet le plus court" msgid " %s %s is undefined" msgstr " %s %s est indéfini" msgid "%s %s is undefined" msgstr "%s %s est indéfini" msgid "longer object length is not a multiple of shorter object length" msgstr "" "la longueur de l'objet le plus long n'est pas un multiple de la longueur de " "l'objet le plus court" msgid "invalid class: %s" msgstr "classe incorrecte : %s" msgid "programming error: min() should have dispatched w/ 1st arg much earlier" msgstr "" "erreur de programmation : min() aurait du être dispatché avec le 1er arg " "bien plus tôt" msgid "in Summary(, .): %s(<%s>, <%s>,...)" msgstr "dans Summary() : %s(<%s>, <%s>, …)" #, fuzzy msgid "in Summary(, .): %s(<%s>, <%s>)" msgstr "dans Summary() : %s(<%s>, <%s>, …)" msgid "not-yet-implemented coercion to \"TsparseMatrix\"" msgstr "conversion automatique en \"TsparseMatrix\" pas encore implémentée" msgid "you cannot mix negative and positive indices" msgstr "vous ne pouvez pas mélanger les indices négatifs et positifs" msgid "index larger than maximal %d" msgstr "indice plus grand que la valeur maximale %d" msgid "'NA' indices are not (yet?) supported for sparse Matrices" msgstr "" "les indices 'NA' ne sont pas (encore?) supportés pour les Matrices éparses" msgid "logical subscript too long (%d, should be %d)" msgstr "indice logique trop long (%d, devrait être %d)" msgid "no 'dimnames[[.]]': cannot use character indexing" msgstr "" "pas de 'dimnames[[.]]' : impossible d'utiliser un indiçage de chaîne de " "caractères" msgid "invalid character indexing" msgstr "indiçage de chaînes de caractères incorrect" msgid "Matrix-internal error in [i,,d]; please report" msgstr "" "Erreur interne de matrice dans [i,,d] ; veuillez reporter ceci" msgid "FIXME: NOT YET FINISHED IMPLEMENTATION" msgstr "FIXME : IMPLEMENTATION PAS ENCORE TERMINEE" msgid "internal bug: missing 'i' in replTmat(): please report" msgstr "bug interne : 'i' manquant dans replTmat() : veuillez reporter ceci" msgid "[ ] indexing not allowed: forgot a \",\" ?" msgstr "" "indiçage [ ] non permis : n'avez-vous pas oublié une \",\" ?" msgid "internal bug: matrix 'i' in replTmat(): please report" msgstr "bug interne : matrice 'i' dans replTmat() : veuillez reporter ceci" msgid "" "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE." msgstr "" "x[.] <- val: x vaut %s, val qui ne sont pas dans {TRUE, FALSE} sont " "convertis ; NA |--> TRUE." msgid "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "" "x[.] <- val: x vaut %s, val qui ne sont pas dans {TRUE, FALSE} sont " "convertis." msgid "" "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE." msgstr "" "x[.,.] <- val: x vaut %s, val qui ne sont pas dans {TRUE, FALSE} sont " "convertis NA |--> TRUE." msgid "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "" "x[.,.] <- val: x vaut %s, val qui ne sont pas dans {TRUE, FALSE} sont " "convertis." msgid "x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrix" msgstr "" "x[.,.] <- val: x est converti automatiquement de Tsparse* vers CsparseMatrix" msgid "nargs() = %d should never happen; please report." msgstr "nargs() = %d ne devrait jamais se produire ; veuillez reporter ceci." msgid "row indices must be <= nrow(.) which is %d" msgstr "les indices de lignes doivent être <= nrow(.) qui est %d" msgid "column indices must be <= ncol(.) which is %d" msgstr "les indices de colonnes doivent être <= ncol(.) qui est %d" msgid "'force' must be (coercable to) TRUE or FALSE" msgstr "'force' doit être (convertible en) TRUE ou FALSE" msgid "invalid (to - from)/by in seq(.)" msgstr "(to - from)/by incorrect dans seq(.)" msgid "wrong sign in 'by' argument" msgstr "signe incorrect dans l'argument 'by'" msgid "'by' argument is much too small" msgstr "l'argument 'by' est beaucoup trop petit" msgid "length must be non-negative number" msgstr "la longueur doit être un nombre non négatif" msgid "too many arguments" msgstr "trop d'arguments" msgid "c(,..) of different kinds, coercing all to 'rleDiff'" msgstr "" "c(,..) de différentes sortes, convertis automatiquement en 'rleDiff" "\"" msgid "[i] is not yet implemented" msgstr "[i] n'est pas encore implémenté" msgid "all() is not yet implemented" msgstr "all() n'est pas encore implémenté" msgid "sum() is not yet implemented" msgstr "sum() n'est pas encore implémenté" msgid "prod() is not yet implemented" msgstr "prod() n'est pas encore implémenté" msgid "not yet implemented" msgstr "pas encore implémenté" msgid "" "x / 0 for an x with sign-change\n" " no longer representable as 'rleDiff'" msgstr "" "x / 0 pour un x avec changement de signe\n" " il n'est plus représentable comme 'rleDiff'" msgid " --> is not yet implemented" msgstr " --> n'est pas encore implémenté" msgid " --> is not yet implemented" msgstr " --> n'est pas encore implémenté" msgid "'diagonals' matrix must have %d columns (= length(k) )" msgstr "une matrice 'diagonals' doit avoir %d colonnes (= length(k) )" msgid "'diagonals' must have the same length (%d) as 'k'" msgstr "'diagonals' doit avoir la même longueur (%d) que 'k'" msgid "matrix can only be symmetric if square, but n != m" msgstr "" msgid "" "for symmetric band matrix, only specify upper or lower triangle\n" " hence, all k must have the same sign" msgstr "" "pour une matrice de bande symétrique, spécifiez seulement le triangle " "supérieur ou inférieur\n" " donc, tous les k doivent avoir le même signe" msgid "the %d-th (sub)-diagonal (k = %d) is too short; filling with NA's" msgstr "" "la %d-ième (sous)-diagonale (k = %d) est trop courte ; elle est replie avec " "des NAs" msgid "resulting x-slot has different type than x's or y's" msgstr "" msgid "'A' must be a square matrix" msgstr "'A' doit être une matrice carrée" msgid "must either specify 'A' or the functions 'A.x' and 'At.x'" msgstr "il faut spécifier 'A' ou les fonctions 'A.x' et 'At.x'" msgid "when 'A' is specified, 'A.x' and 'At.x' are disregarded" msgstr "lorsque 'A' est spécifié, 'A.x' et 'At.x' ne sont pas pris en compte" msgid "not converged in %d iterations" msgstr "pas de convergence en %d itérations" msgid "hit a cycle (1) -- stop iterations" msgstr "un cycle est atteint (1) -- arrêt des itérations" msgid "hit a cycle (2) -- stop iterations" msgstr "un cycle est atteint (2) -- arrêt des itérations" msgid "not enough new vecs -- stop iterations" msgstr "pas assez de nouveaux vecs -- arrêt des itérations" msgid "diagonalMatrix in .dense2C() -- should never happen, please report!" msgstr "" "diagonalMatrix dans .dense2C() -- ne devrait jamais se produire, veuillez " "reporter ceci !" msgid "undefined method for class %s" msgstr "méthode non définie pour la classe %s" msgid "dim(.) value must be numeric of length 2" msgstr "la valeur de dim(.) doit être numérique de longueur 2" msgid "dimensions don't match the number of cells" msgstr "les dimensions ne correspondent pas au nombre de cellules" msgid "invalid nargs()= %d" msgstr "nargs()= %d incorrect" msgid "" "LU computationally singular: ratio of extreme entries in |diag(U)| = %9.4g" msgstr "" "LU calculée singulière : rapport d'entrées extrêmes dans |diag(U)| = %9.4g" msgid "RHS 'b' has wrong number of rows:" msgstr "" msgid "RHS 'b' has wrong length" msgstr "" msgid "cannot coerce non-symmetric \"dgTMatrix\" to \"dsCMatrix\" class" msgstr "" "impossible de convertir automatiquement des \"dgMAtrix\" non symétriques en " "classe \"dsCMatrix\"" msgid "the matrix is not triangular" msgstr "la matrice n'est pas triangulaire" msgid "'lwd' must be NULL or non-negative numeric" msgstr "'lwd' doit être un nombre non négatif ou NULL" msgid "'x' has invalid data type" msgstr "'x' a un type de données incorrect" msgid "length(x) must be either 1 or #{cols}" msgstr "length(x) doit être soit 1 ou #{cols}" msgid "some arguments are not matrices" msgstr "quelques arguments ne sont pas des matrices" msgid "%s kind not yet implemented" msgstr "le type %s n'est pas encore implémenté" msgid "non-square matrix" msgstr "matrice non carrée" msgid "" "matrix with non-zero off-diagonals cannot be coerced to \"diagonalMatrix\"" msgstr "" "une matrice avec des cellules non nulles hors diagonale ne peut être " "convertie automatiquement en \"diagonalMatrix\"" msgid "matrix is not diagonal" msgstr "la matrice n'est pas diagonale" msgid "Internal bug: nargs()=%d; please report" msgstr "bug interne : nargs()=%d ; veuillez reporter ceci" msgid "chol() is undefined for diagonal matrix with negative entries" msgstr "" "chol() est indéfini pour une matrice diagonale avec des entrées négatives" msgid "non-matching dimensions" msgstr "dimensions incohérentes" msgid "incompatible matrix dimensions" msgstr "dimensions de matrices incompatibles" msgid "intermediate 'r' is of type %s" msgstr "le 'r' intermédiaire est de type %s" msgid "not yet implemented .. please report" msgstr "pas encore implémenté .. veuillez reporter ceci" msgid "not a positive definite matrix" msgstr "matrice qui n'est pas un positif défini" msgid "" "as(.,\"dsCMatrix\") is deprecated (since 2008); do use as(., " "\"symmetricMatrix\")" msgstr "" "as(.,\"dsCMatrix\") est déprécié (depuis 2008) ; n'utilisez pas as(., " "\"symmetricMatrix\")" msgid "inefficient coercion (lost triangularity); please report" msgstr "" "conversion automatique inefficace (triangularité perdue) ; veuillez reporter " "ceci" msgid "coercion to \"indMatrix\" only works from integer numeric" msgstr "" "la conversion automatique ne \"indMatrix\" ne fonctionne que pour des " "nombres entiers" msgid "" "coercion from list(i1,...,ik, d) to \"indMatrix\" failed.\n" " All entries must be integer valued and the number of columns, d, not " "smaller\n" " than the maximal index i*." msgstr "" "la conversion automatique depuis list(i1,...,ik, d) en \"indMatrix\" a " "échoué.\n" " toutes les entrées doivent être des valeurs entières et le nombre de " "colonnes, d, ne peut être plus petit\n" " que l'indice maximal i*." msgid "the number of non-zero entries differs from nrow(.)" msgstr "le nombre d'entrées non zéro diffère de nrow(.)" msgid "must have exactly one non-zero entry per row" msgstr "doit avoir exactement une entrée non zéro par ligne" msgid "kronecker method must use default 'FUN'" msgstr "méthode kronecker doit utiliser une 'FUN' par défaut" msgid "replacing \"indMatrix\" entries is not allowed, as rarely sensible" msgstr "" "le replacement d'entrées \"indMatrix\" n'est pas autorisé, c'est rarement " "judicieux" msgid "Matrix seems negative semi-definite" msgstr "La matrice semble négative et semi-définie" msgid "'nearPD()' did not converge in %d iterations" msgstr "'nearPD()' n'a pas converti en %d itérations" msgid "cannot coerce 'NA's to \"nsparseMatrix\"" msgstr "impossible de convertir automatiquement des 'NA's en \"nsparseMatrix\"" msgid "temporarily disabled" msgstr "temporairement désactivé" msgid "coercion to \"pMatrix\" only works from integer numeric" msgstr "" "conversion automatique en \"pMatrix\" ne fonctionne que pour des nombres " "entiers" msgid "not a square matrix" msgstr "ce n'est pas une matrice carrée" msgid "not-yet-implemented method for <%s> %%*%% <%s>" msgstr "méthode pas encore implémentée pour <%s> %%*%% <%s>" #, fuzzy msgid "non-conformable arguments" msgstr "matrices de dimensions incompatibles dans %s" #, fuzzy msgid "'boolArith = %d' not yet implemented" msgstr "le type %s n'est pas encore implémenté" msgid "" "rankMatrix(, method = '%s') coerces to dense matrix.\n" " Probably should rather use method = 'qr' !?" msgstr "" "rankMatrix(, method = '%s') converti automatiquement en " "matrice dense.\n" " Il faudrait probablement plutôt utiliser une méthode = 'qr' ?" msgid "rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)" msgstr "rankMatrix(x, method='qr') : calcul de t(x) comme nrow(x) < ncol(x)" msgid "model frame and formula mismatch in model.matrix()" msgstr "" "le cadre du modèle et la formule ne correspondent pas dans model.matrix()" msgid "invalid 'contrasts.arg' argument" msgstr "argument 'contrast.arg' incorrect" msgid "variable '%s' is absent, its contrast will be ignored" msgstr "la variable '%s' est absente, ses contrastes seront ignorés" msgid "only 2-dimensional tables can be directly coerced to sparse matrices" msgstr "" "seules des tables bidimensionnelles peuvent être automatiquement converties " "en matrices éparses" msgid "exactly one of 'i', 'j', or 'p' must be missing from call" msgstr "exactement l'un parmi 'i', 'j' o 'p' doit être manquant dans l'appel" msgid "'p' must be a non-decreasing vector (0, ...)" msgstr "'p' doit être un vecteur non décroissant (0, …)" msgid "NA's in (i,j) are not allowed" msgstr "NAs dans (i,j) ne sont pas permis" msgid "" "Both 'symmetric' and 'triangular', i.e. asking for diagonal matrix. Use " "'Diagonal()' instead" msgstr "" msgid "symmetric matrix must be square" msgstr "la matrice symétrique doit être carrée" #, fuzzy msgid "triangular matrix must be square" msgstr "la matrice symétrique doit être carrée" msgid "triangular matrix must have all i >= j or i <= j" msgstr "" msgid "length(i) is not a multiple of length(x)" msgstr "length(i) n'est pas un multiple de length(x)" msgid "only square matrices can be used as incidence matrices for graphs" msgstr "" "seules des matrices carrées peuvent être utilisées comme matrices " "d'incidence pour les graphiques" msgid "Matrix-internal error in [i,,d]; please report" msgstr "erreur interne dans [i,,d] ; veuillez reporter ceci" msgid "invalid 'col.names' string: %s" msgstr "chaîne de caractères 'col.names' incorrect : %s" msgid "uniDiag=TRUE, but not all diagonal entries are 1" msgstr "" msgid "uniDiag=TRUE, not all entries in diagonal coded as 1" msgstr "" msgid "in show(); maybe adjust 'options(max.print= *, width = *)'" msgstr "" #, fuzzy msgid "suppressing columns and rows" msgstr "[[ suppression de %d noms de colonnes %s ]]" msgid "suppressing rows" msgstr "" #, fuzzy msgid "suppressing columns" msgstr "[[ suppression de %d noms de colonnes %s ]]" msgid "logic programming error in printSpMatrix2(), please report" msgstr "" "erreur logique de programmation dans printSpMAtrix2(), veuillez reporter ceci" msgid "invalid 'type'" msgstr "'type' invalide" msgid "rcond(.) via sparse -> dense coercion" msgstr "conversion automatique rcond(.) via sparse -> dense" msgid "'V' is not a *square* matrix" msgstr "'V' n'est pas une matrice *carrée*" msgid "number of non zeros is smaller than 'nnz' because of duplicated (i,j)s" msgstr "" msgid "" "qr.R() may differ from qr.R() because of permutations. " "Possibly use our qrR() instead" msgstr "" "qr.R() ne diffère peut-être pas de qr.R() en raison de " "permutations.Utilisez éventuellement notre qrR() à la place" msgid "cannot coerce 'NA's to \"nsparseVector\"" msgstr "impossible de convertir automatiquement 'NA's en \"nsparseVector\"" msgid "'x' must inherit from \"sparseVector\"" msgstr "'x' doit hériter de \"sparseVector\"" msgid "'ncol' must be >= 0" msgstr "'ncol' doit être >= 0" msgid "'nrow' must be >= 0" msgstr "'nrow' doit être >= 0" msgid "Must specify 'nrow' when 'symmetric' is true" msgstr "Il faut spécifier 'nrow' lorsque 'symmetric' est vrai" msgid "'nrow' and 'ncol' must be the same when 'symmetric' is true" msgstr "'now' et 'ncol' doivent être les mêmes lorsque 'symmetric' est vrai" msgid "'x' must have length nrow^2 when 'symmetric' is true" msgstr "'x' doit avoir une longueur nrow^2 lorsque 'symmetric' est vrai" msgid "'ncol' is not a factor of length(x)" msgstr "'ncol' n'est pas un factor de length(x)" msgid "'nrow' is not a factor of length(x)" msgstr "'nrow' n'est pas un factor de length(x)" msgid "Class %s is not yet implemented" msgstr "La classe %s n'est pas implémentée" msgid "" "index must be numeric, logical or sparseVector for indexing sparseVectors" msgstr "" "les indices doivent être numériques, logiques ou sparseVector pour " "l'indiçage sparseVectors" msgid "'times >= 0' is required" msgstr "'times >= 0' est requis" msgid "(un)packing only applies to dense matrices, class(x)='%s'" msgstr "" "la (dé)compaction ne s'applique qu'à des matrices denses, class(x)='%s'" msgid "'x' is not symmetric nor triangular" msgstr "'x' n'est ni symétrique ni triangulaire" #, fuzzy msgid "" "extra argument %s will be disregarded in\n" " %s" msgid_plural "" "extra arguments %s will be disregarded in\n" " %s" msgstr[0] "" "les arguments %s ne sont pas utilisés dans\n" " %s" msgstr[1] "" "les arguments %s ne sont pas utilisés dans\n" " %s" #~ msgid "variable '%s' converted to a factor" #~ msgstr "variable '%s' converti en facteur" #~ msgid "\"dMatrix\" object with NAs cannot be coerced to \"nMatrix\"" #~ msgstr "" #~ "un objet \"dMatrix\" avec NAs ne peut être converti automatiquement en " #~ "\"nMatrix\"" #~ msgid "\"lMatrix\" object with NAs cannot be coerced to \"nMatrix\"" #~ msgstr "" #~ "un objet \"Matrix\" avec NAs ne peut être converti automatiquement en " #~ "\"nMatrix\"" #~ msgid "not a skinny matrix" #~ msgstr "pas une matrice légère" #~ msgid "longer object length" #~ msgstr "la longueur de l'objet le plus long" #~ msgid "is not a multiple of shorter object length" #~ msgstr "n'est pas un multiple de l'objet le plus court" Matrix/po/de.po0000644000176200001440000010312413047321304013062 0ustar liggesusers# Translation of Matrix to German # Copyright (C) 2001-2015 The R Foundation # This file is distributed under the same license as the Matrix package. # Chris Leick , 2009-2011. # Detlef Steuer , 2012-2015. msgid "" msgstr "" "Project-Id-Version: R 3.3.0 / Matrix 1.2-4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-10 12:21+0100\n" "PO-Revision-Date: 2016-04-14 12:54+0200\n" "Last-Translator: Detlef Steuer \n" "Language-Team: R Core \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: CHMfactor.c:14 #, c-format msgid "cholmod_change_factor failed with status %d" msgstr "cholmod_change_factor mit Status %d fehlgeschlagen" #: CHMfactor.c:30 CHMfactor.c:60 msgid "system argument is not valid" msgstr "Systemargument ist nicht gültig" #: CHMfactor.c:47 #, c-format msgid "cholmod_updown() returned %d" msgstr "cholmod_updown() gab Fehlerkode %d zurück" # http://www.matheboard.de/archive/160705/thread.html #: CHMfactor.c:103 #, c-format msgid "diagonal element %d of Cholesky factor is missing" msgstr "Diagonalelement %d des Choleskyfaktors fehlt" #: CHMfactor.c:141 #, c-format msgid "cholmod_factorize_p failed: status %d, minor %d of ncol %d" msgstr "cholmod_factorize_p fehlgeschlagen: Status %d, Minor %d von ncol %d" #: CHMfactor.c:146 msgid "cholmod_change_factor failed" msgstr "cholmod_change_factor fehlgeschlagen" #: Csparse.c:58 msgid "Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrix" msgstr "" "Csparse_sort(x): x ist keine gültige (abgesehen vom Sortieren) CsparseMatrix" #: Csparse.c:76 msgid "slot p must have length = nrow(.) + 1" msgstr "Slot p muss Länge = nrow(.) + 1 haben" #: Csparse.c:78 msgid "first element of slot p must be zero" msgstr "erstes Element von Slot p muss Null sein" #: Csparse.c:81 msgid "last element of slot p must match length of slots j and x" msgstr "" "letztes Element von Slot p muss eine zu den Slots j und x passende Länge " "haben" #: Csparse.c:84 msgid "all column indices must be between 0 and ncol-1" msgstr "Alle Spaltenindizes müssen zwischen 0 und ncol-1 liegen" #: Csparse.c:89 msgid "slot p must be non-decreasing" msgstr "Slot p darf nicht abnehmend sein" #: Csparse.c:100 msgid "slot j is not increasing inside a column" msgstr "Slot j ist nicht zunehmend innerhalb einer Spalte" #: Csparse.c:102 msgid "slot j is not *strictly* increasing inside a column" msgstr "Slot j ist nicht *strikt* zunehmend innerhalb einer Spalte" #: Csparse.c:214 msgid "Csparse_to_nz_pattern(x, tri = NA): 'tri' is taken as TRUE" msgstr "Csparse_to_nz_pattern(x, tri = NA): 'tri' als TRUE angenommen" #: Csparse.c:237 msgid "not a 'n.CMatrix'" msgstr "keine 'n.CMatrix'" #: Csparse.c:267 #, c-format msgid "nz2Csparse(): invalid/non-implemented r_kind = %d" msgstr "nz2Csparse(): ungültiges/nicht implementiertes r_kind = %d" #: Csparse.c:350 msgid "Nonsymmetric matrix in Csparse_symmetric_to_general" msgstr "Asymmetrische Matrix in Csparse_symmetric_to_general" #: Csparse.c:361 msgid "Csparse_general_to_symmetric(): matrix is not square!" msgstr "Csparse_general_to_symmetric(): Matrix ist nicht quadratisch." #: Csparse.c:770 msgid "Csparse_crossprod(): error return from cholmod_aat()" msgstr "Csparse_crossprod(): Fehler von cholmod_aat() zurückgegeben" #: Csparse.c:799 msgid "cholmod_drop() failed" msgstr "cholmod_drop() fehlgeschlagen" #: Csparse.c:825 #, c-format msgid "Impossible Rk_x/Rk_y in Csparse_%s(), please report" msgstr "Unmögliche Rk_x/Rk_y in Csparse_%s(). Bitte dem Entwickler melden!" #: Csparse.c:827 #, c-format msgid "chm_MOD_xtype() was not successful in Csparse_%s(), please report" msgstr "" "chm_MOD_xtype() nicht erfolgreich in Cspare_%s(). Bitte dem Entwickler " "melden!" #: Csparse.c:931 msgid "Index i must be NULL or integer" msgstr "Index i muss NULL oder eine ganze Zahl sein" #: Csparse.c:933 msgid "Index j must be NULL or integer" msgstr "Index j muss NULL oder eine ganze Zahl sein" #: Csparse.c:992 #, c-format msgid "failure to open file \"%s\" for writing" msgstr "Öffnen von Datei '%s' zum Schreiben fehlgeschlagen" #: Csparse.c:996 msgid "cholmod_write_sparse returned error code" msgstr "cholmod_write_sparse gab Fehlerkode zurück" #: Csparse.c:1095 #, c-format msgid "%s = '%s' (back-permuted) is experimental" msgstr "%s = '%s' (zurückgetauscht) ist experimentell" #: Csparse.c:1105 msgid "diag_tC(): invalid 'resultKind'" msgstr "diag_tC(): 'resultKind' ungültig" #: Csparse.c:1177 #, c-format msgid "negative vector lengths not allowed: np = %d, nnz = %d" msgstr "negative Vektorlänge ist nicht erlaubt: np = %d, nnz = %d" #: Csparse.c:1182 msgid "exactly 1 of 'i', 'j' or 'p' must be NULL" msgstr "exakt 1 von 'i', 'j' oder 'p' muss NULL sein" #: Csparse.c:1184 #, c-format msgid "np = %d, must be zero when p is NULL" msgstr "np = %d, muss Null sein, wenn p NULL ist" #: Csparse.c:1187 #, c-format msgid "p[0] = %d, should be zero" msgstr "p[0] = %d, sollte Null sein" #: Csparse.c:1190 msgid "p must be non-decreasing" msgstr "p darf nicht abnehmend sein" #: Csparse.c:1206 #, c-format msgid "Inconsistent dimensions: np = 0 and nnz = %d" msgstr "Inkonsistente Dimensionen: np = 0 und nnz = %d" #: Csparse.c:1214 #, c-format msgid "invalid row index at position %d" msgstr "ungültiger Zeilenindex an Position %d" #: Csparse.c:1221 #, c-format msgid "invalid column index at position %d" msgstr "ungültiger Spaltenindex an Position %d" #: Csparse.c:1231 #, c-format msgid "strlen of cls argument = %d, should be 8" msgstr "strlen des cls-Arguments = %d, sollte 8 sein" #: Csparse.c:1233 #, c-format msgid "cls = \"%s\" does not end in \"CMatrix\"" msgstr "cls = '%s' endet nicht in 'CMatrix'" #: Csparse.c:1243 #, c-format msgid "cls = \"%s\" must begin with 'd', 'l' or 'n'" msgstr "cls = '%s' muss mit 'd', 'l' oder 'n' beginnen" #: Csparse.c:1246 msgid "Only 'g'eneral sparse matrix types allowed" msgstr "Nur 'g'enerelle dünn besetzte Matrixtypen erlaubt" #: Csparse.c:1274 msgid "code not yet written for cls = \"lgCMatrix\"" msgstr "Kode noch nicht für cls = 'lgCMatrix' geschrieben" #: Mutils.c:14 Mutils.c:33 #, c-format msgid "argument type[1]='%s' must be a one-letter character string" msgstr "Argument type[1]='%s' muss eine Zeichenkette aus einem Buchstaben sein" #: Mutils.c:22 #, c-format msgid "argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'" msgstr "" "Argument type[1]='%s' muss eins aus 'M', '1', 'O', 'I', 'F' oder 'E' sein" #: Mutils.c:39 #, c-format msgid "argument type[1]='%s' must be one of '1','O', or 'I'" msgstr "Argument type[1]='%s' eins aus '1', 'O' oder 'I' sein" #: Mutils.c:50 Mutils.c:66 msgid "object must be a named, numeric vector" msgstr "Objekt muss ein benannter numerischer Vektor sein" #: Mutils.c:113 Mutils.c:137 msgid "'factors' slot must be a named list" msgstr "'factors'-Slot muss eine benannte Liste sein" #: Mutils.c:172 msgid "Matrix object has no 'factors' slot" msgstr "Matrix Objekt hat keinen 'factors'-Slot" #: Mutils.c:262 #, c-format msgid "'%s' slot must have length 1" msgstr "Slot '%s' muss die Länge 1 haben" #: Mutils.c:266 #, c-format msgid "'%s' must have string length 1" msgstr "'%s' muss die Zeichenkettenlänge 1 haben" #: Mutils.c:273 #, c-format msgid "'%s' must be in '%s'" msgstr "'%s' muss in '%s' sein" #: Mutils.c:292 msgid "'s1' and 's2' must be \"character\" vectors" msgstr "'s1' und 's2' müssen 'character'-Vektoren sein" #: Mutils.c:314 msgid "length of x slot != prod(Dim)" msgstr "Länge von x-Slot != prod(Dim)" #: Mutils.c:320 msgid "Dim slot must have length 2" msgstr "Dim-Slot muss die Länge 2 haben" #: Mutils.c:325 #, fuzzy msgid "Dim slot is not integer" msgstr "Dim-Slot ist nicht numerisch" #: Mutils.c:331 msgid "Negative value in Dim" msgid_plural "Negative values in Dim" msgstr[0] "Negativer Wert in Dim" msgstr[1] "Negative Werte in Dim" #: Mutils.c:348 msgid "Dimnames slot is not a list" msgstr "Dimnames-Slot ist keine Liste" #: Mutils.c:350 msgid "Dimnames slot is a list, but not of length 2" msgstr "Dimnames-Slot ist eine Liste, aber Länge ist nicht 2" #: Mutils.c:355 #, c-format msgid "Dimnames[%d] is not a character vector" msgstr "Dimnames[%d] ist kein Zeichenkettenvektor" #: Mutils.c:360 #, c-format msgid "length(Dimnames[%d]) differs from Dim[%d] which is %d" msgstr "length(Dimnames[%d]() unterscheidet sich von Dim[%d], was %d ist" #: Mutils.c:387 Mutils.c:413 msgid "'uplo' must be UPP or LOW" msgstr "'uplo' muss UPP oder LOW sein" #: Mutils.c:468 dgeMatrix.c:420 dtrMatrix.c:282 msgid "replacement diagonal has wrong length" msgstr "Diagonale zur Ersetzung hat die falsche Länge" #: Mutils.c:683 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_geMatrix" msgstr "ungültige Klasse '%s' für dup_mMatrix_as_geMatrix" #: Mutils.c:813 #, c-format msgid "unexpected ctype = %d in dup_mMatrix_as_geMatrix" msgstr "unerwartetes ctype = %d in dup_mMatrix_as_geMatrix" #: Mutils.c:841 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_dgeMatrix" msgstr "ungültige Klasse '%s' für dup_mMatrix_as_dgeMatrix" #: Mutils.c:891 msgid "Argument ij must be 2-column integer matrix" msgstr "Argument ij muss eine zweispaltige ganzzahlige Matrix sein" #: Mutils.c:910 msgid "subscript 'i' out of bounds in M[ij]" msgstr "Subskript 'i' außerhalb des Bereichs in M[ij]" #: Mutils.c:912 msgid "subscript 'j' out of bounds in M[ij]" msgstr "Subskript 'j' außerhalb des Bereichs in M[ij]" #: Mutils.c:956 msgid "i and j must be integer vectors of the same length" msgstr "i und j müssen Ganzzahlvektoren mit der gleichen Länge sein" #: Mutils.c:1001 msgid "'data' must be of a vector type" msgstr "'data' muss ein Vektortyp sein" #: Mutils.c:1008 #, c-format msgid "invalid '%s' argument" msgstr "ungültiges '%s' Argument" #: Mutils.c:1015 Mutils.c:1023 msgid "non-numeric matrix extent" msgstr "nicht-numerische Matrix-Ausdehnung" #: Mutils.c:1018 msgid "invalid 'nrow' value (too large or NA)" msgstr "unzulässiger Wert für 'nrow' (zu groß oder NA)" #: Mutils.c:1020 msgid "invalid 'nrow' value (< 0)" msgstr "unzulässiger Wert für 'nrow' (< 0)" #: Mutils.c:1026 msgid "invalid 'ncol' value (too large or NA)" msgstr "unzulässiger Wert für 'ncol' (zu groß oder NA)" #: Mutils.c:1028 msgid "invalid 'ncol' value (< 0)" msgstr "unzulässiger Wert für 'ncol' (< 0)" #: Mutils.c:1046 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]" msgstr "" "Datenlänge [%d] ist kein Teilvielfaches oder Vielfaches der Zahl der Zeilen " "[%d]" #: Mutils.c:1049 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of columns " "[%d]" msgstr "" "Datenlänge [%d] ist kein Teilvielfaches oder Vielfaches der Zahl der Spalten " "[%d]" #: Mutils.c:1052 msgid "data length exceeds size of matrix" msgstr "Datenlänge überschreitet Größe der Matrix" #: Mutils.c:1058 msgid "too many elements specified" msgstr "zu viele Elemente angegeben" #: Mutils.c:1131 #, c-format msgid "the number of columns differ in R_rbind2_vector: %d != %d" msgstr "die Anzahl der Spalten untescheidet sich in R_rbind2_vector: %d != %d" #: Mutils.c:1185 Mutils.c:1216 Mutils.c:1227 Mutils.c:1254 msgid "Argument must be numeric-like atomic vector" msgstr "Argument muss zahl-ähnlich atomar sein" #: Tsparse.c:20 msgid "lengths of slots i and j must match" msgstr "Längen der Slots i und j müssen passen" #: Tsparse.c:23 msgid "slot Dim must have length 2" msgstr "Slot Dim muss die Länge 2 haben" #: Tsparse.c:27 msgid "" "all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrix" msgstr "" "alle Zeilenindizes (slot 'i') müssen in TsparseMatrix zwischen 0 und nrow-1 " "liegen" #: Tsparse.c:29 msgid "" "all column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrix" msgstr "" "Alle Spaltenindizes (slot 'j') müssen in TsparseMatrix zwischen 0 und ncol-1 " "liegen" #: chm_common.c:76 msgid "Argument rho must be an environment" msgstr "Argument rho muss eine Umgebung sein" #: chm_common.c:253 msgid "invalid class of object to as_cholmod_sparse" msgstr "ungültige Klasse des Objektes zu as_cholmod_sparse" #: chm_common.c:255 msgid "invalid object passed to as_cholmod_sparse" msgstr "ungültiges Objekt an Klasse as_cholmod_sparse übergeben" #: chm_common.c:282 msgid "in_place cholmod_sort returned an error code" msgstr "in_place cholmod_sort gab einen Fehlerkode zurück" #: chm_common.c:288 msgid "cholmod_sort returned an error code" msgstr "cholmod_sort gab einen Fehlerkode zurück" #: chm_common.c:370 msgid "chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)" msgstr "chm_sparse_to_SEXP(, *): ungültiges 'Rkind' (echter Artkode)" #: chm_common.c:378 msgid "unknown xtype in cholmod_sparse object" msgstr "unbekannter xtype in Objekt cholmod_sparse" #: chm_common.c:407 chm_common.c:638 chm_common.c:916 chm_common.c:966 msgid "complex sparse matrix code not yet written" msgstr "Kode für komplexe dünn besetzte Matrizen noch nicht geschrieben" #: chm_common.c:412 chm_common.c:643 msgid "Symmetric and triangular both set" msgstr "Symmetrisch und dreieckig sind beide gesetzt" #: chm_common.c:488 msgid "invalid class of object to as_cholmod_triplet" msgstr "ungültige Klasse des Objektes zu as_cholmod_triplet" #: chm_common.c:512 msgid "as_cholmod_triplet(): could not reallocate for internal diagU2N()" msgstr "as_cholmod_triplet(): konnte für internes diagU2N() nicht reallozieren" #: chm_common.c:610 msgid "unknown xtype in cholmod_triplet object" msgstr "unbekannter xtype in Objekt cholmod_triplet" #: chm_common.c:689 msgid "invalid class of object to as_cholmod_dense" msgstr "ungültige Klasse des Objektes zu as_cholmod_dense" #: chm_common.c:757 #, c-format msgid "" "chm_transpose_dense(ans, x) not yet implemented for %s different from %s" msgstr "" "chm_transpose_dense(ans, x) noch nicht implementiert für %s verschieden von " "%s" #: chm_common.c:781 #, c-format msgid "Cholmod error '%s' at file %s, line %d" msgstr "Cholmod-Fehler '%s' bei Datei %s, Zeile %d" #: chm_common.c:785 #, c-format msgid "Cholmod warning '%s' at file %s, line %d" msgstr "Cholmod-Warnung '%s' bei Datei %s, Zeile %d" #: chm_common.c:814 #, c-format msgid "Unable to initialize cholmod: error code %d" msgstr "cholmod kann nicht initialisiert werden: Fehlerkode %d" #: chm_common.c:860 msgid "unknown 'Rkind'" msgstr "'Rkind' unbekannt" #: chm_common.c:867 chm_common.c:952 msgid "unknown xtype" msgstr "unbekannter xtype" #: chm_common.c:922 chm_common.c:975 msgid "code for cholmod_dense with holes not yet written" msgstr "Kode für cholmod_dense mit Löchern noch nicht geschrieben" #: chm_common.c:971 msgid "don't know if a dense pattern matrix makes sense" msgstr "es ist nicht klar, ob eine dicht besetzte Mustermatrix sinnvoll ist" #: chm_common.c:1038 msgid "invalid class of object to as_cholmod_factor" msgstr "ungültige Klasse des Objektes zu as_cholmod_factor" #: chm_common.c:1052 msgid "Supernodal LDL' decomposition not available" msgstr "Superknoten-LDL'-Zerlegung nicht verfügbar" #: chm_common.c:1054 msgid "Supernodal/simplicial class inconsistent with type flags" msgstr "Superknoten-/simpliziale Klasse inkonstent mit Typkennzeichen" #: chm_common.c:1072 msgid "Number of supernodes must be positive when is_super is TRUE" msgstr "Anzahl der Superknoten muss positiv sein, wenn is_super TRUE ist" #: chm_common.c:1075 msgid "Lengths of super and pi must be equal" msgstr "Längen von super und pi müssen gleich sein" #: chm_common.c:1079 msgid "Lengths of super and px must be equal" msgstr "Längen von super und px müssen gleich sein" #: chm_common.c:1092 msgid "failure in as_cholmod_factor" msgstr "Misserfolg in as_cholmod_factor" #: chm_common.c:1120 msgid "CHOLMOD factorization was unsuccessful" msgstr "CHOLMOD-Faktorzerlegung war nicht erfolgreich" #: chm_common.c:1133 #, c-format msgid "f->xtype of %d not recognized" msgstr "f->xtype von %d nicht erkannt" #: chm_common.c:1198 #, c-format msgid "chm_diagN2U(): nrow=%d, ncol=%d" msgstr "chm_diagN2U(= k (%d)" msgstr "falsches zyklisches Linksverschieben, j (%d) >= k (%d)" #: dense.c:31 #, c-format msgid "incorrect left cyclic shift, j (%d) < 0" msgstr "falsches zyklisches Linksverschieben, j (%d) < 0" #: dense.c:33 #, c-format msgid "incorrect left cyclic shift, k (%d) > ldx (%d)" msgstr "falsches zyklisches Linksverschieben, k (%d) > ldx (%d)" #: dense.c:78 msgid "Unknown error in getGivens" msgstr "Unbekannter Fehler in getGivens" #: dense.c:90 dense.c:106 dense.c:139 msgid "X must be a numeric (double precision) matrix" msgstr "X muss eine numerische (doppelte Genauigkeit) Matrix sein" #: dense.c:111 dense.c:144 msgid "y must be a numeric (double precision) matrix" msgstr "y muss eine numerische (doppelte Genauigkeit) Matrix sein" #: dense.c:115 dense.c:148 #, c-format msgid "number of rows in y (%d) does not match number of rows in X (%d)" msgstr "" "Anzahl der Zeilen in y (%d) passt nicht zur Anzahl der Zeilen in X (%d)" # http://de.wikipedia.org/wiki/LAPACK #: dense.c:126 #, c-format msgid "Lapack routine dposv returned error code %d" msgstr "Lapack-Routine dposv gab Fehlerkode %d zurück" #: dense.c:158 #, c-format msgid "First call to Lapack routine dgels returned error code %d" msgstr "Erster Aufruf der Lapack-Routine dgels gab Fehlerkode %d zurück" #: dense.c:165 #, c-format msgid "Second call to Lapack routine dgels returned error code %d" msgstr "Zweiter Aufruf der Lapack-Routine dgels gab Fehlerkode %d zurück" #: dense.c:178 msgid "X must be a real (numeric) matrix" msgstr "X muss eine echte (numerische) Matrix sein" #: dense.c:179 #, c-format msgid "tol, given as %g, must be non-negative" msgstr "tol, als %g gegeben, darf nicht negativ sein" #: dense.c:180 #, c-format msgid "tol, given as %g, must be <= 1" msgstr "tol, als %g gegeben, muss <= 1 sein" #: dense.c:204 #, c-format msgid "First call to dgeqrf returned error code %d" msgstr "Erster Aufruf von dgeqrf gab Fehlerkode %d zurück" #: dense.c:210 #, c-format msgid "Second call to dgeqrf returned error code %d" msgstr "Zweiter Aufruf von dgeqrf gab Fehlerkode %d zurück" #: dense.c:215 dense.c:235 #, c-format msgid "Lapack routine dtrcon returned error code %d" msgstr "Lapack-Routine dtrcon gab Fehlerkode %d zurück" #: dense.c:287 #, c-format msgid "Lower band %d > upper band %d" msgstr "Unteres Band %d > oberes Band %d" #: dense.c:358 msgid "ddense_to_symmetric(): matrix is not square!" msgstr "ddense_to_symmetric(): Matrix ist nicht quadratisch." #: dense.c:369 #, c-format msgid "matrix is not symmetric [%d,%d]" msgstr "Matrix ist nicht symmetrisch [%d,%d]" #: dense.c:430 msgid "matrix is not square! (symmetric part)" msgstr "Matrix ist nicht quadratisch. (symmetrischer Teil)" #: dense.c:488 msgid "matrix is not square! (skew-symmetric part)" msgstr "Matrix ist nicht quadratisch. (schief-symmetrischer Teil)" #: dgCMatrix.c:24 msgid "lengths of slots 'i' and 'x' must match" msgstr "Längen der Slots 'i' und 'x' müssen übereinstimmen" #: dgCMatrix.c:36 msgid "lengths of slots 'j' and 'x' must match" msgstr "Längen der Slots 'j' und 'x' müssen übereinstimmen" #: dgCMatrix.c:58 #, c-format msgid "invalid class(x) '%s' in compressed_to_TMatrix(x)" msgstr "ungültige class(x) '%s' in compressed_to_TMatrix(x)" #: dgCMatrix.c:93 #, c-format msgid "invalid class(x) '%s' in R_to_CMatrix(x)" msgstr "ungültige class(x) '%s' in R_to_CMatrix(x)" #: dgCMatrix.c:164 msgid "dgCMatrix_lusol requires a square, non-empty matrix" msgstr "dgCMatrix_lusol benötigt eine quadratische, nicht leere Matrix" #: dgCMatrix.c:166 dgCMatrix.c:193 dgCMatrix.c:508 dgCMatrix.c:549 #: dgeMatrix.c:592 dpoMatrix.c:95 dpoMatrix.c:120 dppMatrix.c:80 dspMatrix.c:78 #: dsyMatrix.c:79 dtCMatrix.c:90 dtCMatrix.c:120 dtrMatrix.c:91 msgid "Dimensions of system to be solved are inconsistent" msgstr "Dimensionen des Systems, das gelöst werden soll, sind inkonsistent" #: dgCMatrix.c:168 msgid "cs_lusol failed" msgstr "cs_lusol fehlgeschlagen" #: dgCMatrix.c:190 msgid "dgCMatrix_qrsol(., order) needs order in {0,..,3}" msgstr "dgCMatrix_qrsol(., Anordnung) benötigt Anordnung in {0,..,3}" #: dgCMatrix.c:199 #, c-format msgid "dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrix" msgstr "" "dgCMatrix_qrsol(<%d x %d>-Matrix) benötigt eine 'lange' rechteckige Matrix" #: dgCMatrix.c:210 msgid "cs_qrsol() failed inside dgCMatrix_qrsol()" msgstr "cs_qrsol() innerhalb dgCMatrix_qrsol() fehlgeschlagen" #: dgCMatrix.c:229 msgid "A must have #{rows} >= #{columns}" msgstr "A muss #{rows} >= #{columns} haben" #: dgCMatrix.c:234 msgid "cs_sqr failed" msgstr "cs_sqr fehlgeschlagen" #: dgCMatrix.c:237 msgid "dgcMatrix_QR(*, keep_dimnames = NA): NA taken as TRUE" msgstr "dgcMatrix_QR(*, keep_dimnames = NA): NA taken as TRUE" #: dgCMatrix.c:243 msgid "cs_qr failed" msgstr "cs_qr fehlgeschlagen" #: dgCMatrix.c:329 msgid "SuiteSparseQR_C_QR returned an error code" msgstr "SuiteSparseQR_C_QR gab einen Fehlerkode zurück" #: dgCMatrix.c:373 msgid "LU decomposition applies only to square matrices" msgstr "LU-Zerlegung ist nur bei quadratischen Matrizen anwendbar" #: dgCMatrix.c:382 msgid "cs_lu(A) failed: near-singular A (or out of memory)" msgstr "" "cs_lu(A) fehlgeschlagen: near-Singuläres A (oder außerhalb des Speichers)" #: dgCMatrix.c:468 msgid "dgcMatrix_LU(*, keep_dimnames = NA): NA taken as TRUE" msgstr "dgcMatrix_LU(*, keep_dimnames = NA): NA taken as TRUE" #: dgCMatrix.c:480 msgid "dgCMatrix_matrix_solve(.., sparse=TRUE) not yet implemented" msgstr "dgCMatrix_matrix_solve(.., sparse=TRUE) noch nicht implementiert" #: dgCMatrix.c:547 msgid "dgCMatrix_cholsol requires a 'short, wide' rectangular matrix" msgstr "dgCMatrix_cholsol benötigt eine 'short, wide'-rechteckige Matrix" #: dgCMatrix.c:555 msgid "cholmod_sdmult error (rhs)" msgstr "cholmod_sdmult-Fehler (rhs)" #: dgCMatrix.c:558 #, c-format msgid "cholmod_factorize failed: status %d, minor %d from ncol %d" msgstr "cholmod_factorize fehlgeschlagen: Status %d, Minor %d von ncol %d" #: dgCMatrix.c:562 #, c-format msgid "cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %d" msgstr "" "cholmod_solve (CHOLMOD_A) fehlgeschlagen: Status %d, Minor %d von ncol %d" #: dgCMatrix.c:579 msgid "cholmod_sdmult error (resid)" msgstr "cholmod_sdmult-Fehler (resid)" #: dgTMatrix.c:15 msgid "lengths of slots i and x must match" msgstr "Längen der Slots i und x müssen zusammen passen" #: dgTMatrix.c:33 dgTMatrix.c:62 #, c-format msgid "too large matrix: %.0f" msgstr "" #: dgTMatrix.c:97 #, c-format msgid "Cannot coerce to too large *geMatrix with %.0f entries" msgstr "Kann nicht in eine große *geMatrix mit %.0f Einträgen umwandeln" #: dgeMatrix.c:9 msgid "x slot must be numeric \"double\"" msgstr "x-Slot muss ein numerischer 'double' Wert sein" #: dgeMatrix.c:25 msgid "factors slot must be named list" msgstr "Faktoren-Slot muss eine benannte Liste sein" #: dgeMatrix.c:63 msgid "rcond requires a square, non-empty matrix" msgstr "rcond benötigt eine quadratische, nicht leere Matrix" #: dgeMatrix.c:159 dgeMatrix.c:252 #, c-format msgid "Dimensions of x and y are not compatible for %s" msgstr "Dimensionen von x und y sind nicht kompatibel für %s" #: dgeMatrix.c:231 msgid "Argument y must be numeric, integer or logical" msgstr "Argument y muss numerisch, ganzzahlig oder logisch sein" #: dgeMatrix.c:314 dgeMatrix.c:318 dspMatrix.c:154 dsyMatrix.c:119 #: dtrMatrix.c:127 msgid "Matrices are not conformable for multiplication" msgstr "Matrizen sind nicht für Multiplikation konform" #: dgeMatrix.c:456 msgid "diagonal to be added has wrong length" msgstr "zu addierende Diagonale hat die falsche Länge" #: dgeMatrix.c:475 msgid "Cannot factor a matrix with zero extents" msgstr "Eine Matrix mit Umfang Null kann nicht berücksichtigt werden" #: dgeMatrix.c:486 dpoMatrix.c:46 dppMatrix.c:36 dspMatrix.c:183 #, c-format msgid "Lapack routine %s returned error code %d" msgstr "Lapack-Routine %s gab einen Fehlerkode %d zurück" #: dgeMatrix.c:488 #, c-format msgid "Exact singularity detected during LU decomposition: %s, i=%d." msgstr "Exakte Singularität während LU-Zerlegung entdeckt: %s, i=%d." #: dgeMatrix.c:510 msgid "Determinant requires a square matrix" msgstr "Determinante benötigt eine quadratische Matrix" #: dgeMatrix.c:552 msgid "Solve requires a square matrix" msgstr "Auflösen benötigt eine quadratische Matrix" #: dgeMatrix.c:565 #, c-format msgid "error [%d] from Lapack 'dgecon()'" msgstr "Fehler [%d] von Lapack-'dgecon()'" #: dgeMatrix.c:567 #, c-format msgid "" "Lapack dgecon(): system computationally singular, reciprocal condition " "number = %g" msgstr "" "Lapack-dgecon(): System rechnerisch singulär, reziproke Konditionszahl = %g" #: dgeMatrix.c:577 msgid "Lapack routine dgetri: system is exactly singular" msgstr "Lapack-Routine dgetri: System ist exakt singulär" #: dgeMatrix.c:598 msgid "Lapack routine dgetrs: system is exactly singular" msgstr "Lapack-Routine dgetrs:: System ist exakt singulär" #: dgeMatrix.c:681 msgid "Matrix exponential requires square, non-null matrix" msgstr "Exponentielle Matrix benötigt eine quadratische Matrix ungleich Null" #: dgeMatrix.c:698 dgeMatrix.c:700 #, c-format msgid "dgeMatrix_exp: LAPACK routine dgebal returned %d" msgstr "dgeMatrix_exp: LAPACK-Routine dgebal gab %d zurück" #: dgeMatrix.c:738 #, c-format msgid "dgeMatrix_exp: dgetrf returned error code %d" msgstr "dgeMatrix_exp: dgetrf gab Fehlerkode %d zurück" #: dgeMatrix.c:740 #, c-format msgid "dgeMatrix_exp: dgetrs returned error code %d" msgstr "dgeMatrix_exp: dgetrs gab Fehlerkode %d zurück" #: dgeMatrix.c:813 msgid "dgeMatrix_Schur: argument x must be a non-null square matrix" msgstr "" "dgeMatrix_Schur: Argument x muss eine quadratische Matrix ungleich Null sein" #: dgeMatrix.c:824 msgid "dgeMatrix_Schur: first call to dgees failed" msgstr "dgeMatrix_Schur: Erster Aufruf von dgees fehlgeschlagen" #: dgeMatrix.c:833 #, c-format msgid "dgeMatrix_Schur: dgees returned code %d" msgstr "dgeMatrix_Schur: dgees gab Fehlerkode %d zurück" #: dpoMatrix.c:16 msgid "dpoMatrix is not positive definite" msgstr "dpoMatrix ist nicht positiv definit" #: dpoMatrix.c:43 dppMatrix.c:33 #, c-format msgid "the leading minor of order %d is not positive definite" msgstr "der führende Minor der Ordnung %d ist nicht positiv definit" #: dpoMatrix.c:97 msgid "Cannot solve() for matrices with zero extents" msgstr "solve() für Matrizen mit Umfang Null nicht möglich" #: dpoMatrix.c:118 msgid "Argument b must be a numeric matrix" msgstr "Argument b muss eine numerische Matrix sein" #: dsCMatrix.c:25 msgid "chm_factor_name(): did not get string of length 11" msgstr "chm_factor_name(): habe keine Zeichenkette der Länge 11 bekommen" #: dsCMatrix.c:99 msgid "" "Cholesky factorization failed; unusually, please report to Matrix-authors" msgstr "" "Cholesky-Faktorisierung fehlgeschlagen; ungewöhnlich, bitte an Matrix-" "authors melden!" #: dsCMatrix.c:105 msgid "internal_chm_factor: Cholesky factorization failed" msgstr "internal_chm_factor: Cholesky-Faktorisierung fehlgeschlagen" #: dsCMatrix.c:250 msgid "Non-symmetric matrix passed to dsCMatrix_to_dgTMatrix" msgstr "Nicht symmetrische Matrix an dsCMatrix_to_dgTMatrix übergeben" #: dspMatrix.c:13 dtpMatrix.c:17 msgid "Incorrect length of 'x' slot" msgstr "Falsche Länge von 'x'-Slot" #: dspMatrix.c:146 dsyMatrix.c:112 #, c-format msgid "Matrix dimension %d x %d (= %g) is too large" msgstr "Matrix dimension %d x %d (= %g) ist zu groß" #: dsyMatrix.c:7 dtrMatrix.c:10 msgid "'Dim' slot has length less than two" msgstr "'Dim'-Slot hat eine Länge kleiner zwei" #: dsyMatrix.c:9 dtrMatrix.c:12 msgid "Matrix is not square" msgstr "Matrix ist nicht quadratisch" #: dsyMatrix.c:164 #, c-format msgid "Lapack routine dsytrf returned error code %d" msgstr "Lapack-Routine dsytrf gab Fehlerkode %d zurück" #: dtCMatrix.c:28 dtCMatrix.c:63 dtTMatrix.c:24 msgid "uplo='U' must not have sparse entries below the diagonal" msgstr "" "uplo='U' darf keine dünn besetzten Einträge unterhalb der Diagonale haben" #: dtCMatrix.c:34 dtCMatrix.c:69 dtTMatrix.c:29 msgid "uplo='L' must not have sparse entries above the diagonal" msgstr "" "uplo='L' darf keine dünn besetzten Einträge unterhalb der Diagonale haben" #: dtpMatrix.c:124 dtpMatrix.c:152 dtpMatrix.c:183 #, c-format msgid "Dimensions of a (%d,%d) and b (%d,%d) do not conform" msgstr "Dimensionen von a (%d,%d) und b (%d,%d) sind nicht konform" #: dtpMatrix.c:131 msgid "right=TRUE is not yet implemented __ FIXME" msgstr "right=TRUE ist noch nicht implementiert __ FIXME" #: dtrMatrix.c:125 msgid "dtrMatrix must be square" msgstr "dtrMatrix muss quadratisch sein" #: dtrMatrix.c:188 msgid "\"dtrMatrix\" objects in '%*%' must have matching (square) dimension" msgstr "" "\"dtrMatrix\" Objekte in '%*%' müssen quadratisch mit passender Dimension " "sein" #: dtrMatrix.c:277 msgid "cannot set diag() as long as 'diag = \"U\"'" msgstr "kann diag() nicht setzen solange 'diag = \"U\"'" #: dtrMatrix.c:311 msgid "cannot add diag() as long as 'diag = \"U\"'" msgstr "kann diag() nicht hinzufügen solange 'diag = \"U\"'" #: factorizations.c:18 msgid "x slot is not \"double\"" msgstr "x-Slot ist kein \\\"double\\\"" #: factorizations.c:20 msgid "x slot is not of correct length" msgstr "x-Slot hat nicht die richtige Länge" #: init.c:370 msgid "missing 'Matrix' namespace: should never happen" msgstr "fehlender 'Matrix'-Namensraum: Sollte niemals vorkommen" #: init.c:381 msgid "Matrix namespace not determined correctly" msgstr "Matrix-Namensraum nicht korrekt bestimmt" #: lgCMatrix.c:58 msgid "A must be a logical matrix" msgstr "A muss eine logische Matrix sein" #: sparseQR.c:13 msgid "length(p) must match nrow(V)" msgstr "length(p) muss zu nrow(V) passen" #: sparseQR.c:15 msgid "length(beta) must match ncol(V)" msgstr "length(beta) muss zu ncol(V) passen" #: sparseQR.c:18 msgid "length(q) must be zero or ncol(R)" msgstr "length(q) muss null oder ncol(R) sein" #: sparseQR.c:46 #, c-format msgid "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" msgstr "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" #: sparseQR.c:134 sparseQR.c:175 sparseQR.c:210 #, c-format msgid "%s(): structurally rank deficient case: possibly WRONG zeros" msgstr "%s(): Fall mit strukturellem Rangdefizit: evtl FALSCHE Nullen" #: t_Csparse_subassign.c:144 msgid "invalid class of 'x' in Csparse_subassign()" msgstr "ungültige Klasse von 'x' in Csparse_subassign()" #: t_Csparse_subassign.c:146 msgid "invalid class of 'value' in Csparse_subassign()" msgstr "ungültige Klasse von 'value' in Csparse_subassign()" #: t_Csparse_subassign.c:189 #, c-format msgid "x[] <- val: val is coerced to logical for \"%s\" x" msgstr "x[] <- val: val in booleschen Wert umgewandelt für \"%s\" x" #: t_Csparse_subassign.c:194 #, c-format msgid "" "x[] <- val: val should be integer or logical, is coerced to integer, for \"%s" "\" x" msgstr "" "x[] <- val: val sollte ganzzahlig oder logisch sein, wird in ganze Zahl " "umgewandelt für \"%s\" x" #: t_Csparse_subassign.c:201 msgid "programming error in Csparse_subassign() should never happen" msgstr "Fehler in Csparse_subassign(); sollte niemals vorkommen" #~ msgid "not a CsparseMatrix" #~ msgstr "keine CsparseMatrix" #~ msgid "slot p must have length = ncol(.) + 1" #~ msgstr "Slot p muss Länge = ncol(.) + 1 haben" #~ msgid "last element of slot p must match length of slots i and x" #~ msgstr "" #~ "letztes Element von Slot p muss eine zu den Slots i und x passende Länge " #~ "haben" #~ msgid "all row indices must be between 0 and nrow-1" #~ msgstr "alle Zeilenindizes müssen zwischen 0 und nrow-1 liegen" #~ msgid "" #~ "slot i is not *strictly* increasing inside a column (even after " #~ "cholmod_l_sort)" #~ msgstr "" #~ "Slot i ist nicht *strikt* zunehmend innerhalb einer Spalte (sogar nach " #~ "cholmod_l_sort)" #~ msgid "row indices are not sorted within columns" #~ msgstr "Zeilenindizes sind nicht innerhalb von Spalten sortiert" #~ msgid "slot i is not *strictly* increasing inside a column" #~ msgstr "Slot i ist nicht *strikt* zunehmend innerhalb einer Spalte" #~ msgid "Dimensions of system are inconsistent" #~ msgstr "Dimensionen des Systems sind inkonsistent" #~ msgid "could not find correct environment; please report!" #~ msgstr "korrekte Umgebung konnte nicht gefunden werden. Bitte berichten!" #~ msgid "previous CHOLMOD factorization was unsuccessful" #~ msgstr "frühere CHOLMOD Faktorisierung war nicht erfolgreich" #~ msgid "Negative value(s) in Dim" #~ msgstr "Negative(r) Wert(e) in Dim" #~ msgid "cs_qrsol failed" #~ msgstr "cs_qrsol fehlgeschlagen" #~ msgid "p[np] = %d != nnz = %d" #~ msgstr "p[np] = %d != nnz = %d" #~ msgid "ncol(V) != ncol(R)" #~ msgstr "ncol(V) != ncol(R)" Matrix/po/Matrix.pot0000644000176200001440000005135313047321304014130 0ustar liggesusers# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the Matrix package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Matrix 1.2-9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-10 12:21+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: CHMfactor.c:14 #, c-format msgid "cholmod_change_factor failed with status %d" msgstr "" #: CHMfactor.c:30 CHMfactor.c:60 msgid "system argument is not valid" msgstr "" #: CHMfactor.c:47 #, c-format msgid "cholmod_updown() returned %d" msgstr "" #: CHMfactor.c:103 #, c-format msgid "diagonal element %d of Cholesky factor is missing" msgstr "" #: CHMfactor.c:141 #, c-format msgid "cholmod_factorize_p failed: status %d, minor %d of ncol %d" msgstr "" #: CHMfactor.c:146 msgid "cholmod_change_factor failed" msgstr "" #: Csparse.c:58 msgid "Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrix" msgstr "" #: Csparse.c:76 msgid "slot p must have length = nrow(.) + 1" msgstr "" #: Csparse.c:78 msgid "first element of slot p must be zero" msgstr "" #: Csparse.c:81 msgid "last element of slot p must match length of slots j and x" msgstr "" #: Csparse.c:84 msgid "all column indices must be between 0 and ncol-1" msgstr "" #: Csparse.c:89 msgid "slot p must be non-decreasing" msgstr "" #: Csparse.c:100 msgid "slot j is not increasing inside a column" msgstr "" #: Csparse.c:102 msgid "slot j is not *strictly* increasing inside a column" msgstr "" #: Csparse.c:214 msgid "Csparse_to_nz_pattern(x, tri = NA): 'tri' is taken as TRUE" msgstr "" #: Csparse.c:237 msgid "not a 'n.CMatrix'" msgstr "" #: Csparse.c:267 #, c-format msgid "nz2Csparse(): invalid/non-implemented r_kind = %d" msgstr "" #: Csparse.c:350 msgid "Nonsymmetric matrix in Csparse_symmetric_to_general" msgstr "" #: Csparse.c:361 msgid "Csparse_general_to_symmetric(): matrix is not square!" msgstr "" #: Csparse.c:770 msgid "Csparse_crossprod(): error return from cholmod_aat()" msgstr "" #: Csparse.c:799 msgid "cholmod_drop() failed" msgstr "" #: Csparse.c:825 #, c-format msgid "Impossible Rk_x/Rk_y in Csparse_%s(), please report" msgstr "" #: Csparse.c:827 #, c-format msgid "chm_MOD_xtype() was not successful in Csparse_%s(), please report" msgstr "" #: Csparse.c:931 msgid "Index i must be NULL or integer" msgstr "" #: Csparse.c:933 msgid "Index j must be NULL or integer" msgstr "" #: Csparse.c:992 #, c-format msgid "failure to open file \"%s\" for writing" msgstr "" #: Csparse.c:996 msgid "cholmod_write_sparse returned error code" msgstr "" #: Csparse.c:1095 #, c-format msgid "%s = '%s' (back-permuted) is experimental" msgstr "" #: Csparse.c:1105 msgid "diag_tC(): invalid 'resultKind'" msgstr "" #: Csparse.c:1177 #, c-format msgid "negative vector lengths not allowed: np = %d, nnz = %d" msgstr "" #: Csparse.c:1182 msgid "exactly 1 of 'i', 'j' or 'p' must be NULL" msgstr "" #: Csparse.c:1184 #, c-format msgid "np = %d, must be zero when p is NULL" msgstr "" #: Csparse.c:1187 #, c-format msgid "p[0] = %d, should be zero" msgstr "" #: Csparse.c:1190 msgid "p must be non-decreasing" msgstr "" #: Csparse.c:1206 #, c-format msgid "Inconsistent dimensions: np = 0 and nnz = %d" msgstr "" #: Csparse.c:1214 #, c-format msgid "invalid row index at position %d" msgstr "" #: Csparse.c:1221 #, c-format msgid "invalid column index at position %d" msgstr "" #: Csparse.c:1231 #, c-format msgid "strlen of cls argument = %d, should be 8" msgstr "" #: Csparse.c:1233 #, c-format msgid "cls = \"%s\" does not end in \"CMatrix\"" msgstr "" #: Csparse.c:1243 #, c-format msgid "cls = \"%s\" must begin with 'd', 'l' or 'n'" msgstr "" #: Csparse.c:1246 msgid "Only 'g'eneral sparse matrix types allowed" msgstr "" #: Csparse.c:1274 msgid "code not yet written for cls = \"lgCMatrix\"" msgstr "" #: Mutils.c:14 Mutils.c:33 #, c-format msgid "argument type[1]='%s' must be a one-letter character string" msgstr "" #: Mutils.c:22 #, c-format msgid "argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'" msgstr "" #: Mutils.c:39 #, c-format msgid "argument type[1]='%s' must be one of '1','O', or 'I'" msgstr "" #: Mutils.c:50 Mutils.c:66 msgid "object must be a named, numeric vector" msgstr "" #: Mutils.c:113 Mutils.c:137 msgid "'factors' slot must be a named list" msgstr "" #: Mutils.c:172 msgid "Matrix object has no 'factors' slot" msgstr "" #: Mutils.c:262 #, c-format msgid "'%s' slot must have length 1" msgstr "" #: Mutils.c:266 #, c-format msgid "'%s' must have string length 1" msgstr "" #: Mutils.c:273 #, c-format msgid "'%s' must be in '%s'" msgstr "" #: Mutils.c:292 msgid "'s1' and 's2' must be \"character\" vectors" msgstr "" #: Mutils.c:314 msgid "length of x slot != prod(Dim)" msgstr "" #: Mutils.c:320 msgid "Dim slot must have length 2" msgstr "" #: Mutils.c:325 msgid "Dim slot is not integer" msgstr "" #: Mutils.c:331 msgid "Negative value in Dim" msgid_plural "Negative values in Dim" msgstr[0] "" msgstr[1] "" #: Mutils.c:348 msgid "Dimnames slot is not a list" msgstr "" #: Mutils.c:350 msgid "Dimnames slot is a list, but not of length 2" msgstr "" #: Mutils.c:355 #, c-format msgid "Dimnames[%d] is not a character vector" msgstr "" #: Mutils.c:360 #, c-format msgid "length(Dimnames[%d]) differs from Dim[%d] which is %d" msgstr "" #: Mutils.c:387 Mutils.c:413 msgid "'uplo' must be UPP or LOW" msgstr "" #: Mutils.c:468 dgeMatrix.c:420 dtrMatrix.c:282 msgid "replacement diagonal has wrong length" msgstr "" #: Mutils.c:683 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_geMatrix" msgstr "" #: Mutils.c:813 #, c-format msgid "unexpected ctype = %d in dup_mMatrix_as_geMatrix" msgstr "" #: Mutils.c:841 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_dgeMatrix" msgstr "" #: Mutils.c:891 msgid "Argument ij must be 2-column integer matrix" msgstr "" #: Mutils.c:910 msgid "subscript 'i' out of bounds in M[ij]" msgstr "" #: Mutils.c:912 msgid "subscript 'j' out of bounds in M[ij]" msgstr "" #: Mutils.c:956 msgid "i and j must be integer vectors of the same length" msgstr "" #: Mutils.c:1001 msgid "'data' must be of a vector type" msgstr "" #: Mutils.c:1008 #, c-format msgid "invalid '%s' argument" msgstr "" #: Mutils.c:1015 Mutils.c:1023 msgid "non-numeric matrix extent" msgstr "" #: Mutils.c:1018 msgid "invalid 'nrow' value (too large or NA)" msgstr "" #: Mutils.c:1020 msgid "invalid 'nrow' value (< 0)" msgstr "" #: Mutils.c:1026 msgid "invalid 'ncol' value (too large or NA)" msgstr "" #: Mutils.c:1028 msgid "invalid 'ncol' value (< 0)" msgstr "" #: Mutils.c:1046 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]" msgstr "" #: Mutils.c:1049 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of columns " "[%d]" msgstr "" #: Mutils.c:1052 msgid "data length exceeds size of matrix" msgstr "" #: Mutils.c:1058 msgid "too many elements specified" msgstr "" #: Mutils.c:1131 #, c-format msgid "the number of columns differ in R_rbind2_vector: %d != %d" msgstr "" #: Mutils.c:1185 Mutils.c:1216 Mutils.c:1227 Mutils.c:1254 msgid "Argument must be numeric-like atomic vector" msgstr "" #: Tsparse.c:20 msgid "lengths of slots i and j must match" msgstr "" #: Tsparse.c:23 msgid "slot Dim must have length 2" msgstr "" #: Tsparse.c:27 msgid "" "all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrix" msgstr "" #: Tsparse.c:29 msgid "" "all column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrix" msgstr "" #: chm_common.c:76 msgid "Argument rho must be an environment" msgstr "" #: chm_common.c:253 msgid "invalid class of object to as_cholmod_sparse" msgstr "" #: chm_common.c:255 msgid "invalid object passed to as_cholmod_sparse" msgstr "" #: chm_common.c:282 msgid "in_place cholmod_sort returned an error code" msgstr "" #: chm_common.c:288 msgid "cholmod_sort returned an error code" msgstr "" #: chm_common.c:370 msgid "chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)" msgstr "" #: chm_common.c:378 msgid "unknown xtype in cholmod_sparse object" msgstr "" #: chm_common.c:407 chm_common.c:638 chm_common.c:916 chm_common.c:966 msgid "complex sparse matrix code not yet written" msgstr "" #: chm_common.c:412 chm_common.c:643 msgid "Symmetric and triangular both set" msgstr "" #: chm_common.c:488 msgid "invalid class of object to as_cholmod_triplet" msgstr "" #: chm_common.c:512 msgid "as_cholmod_triplet(): could not reallocate for internal diagU2N()" msgstr "" #: chm_common.c:610 msgid "unknown xtype in cholmod_triplet object" msgstr "" #: chm_common.c:689 msgid "invalid class of object to as_cholmod_dense" msgstr "" #: chm_common.c:757 #, c-format msgid "" "chm_transpose_dense(ans, x) not yet implemented for %s different from %s" msgstr "" #: chm_common.c:781 #, c-format msgid "Cholmod error '%s' at file %s, line %d" msgstr "" #: chm_common.c:785 #, c-format msgid "Cholmod warning '%s' at file %s, line %d" msgstr "" #: chm_common.c:814 #, c-format msgid "Unable to initialize cholmod: error code %d" msgstr "" #: chm_common.c:860 msgid "unknown 'Rkind'" msgstr "" #: chm_common.c:867 chm_common.c:952 msgid "unknown xtype" msgstr "" #: chm_common.c:922 chm_common.c:975 msgid "code for cholmod_dense with holes not yet written" msgstr "" #: chm_common.c:971 msgid "don't know if a dense pattern matrix makes sense" msgstr "" #: chm_common.c:1038 msgid "invalid class of object to as_cholmod_factor" msgstr "" #: chm_common.c:1052 msgid "Supernodal LDL' decomposition not available" msgstr "" #: chm_common.c:1054 msgid "Supernodal/simplicial class inconsistent with type flags" msgstr "" #: chm_common.c:1072 msgid "Number of supernodes must be positive when is_super is TRUE" msgstr "" #: chm_common.c:1075 msgid "Lengths of super and pi must be equal" msgstr "" #: chm_common.c:1079 msgid "Lengths of super and px must be equal" msgstr "" #: chm_common.c:1092 msgid "failure in as_cholmod_factor" msgstr "" #: chm_common.c:1120 msgid "CHOLMOD factorization was unsuccessful" msgstr "" #: chm_common.c:1133 #, c-format msgid "f->xtype of %d not recognized" msgstr "" #: chm_common.c:1198 #, c-format msgid "chm_diagN2U(): nrow=%d, ncol=%d" msgstr "" #: chm_common.c:1241 #, c-format msgid "chm_diagN2U(x, uploT = %d): uploT should be +- 1" msgstr "" #: cs_utils.c:37 msgid "csp_eye argument n must be positive" msgstr "" #: cs_utils.c:68 msgid "invalid class of 'x' in Matrix_as_cs(a, x)" msgstr "" #: cs_utils.c:127 cs_utils.c:174 cs_utils.c:189 cs_utils.c:209 cs_utils.c:222 #, c-format msgid "invalid class of object to %s" msgstr "" #: cs_utils.c:141 #, c-format msgid "cs matrix not compatible with class '%s'" msgstr "" #: cs_utils.c:246 cs_utils.c:265 #, c-format msgid "Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)" msgstr "" #: cs_utils.c:292 cs_utils.c:311 #, c-format msgid "Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)" msgstr "" #: dense.c:29 #, c-format msgid "incorrect left cyclic shift, j (%d) >= k (%d)" msgstr "" #: dense.c:31 #, c-format msgid "incorrect left cyclic shift, j (%d) < 0" msgstr "" #: dense.c:33 #, c-format msgid "incorrect left cyclic shift, k (%d) > ldx (%d)" msgstr "" #: dense.c:78 msgid "Unknown error in getGivens" msgstr "" #: dense.c:90 dense.c:106 dense.c:139 msgid "X must be a numeric (double precision) matrix" msgstr "" #: dense.c:111 dense.c:144 msgid "y must be a numeric (double precision) matrix" msgstr "" #: dense.c:115 dense.c:148 #, c-format msgid "number of rows in y (%d) does not match number of rows in X (%d)" msgstr "" #: dense.c:126 #, c-format msgid "Lapack routine dposv returned error code %d" msgstr "" #: dense.c:158 #, c-format msgid "First call to Lapack routine dgels returned error code %d" msgstr "" #: dense.c:165 #, c-format msgid "Second call to Lapack routine dgels returned error code %d" msgstr "" #: dense.c:178 msgid "X must be a real (numeric) matrix" msgstr "" #: dense.c:179 #, c-format msgid "tol, given as %g, must be non-negative" msgstr "" #: dense.c:180 #, c-format msgid "tol, given as %g, must be <= 1" msgstr "" #: dense.c:204 #, c-format msgid "First call to dgeqrf returned error code %d" msgstr "" #: dense.c:210 #, c-format msgid "Second call to dgeqrf returned error code %d" msgstr "" #: dense.c:215 dense.c:235 #, c-format msgid "Lapack routine dtrcon returned error code %d" msgstr "" #: dense.c:287 #, c-format msgid "Lower band %d > upper band %d" msgstr "" #: dense.c:358 msgid "ddense_to_symmetric(): matrix is not square!" msgstr "" #: dense.c:369 #, c-format msgid "matrix is not symmetric [%d,%d]" msgstr "" #: dense.c:430 msgid "matrix is not square! (symmetric part)" msgstr "" #: dense.c:488 msgid "matrix is not square! (skew-symmetric part)" msgstr "" #: dgCMatrix.c:24 msgid "lengths of slots 'i' and 'x' must match" msgstr "" #: dgCMatrix.c:36 msgid "lengths of slots 'j' and 'x' must match" msgstr "" #: dgCMatrix.c:58 #, c-format msgid "invalid class(x) '%s' in compressed_to_TMatrix(x)" msgstr "" #: dgCMatrix.c:93 #, c-format msgid "invalid class(x) '%s' in R_to_CMatrix(x)" msgstr "" #: dgCMatrix.c:164 msgid "dgCMatrix_lusol requires a square, non-empty matrix" msgstr "" #: dgCMatrix.c:166 dgCMatrix.c:193 dgCMatrix.c:508 dgCMatrix.c:549 #: dgeMatrix.c:592 dpoMatrix.c:95 dpoMatrix.c:120 dppMatrix.c:80 dspMatrix.c:78 #: dsyMatrix.c:79 dtCMatrix.c:90 dtCMatrix.c:120 dtrMatrix.c:91 msgid "Dimensions of system to be solved are inconsistent" msgstr "" #: dgCMatrix.c:168 msgid "cs_lusol failed" msgstr "" #: dgCMatrix.c:190 msgid "dgCMatrix_qrsol(., order) needs order in {0,..,3}" msgstr "" #: dgCMatrix.c:199 #, c-format msgid "dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrix" msgstr "" #: dgCMatrix.c:210 msgid "cs_qrsol() failed inside dgCMatrix_qrsol()" msgstr "" #: dgCMatrix.c:229 msgid "A must have #{rows} >= #{columns}" msgstr "" #: dgCMatrix.c:234 msgid "cs_sqr failed" msgstr "" #: dgCMatrix.c:237 msgid "dgcMatrix_QR(*, keep_dimnames = NA): NA taken as TRUE" msgstr "" #: dgCMatrix.c:243 msgid "cs_qr failed" msgstr "" #: dgCMatrix.c:329 msgid "SuiteSparseQR_C_QR returned an error code" msgstr "" #: dgCMatrix.c:373 msgid "LU decomposition applies only to square matrices" msgstr "" #: dgCMatrix.c:382 msgid "cs_lu(A) failed: near-singular A (or out of memory)" msgstr "" #: dgCMatrix.c:468 msgid "dgcMatrix_LU(*, keep_dimnames = NA): NA taken as TRUE" msgstr "" #: dgCMatrix.c:480 msgid "dgCMatrix_matrix_solve(.., sparse=TRUE) not yet implemented" msgstr "" #: dgCMatrix.c:547 msgid "dgCMatrix_cholsol requires a 'short, wide' rectangular matrix" msgstr "" #: dgCMatrix.c:555 msgid "cholmod_sdmult error (rhs)" msgstr "" #: dgCMatrix.c:558 #, c-format msgid "cholmod_factorize failed: status %d, minor %d from ncol %d" msgstr "" #: dgCMatrix.c:562 #, c-format msgid "cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %d" msgstr "" #: dgCMatrix.c:579 msgid "cholmod_sdmult error (resid)" msgstr "" #: dgTMatrix.c:15 msgid "lengths of slots i and x must match" msgstr "" #: dgTMatrix.c:33 dgTMatrix.c:62 #, c-format msgid "too large matrix: %.0f" msgstr "" #: dgTMatrix.c:97 #, c-format msgid "Cannot coerce to too large *geMatrix with %.0f entries" msgstr "" #: dgeMatrix.c:9 msgid "x slot must be numeric \"double\"" msgstr "" #: dgeMatrix.c:25 msgid "factors slot must be named list" msgstr "" #: dgeMatrix.c:63 msgid "rcond requires a square, non-empty matrix" msgstr "" #: dgeMatrix.c:159 dgeMatrix.c:252 #, c-format msgid "Dimensions of x and y are not compatible for %s" msgstr "" #: dgeMatrix.c:231 msgid "Argument y must be numeric, integer or logical" msgstr "" #: dgeMatrix.c:314 dgeMatrix.c:318 dspMatrix.c:154 dsyMatrix.c:119 #: dtrMatrix.c:127 msgid "Matrices are not conformable for multiplication" msgstr "" #: dgeMatrix.c:456 msgid "diagonal to be added has wrong length" msgstr "" #: dgeMatrix.c:475 msgid "Cannot factor a matrix with zero extents" msgstr "" #: dgeMatrix.c:486 dpoMatrix.c:46 dppMatrix.c:36 dspMatrix.c:183 #, c-format msgid "Lapack routine %s returned error code %d" msgstr "" #: dgeMatrix.c:488 #, c-format msgid "Exact singularity detected during LU decomposition: %s, i=%d." msgstr "" #: dgeMatrix.c:510 msgid "Determinant requires a square matrix" msgstr "" #: dgeMatrix.c:552 msgid "Solve requires a square matrix" msgstr "" #: dgeMatrix.c:565 #, c-format msgid "error [%d] from Lapack 'dgecon()'" msgstr "" #: dgeMatrix.c:567 #, c-format msgid "" "Lapack dgecon(): system computationally singular, reciprocal condition " "number = %g" msgstr "" #: dgeMatrix.c:577 msgid "Lapack routine dgetri: system is exactly singular" msgstr "" #: dgeMatrix.c:598 msgid "Lapack routine dgetrs: system is exactly singular" msgstr "" #: dgeMatrix.c:681 msgid "Matrix exponential requires square, non-null matrix" msgstr "" #: dgeMatrix.c:698 dgeMatrix.c:700 #, c-format msgid "dgeMatrix_exp: LAPACK routine dgebal returned %d" msgstr "" #: dgeMatrix.c:738 #, c-format msgid "dgeMatrix_exp: dgetrf returned error code %d" msgstr "" #: dgeMatrix.c:740 #, c-format msgid "dgeMatrix_exp: dgetrs returned error code %d" msgstr "" #: dgeMatrix.c:813 msgid "dgeMatrix_Schur: argument x must be a non-null square matrix" msgstr "" #: dgeMatrix.c:824 msgid "dgeMatrix_Schur: first call to dgees failed" msgstr "" #: dgeMatrix.c:833 #, c-format msgid "dgeMatrix_Schur: dgees returned code %d" msgstr "" #: dpoMatrix.c:16 msgid "dpoMatrix is not positive definite" msgstr "" #: dpoMatrix.c:43 dppMatrix.c:33 #, c-format msgid "the leading minor of order %d is not positive definite" msgstr "" #: dpoMatrix.c:97 msgid "Cannot solve() for matrices with zero extents" msgstr "" #: dpoMatrix.c:118 msgid "Argument b must be a numeric matrix" msgstr "" #: dsCMatrix.c:25 msgid "chm_factor_name(): did not get string of length 11" msgstr "" #: dsCMatrix.c:99 msgid "" "Cholesky factorization failed; unusually, please report to Matrix-authors" msgstr "" #: dsCMatrix.c:105 msgid "internal_chm_factor: Cholesky factorization failed" msgstr "" #: dsCMatrix.c:250 msgid "Non-symmetric matrix passed to dsCMatrix_to_dgTMatrix" msgstr "" #: dspMatrix.c:13 dtpMatrix.c:17 msgid "Incorrect length of 'x' slot" msgstr "" #: dspMatrix.c:146 dsyMatrix.c:112 #, c-format msgid "Matrix dimension %d x %d (= %g) is too large" msgstr "" #: dsyMatrix.c:7 dtrMatrix.c:10 msgid "'Dim' slot has length less than two" msgstr "" #: dsyMatrix.c:9 dtrMatrix.c:12 msgid "Matrix is not square" msgstr "" #: dsyMatrix.c:164 #, c-format msgid "Lapack routine dsytrf returned error code %d" msgstr "" #: dtCMatrix.c:28 dtCMatrix.c:63 dtTMatrix.c:24 msgid "uplo='U' must not have sparse entries below the diagonal" msgstr "" #: dtCMatrix.c:34 dtCMatrix.c:69 dtTMatrix.c:29 msgid "uplo='L' must not have sparse entries above the diagonal" msgstr "" #: dtpMatrix.c:124 dtpMatrix.c:152 dtpMatrix.c:183 #, c-format msgid "Dimensions of a (%d,%d) and b (%d,%d) do not conform" msgstr "" #: dtpMatrix.c:131 msgid "right=TRUE is not yet implemented __ FIXME" msgstr "" #: dtrMatrix.c:125 msgid "dtrMatrix must be square" msgstr "" #: dtrMatrix.c:188 msgid "\"dtrMatrix\" objects in '%*%' must have matching (square) dimension" msgstr "" #: dtrMatrix.c:277 msgid "cannot set diag() as long as 'diag = \"U\"'" msgstr "" #: dtrMatrix.c:311 msgid "cannot add diag() as long as 'diag = \"U\"'" msgstr "" #: factorizations.c:18 msgid "x slot is not \"double\"" msgstr "" #: factorizations.c:20 msgid "x slot is not of correct length" msgstr "" #: init.c:370 msgid "missing 'Matrix' namespace: should never happen" msgstr "" #: init.c:381 msgid "Matrix namespace not determined correctly" msgstr "" #: lgCMatrix.c:58 msgid "A must be a logical matrix" msgstr "" #: sparseQR.c:13 msgid "length(p) must match nrow(V)" msgstr "" #: sparseQR.c:15 msgid "length(beta) must match ncol(V)" msgstr "" #: sparseQR.c:18 msgid "length(q) must be zero or ncol(R)" msgstr "" #: sparseQR.c:46 #, c-format msgid "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" msgstr "" #: sparseQR.c:134 sparseQR.c:175 sparseQR.c:210 #, c-format msgid "%s(): structurally rank deficient case: possibly WRONG zeros" msgstr "" #: t_Csparse_subassign.c:144 msgid "invalid class of 'x' in Csparse_subassign()" msgstr "" #: t_Csparse_subassign.c:146 msgid "invalid class of 'value' in Csparse_subassign()" msgstr "" #: t_Csparse_subassign.c:189 #, c-format msgid "x[] <- val: val is coerced to logical for \"%s\" x" msgstr "" #: t_Csparse_subassign.c:194 #, c-format msgid "" "x[] <- val: val should be integer or logical, is coerced to integer, for \"%s" "\" x" msgstr "" #: t_Csparse_subassign.c:201 msgid "programming error in Csparse_subassign() should never happen" msgstr "" Matrix/po/pl.po0000644000176200001440000016256513047321304013123 0ustar liggesusersmsgid "" msgstr "" "Project-Id-Version: Matrix 1.1-2-2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-10 12:21+0100\n" "PO-Revision-Date: 2014-03-24 17:53+0100\n" "Last-Translator: Łukasz Daniel \n" "Language-Team: Łukasz Daniel \n" "Language: pl_PL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" "X-Poedit-SourceCharset: iso-8859-1\n" "X-Generator: Poedit 1.5.4\n" # Matrix/src/CHMfactor.c: 14 # error(_("cholmod_change_factor failed with status %d"), c.status) #: CHMfactor.c:14 #, c-format msgid "cholmod_change_factor failed with status %d" msgstr "'cholmod_change_factor' nie powiódł się zwracając status %d" # Matrix/src/CHMfactor.c: 30 # error(_("system argument is not valid")) # Matrix/src/CHMfactor.c: 60 # error(_("system argument is not valid")) #: CHMfactor.c:30 CHMfactor.c:60 msgid "system argument is not valid" msgstr "argument systemowy nie jest poprawny" # Matrix/src/CHMfactor.c: 47 # error(_("cholmod_updown() returned %d"), r) #: CHMfactor.c:47 #, c-format msgid "cholmod_updown() returned %d" msgstr "cholmod_updown() zwróciło %d" # Matrix/src/CHMfactor.c: 97 # error(_("diagonal element %d of Cholesky factor is missing"), j) #: CHMfactor.c:103 #, c-format msgid "diagonal element %d of Cholesky factor is missing" msgstr "brakuje elementu diagonalnego %d czynnika Cholesky'ego" # Matrix/src/CHMfactor.c: 135 # error(_("cholmod_factorize_p failed: status %d, minor %d of ncol %d"), # c.status, f->minor, f->n) #: CHMfactor.c:141 #, c-format msgid "cholmod_factorize_p failed: status %d, minor %d of ncol %d" msgstr "" "'cholmod_factorize_p' nie powiódł się: status %d, minor %d liczba kolumn %d" # Matrix/src/CHMfactor.c: 140 # error(_("cholmod_change_factor failed")) #: CHMfactor.c:146 msgid "cholmod_change_factor failed" msgstr "'cholmod_change_factor' nie powiódł się" # Matrix/src/Csparse.c: 55 # warning(_("Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrix")) #: Csparse.c:58 msgid "Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrix" msgstr "" "Csparse_sort(x): 'x' nie jest poprawnym (niezależnie od sortowania) obiektem " "klasy \"CsparseMatrix\"" # Matrix/src/Csparse.c: 73 # (_("slot p must have length = nrow(.) + 1")) #: Csparse.c:76 msgid "slot p must have length = nrow(.) + 1" msgstr "gniazdo 'p' musi mieć długość = nrow(.) + 1" # Matrix/src/Csparse.c: 75 # (_("first element of slot p must be zero")) #: Csparse.c:78 msgid "first element of slot p must be zero" msgstr "pierwszy element gniazda 'p' musi być zerem" # Matrix/src/Csparse.c: 78 # (_("last element of slot p must match length of slots j and x")) #: Csparse.c:81 msgid "last element of slot p must match length of slots j and x" msgstr "" "ostatni element gniazda 'p' musi zgadzać się długością z gniazdem 'j' oraz " "'x'" # Matrix/src/Csparse.c: 81 # (_("all column indices must be between 0 and ncol-1")) #: Csparse.c:84 msgid "all column indices must be between 0 and ncol-1" msgstr "wszystkie indeksy kolumn muszą być pomiędzy 0 a 'ncol-1'" # Matrix/src/Csparse.c: 86 # (_("slot p must be non-decreasing")) #: Csparse.c:89 msgid "slot p must be non-decreasing" msgstr "gniazdo 'p' musi być niemalejące" # Matrix/src/Csparse.c: 97 # (_("slot j is not increasing inside a column")) #: Csparse.c:100 msgid "slot j is not increasing inside a column" msgstr "gniazdo 'j' nie jest rosnące wewnątrz kolumny" # Matrix/src/Csparse.c: 99 # (_("slot j is not *strictly* increasing inside a column")) #: Csparse.c:102 msgid "slot j is not *strictly* increasing inside a column" msgstr "gniazdo 'j' nie jest *ściśle* rosnące wewnątrz kolumny" #: Csparse.c:214 msgid "Csparse_to_nz_pattern(x, tri = NA): 'tri' is taken as TRUE" msgstr "" #: Csparse.c:237 msgid "not a 'n.CMatrix'" msgstr "to nie jest 'n.Cmatrix'" # Matrix/src/Csparse.c: 172 # error(_("nz2Csparse(): invalid/non-implemented r_kind = %d"), # r_kind) #: Csparse.c:267 #, c-format msgid "nz2Csparse(): invalid/non-implemented r_kind = %d" msgstr "nz2Csparse(): niepoprawny/niezaimplementowany 'r_kind = %d'" # Matrix/src/Csparse.c: 221 # error(_("Nonsymmetric matrix in Csparse_symmetric_to_general")) #: Csparse.c:350 msgid "Nonsymmetric matrix in Csparse_symmetric_to_general" msgstr "Niesymetryczna macierz w 'Csparse_symmetric_to_general'" # Matrix/src/Csparse.c: 232 # error(_("Csparse_general_to_symmetric(): matrix is not square!")) #: Csparse.c:361 msgid "Csparse_general_to_symmetric(): matrix is not square!" msgstr "Csparse_general_to_symmetric(): macierz nie jest kwadratowa!" # Matrix/src/Csparse.c: 423 # error(_("Csparse_crossprod(): error return from cholmod_aat()")) #: Csparse.c:770 msgid "Csparse_crossprod(): error return from cholmod_aat()" msgstr "Csparse_crossprod(): błąd zwrócony z 'cholmod_aat()'" # Matrix/src/Csparse.c: 455 # error(_("cholmod_drop() failed")) #: Csparse.c:799 msgid "cholmod_drop() failed" msgstr "'cholmod_drop()' nie powiódł się" #: Csparse.c:825 #, c-format msgid "Impossible Rk_x/Rk_y in Csparse_%s(), please report" msgstr "" #: Csparse.c:827 #, c-format msgid "chm_MOD_xtype() was not successful in Csparse_%s(), please report" msgstr "" # Matrix/src/Csparse.c: 568 # error(_("Index i must be NULL or integer")) #: Csparse.c:931 msgid "Index i must be NULL or integer" msgstr "Indeks 'i' musi być wartością NULL lub być liczbą całkowitą" # Matrix/src/Csparse.c: 570 # error(_("Index j must be NULL or integer")) #: Csparse.c:933 msgid "Index j must be NULL or integer" msgstr "Indeks 'j' musi być wartością NULL lub być liczbą całkowitą" # Matrix/src/Csparse.c: 612 # error(_("failure to open file \"%s\" for writing"), # CHAR(asChar(fname))) #: Csparse.c:992 #, c-format msgid "failure to open file \"%s\" for writing" msgstr "nie udało się otworzyć pliku '%s' do zapisu" # Matrix/src/Csparse.c: 616 # error(_("cholmod_write_sparse returned error code")) #: Csparse.c:996 msgid "cholmod_write_sparse returned error code" msgstr "'cholmod_write_sparse' zwrócił kod błędu" # Matrix/src/Csparse.c: 689 # warning(_("%s = '%s' (back-permuted) is experimental"), # "resultKind", "diagBack") #: Csparse.c:1095 #, c-format msgid "%s = '%s' (back-permuted) is experimental" msgstr "%s = '%s' (wstecznie permutowany) jest eksperymentalny" # Matrix/src/Csparse.c: 699 # error(_("diag_tC(): invalid 'resultKind'")) #: Csparse.c:1105 msgid "diag_tC(): invalid 'resultKind'" msgstr "diag_tC(): niepoprawny 'resultKind'" # Matrix/src/Csparse.c: 760 # error(_("negative vector lengths not allowed: np = %d, nnz = %d"), # np, nnz) #: Csparse.c:1177 #, c-format msgid "negative vector lengths not allowed: np = %d, nnz = %d" msgstr "ujemne długości wektora nie są dozwolone: np = %d, nnz = %d" # Matrix/src/Csparse.c: 765 # error(_("exactly 1 of 'i', 'j' or 'p' must be NULL")) #: Csparse.c:1182 msgid "exactly 1 of 'i', 'j' or 'p' must be NULL" msgstr "dokładnie jeden z 'i', 'j' lub 'p' musi być wartością NULL" # Matrix/src/Csparse.c: 767 # error(_("np = %d, must be zero when p is NULL"), np) #: Csparse.c:1184 #, c-format msgid "np = %d, must be zero when p is NULL" msgstr "np = %d, musi wynosić zero gdy 'p' ma wartość NULL" # Matrix/src/Csparse.c: 770 # error(_("p[0] = %d, should be zero"), p[0]) #: Csparse.c:1187 #, c-format msgid "p[0] = %d, should be zero" msgstr "'p[0] = %d', powinno być zero" # Matrix/src/Csparse.c: 773 # error(_("p must be non-decreasing")) #: Csparse.c:1190 msgid "p must be non-decreasing" msgstr "'p' musi być niemalejące" # Matrix/src/Csparse.c: 789 # error(_("Inconsistent dimensions: np = 0 and nnz = %d"), # nnz) #: Csparse.c:1206 #, c-format msgid "Inconsistent dimensions: np = 0 and nnz = %d" msgstr "Niespójne wymiary: 'np = 0' oraz 'nnz = %d'" # Matrix/src/Csparse.c: 797 # error(_("invalid row index at position %d"), ii) #: Csparse.c:1214 #, c-format msgid "invalid row index at position %d" msgstr "niepoprawny indeks wiersza na pozycji %d" # Matrix/src/Csparse.c: 804 # error(_("invalid column index at position %d"), jj) #: Csparse.c:1221 #, c-format msgid "invalid column index at position %d" msgstr "niepoprawny indeks kolumny na pozycji %d" # Matrix/src/Csparse.c: 814 # error(_("strlen of cls argument = %d, should be 8"), strlen(cls)) #: Csparse.c:1231 #, c-format msgid "strlen of cls argument = %d, should be 8" msgstr "długość argumentu 'cls = %d', powinna wynosić 8" # Matrix/src/Csparse.c: 816 # error(_("cls = \"%s\" does not end in \"CMatrix\""), cls) #: Csparse.c:1233 #, c-format msgid "cls = \"%s\" does not end in \"CMatrix\"" msgstr "'cls = \"%s\"' nie kończy się w 'CMatrix'" # Matrix/src/Csparse.c: 826 # error(_("cls = \"%s\" must begin with 'd', 'l' or 'n'"), cls) #: Csparse.c:1243 #, c-format msgid "cls = \"%s\" must begin with 'd', 'l' or 'n'" msgstr "'cls = \"%s\"' musi rozpoczynać się od 'd', 'l' lub 'n'" # Matrix/src/Csparse.c: 829 # error(_("Only 'g'eneral sparse matrix types allowed")) #: Csparse.c:1246 msgid "Only 'g'eneral sparse matrix types allowed" msgstr "Tylko ogólne ('g') typy rzadkich macierzy są dozwolone" # Matrix/src/Csparse.c: 857 # error(_("code not yet written for cls = \"lgCMatrix\"")) #: Csparse.c:1274 msgid "code not yet written for cls = \"lgCMatrix\"" msgstr "kod dla 'cls = \"lgCMatrix\"' nie został jeszcze napisany" # Matrix/src/Mutils.c: 13 # error( # _("argument type[1]='%s' must be a one-letter character string"), # typstr) # Matrix/src/Mutils.c: 32 # error( # _("argument type[1]='%s' must be a one-letter character string"), # typstr) #: Mutils.c:14 Mutils.c:33 #, c-format msgid "argument type[1]='%s' must be a one-letter character string" msgstr "argument type[1]='%s' musi być jednoliterowym łańcuchem tekstowym" # Matrix/src/Mutils.c: 22 # error(_("argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'"), # typstr) #: Mutils.c:22 #, c-format msgid "argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'" msgstr "argument type[1]='%s' musi być jednym z 'M','1','O','I','F' lub 'E'" # Matrix/src/Mutils.c: 39 # error(_("argument type[1]='%s' must be one of '1','O', or 'I'"), # typstr) #: Mutils.c:39 #, c-format msgid "argument type[1]='%s' must be one of '1','O', or 'I'" msgstr "argument type[1]='%s' musi być jednym z '1','O', lub 'I'" # Matrix/src/Mutils.c: 50 # error(_("object must be a named, numeric vector")) # Matrix/src/Mutils.c: 66 # error(_("object must be a named, numeric vector")) #: Mutils.c:50 Mutils.c:66 msgid "object must be a named, numeric vector" msgstr "obiekt musi być nazwanym wektorem liczbowym" # Matrix/src/Mutils.c: 113 # error(_("'factors' slot must be a named list")) # Matrix/src/Mutils.c: 137 # error(_("'factors' slot must be a named list")) #: Mutils.c:113 Mutils.c:137 msgid "'factors' slot must be a named list" msgstr "gniazdo 'factors' musi być nazwaną listą" #: Mutils.c:172 msgid "Matrix object has no 'factors' slot" msgstr "" # Matrix/src/Mutils.c: 257 # _("'%s' slot must have length 1") #: Mutils.c:262 #, c-format msgid "'%s' slot must have length 1" msgstr "gniazdo '%s' musi mieć długość 1" # Matrix/src/Mutils.c: 261 # _("'%s' must have string length 1") #: Mutils.c:266 #, c-format msgid "'%s' must have string length 1" msgstr "'%s' musi mieć łańcuch długości 1" # Matrix/src/Mutils.c: 268 # _("'%s' must be in '%s'") #: Mutils.c:273 #, c-format msgid "'%s' must be in '%s'" msgstr "'%s' musi być w '%s'" # Matrix/src/Mutils.c: 287 # error(_("'s1' and 's2' must be \"character\" vectors")) #: Mutils.c:292 msgid "'s1' and 's2' must be \"character\" vectors" msgstr "'s1' oraz 's2' muszą być wektorami tekstowymi" # Matrix/src/Mutils.c: 309 # (_("length of 'x' slot is not equal to 'prod(Dim)'")) #: Mutils.c:314 msgid "length of x slot != prod(Dim)" msgstr "długość gniazda 'x' nie równa się 'prod(Dim)'" # Matrix/src/dgeMatrix.c: 11 # (_("'Dim' slot must have length 2")) #: Mutils.c:320 msgid "Dim slot must have length 2" msgstr "gniazdo 'Dim' musi mieć długość 2" # Matrix/src/dgeMatrix.c: 19 # (_("'x' slot must be numeric \"double\"")) #: Mutils.c:325 #, fuzzy msgid "Dim slot is not integer" msgstr "gniazdo 'x' musi być liczbą typu \"double\"" # Matrix/src/dgeMatrix.c: 14 # ngettext("Matrix", # "Negative value in 'Dim' slot", # "Negative values in 'Dim' slot", # (m*n > 0) ? 2 : 1) #: Mutils.c:331 msgid "Negative value in Dim" msgid_plural "Negative values in Dim" msgstr[0] "Ujemna wartość w gnieździe 'Dim'" msgstr[1] "Ujemne wartości w gnieździe 'Dim'" msgstr[2] "Ujemne wartości w gnieździe 'Dim'" #: Mutils.c:348 msgid "Dimnames slot is not a list" msgstr "" #: Mutils.c:350 msgid "Dimnames slot is a list, but not of length 2" msgstr "" # Matrix/src/Mutils.c: 287 # error(_("'s1' and 's2' must be \"character\" vectors")) #: Mutils.c:355 #, fuzzy, c-format msgid "Dimnames[%d] is not a character vector" msgstr "'s1' oraz 's2' muszą być wektorami tekstowymi" #: Mutils.c:360 #, c-format msgid "length(Dimnames[%d]) differs from Dim[%d] which is %d" msgstr "" # Matrix/src/Mutils.c: 330 # error(_("'uplo' must be UPP or LOW")) # Matrix/src/Mutils.c: 356 # error(_("'uplo' must be UPP or LOW")) #: Mutils.c:387 Mutils.c:413 msgid "'uplo' must be UPP or LOW" msgstr "'uplo' musi być UPP lub LOW" #: Mutils.c:468 dgeMatrix.c:420 dtrMatrix.c:282 msgid "replacement diagonal has wrong length" msgstr "" # Matrix/src/Mutils.c: 643 # error(_("invalid class \"%s\" passed to 'dup_mMatrix_as_geMatrix' function"), # class_P(A)) #: Mutils.c:683 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_geMatrix" msgstr "" "niepoprawna klasa \"%s\" przekazana do funkcji 'dup_mMatrix_as_geMatrix()'" # Matrix/src/Mutils.c: 763 # error(_("unexpected ctype = %d in 'dup_mMatrix_as_geMatrix' function"), ctype) #: Mutils.c:813 #, c-format msgid "unexpected ctype = %d in dup_mMatrix_as_geMatrix" msgstr "nieoczekiwany 'ctype = %d' w funkcji 'dup_mMatrix_as_geMatrix()'" # Matrix/src/Mutils.c: 794 # error(_("invalid class \"%s\" passed to 'dup_mMatrix_as_dgeMatrix' function"), # class_P(A)) #: Mutils.c:841 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_dgeMatrix" msgstr "" "niepoprawna klasa \"%s\" przekazana do funkcji 'dup_mMatrix_as_dgeMatrix()'" # Matrix/src/Mutils.c: 840 # error(_("Argument 'ij' must be 2-column integer matrix")) #: Mutils.c:891 msgid "Argument ij must be 2-column integer matrix" msgstr "Argument 'ij' musi być 2-kolumnową macierzą liczb całkowitych" # Matrix/src/Mutils.c: 856 # error(_("subscript 'i' out of bounds in M[ij]")) #: Mutils.c:910 msgid "subscript 'i' out of bounds in M[ij]" msgstr "indeks 'i' poza zakresem w 'M[ij]'" # Matrix/src/Mutils.c: 858 # error(_("subscript 'j' out of bounds in M[ij]")) #: Mutils.c:912 msgid "subscript 'j' out of bounds in M[ij]" msgstr "indeks 'j' poza zakresem w 'M[ij]'" # Matrix/src/Mutils.c: 897 # error(_("'i' and 'j' arguments must be integer vectors of the same length")) #: Mutils.c:956 msgid "i and j must be integer vectors of the same length" msgstr "" "'i' oraz 'j' muszą być wektorami liczb całkowitych o tej samej długości" # Matrix/src/Mutils.c: 983 # error(_("'data' must be of a vector type")) #: Mutils.c:1001 msgid "'data' must be of a vector type" msgstr "'data' musi być type wektor" # Matrix/src/Mutils.c: 990 # error(_("invalid '%s' argument"), "byrow") #: Mutils.c:1008 #, c-format msgid "invalid '%s' argument" msgstr "niepoprawny argument '%s'" # Matrix/src/Mutils.c: 997 # error(_("non-numeric matrix extent")) # Matrix/src/Mutils.c: 1005 # error(_("non-numeric matrix extent")) #: Mutils.c:1015 Mutils.c:1023 msgid "non-numeric matrix extent" msgstr "nieliczbowy rozmiar macierzy" # Matrix/src/Mutils.c: 1000 # error(_("invalid 'nrow' value (too large or NA)")) #: Mutils.c:1018 msgid "invalid 'nrow' value (too large or NA)" msgstr "niepoprawna wartość 'nrow' (zbyt duża lub wartość NA)" # Matrix/src/Mutils.c: 1002 # error(_("invalid 'nrow' value (< 0)")) #: Mutils.c:1020 msgid "invalid 'nrow' value (< 0)" msgstr "niepoprawna wartość 'nrow' (< 0)" # Matrix/src/Mutils.c: 1008 # error(_("invalid 'ncol' value (too large or NA)")) #: Mutils.c:1026 msgid "invalid 'ncol' value (too large or NA)" msgstr "niepoprawna wartość 'ncol' (zbyt duża lub wartość NA)" # Matrix/src/Mutils.c: 1010 # error(_("invalid 'ncol' value (< 0)")) #: Mutils.c:1028 msgid "invalid 'ncol' value (< 0)" msgstr "niepoprawna wartość 'ncol' (< 0)" # Matrix/src/Mutils.c: 1028 # warning(_("data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"), lendat, nr) #: Mutils.c:1046 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]" msgstr "" "długość danych [%d] nie jest podwielokrotnością lub wielokrotnością liczby " "wierszy [%d]" # Matrix/src/Mutils.c: 1031 # warning(_("data length [%d] is not a sub-multiple or multiple of the number of columns [%d]"), lendat, nc) #: Mutils.c:1049 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of columns " "[%d]" msgstr "" "długość danych [%d] nie jest podwielokrotnością lub wielokrotnością liczby " "kolumn [%d]" # Matrix/src/Mutils.c: 1034 # warning(_("data length exceeds size of matrix")) #: Mutils.c:1052 msgid "data length exceeds size of matrix" msgstr "długość danych przekracza rozmiar macierzy" # Matrix/src/Mutils.c: 1040 # error(_("too many elements specified")) #: Mutils.c:1058 msgid "too many elements specified" msgstr "określono zbyt dużo elementów" #: Mutils.c:1131 #, c-format msgid "the number of columns differ in R_rbind2_vector: %d != %d" msgstr "" # Matrix/src/dpoMatrix.c: 115 # error(_("Argument 'b' must be a numeric matrix")) #: Mutils.c:1185 Mutils.c:1216 Mutils.c:1227 Mutils.c:1254 msgid "Argument must be numeric-like atomic vector" msgstr "Argument musi być atomowym wektorem liczbowym" # Matrix/src/Tsparse.c: 20 # (_("lengths of slots i and j must match")) #: Tsparse.c:20 msgid "lengths of slots i and j must match" msgstr "długość gniazd 'i' oraz 'j' musi się zgadzać" # Matrix/src/Tsparse.c: 23 # (_("slot 'dim' must have length 2")) #: Tsparse.c:23 msgid "slot Dim must have length 2" msgstr "gniazdo 'dim' musi mieć długość 2" # Matrix/src/Tsparse.c: 27 # (_("all row indices (slot 'i') must be between 0 and nrow-1 in a object of class \"TsparseMatrix\"")) #: Tsparse.c:27 msgid "" "all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrix" msgstr "" "wszystkie indeksy wierszy (gniazdo 'i') muszą być pomiędzy 0 a 'nrow-1' w " "obiekcie klasy \"TsparseMatrix\"" # Matrix/src/Tsparse.c: 29 # (_("all column indices (slot 'j') must be between 0 and ncol-1 in a object of class \"TsparseMatrix\"")) #: Tsparse.c:29 msgid "" "all column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrix" msgstr "" "wszystkie indeksy kolumn (gniazdo 'j') muszą być pomiędzy 0 a 'ncol-1' w " "obiekcie klasy \"TsparseMatrix\"" # Matrix/src/chm_common.c: 67 # error(_("Argument 'rho' must be an environment")) #: chm_common.c:76 msgid "Argument rho must be an environment" msgstr "Argument 'rho' musi być środowiskiem" # Matrix/src/chm_common.c: 230 # error(_("invalid class of object passed to 'as_cholmod_sparse' function")) #: chm_common.c:253 msgid "invalid class of object to as_cholmod_sparse" msgstr "" "niepoprawna klasa obiektu przekazanego do funkcji 'as_cholmod_sparse()'" # Matrix/src/chm_common.c: 232 # error(_("invalid object passed to 'as_cholmod_sparse' function")) #: chm_common.c:255 msgid "invalid object passed to as_cholmod_sparse" msgstr "niepoprawny obiekt przekazany do funkcji 'as_cholmod_sparse()'" # Matrix/src/chm_common.c: 259 # error(_("'in_place' 'cholmod_sort' returned an error code")) #: chm_common.c:282 msgid "in_place cholmod_sort returned an error code" msgstr "'in_place' funkcji 'cholmod_sort()' zwróciło kod błędu" # Matrix/src/chm_common.c: 265 # error(_("'cholmod_sort' function returned an error code")) #: chm_common.c:288 msgid "cholmod_sort returned an error code" msgstr "funkcja 'cholmod_sort' zwróciła kod błędu" # Matrix/src/chm_common.c: 346 # error(_("chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)")) #: chm_common.c:370 msgid "chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)" msgstr "chm_sparse_to_SEXP(, *): niepoprawny 'Rkind' (kod 'real kind')" # Matrix/src/chm_common.c: 354 # error(_("unknown 'xtype' in \"cholmod_sparse\" object")) #: chm_common.c:378 msgid "unknown xtype in cholmod_sparse object" msgstr "nieznany 'xtype' w obiekcie klasy \"cholmod_sparse\"" # Matrix/src/chm_common.c: 383 # error(_("complex sparse matrix code not yet written")) # Matrix/src/chm_common.c: 577 # error(_("complex sparse matrix code not yet written")) # Matrix/src/chm_common.c: 812 # error(_("complex sparse matrix code not yet written")) # Matrix/src/chm_common.c: 862 # error(_("complex sparse matrix code not yet written")) #: chm_common.c:407 chm_common.c:638 chm_common.c:916 chm_common.c:966 msgid "complex sparse matrix code not yet written" msgstr "kod dla zespolonych rzadkich macierzy nie został jeszcze napisany" # Matrix/src/chm_common.c: 388 # error(_("'symmetric' and 'triangular' both set")) # Matrix/src/chm_common.c: 582 # error(_("'symmetric' and 'triangular' both set")) #: chm_common.c:412 chm_common.c:643 msgid "Symmetric and triangular both set" msgstr "Ustawiono jednocześnie 'symmetric' oraz 'triangular'" # Matrix/src/chm_common.c: 428 # error(_("invalid class of object passed to 'as_cholmod_triplet' function")) #: chm_common.c:488 msgid "invalid class of object to as_cholmod_triplet" msgstr "" "niepoprawna klasa obiektu przekazanego do funkcji 'as_cholmod_triplet()'" # Matrix/src/chm_common.c: 452 # error(_("as_cholmod_triplet(): could not reallocate for internal 'diagU2N()' function")) #: chm_common.c:512 msgid "as_cholmod_triplet(): could not reallocate for internal diagU2N()" msgstr "" "as_cholmod_triplet(): nie można ponownie przydzielić dla wewnętrznej funkcji " "'diagU2N()'" # Matrix/src/chm_common.c: 549 # error(_("unknown 'xtype' in \"cholmod_triplet\" object")) #: chm_common.c:610 msgid "unknown xtype in cholmod_triplet object" msgstr "nieznany 'xtype' w obiekcie klasy \"cholmod_triplet\"" # Matrix/src/chm_common.c: 628 # error(_("invalid class of object passed to 'as_cholmod_dense()' function")) #: chm_common.c:689 msgid "invalid class of object to as_cholmod_dense" msgstr "niepoprawna klasa obiektu przekazanego do funkcji 'as_cholmod_dense()'" #: chm_common.c:757 #, c-format msgid "" "chm_transpose_dense(ans, x) not yet implemented for %s different from %s" msgstr "" # Matrix/src/chm_common.c: 698 # error(_("Cholmod error '%s' at file %s, line %d"), message, file, line) #: chm_common.c:781 #, c-format msgid "Cholmod error '%s' at file %s, line %d" msgstr "Błąd 'cholmod' '%s' w pliku %s, linia %d" # Matrix/src/chm_common.c: 702 # warning(_("Cholmod warning '%s' at file %s, line %d"), # message, file, line) #: chm_common.c:785 #, c-format msgid "Cholmod warning '%s' at file %s, line %d" msgstr "Ostrzeżenie 'cholmod' '%s' w pliku %s, linia %d" # Matrix/src/chm_common.c: 731 # error(_("Unable to initialize 'cholmod' function: error code %d"), res) #: chm_common.c:814 #, c-format msgid "Unable to initialize cholmod: error code %d" msgstr "Nie można zainicjować funkcji 'cholmod()': kod błędu %d" # Matrix/src/chm_common.c: 778 # error(_("unknown 'Rkind'")) #: chm_common.c:860 msgid "unknown 'Rkind'" msgstr "nieznany 'Rkind'" # Matrix/src/chm_common.c: 785 # error(_("unknown 'xtype'")) # Matrix/src/chm_common.c: 848 # error(_("unknown 'xtype'")) #: chm_common.c:867 chm_common.c:952 msgid "unknown xtype" msgstr "nieznany 'xtype'" # Matrix/src/chm_common.c: 818 # error(_("code for 'cholmod_dense()' function with holes not yet written")) # Matrix/src/chm_common.c: 871 # error(_("code for 'cholmod_dense()' functionwith holes not yet written")) #: chm_common.c:922 chm_common.c:975 msgid "code for cholmod_dense with holes not yet written" msgstr "kod dla funkcji 'cholmod_dense()' z dziurami nie jest jeszcze napisany" # Matrix/src/chm_common.c: 867 # error(_("don't know if a dense pattern matrix makes sense")) #: chm_common.c:971 msgid "don't know if a dense pattern matrix makes sense" msgstr "nie wiadomo, czy gęsty wzrór macierzy ma sens" # Matrix/src/chm_common.c: 934 # error(_("invalid class of object passed to 'as_cholmod_factor' function")) #: chm_common.c:1038 msgid "invalid class of object to as_cholmod_factor" msgstr "" "niepoprawna klasa obiektu przekazanego do funkcji 'as_cholmod_factor()'" # Matrix/src/chm_common.c: 948 # error(_("Supernodal LDL decomposition not available")) #: chm_common.c:1052 msgid "Supernodal LDL' decomposition not available" msgstr "Dekompozycja supernodalna LDL nie jest dostępna" # Matrix/src/chm_common.c: 950 # error(_("Supernodal/simplicial class inconsistent with 'type' flags")) #: chm_common.c:1054 msgid "Supernodal/simplicial class inconsistent with type flags" msgstr "klasa supernodal/simplicial niespójna z flagami 'type'" # Matrix/src/chm_common.c: 968 # error(_("Number of supernodes must be positive when 'is_super' argument is TRUE")) #: chm_common.c:1072 msgid "Number of supernodes must be positive when is_super is TRUE" msgstr "" "Liczba super węzłów musi być dodatnia gdy argument 'is_super' ma wartość TRUE" # Matrix/src/chm_common.c: 971 # error(_("Lengths of 'super' and 'pi' arguments must be equal")) #: chm_common.c:1075 msgid "Lengths of super and pi must be equal" msgstr "Długości 'super' oraz 'pi' muszą być równe" # Matrix/src/chm_common.c: 975 # error(_("Lengths of 'super' and 'px' arguments must be equal")) #: chm_common.c:1079 msgid "Lengths of super and px must be equal" msgstr "Długości 'super' oraz 'px' muszą być równe" # Matrix/src/chm_common.c: 988 # error(_("failure in 'as_cholmod_factor' function")) #: chm_common.c:1092 msgid "failure in as_cholmod_factor" msgstr "niepowodzenie w funkcji 'as_cholmod_factor()'" # Matrix/src/chm_common.c: 1016 # error(_("CHOLMOD factorization was unsuccessful")) #: chm_common.c:1120 msgid "CHOLMOD factorization was unsuccessful" msgstr "Faktoryzacja 'CHOLMOD' nie powiodła się" # Matrix/src/chm_common.c: 1029 # error(_("f->xtype of %d not recognized"), f->xtype) #: chm_common.c:1133 #, c-format msgid "f->xtype of %d not recognized" msgstr "'f->xtype' dla %d nie został rozpoznany" # Matrix/src/chm_common.c: 1094 # error(_("chm_diagN2U(): nrow=%d, ncol=%d"), # n, chx->ncol) #: chm_common.c:1198 #, c-format msgid "chm_diagN2U(): nrow=%d, ncol=%d" msgstr "chm_diagN2U(): nrow=%d, ncol=%d" # Matrix/src/chm_common.c: 1137 # error(_("chm_diagN2U(x, uploT = %d): uploT should be +- 1"), uploT) #: chm_common.c:1241 #, c-format msgid "chm_diagN2U(x, uploT = %d): uploT should be +- 1" msgstr "chm_diagN2U(x, uploT = %d): 'uploT' powinien wynosić +/- 1" # Matrix/src/cs_utils.c: 37 # error(_("'csp_eye' function's argument 'n' must be positive")) #: cs_utils.c:37 msgid "csp_eye argument n must be positive" msgstr "argument 'n' w funkcji 'csp_eye()' musi być dodatni" # Matrix/src/cs_utils.c: 68 # error(_("invalid class of 'x' argument in 'Matrix_as_cs(a, x)' function")) #: cs_utils.c:68 msgid "invalid class of 'x' in Matrix_as_cs(a, x)" msgstr "niepoprawna klasa argumentu 'x' w funkcji 'Matrix_as_cs(a, x)'" # Matrix/src/cs_utils.c: 170 # error(_("invalid class of object to %s"), "Matrix_as_css") # Matrix/src/cs_utils.c: 185 # error(_("invalid class of object to %s"), "Matrix_as_css") # Matrix/src/cs_utils.c: 205 # error(_("invalid class of object to %s"), "Matrix_as_csn") # Matrix/src/cs_utils.c: 218 # error(_("invalid class of object to %s"), "Matrix_as_csn") #: cs_utils.c:127 cs_utils.c:174 cs_utils.c:189 cs_utils.c:209 cs_utils.c:222 #, c-format msgid "invalid class of object to %s" msgstr "niepoprawna klasa obiektu przekazanego do '%s'" # Matrix/src/cs_utils.c: 139 # error(_("cs matrix not compatible with class '%s'"), valid[ctype]) #: cs_utils.c:141 #, c-format msgid "cs matrix not compatible with class '%s'" msgstr "'cs matrix' nie jest zgodne z klasą '%s'" # Matrix/src/cs_utils.c: 242 # error(_("Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)"), # cl) # Matrix/src/cs_utils.c: 261 # error(_("Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)"), # cl) #: cs_utils.c:246 cs_utils.c:265 #, c-format msgid "Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)" msgstr "Niepoprawna klasa cl='%s' w 'Matrix_css_to_SEXP(S, cl, ..)'" # Matrix/src/cs_utils.c: 287 # error(_("Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)"), # cl) # Matrix/src/cs_utils.c: 306 # error(_("Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)"), # cl) #: cs_utils.c:292 cs_utils.c:311 #, c-format msgid "Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)" msgstr "Niepoprawna klasa cl='%s' w 'Matrix_csn_to_SEXP(S, cl, ..)'" # Matrix/src/dense.c: 29 # error(_("incorrect left cyclic shift, j (%d) >= k (%d)"), j, k) #: dense.c:29 #, c-format msgid "incorrect left cyclic shift, j (%d) >= k (%d)" msgstr "niepoprawne lewe cykliczne przesunięcie, j (%d) >= k (%d)" # Matrix/src/dense.c: 31 # error(_("incorrect left cyclic shift, j (%d) < 0"), j, k) #: dense.c:31 #, c-format msgid "incorrect left cyclic shift, j (%d) < 0" msgstr "niepoprawne lewe cykliczne przesunięcie, j (%d) < 0" # Matrix/src/dense.c: 33 # error(_("incorrect left cyclic shift, k (%d) > ldx (%d)"), k, ldx) #: dense.c:33 #, c-format msgid "incorrect left cyclic shift, k (%d) > ldx (%d)" msgstr "niepoprawne lewe cykliczne przesunięcie, k (%d) > ldx (%d)" # Matrix/src/dense.c: 78 # error(_("Unknown error in 'getGivens' function")) #: dense.c:78 msgid "Unknown error in getGivens" msgstr "Nieznany błąd w funkcji 'getGivens()'" # Matrix/src/dense.c: 90 # error(_("'X' argument must be a numeric (double precision) matrix")) # Matrix/src/dense.c: 106 # error(_("'X' argument must be a numeric (double precision) matrix")) # Matrix/src/dense.c: 137 # error(_("'X' argument must be a numeric (double precision) matrix")) #: dense.c:90 dense.c:106 dense.c:139 msgid "X must be a numeric (double precision) matrix" msgstr "'X' musi być macierzą liczbową (o podwójnej precyzji)" # Matrix/src/dense.c: 111 # error(_("'y' argument must be a numeric (double precision) matrix")) # Matrix/src/dense.c: 142 # error(_("'y' argument must be a numeric (double precision) matrix")) #: dense.c:111 dense.c:144 msgid "y must be a numeric (double precision) matrix" msgstr "'y' musi być macierzą liczbową (o podwójnej precyzji)" # Matrix/src/dense.c: 114 # error(_("number of rows in 'y' (%d) does not match number of rows in 'X' (%d)"), ydims[0], n) # Matrix/src/dense.c: 145 # error(_("number of rows in 'y' (%d) does not match number of rows in 'X' (%d)"), ydims[0], n) #: dense.c:115 dense.c:148 #, c-format msgid "number of rows in y (%d) does not match number of rows in X (%d)" msgstr "liczba wierszy w 'y' (%d) nie zgadza się z liczbą wierszy w 'X' (%d)" # Matrix/src/dense.c: 124 # error(_("Lapack routine 'dposv' returned error code %d"), info) #: dense.c:126 #, c-format msgid "Lapack routine dposv returned error code %d" msgstr "procedura Lapack 'dposv' zwróciła kod błędu %d" # Matrix/src/dense.c: 155 # error(_("First call to Lapack routine 'dgels' returned error code %d"), info) #: dense.c:158 #, c-format msgid "First call to Lapack routine dgels returned error code %d" msgstr "Pierwsze wywołanie procedury Lapack 'dgels()' zwróciło kod błędu %d" # Matrix/src/dense.c: 161 # error(_("Second call to Lapack routine 'dgels' returned error code %d"), info) #: dense.c:165 #, c-format msgid "Second call to Lapack routine dgels returned error code %d" msgstr "Drugie wywołanie procedury Lapack 'dgels()' zwróciło kod błędu %d" # Matrix/src/dense.c: 173 # error(_("'X' must be a real (numeric) matrix")) #: dense.c:178 msgid "X must be a real (numeric) matrix" msgstr "'X' musi być rzeczywistą (liczbową) macierzą" # Matrix/src/dense.c: 174 # error(_("'tol' argument, given as %g, must be non-negative"), tol) #: dense.c:179 #, c-format msgid "tol, given as %g, must be non-negative" msgstr "argument 'tol', podany jako %g, musi być nieujemny" # Matrix/src/dense.c: 175 # error(_("'tol' argument, given as %g, must be less or equal to 1"), tol) #: dense.c:180 #, c-format msgid "tol, given as %g, must be <= 1" msgstr "argument 'tol', podany jako %g, musi być mniejszy lub równy 1" # Matrix/src/dense.c: 199 # error(_("First call to 'dgeqrf' returned error code %d"), info) #: dense.c:204 #, c-format msgid "First call to dgeqrf returned error code %d" msgstr "Pierwsze wywołanie 'dgeqrf()' zwróciło kod błędu %d" # Matrix/src/dense.c: 205 # error(_("Second call to 'dgeqrf' returned error code %d"), info) #: dense.c:210 #, c-format msgid "Second call to dgeqrf returned error code %d" msgstr "Drugie wywołanie 'dgeqrf()' zwróciło kod %d" # Matrix/src/dense.c: 210 # error(_("Lapack routine 'dtrcon' returned error code %d"), info) # Matrix/src/dense.c: 230 # error(_("Lapack routine 'dtrcon' returned error code %d"), info) #: dense.c:215 dense.c:235 #, c-format msgid "Lapack routine dtrcon returned error code %d" msgstr "Procedura Lapack 'dtrcon()' zwróciła kod błędu %d" # Matrix/src/dense.c: 279 # error(_("Lower band %d is greater than upper band %d"), k1, k2) #: dense.c:287 #, c-format msgid "Lower band %d > upper band %d" msgstr "Niższe pasmo %d jest większe niż górne pasmo %d" # Matrix/src/dense.c: 348 # error(_("ddense_to_symmetric(): matrix is not square!")) #: dense.c:358 msgid "ddense_to_symmetric(): matrix is not square!" msgstr "ddense_to_symmetric(): macierz nie jest kwadratowa!" # Matrix/src/dense.c: 359 # error(_("matrix is not symmetric [%d,%d]"), i+1, j+1) #: dense.c:369 #, c-format msgid "matrix is not symmetric [%d,%d]" msgstr "macierz nie jest symetryczna [%d,%d]" # Matrix/src/dense.c: 407 # error(_("matrix is not square! (symmetric part)")) #: dense.c:430 msgid "matrix is not square! (symmetric part)" msgstr "macierz nie jest kwadratowa! (część symetryczna)" # Matrix/src/dense.c: 451 # error(_("matrix is not square! (skew-symmetric part)")) #: dense.c:488 msgid "matrix is not square! (skew-symmetric part)" msgstr "macierz nie jest kwadratowa! (część skośno-symetryczna)" # Matrix/src/dgTMatrix.c: 15 # (_("lengths of slots 'i' and 'x' must match")) # Matrix/src/dgCMatrix.c: 18 # (_("lengths of slots 'i' and 'x' must match")) #: dgCMatrix.c:24 msgid "lengths of slots 'i' and 'x' must match" msgstr "długość gniazd 'i' oraz 'x' musi się zgadzać" # Matrix/src/dgCMatrix.c: 30 # (_("lengths of slots 'j' and 'x' must match")) #: dgCMatrix.c:36 msgid "lengths of slots 'j' and 'x' must match" msgstr "długość gniazd 'j' oraz 'x' musi się zgadzać" # Matrix/src/dgCMatrix.c: 52 # error(_("invalid class(x) '%s' in 'compressed_to_TMatrix(x)' function"), ncl) #: dgCMatrix.c:58 #, c-format msgid "invalid class(x) '%s' in compressed_to_TMatrix(x)" msgstr "niepoprawne 'class(x)' '%s' w funkcji 'compressed_to_TMatrix(x)'" # Matrix/src/dgCMatrix.c: 86 # error(_("invalid class(x) '%s' in 'R_to_CMatrix(x)' function"), ncl) #: dgCMatrix.c:93 #, c-format msgid "invalid class(x) '%s' in R_to_CMatrix(x)" msgstr "niepoprawne 'class(x)' '%s' w funkcji 'R_to_CMatrix(x)'" # Matrix/src/dgCMatrix.c: 156 # error(_("dgCMatrix_lusol requires a square, non-empty matrix")) #: dgCMatrix.c:164 msgid "dgCMatrix_lusol requires a square, non-empty matrix" msgstr "'dgCMatrix_lusol' wymaga kwadratowej, niepustej macierzy" # Matrix/src/dppMatrix.c: 81 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dpoMatrix.c: 92 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dpoMatrix.c: 117 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dsyMatrix.c: 85 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dtCMatrix.c: 90 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dtCMatrix.c: 106 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dgCMatrix.c: 158 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dgCMatrix.c: 184 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dgCMatrix.c: 438 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dgCMatrix.c: 471 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dtrMatrix.c: 99 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dgeMatrix.c: 423 # error(_("Dimensions of system to be solved are inconsistent")) # Matrix/src/dspMatrix.c: 79 # error(_("Dimensions of system to be solved are inconsistent")) #: dgCMatrix.c:166 dgCMatrix.c:193 dgCMatrix.c:508 dgCMatrix.c:549 #: dgeMatrix.c:592 dpoMatrix.c:95 dpoMatrix.c:120 dppMatrix.c:80 dspMatrix.c:78 #: dsyMatrix.c:79 dtCMatrix.c:90 dtCMatrix.c:120 dtrMatrix.c:91 msgid "Dimensions of system to be solved are inconsistent" msgstr "Wymiary systemu, który ma być rozwiązany, są niespójne" # Matrix/src/dgCMatrix.c: 160 # error(_("cs_lusol failed")) #: dgCMatrix.c:168 msgid "cs_lusol failed" msgstr "'cs_lusol' nie powiódł się" # Matrix/src/dgCMatrix.c: 181 # error(_("'dgCMatrix_qrsol(., order)' function needs order in {0,..,3}")) #: dgCMatrix.c:190 msgid "dgCMatrix_qrsol(., order) needs order in {0,..,3}" msgstr "" "funkcja 'dgCMatrix_qrsol(., order)' potrzebuje zmiennej 'order' ze zbioru " "{0,..,3}" # Matrix/src/dgCMatrix.c: 190 # error(_("'dgCMatrix_qrsol(<%d x %d>-matrix)' function requires a 'tall' rectangular matrix"), # xc->m, xc->n) #: dgCMatrix.c:199 #, c-format msgid "dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrix" msgstr "" "funkcja 'dgCMatrix_qrsol(macierz <%d x %d>)' wymaga długiej prostokątnej " "macierzy" # Matrix/src/dgCMatrix.c: 201 # error(_("'cs_qrsol()' function failed inside 'dgCMatrix_qrsol()' function")) #: dgCMatrix.c:210 msgid "cs_qrsol() failed inside dgCMatrix_qrsol()" msgstr "" "funkcja 'cs_qrsol()' nie powiodła się wewnątrz funkcji 'dgCMatrix_qrsol()'" # Matrix/src/dgCMatrix.c: 220 # error(_("'A' must have #{rows} >= #{columns}")) #: dgCMatrix.c:229 msgid "A must have #{rows} >= #{columns}" msgstr "'A' musi mieć liczbę wierszy >= liczba kolumn" # Matrix/src/dgCMatrix.c: 160 # error(_("cs_lusol failed")) #: dgCMatrix.c:234 msgid "cs_sqr failed" msgstr "funkcja 'cs_lusol()' nie powiodła się" #: dgCMatrix.c:237 msgid "dgcMatrix_QR(*, keep_dimnames = NA): NA taken as TRUE" msgstr "" # Matrix/src/dgCMatrix.c: 160 # error(_("cs_lusol failed")) #: dgCMatrix.c:243 msgid "cs_qr failed" msgstr "funkcja 'cs_qr' nie powiodła się " # Matrix/src/dgCMatrix.c: 293 # error(_("'SuiteSparseQR_C_QR' function returned an error code")) #: dgCMatrix.c:329 msgid "SuiteSparseQR_C_QR returned an error code" msgstr "funkcja 'SuiteSparseQR_C_QR()' zwróciła kod błędu" # Matrix/src/dgCMatrix.c: 337 # error(_("LU decomposition applies only to square matrices")) #: dgCMatrix.c:373 msgid "LU decomposition applies only to square matrices" msgstr "dekompozycja LU stosuje się tylko do macierzy kwadratowych" # Matrix/src/dgCMatrix.c: 346 # error(_("cs_lu(A) failed: near-singular 'A' (or out of memory)")) #: dgCMatrix.c:382 msgid "cs_lu(A) failed: near-singular A (or out of memory)" msgstr "" "'cs_lu(A)' nie powiódł się: 'A' jest bliskie osobliwości (lub brak pamięci)" #: dgCMatrix.c:468 msgid "dgcMatrix_LU(*, keep_dimnames = NA): NA taken as TRUE" msgstr "" # Matrix/src/dgCMatrix.c: 406 # error(_("dgCMatrix_matrix_solve(.., sparse=TRUE) not yet implemented")) #: dgCMatrix.c:480 msgid "dgCMatrix_matrix_solve(.., sparse=TRUE) not yet implemented" msgstr "" "'dgCMatrix_matrix_solve(.., sparse=TRUE)' nie jest jeszcze zaimplementowane" # Matrix/src/dgCMatrix.c: 469 # error(_("'dgCMatrix_cholsol' function requires a 'short, wide' rectangular matrix")) #: dgCMatrix.c:547 msgid "dgCMatrix_cholsol requires a 'short, wide' rectangular matrix" msgstr "" "funkcja 'dgCMatrix_cholsol()' wymaga krótkiej lub szerokiej macierzy " "prostokątnej" # Matrix/src/dgCMatrix.c: 477 # error(_("'cholmod_sdmult' function error (rhs)")) #: dgCMatrix.c:555 msgid "cholmod_sdmult error (rhs)" msgstr "błąd funkcji 'cholmod_sdmult' (prawa strona)" # Matrix/src/CHMfactor.c: 135 # error(_("cholmod_factorize_p failed: status %d, minor %d of ncol %d"), # c.status, f->minor, f->n) #: dgCMatrix.c:558 #, c-format msgid "cholmod_factorize failed: status %d, minor %d from ncol %d" msgstr "" "'cholmod_factorize_p' nie powiódł się: status %d, minor %d liczba kolumn %d" # Matrix/src/dgCMatrix.c: 484 # error(_("'cholmod_solve' function (CHOLMOD_A) failed: status %d, minor %d from ncol %d"), # c.status, L->minor, L->n) #: dgCMatrix.c:562 #, c-format msgid "cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %d" msgstr "" "funkcja 'cholmod_solve' (CHOLMOD_A) nie powiodła się: status %d, minor %d z " "liczbą kolumn %d" # Matrix/src/dgCMatrix.c: 501 # error(_("'cholmod_sdmult' function error (resid)")) #: dgCMatrix.c:579 msgid "cholmod_sdmult error (resid)" msgstr "błąd funkcji 'cholmod_sdmult' (reszta)" # Matrix/src/Tsparse.c: 20 # (_("lengths of slots i and j must match")) #: dgTMatrix.c:15 msgid "lengths of slots i and x must match" msgstr "długość gniazd 'i' oraz 'j' musi się zgadzać" #: dgTMatrix.c:33 dgTMatrix.c:62 #, c-format msgid "too large matrix: %.0f" msgstr "" # Matrix/src/dgTMatrix.c: 56 # error(_("Cannot coerce to too large '*geMatrix' with %.0f entries"), len) #: dgTMatrix.c:97 #, c-format msgid "Cannot coerce to too large *geMatrix with %.0f entries" msgstr "Nie można przekształcić do dużego '*geMatrix' z %.0f wpisami" # Matrix/src/dgeMatrix.c: 19 # (_("'x' slot must be numeric \"double\"")) #: dgeMatrix.c:9 msgid "x slot must be numeric \"double\"" msgstr "gniazdo 'x' musi być liczbą typu \"double\"" # Matrix/src/dgeMatrix.c: 32 # (_("'factors' slot must be named list")) #: dgeMatrix.c:25 msgid "factors slot must be named list" msgstr "gniazdo 'factors' musi być nazwaną listą" # Matrix/src/dgeMatrix.c: 70 # error(_("'rcond()' function requires a square, non-empty matrix")) #: dgeMatrix.c:63 msgid "rcond requires a square, non-empty matrix" msgstr "funkcja 'rcond()' wymaga kwadratowej, niepustej macierzy" # Matrix/src/dgeMatrix.c: 127 # error(_("Dimensions of 'x' and 'y' are not compatible for '%s'"), # tr ? "tcrossprod" : "crossprod") # Matrix/src/dgeMatrix.c: 184 # error(_("Dimensions of 'x' and 'y' are not compatible for '%s'"), # tr ? "tcrossprod" : "crossprod") #: dgeMatrix.c:159 dgeMatrix.c:252 #, c-format msgid "Dimensions of x and y are not compatible for %s" msgstr "Wymiary 'x' oraz 'y' nie są zgodne dla '%s'" # Matrix/src/dgeMatrix.c: 166 # error(_("'y' argument must be numeric or integer")) #: dgeMatrix.c:231 #, fuzzy msgid "Argument y must be numeric, integer or logical" msgstr "Argument 'y' musi być liczbą lub rzeczywistą lub całkowitą" # Matrix/src/dsyMatrix.c: 122 # error(_("Matrices are not conformable for multiplication")) # Matrix/src/dtrMatrix.c: 123 # error(_("Matrices are not conformable for multiplication")) # Matrix/src/dgeMatrix.c: 447 # error(_("Matrices are not conformable for multiplication")) # Matrix/src/dgeMatrix.c: 469 # error(_("Matrices are not conformable for multiplication")) # Matrix/src/dspMatrix.c: 153 # error(_("Matrices are not conformable for multiplication")) #: dgeMatrix.c:314 dgeMatrix.c:318 dspMatrix.c:154 dsyMatrix.c:119 #: dtrMatrix.c:127 msgid "Matrices are not conformable for multiplication" msgstr "Macierze nie są dostosowane do przemnożenia" #: dgeMatrix.c:456 msgid "diagonal to be added has wrong length" msgstr "" # Matrix/src/dgeMatrix.c: 307 # error(_("Cannot factor a matrix with zero extents")) #: dgeMatrix.c:475 msgid "Cannot factor a matrix with zero extents" msgstr "Nie można faktoryzować macierzy o zerowym stopniu" # Matrix/src/dppMatrix.c: 37 # error(_("Lapack routine '%s' returned error code %d"), "dpptrf", info) # Matrix/src/dpoMatrix.c: 43 # error(_("Lapack routine '%s' returned error code %d"), "dpotrf", info) # Matrix/src/dgeMatrix.c: 317 # error(_("Lapack routine '%s' returned error code %d"), "dgetrf()", info) # Matrix/src/dspMatrix.c: 182 # error(_("Lapack routine '%s' returned error code %d"), "dsptrf", info) #: dgeMatrix.c:486 dpoMatrix.c:46 dppMatrix.c:36 dspMatrix.c:183 #, c-format msgid "Lapack routine %s returned error code %d" msgstr "Procedura Lapack '%s' zwróciła kod błędu %d" # Matrix/src/dgeMatrix.c: 319 # warning(_("Exact singularity detected during LU decomposition: %s, i=%d."), # "U[i,i]=0", info) #: dgeMatrix.c:488 #, c-format msgid "Exact singularity detected during LU decomposition: %s, i=%d." msgstr "Wykryto dokładną osobliwość podczas dekompozycji LU: %s, i=%d." # Matrix/src/dgeMatrix.c: 341 # error(_("Determinant requires a square matrix")) #: dgeMatrix.c:510 msgid "Determinant requires a square matrix" msgstr "Wyznacznik wymaga aby macierz była kwadratowa" # Matrix/src/dgeMatrix.c: 383 # error(_("'solve' function requires a square matrix")) #: dgeMatrix.c:552 msgid "Solve requires a square matrix" msgstr "funkcja 'solve()' wymaga kwadratowej macierzy" # Matrix/src/dgeMatrix.c: 396 # error(_("error [%d] from Lapack 'dgecon()' function"), info) #: dgeMatrix.c:565 #, c-format msgid "error [%d] from Lapack 'dgecon()'" msgstr "błąd [%d] z funkcji Lapack 'dgecon()'" # Matrix/src/dgeMatrix.c: 398 # error(_("Lapack dgecon(): system computationally singular, reciprocal condition number = %g"), # rcond) #: dgeMatrix.c:567 #, c-format msgid "" "Lapack dgecon(): system computationally singular, reciprocal condition " "number = %g" msgstr "" "Lapack dgecon(): system obliczeniowo osobliwy, numer obustronnego stanu = %g" # Matrix/src/dgeMatrix.c: 408 # error(_("Lapack routine 'dgetri()': system is exactly singular")) #: dgeMatrix.c:577 msgid "Lapack routine dgetri: system is exactly singular" msgstr "procedura Lapack 'dgetri()': system jest ściśle osobliwy" # Matrix/src/dgeMatrix.c: 428 # error(_("Lapack routine 'dgetrs()': system is exactly singular")) #: dgeMatrix.c:598 msgid "Lapack routine dgetrs: system is exactly singular" msgstr "procedura Lapack 'dgetrs()': system jest ściśle osobliwy" # Matrix/src/dgeMatrix.c: 570 # error(_("Matrix exponential requires square, non-null matrix")) #: dgeMatrix.c:681 msgid "Matrix exponential requires square, non-null matrix" msgstr "Eksponencjowanie macierzy wymaga kwadratowej, niepustej macierzy" # Matrix/src/dgeMatrix.c: 587 # error(_("dgeMatrix_exp: LAPACK routine 'dgebal()' returned %d"), j) # Matrix/src/dgeMatrix.c: 589 # error(_("dgeMatrix_exp: LAPACK routine 'dgebal()' returned %d"), j) #: dgeMatrix.c:698 dgeMatrix.c:700 #, c-format msgid "dgeMatrix_exp: LAPACK routine dgebal returned %d" msgstr "dgeMatrix_exp: procedura LAPACK 'dgebal()' zwróciła %d" # Matrix/src/dgeMatrix.c: 627 # error(_("dgeMatrix_exp: 'dgetrf()' returned error code %d"), j) #: dgeMatrix.c:738 #, c-format msgid "dgeMatrix_exp: dgetrf returned error code %d" msgstr "dgeMatrix_exp: funkcja 'dgetrf()' zwróciła kod błędu %d" # Matrix/src/dgeMatrix.c: 629 # error(_("dgeMatrix_exp: 'dgetrs()' returned error code %d"), j) #: dgeMatrix.c:740 #, c-format msgid "dgeMatrix_exp: dgetrs returned error code %d" msgstr "dgeMatrix_exp: funkcja 'dgetrs()' zwróciła kod błędu %d" # Matrix/src/dgeMatrix.c: 702 # error(_("dgeMatrix_Schur: 'x' argument must be a non-null square matrix")) #: dgeMatrix.c:813 msgid "dgeMatrix_Schur: argument x must be a non-null square matrix" msgstr "dgeMatrix_Schur: argument 'x' musi być niepustą macierzą kwadratową" # Matrix/src/dgeMatrix.c: 713 # error(_("dgeMatrix_Schur: first call to 'dgees()' function failed")) #: dgeMatrix.c:824 msgid "dgeMatrix_Schur: first call to dgees failed" msgstr "dgeMatrix_Schur: pierwsze wywołanie funkcji 'dgees()' nie powiodło się" # Matrix/src/dgeMatrix.c: 721 # error(_("dgeMatrix_Schur: 'dgees()' function returned code %d"), info) #: dgeMatrix.c:833 #, c-format msgid "dgeMatrix_Schur: dgees returned code %d" msgstr "dgeMatrix_Schur: funkcja 'dgees()' zwróciła kod %d" # Matrix/src/dpoMatrix.c: 13 # (_("object of class \"dpoMatrix\" is not positive definite")) #: dpoMatrix.c:16 msgid "dpoMatrix is not positive definite" msgstr "obiekt klasy \"dpoMatrix\" nie jest dodatnio określony" # Matrix/src/dppMatrix.c: 34 # error(_("the leading minor of order %d is not positive definite"), # info) # Matrix/src/dpoMatrix.c: 40 # error(_("the leading minor of order %d is not positive definite"), # info) #: dpoMatrix.c:43 dppMatrix.c:33 #, c-format msgid "the leading minor of order %d is not positive definite" msgstr "wiodący minor rzędu %d nie jest dodatnio określony" # Matrix/src/dpoMatrix.c: 94 # error(_("Cannot perform 'solve()' function for matrices with zero extents")) #: dpoMatrix.c:97 msgid "Cannot solve() for matrices with zero extents" msgstr "Nie można wykonać funkcji 'solve()' dla macierzy o zerowym stopniu" # Matrix/src/dpoMatrix.c: 115 # error(_("Argument 'b' must be a numeric matrix")) #: dpoMatrix.c:118 msgid "Argument b must be a numeric matrix" msgstr "Argument 'b' musi być macierzą liczbową" # Matrix/src/dsCMatrix.c: 25 # error(_("chm_factor_name(): did not get string of length 11")) #: dsCMatrix.c:25 msgid "chm_factor_name(): did not get string of length 11" msgstr "" "chm_factor_name(): nie uzyskano łańcucha tekstowego o długości 11 znaków" # Matrix/src/dsCMatrix.c: 99 # error(_("Cholesky factorization failed; unusually, please report to Matrix-authors")) #: dsCMatrix.c:99 msgid "" "Cholesky factorization failed; unusually, please report to Matrix-authors" msgstr "" "faktoryzacja Cholesky'ego nie powiodła się; nietypowo, proszę zgłosić raport " "autorom pakietu Matrix" # Matrix/src/dsCMatrix.c: 105 # error(_("internal_chm_factor: Cholesky factorization failed")) #: dsCMatrix.c:105 msgid "internal_chm_factor: Cholesky factorization failed" msgstr "internal_chm_factor: faktoryzacja Cholesky'ego nie powiodła się" # Matrix/src/dsCMatrix.c: 241 # error(_("Non-symmetric matrix passed to 'dsCMatrix_to_dgTMatrix' function")) #: dsCMatrix.c:250 msgid "Non-symmetric matrix passed to dsCMatrix_to_dgTMatrix" msgstr "" "Niesymetryczna macierz przekazana do funkcji 'dsCMatrix_to_dgTMatrix()'" # Matrix/src/dtpMatrix.c: 18 # (_("Incorrect length of 'x' slot")) # Matrix/src/dspMatrix.c: 14 # (_("Incorrect length of 'x' slot")) #: dspMatrix.c:13 dtpMatrix.c:17 msgid "Incorrect length of 'x' slot" msgstr "Niepoprawna długość gniazda 'x'" #: dspMatrix.c:146 dsyMatrix.c:112 #, c-format msgid "Matrix dimension %d x %d (= %g) is too large" msgstr "" # Matrix/src/dsyMatrix.c: 7 # (_("'dim' slot has length less than two")) # Matrix/src/dtrMatrix.c: 11 # (_("'dim' slot has length less than two")) #: dsyMatrix.c:7 dtrMatrix.c:10 msgid "'Dim' slot has length less than two" msgstr "gniazdo 'dim' ma długość mniejszą niż dwa" # Matrix/src/dsyMatrix.c: 9 # (_("Matrix is not square")) # Matrix/src/dtrMatrix.c: 13 # (_("Matrix is not square")) #: dsyMatrix.c:9 dtrMatrix.c:12 msgid "Matrix is not square" msgstr "Macierz nie jest kwadratowa" # Matrix/src/dsyMatrix.c: 158 # error(_("Lapack routine 'dsytrf' returned error code %d"), info) #: dsyMatrix.c:164 #, c-format msgid "Lapack routine dsytrf returned error code %d" msgstr "procedura Lapack 'dsytrf()' zwróciła kod błędu %d" # Matrix/src/dtTMatrix.c: 24 # (_("uplo='U' must not have sparse entries below the diagonal")) # Matrix/src/dtCMatrix.c: 28 # (_("uplo='U' must not have sparse entries below the diagonal")) # Matrix/src/dtCMatrix.c: 63 # (_("uplo='U' must not have sparse entries below the diagonal")) #: dtCMatrix.c:28 dtCMatrix.c:63 dtTMatrix.c:24 msgid "uplo='U' must not have sparse entries below the diagonal" msgstr "uplo='U' nie może mieć rzadkich wpisów poniżej diagonali" # Matrix/src/dtTMatrix.c: 29 # (_("uplo='L' must not have sparse entries above the diagonal")) # Matrix/src/dtCMatrix.c: 34 # (_("uplo='L' must not have sparse entries above the diagonal")) # Matrix/src/dtCMatrix.c: 69 # (_("uplo='L' must not have sparse entries above the diagonal")) #: dtCMatrix.c:34 dtCMatrix.c:69 dtTMatrix.c:29 msgid "uplo='L' must not have sparse entries above the diagonal" msgstr "uplo='L' nie może mieć rzadkich wpisów powyżej diagonali" # Matrix/src/dtpMatrix.c: 125 # error(_("Dimensions of 'a' (%d,%d) and 'b' (%d,%d) do not conform"), # xDim[0], xDim[1], yDim[0], yDim[1]) # Matrix/src/dtpMatrix.c: 153 # error(_("Dimensions of 'a' (%d,%d) and 'b' (%d,%d) do not conform"), # aDim[0], aDim[1], bDim[0], bDim[1]) # Matrix/src/dtpMatrix.c: 184 # error(_("Dimensions of 'a' (%d,%d) and 'b' (%d,%d) do not conform"), # xDim[0], xDim[1], yDim[0], yDim[1]) #: dtpMatrix.c:124 dtpMatrix.c:152 dtpMatrix.c:183 #, c-format msgid "Dimensions of a (%d,%d) and b (%d,%d) do not conform" msgstr "Wymiary 'a' (%d,%d) oraz 'b' (%d,%d) nie pokrywają się" # Matrix/src/dtpMatrix.c: 132 # error(_("right=TRUE is not yet implemented __ FIXME")) #: dtpMatrix.c:131 msgid "right=TRUE is not yet implemented __ FIXME" msgstr "'right = TRUE' nie jest jeszcze zaimplementowane __ NAPRAW_MNIE" # Matrix/src/dtrMatrix.c: 121 # error(_("object of class \"dtrMatrix\" must be square")) #: dtrMatrix.c:125 msgid "dtrMatrix must be square" msgstr "obiekt klasy \"dtrMatrix\" musi być kwadratowy" # Matrix/src/dtrMatrix.c: 161 # error(_("objects of class \"dtrMatrices\" in %*% must have matching (square) dimensions")) #: dtrMatrix.c:188 #, fuzzy msgid "\"dtrMatrix\" objects in '%*%' must have matching (square) dimension" msgstr "" "obiekty klasy \"dtrMatrix\" w '%*%' muszą mieć pasujące (kwadratowe) wymiary." # Matrix/src/dtrMatrix.c: 248 # error(_("cannot set diag() as long as 'diag = \"U\"'")) #: dtrMatrix.c:277 msgid "cannot set diag() as long as 'diag = \"U\"'" msgstr "nie można ustawić 'diag()' dopóki 'diag = \"U\"'" # Matrix/src/dtrMatrix.c: 269 # error(_("cannot add diag() as long as 'diag = \"U\"'")) #: dtrMatrix.c:311 msgid "cannot add diag() as long as 'diag = \"U\"'" msgstr "nie można dodać 'diag()' dopóki 'diag = \"U\"'" # Matrix/src/dgeMatrix.c: 19 # (_("'x' slot must be numeric \"double\"")) #: factorizations.c:18 #, fuzzy msgid "x slot is not \"double\"" msgstr "gniazdo 'x' musi być liczbą typu \"double\"" #: factorizations.c:20 msgid "x slot is not of correct length" msgstr "" # Matrix/src/init.c: 356 # error(_("missing 'Matrix' namespace: should never happen")) #: init.c:370 msgid "missing 'Matrix' namespace: should never happen" msgstr "brakuje przestrzeni nazw 'Matrix': nie powinno się wydarzyć" # Matrix/src/init.c: 367 # error(_("Matrix namespace not determined correctly")) #: init.c:381 msgid "Matrix namespace not determined correctly" msgstr "przestrzeń nazw macierzy nie została poprawnie określona" # Matrix/src/lgCMatrix.c: 58 # error(_("'A' must be a logical matrix")) #: lgCMatrix.c:58 msgid "A must be a logical matrix" msgstr "'A' musi być macierzą logiczną" # Matrix/src/sparseQR.c: 13 # (_("'length(p)' must match 'nrow(V)'")) #: sparseQR.c:13 msgid "length(p) must match nrow(V)" msgstr "'length(p)' musi zgadzać się z 'nrow(V)'" # Matrix/src/sparseQR.c: 15 # (_("'length(beta)' must match 'ncol(V)'")) #: sparseQR.c:15 msgid "length(beta) must match ncol(V)" msgstr "'length(beta)' musi zgadzać się z 'ncol(V)'" # Matrix/src/sparseQR.c: 18 # (_("'length(q)' must be zero or 'ncol(R)'")) #: sparseQR.c:18 msgid "length(q) must be zero or ncol(R)" msgstr "'length(q)' musi wynosić zero lub 'ncol(R)'" #: sparseQR.c:46 #, c-format msgid "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" msgstr "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" # Matrix/src/sparseQR.c: 121 # warning(_("%s(): structurally rank deficient case: possibly WRONG zeros"), # "sparseQR_qty") # Matrix/src/sparseQR.c: 159 # warning(_("%s(): structurally rank deficient case: possibly WRONG zeros"), # "sparseQR_coef") # Matrix/src/sparseQR.c: 195 # warning(_("%s(): structurally rank deficient case: possibly WRONG zeros"), # "sparseQR_resid_fitted") #: sparseQR.c:134 sparseQR.c:175 sparseQR.c:210 #, c-format msgid "%s(): structurally rank deficient case: possibly WRONG zeros" msgstr "" "%s(): przypadek strukturalnie z niedoborem rang: prawdopodobnie BŁĘDNE zera" # Matrix/src/t_Csparse_subassign.c: 144 # error(_("invalid class of 'x' in 'Csparse_subassign()' function")) #: t_Csparse_subassign.c:144 msgid "invalid class of 'x' in Csparse_subassign()" msgstr "niepoprawna klasa 'x' w funkcji 'Csparse_subassign()'" # Matrix/src/t_Csparse_subassign.c: 146 # error(_("invalid class of 'value' in 'Csparse_subassign()' function")) #: t_Csparse_subassign.c:146 msgid "invalid class of 'value' in Csparse_subassign()" msgstr "niepoprawna klasa 'value' w funkcji 'Csparse_subassign()'" # Matrix/src/t_Csparse_subassign.c: 189 # warning(_("x[] <- val: 'val' must be logical for \"%s\" x"), # valid_cM[ctype_x]) #: t_Csparse_subassign.c:189 #, c-format msgid "x[] <- val: val is coerced to logical for \"%s\" x" msgstr "" "x[] <- val: 'val' została przekształcone w wartość logiczną dla \"%s\" 'x'" # Matrix/src/t_Csparse_subassign.c: 194 # error(_("x[] <- val: 'val' must be integer or logical for \"%s\" x"), # valid_cM[ctype_x]) #: t_Csparse_subassign.c:194 #, c-format msgid "" "x[] <- val: val should be integer or logical, is coerced to integer, for \"%s" "\" x" msgstr "" "x[] <- val: 'val' powinno być liczbą całkowitą lub wartością logiczną, " "została przekształcona na liczbę całkowitą, dla \"%s\" 'x'" # Matrix/src/t_Csparse_subassign.c: 201 # error(_("programming error in 'Csparse_subassign()' function should never happen")) #: t_Csparse_subassign.c:201 msgid "programming error in Csparse_subassign() should never happen" msgstr "" "błąd programowy w funkcji 'Csparse_subassign()' nie powinien się wydarzyć" #~ msgid "not a CsparseMatrix" #~ msgstr "to nie jest 'CsparseMatrix'" Matrix/po/R-de.po0000644000176200001440000007766713047321304013307 0ustar liggesusers# Translation of R-matrix to German # Copyright (C) 2001 The R Foundation # This file is distributed under the same license as the matrix package. # Chris Leick , 2009. # Detlef Steuer , 2012-2014. msgid "" msgstr "" "Project-Id-Version: R 3.3.0 / matrix 1.2-4\n" "Report-Msgid-Bugs-To: bugs.r-project.org\n" "POT-Creation-Date: 2017-02-10 12:21\n" "PO-Revision-Date: 2016-04-14 12:55+0200\n" "Last-Translator: Detlef Steuer \n" "Language-Team: R-Core \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" msgid "invalid 'mod': %s" msgstr "ungültiges 'mod': %s" msgid "" "not-yet-implemented method for %s(<%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "noch nicht implementierte Methode für %s(<%s>).\n" " ->> Bitten Sie die Autoren des Pakets, diese fehlende Funktion zu " "implementieren." msgid "" "not-yet-implemented method for %s(<%s>, <%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "noch nicht implementierte Methode für %s(<%s>, <%s>).\n" " ->> Bitten Sie die Autoren des Pakets, diese fehlende Funktion zu " "implementieren." msgid "'x' is not positive definite -- chol() undefined." msgstr "'x' ist nicht positiv definit -- chol() undefiniert." msgid "Matrices must have same dimensions in %s" msgstr "Matrizen müssen in %s die gleichen Dimensionen haben" msgid "non-conformable matrix dimensions in %s" msgstr "nicht konforme Matrixdimensionen in %s" msgid "dimnames [%d] mismatch in %s" msgstr "dimnames [%d] passen nicht in %s" msgid "names(dimnames()) must be NULL or of length two" msgstr "names(dimnames()) muss entweder NULL oder von Länge 2 sein" msgid "Matrices must have same number of rows in %s" msgstr "Matrizen müssen die gleiche Anzahl Zeilen in %s haben" msgid "Matrices must have same number of columns in %s" msgstr "Matrizen müssen die gleiche Anzahl Spalten in %s haben" msgid "[[ suppressing %d column names %s ... ]]" msgstr "[[ unterdrücke %d Spaltennamen %s ...]]" msgid "[[ suppressing %d column names %s ]]" msgstr "[[ unterdrücke %d Spaltennamen %s ]]" msgid "'x' must be \"sparseMatrix\"" msgstr "'x' muss \"sparseMatrix\" sein" msgid "not yet implemented for class %s" msgstr "noch nicht implementiert für Klasse %s" msgid "not a triangular matrix" msgstr "keine Dreiecksmatrix" msgid "not a symmetric matrix; consider forceSymmetric() or symmpart()" msgstr "" "keine symmetrische Matrix. Erwägen Sie forceSymmetric() oder symmpart()" msgid "not yet implemented for matrix with typeof %s" msgstr "noch nicht implementiert für Matrix mit typeof %s" msgid "not yet implemented for %s" msgstr "noch nicht implementiert für %s" msgid "general Matrix class not yet implemented for %s" msgstr "allgemeine Matrixklasse noch nicht implementiert für %s" msgid "" "Quadratic matrix '%s' (=: A) is not formally\n" "\tsymmetric. Will be treated as\tA A'" msgstr "" "Die quadratische Matrix '%s' (=: A) ist formal\n" " nicht symmetrisch. Wird behandelt wie A A'" msgid "" "'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a \"CHMfactor\"" msgstr "" "'update' muss entweder boolesch, '+' oder '-' sein; 'C' eine Matrix\n" "und 'L' ein \"CHMfactor\"" msgid "update must be TRUE/FALSE or '+' or '-'" msgstr "update muss entweder TRUE/FALSE, '+' oder '-' sein" msgid "Matrix-internal error in [i,,d]; please report" msgstr "Matrixinterner Fehler in [i,,d]. Bitte berichten" msgid "nothing to replace with" msgstr "nichts zu ersetzen mit" msgid "number of items to replace is not a multiple of replacement length" msgstr "" "Anzahl der zu ersetzenden Elemente ist kein Vielfaches der Austauschlänge" msgid "too many replacement values" msgstr "zu viele Austauschwerte" msgid "i1[1] == 0 ==> C-level verbosity will not happen!" msgstr "i1[1] == 0 ==> C-Ebene wird nicht detailliert sein!" msgid "using\t \"old code\" part in Csparse subassignment" msgstr "benutzt wird\t 'alter Kode'-Teil in Csparse-Unterzuweisung" msgid "" "using\"old code\" part in Csparse subassignment\n" " >>> please report to Matrix-authors@r-project.org" msgstr "" "benutzt wird 'alter Kode'-Teil in Csparse-Unterzuweisung\n" " >>> bitte an Matrix-authors@r-project.org berichten" msgid "" "Cholesky() -> *symbolic* factorization -- not yet implemented" msgstr "" "Cholesky() -> *symbolische* Faktorisierung – noch nicht " "implementiert" msgid "Not a valid format" msgstr "Kein gültiges Format" msgid "'file' must be a character string or connection" msgstr "'file' muss eine Zeichenkette oder Verbindung sein" msgid "Invalid storage type: %s" msgstr "Ungültiger Speichertyp: %s" msgid "Only numeric sparse matrices allowed" msgstr "Nur dünn besetzte Matrizen erlaubt" msgid "Invalid storage format: %s" msgstr "Ungültiges Speicherformat: %s" msgid "Invalid assembled indicator: %s" msgstr "Ungültig zusammengesetzter Indikator: %s" msgid "file is not a MatrixMarket file" msgstr "Datei ist keine MatrixMarket-Datei" msgid "type '%s' not recognized" msgstr "Typ '%s' nicht erkannt" msgid "representation '%s' not recognized" msgstr "Repräsentation '%s' nicht erkannt" msgid "element type '%s' not recognized" msgstr "Elementtyp '%s' nicht erkannt" msgid "symmetry form '%s' not recognized" msgstr "Symmetrieform '%s' nicht erkannt" msgid "readMM(): row\t values 'i' are not in 1:nr" msgstr "readMM(): Zeile\t Werte 'i' sind nicht in 1:nr" msgid "readMM(): column values 'j' are not in 1:nc" msgstr "readMM(): Spalte\t Werte 'j' sind nicht in 1:nc" msgid "symmetry form 'skew-symmetric' not yet implemented for reading" msgstr "Symmetrieform 'skew-symmetric' noch nicht zum Lesen implementiert" msgid "symmetry form 'hermitian' not yet implemented for reading" msgstr "Symmetrieform 'hermitian' noch nicht zum Lesen implementiert" msgid "symmetry form '%s' is not yet implemented" msgstr "Symmetrieform '%s' noch nicht implementiert" msgid "element type 'complex' not yet implemented" msgstr "Elementtyp 'complex' noch nicht implementiert" msgid "'%s()' is not yet implemented for element type '%s'" msgstr "'%s()' ist noch nicht für Elementtyp '%s' implementiert" msgid "'%s()' is not yet implemented for representation '%s'" msgstr "'%s()' ist noch nicht implementiert für Darstellung '%s'" msgid "trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)" msgstr "" "getrimmter Mittelwert von 'sparseVector' – suboptimalerweise wird as." "numeric(.) benutzt" msgid "'V' is not a square matrix" msgstr "'V' ist keine quadratische Matrix" msgid "diag(.) had 0 or NA entries; non-finite result is doubtful" msgstr "" "diag(.) hatte 0 oder NA Einträge. Nicht-endliches Ergebnis ist zweifelhaft" msgid "invalid dimnames given for %s object" msgstr "ungültige dimnames für %s Objekt gegeben" msgid "" "dimnames(.) <- NULL: translated to \n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" msgstr "" "dimnames(.) <- NULL: übersetzt in\n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" msgid "'nrow', 'ncol', etc, are disregarded when 'data' is \"Matrix\" already" msgstr "" "'nrow', 'ncol', etc. werden nicht berücksichtigt, wenn 'data' bereits " "'Matrix' ist" msgid "invalid 'data'" msgstr "ungültiges 'data'" msgid "'nrow', 'ncol', etc, are disregarded for matrix 'data'" msgstr "'nrow', 'ncol', etc werden nicht für Matrix 'data' berücksichtigt" msgid "complex matrices not yet implemented in Matrix package" msgstr "komplexe Matrizen noch nicht im Matrix-Paket implementiert" msgid "using slow kronecker() method" msgstr "langsame kronecker()-Methode wird benutzt" msgid "" "Cholesky(A) called for 'A' of class \"%s\";\n" "\t it is currently defined for sparseMatrix only; consider using chol() " "instead" msgstr "" "Cholesky(A) für 'A' der Klasse \"%s\" aufgerufen;\n" "\t es ist derzeit nur für sparseMatrix definiert; erwägen Sie, chol() zu " "benutzen " msgid "'lag' and 'differences' must be integers >= 1" msgstr "'lag' und 'differences' müssen ganze Zahlen >=1 sein" msgid "invalid or not-yet-implemented 'Matrix' subsetting" msgstr "ungültige oder noch nicht implementierte 'Matrix'-Untermenge" msgid "[ ] : .M.sub.i.logical() maybe inefficient" msgstr "[ ] : .M.sub.i.logical() könnte ineffizient sein" msgid "" "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?" msgstr "" "nargs() = %d. Irrelevante ungültige Argumente innerhalb '[ .. ]' (i.logical)?" msgid "m[ ]: inefficiently indexing single elements" msgstr "m[ ]: ineffiziente Indexierung einzelner Elemente" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?" msgstr "" "nargs() = %d. Irrelevante ungültige Argumente innerhalb '[ .. ]' (i.2col)?" msgid "" ".M.sub.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.sub.i.2col(): 'i' hat keine ganzzahlige Spaltennummer.\n" "Sollte nie passieren. Bitte melden!" msgid "such indexing must be by logical or 2-column numeric matrix" msgstr "" "solche Indexierung muss von logischer oder 2-spaltig numerischer Matrix sein" msgid "" ".M.repl.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.repl.i.2col(): 'i' hat keine ganzzahlige Spaltennummer.\n" "Sollte nie passieren. Bitte melden." msgid ".M.repl.i.2col(): drop 'matrix' case ..." msgstr ".M.repl.i.2col(): 'matrix'-Fall weglassen ..." msgid "negative values are not allowed in a matrix subscript" msgstr "negative Werte sind in einer Matrix-Subskript nicht erlaubt" msgid "NAs are not allowed in subscripted assignments" msgstr "NAs sind in indexierten Anweisungen nicht erlaubt" msgid "m[ ] <- v: inefficiently treating single elements" msgstr "m[ ] <- v: Einzelne Elemente ineffizient behandelt" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?" msgstr "nargs() = %d. Irrelevante ungültige Argumente innerhalb '[ .. ]'?" msgid "RHS 'value' (class %s) matches 'ANY', but must match matrix class %s" msgstr "" "RHS 'value' (Klasse %s) passt zu 'ANY', muss aber zur Matrixklasse %s passen" msgid "not-yet-implemented 'Matrix[<-' method" msgstr "noch nicht implementierte 'Matrix[<-'-Methode" msgid "inefficient method used for \"- e1\"" msgstr "ineffiziente Methode für '- e1' benutzt" msgid "dim [product %d] do not match the length of object [%d]" msgstr "dim [produkt %d] passt nicht zur Länge des Objekts [%d]" msgid "internal bug in \"Compare\" method (Cmp.Mat.atomic); please report" msgstr "" "interner Fehler in der \"Compare\"-Methode (Cmp.Mat.atomic). Bitte berichten" msgid "Cmp.Mat.atomic() should not be called for diagonalMatrix" msgstr "Cmp.Mat.atomic() sollte nicht für diagonalMatrix aufgerufen werden" msgid "Matrices must have same number of rows for arithmetic" msgstr "Matrizen müssen für Arithmetik die gleiche Anzahl Zeilen haben" msgid "number of rows are not compatible for %s" msgstr "Anzahl der Zeilen ist nicht kompatibel für %s" msgid "length of 2nd arg does not match dimension of first" msgstr "Länge des zweiten Arguments passt nicht zur Dimension des ersten" msgid "length of 1st arg does not match dimension of 2nd" msgstr "Länge des ersten arg passt nicht zur Dimension des zweiten" msgid "internal bug in \"Logic\" method (Logic.Mat.atomic); please report" msgstr "" "interner Fehler in der \"Logic\"-Methode (.Logic.Mat.atomic). Bitte berichten" msgid "Logic.Mat.atomic() should not be called for diagonalMatrix" msgstr "Logic.mat.atomic() sollte für diagonalMatrix nicht aufgerufen werden" msgid "vector too long in Matrix - vector operation" msgstr "Vektor zu lang in der Matrix - Vektor Operation" msgid "" "longer object length\n" "\tis not a multiple of shorter object length" msgstr "" "längere Objektlänge\n" "\tist kein Vielfaches der kürzeren Objektlänge" msgid " %s %s is undefined" msgstr " %s %s ist undefiniert" msgid "%s %s is undefined" msgstr "%s %s ist undefiniert" msgid "longer object length is not a multiple of shorter object length" msgstr "längere Objektlänge ist kein Vielfaches der kürzeren Objektlänge" msgid "invalid class: %s" msgstr "ungültige Klasse: %s" msgid "programming error: min() should have dispatched w/ 1st arg much earlier" msgstr "" "Programmierfehler: min() ohne erstes Argument hätte eher abgefangen sein " "müssen" msgid "in Summary(, .): %s(<%s>, <%s>,...)" msgstr "in Summary(, .): %s(<%s>, <%s>, ...)" msgid "in Summary(, .): %s(<%s>, <%s>)" msgstr "in Summary(, .): %s(<%s>, <%s>)" msgid "not-yet-implemented coercion to \"TsparseMatrix\"" msgstr "noch nicht implementierte Typumwandlung zu 'TsparseMatrix'" msgid "you cannot mix negative and positive indices" msgstr "Sie können positive und negative Indizes nicht mischen" msgid "index larger than maximal %d" msgstr "Index größer als maximales %d" msgid "'NA' indices are not (yet?) supported for sparse Matrices" msgstr "" "'NA'-Indizes werden (noch?) nicht für dünn besetzte Matrizen unterstützt" msgid "logical subscript too long (%d, should be %d)" msgstr "logisches Subskript zu lang (%d, sollte %d sein)" msgid "no 'dimnames[[.]]': cannot use character indexing" msgstr "keine 'dimnames[[.]]': Zeichenindexierung kann nicht benutzt werden" msgid "invalid character indexing" msgstr "ungültige Zeichenindexierung" msgid "Matrix-internal error in [i,,d]; please report" msgstr "Matrix-interner Fehler in [i,,d]; Bitte berichten" msgid "FIXME: NOT YET FINISHED IMPLEMENTATION" msgstr "ZU ERLEDIGEN: NOCH NICHT ABGESCHLOSSENE IMPLEMENTIERUNG" msgid "internal bug: missing 'i' in replTmat(): please report" msgstr "interner Fehler: Fehlendes 'i' in replTmat(): Bitte berichten" msgid "[ ] indexing not allowed: forgot a \",\" ?" msgstr "[ ] Indexierung nicht erlaubt: Ein ',' vergessen?" msgid "internal bug: matrix 'i' in replTmat(): please report" msgstr "interner Fehler: Matrix 'i' in replTmat(): Bitte berichten" msgid "" "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE." msgstr "" "x[.] <- val: x ist %s, val nicht in {TRUE, FALSE}, wird umgewandelt;\n" "NA |--> TRUE." msgid "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "x[.] <- val: x ist %s, val nicht in {TRUE, FALSE}, wird umgewandelt." msgid "" "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE." msgstr "" "x[.,.] <- val: x ist %s, val nicht in {TRUE, FALSE} wird umgewandelt NA |--> " "TRUE." msgid "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "x[.,.] <- val: x ist %s, val nicht in {TRUE, FALSE} wird umgewandelt" msgid "x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrix" msgstr "x[.,.] <- val : x wird von Tsparse* in CsparseMatrix umgewandelt" msgid "nargs() = %d should never happen; please report." msgstr "nargs() = %d sollte niemals vorkommen. Bitte berichten." msgid "row indices must be <= nrow(.) which is %d" msgstr "Zeilenindizes müssen <= nrow(.) sein, das ist %d" msgid "column indices must be <= ncol(.) which is %d" msgstr "Spaltenindizes müssen <= ncol(.) sein, das ist %d" msgid "'force' must be (coercable to) TRUE or FALSE" msgstr "'force' muss (umwandelbar nach) TRUE oder FALSE sein" msgid "invalid (to - from)/by in seq(.)" msgstr "unzulässiges (to - from)/by in seq(.)" msgid "wrong sign in 'by' argument" msgstr "falsches Vorzeichen im Argument 'by'" msgid "'by' argument is much too small" msgstr "Argument 'by' ist zu klein" msgid "length must be non-negative number" msgstr "Länge muss eine nicht negative Zahl sein" msgid "too many arguments" msgstr "zu viele Argumente" msgid "c(,..) of different kinds, coercing all to 'rleDiff'" msgstr "" "c(,..) von unterschiedlichen Arten, alle werden in 'rleDiff' " "umgewandelt" msgid "[i] is not yet implemented" msgstr "[i] ist noch nicht implementiert" msgid "all() is not yet implemented" msgstr "all() ist noch nicht implementiert" msgid "sum() is not yet implemented" msgstr "sum() ist noch nicht implementiert" msgid "prod() is not yet implemented" msgstr "prod() ist noch nicht implementiert" msgid "not yet implemented" msgstr "noch nicht implementiert" msgid "" "x / 0 for an x with sign-change\n" " no longer representable as 'rleDiff'" msgstr "" "x / 0 für einen x mit Vorzeichenwechsel\n" " nicht länger als 'rleDiff' darstellbar" msgid " --> is not yet implemented" msgstr " --> ist noch nicht implementiert" msgid " --> is not yet implemented" msgstr " --> ist noch nicht implementiert" msgid "'diagonals' matrix must have %d columns (= length(k) )" msgstr "'diagonals'-Matrix muss %d Spalten haben (= length(k) )" msgid "'diagonals' must have the same length (%d) as 'k'" msgstr "'diagonals' muss die gleiche Länge (%d) wie 'k' haben" msgid "matrix can only be symmetric if square, but n != m" msgstr "" msgid "" "for symmetric band matrix, only specify upper or lower triangle\n" " hence, all k must have the same sign" msgstr "" "geben Sie für symmetrische Bandmatrizen nur oberes oder unteres Dreieck an.\n" " deshalb müssen alle k dasselbe Vorzeichen haben." msgid "the %d-th (sub)-diagonal (k = %d) is too short; filling with NA's" msgstr "" "die %d-te (Unter)-Diagonale (k = %d) ist zu kurz und wird mit NA aufgefüllt" msgid "resulting x-slot has different type than x's or y's" msgstr "resultierender x-slot hat einen anderen Typ als x oder y" msgid "'A' must be a square matrix" msgstr "'A' muss eine quadratische Matrix sein" msgid "must either specify 'A' or the functions 'A.x' and 'At.x'" msgstr "muss entweder 'A' angeben oder die Funktionen 'A.x' und 'At.x'" msgid "when 'A' is specified, 'A.x' and 'At.x' are disregarded" msgstr "wenn 'A' angegeben wurde, werden 'A.x' und 'At.x' nicht berücksichtigt" msgid "not converged in %d iterations" msgstr "nicht konvergiert in %d Iterationsschritten" msgid "hit a cycle (1) -- stop iterations" msgstr "auf einen Zyklus getroffen (1) – Iterationen stoppen" msgid "hit a cycle (2) -- stop iterations" msgstr "auf einen Zyklus getroffen (2) – Iterationen stoppen" msgid "not enough new vecs -- stop iterations" msgstr "nicht genügend neue Vektoren – Iterationen stoppen" msgid "diagonalMatrix in .dense2C() -- should never happen, please report!" msgstr "" "diagonalMatrix in .dense2C() -- sollte niemals vorkommen. Bitte berichten." msgid "undefined method for class %s" msgstr "undefinierte Methode für Klasse %s" msgid "dim(.) value must be numeric of length 2" msgstr "dim(.)-Wert muss numerisch sein und die Länge 2 haben" msgid "dimensions don't match the number of cells" msgstr "Dimensionen passen nicht zur Anzahl der Zellen" msgid "invalid nargs()= %d" msgstr "ungültige nargs()= %d" msgid "" "LU computationally singular: ratio of extreme entries in |diag(U)| = %9.4g" msgstr "" "Die LU Zerlegung ist computational singulär; Quotient der extremen Elemente " "von |diag(U)| = %9.4g" msgid "RHS 'b' has wrong number of rows:" msgstr "RHS 'b' hat falsche Zahl Zeilen:" msgid "RHS 'b' has wrong length" msgstr "RHS 'b' hat falsche Länge" msgid "cannot coerce non-symmetric \"dgTMatrix\" to \"dsCMatrix\" class" msgstr "" "nicht symmetrische \"dgTMatrix\" kann nicht in \"dsCMatrix\" Klasse " "umgewandelt werden" msgid "the matrix is not triangular" msgstr "die Matrix ist nicht dreieckig" msgid "'lwd' must be NULL or non-negative numeric" msgstr "'lwd' muss NULL oder nicht negativ numerisch sein" msgid "'x' has invalid data type" msgstr "'x' hat ungültigen Datentyp" msgid "length(x) must be either 1 or #{cols}" msgstr "length(x) muss 1 oder #{cols} sein" msgid "some arguments are not matrices" msgstr "einige Argumente sind keine Matrizen" msgid "%s kind not yet implemented" msgstr "%s-Art noch nicht implementiert" msgid "non-square matrix" msgstr "nicht quadratische Matrix" msgid "" "matrix with non-zero off-diagonals cannot be coerced to \"diagonalMatrix\"" msgstr "" "Matrix mit Nichtdiagonalelementen ungleich Null kann nicht in " "\"diagonalMatrix\" umgewandelt werden" msgid "matrix is not diagonal" msgstr "Matrix ist nicht diagonal" msgid "Internal bug: nargs()=%d; please report" msgstr "Interner Fehler: nargs()=%d; bitte melden" msgid "chol() is undefined for diagonal matrix with negative entries" msgstr "chol() ist undefiniert für diagonale Matrix mit negativen Einträgen" msgid "non-matching dimensions" msgstr "nicht passende Dimensionen" msgid "incompatible matrix dimensions" msgstr "inkompatible Matrixdimensionen" msgid "intermediate 'r' is of type %s" msgstr "Zwischenergebnis 'r' ist vom Typ %s" msgid "not yet implemented .. please report" msgstr "noch nicht implementiert ... bitte melden" msgid "not a positive definite matrix" msgstr "keine positiv definite Matrix" msgid "" "as(.,\"dsCMatrix\") is deprecated (since 2008); do use as(., " "\"symmetricMatrix\")" msgstr "" "as(.,\"dsCMatrix\") ist veraltet (seit 2008). Benutzen Sie as(., " "\"symmetricMatrix\")" msgid "inefficient coercion (lost triangularity); please report" msgstr "ineffiziente Umwandlung (Dreiecksgestalt verloren). Bitte berichten" msgid "coercion to \"indMatrix\" only works from integer numeric" msgstr "" "Umwandlung zu \"indMatrix\" funktioniert nur von ganzzahligen numerischen " "Werten" msgid "" "coercion from list(i1,...,ik, d) to \"indMatrix\" failed.\n" " All entries must be integer valued and the number of columns, d, not " "smaller\n" " than the maximal index i*." msgstr "" "Umwandlung von list(i1,...,ik, d) zu \"indMatrix\" gescheitert.\n" " Alle Elemente müssen ganzzahlig sein und die Anzahl Spalten, d, nicht " "kleiner\n" " als der maximale Index i*." msgid "the number of non-zero entries differs from nrow(.)" msgstr "die Anzahl der Nicht-Null-Einträge weicht von nrow(.) ab" msgid "must have exactly one non-zero entry per row" msgstr "muss genau einen Nicht-Null-Eintrag pro Zeile haben" msgid "kronecker method must use default 'FUN'" msgstr "kronecker-Methode muss Standard 'FUN' benutzen" msgid "replacing \"indMatrix\" entries is not allowed, as rarely sensible" msgstr "" "Ersetzen von \"indMatrix\"-Einträgen ist nicht erlaubt, da selten sinnvoll" msgid "Matrix seems negative semi-definite" msgstr "Matrix scheint negativ semidefinit zu sein" msgid "'nearPD()' did not converge in %d iterations" msgstr "nearPD() ist nicht in %d Iterationen konvergiert" msgid "cannot coerce 'NA's to \"nsparseMatrix\"" msgstr "'NA's können nicht in \"nsparseMatrix\" umgewandelt werden" msgid "temporarily disabled" msgstr "zeitweise ausgeschaltet" msgid "coercion to \"pMatrix\" only works from integer numeric" msgstr "" "Umwandlung zu \"pMatrix\" funktioniert nur von ganzzahligen numerischen " "Werten" msgid "not a square matrix" msgstr "keine quadratische Matrix" msgid "not-yet-implemented method for <%s> %%*%% <%s>" msgstr "noch nicht implementierte Methode für <%s> %%*%% <%s>" msgid "non-conformable arguments" msgstr "nicht passende Argumente" msgid "'boolArith = %d' not yet implemented" msgstr "'boolArith = %d' noch nicht implementiert" msgid "" "rankMatrix(, method = '%s') coerces to dense matrix.\n" " Probably should rather use method = 'qr' !?" msgstr "" "rankMatrix(, method = '%s') wird in dicht\n" "besetzte Matrix umgewandelt. Evtl. eher method = 'qr' nutzen? " msgid "rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)" msgstr "rankMatrix(x, method='qr'): t(x) berechnet, da nrow(x) < ncol(x)" msgid "model frame and formula mismatch in model.matrix()" msgstr "Model-Frame und Formel passen nicht zusammen in model.matrix()" msgid "invalid 'contrasts.arg' argument" msgstr "unzulässiges 'contrasts.arg' Argument" msgid "variable '%s' is absent, its contrast will be ignored" msgstr "Variable '%s' fehlt, ihr Kontrast wird irgnoriert" msgid "only 2-dimensional tables can be directly coerced to sparse matrices" msgstr "" "nur 2-dimensionale Tabellen könne direkt in eine dünn besetzte Matrix " "umgewandelt werden" msgid "exactly one of 'i', 'j', or 'p' must be missing from call" msgstr "exakt eins von 'i', 'j' oder 'p' muss im Aufruf fehlen" msgid "'p' must be a non-decreasing vector (0, ...)" msgstr "'p' muss ein nicht abnehmender Vektor (0, ...) sein" msgid "NA's in (i,j) are not allowed" msgstr "NAs sind in (i,j) nicht erlaubt" msgid "" "Both 'symmetric' and 'triangular', i.e. asking for diagonal matrix. Use " "'Diagonal()' instead" msgstr "" msgid "symmetric matrix must be square" msgstr "symmetrische Matrix muss quadratisch sein" #, fuzzy msgid "triangular matrix must be square" msgstr "symmetrische Matrix muss quadratisch sein" msgid "triangular matrix must have all i >= j or i <= j" msgstr "" msgid "length(i) is not a multiple of length(x)" msgstr "length(i) ist kein Vielfaches von length(x)" msgid "only square matrices can be used as incidence matrices for graphs" msgstr "" "nur quadratische Matrizen können als Inzidenzmatrizen für Graphen benutzt " "werden" msgid "Matrix-internal error in [i,,d]; please report" msgstr "Matrix-interner Fehler in [i,,d]. Bitte berichten" msgid "invalid 'col.names' string: %s" msgstr "ungültige 'col.names'-Zeichenkette: %s" msgid "uniDiag=TRUE, but not all diagonal entries are 1" msgstr "" msgid "uniDiag=TRUE, not all entries in diagonal coded as 1" msgstr "" msgid "in show(); maybe adjust 'options(max.print= *, width = *)'" msgstr "" #, fuzzy msgid "suppressing columns and rows" msgstr "[[ unterdrücke %d Spaltennamen %s ]]" msgid "suppressing rows" msgstr "" #, fuzzy msgid "suppressing columns" msgstr "[[ unterdrücke %d Spaltennamen %s ]]" msgid "logic programming error in printSpMatrix2(), please report" msgstr "logischer Programmierfehler in printSpMatrix2(), bitte berichten" msgid "invalid 'type'" msgstr "ungültiger 'type'" msgid "rcond(.) via sparse -> dense coercion" msgstr "rcond(.) über Umwandlung dünn besetzt -> dicht besetzt" msgid "'V' is not a *square* matrix" msgstr "'V' ist keine *quadratische* Matrix" msgid "number of non zeros is smaller than 'nnz' because of duplicated (i,j)s" msgstr "Anzahl von Nicht-Nullen ist kleiner als 'nnz' wegen doppelter (i,j)s" msgid "" "qr.R() may differ from qr.R() because of permutations. " "Possibly use our qrR() instead" msgstr "" "qr.R() könnte von qr.R() aufgrund von Permutationen " "abweichen. Evtl. besser qrR() nutzen." msgid "cannot coerce 'NA's to \"nsparseVector\"" msgstr "Kann NAs nicht in 'nsparseVector' umwandeln" msgid "'x' must inherit from \"sparseVector\"" msgstr "'x' muss von \"sparseVector\" geerbt sein" msgid "'ncol' must be >= 0" msgstr "'ncol' muss >= 0 sein" msgid "'nrow' must be >= 0" msgstr "'nrow' muss >= 0 sein" msgid "Must specify 'nrow' when 'symmetric' is true" msgstr "'nrow' muss angegeben werden, wenn 'symmetric' auf true gesetzt ist" msgid "'nrow' and 'ncol' must be the same when 'symmetric' is true" msgstr "" "'nrow' und 'ncol' müssen gleich sein, wenn 'symmetric' auf true gesetzt ist" msgid "'x' must have length nrow^2 when 'symmetric' is true" msgstr "'x' muss die Länge nrow^2, wenn 'symmetric' auf true gesetzt ist" msgid "'ncol' is not a factor of length(x)" msgstr "'ncol' ist kein Faktor von length(x)" msgid "'nrow' is not a factor of length(x)" msgstr "'nrow' ist kein Faktor von length(x)" msgid "Class %s is not yet implemented" msgstr "Klasse %s noch nicht implementiert" msgid "" "index must be numeric, logical or sparseVector for indexing sparseVectors" msgstr "" "Index muss numerisch, logisch oder sparseVector sein, um sparseVector zu " "indizieren" msgid "'times >= 0' is required" msgstr "'times >= 0' wird benötigt" msgid "(un)packing only applies to dense matrices, class(x)='%s'" msgstr "" "(ent)packen ist nur für dicht besetzte Matrizen anwendbar, class(x)='%s'" msgid "'x' is not symmetric nor triangular" msgstr "'x' ist weder symmetrisch noch in Dreiecksform" msgid "" "extra argument %s will be disregarded in\n" " %s" msgid_plural "" "extra arguments %s will be disregarded in\n" " %s" msgstr[0] "extra Argument %s wird nicht berücksichtigt in %s" msgstr[1] "extra Argumente %s werden nicht berücksichtigt in %s" #~ msgid "variable '%s' converted to a factor" #~ msgstr "Variable '%s' konvertiert in einen Faktor" #~ msgid "\"dMatrix\" object with NAs cannot be coerced to \"nMatrix\"" #~ msgstr "" #~ "\"dMatrix\"-Objekt mit NAs kann nicht in \"nMatrix\" umgewandelt werden" #~ msgid "\"lMatrix\" object with NAs cannot be coerced to \"nMatrix\"" #~ msgstr "'lMatrix'-Objekt mit NAs kann nicht zu 'nMatrix' umgewandelt werden" #~ msgid "not a skinny matrix" #~ msgstr "keine lange (\"skinny\") Matrix" #~ msgid "longer object length" #~ msgstr "längere Objektlänge" #~ msgid "is not a multiple of shorter object length" #~ msgstr "ist kein Vielfaches der kürzeren Objektlänge" #~ msgid "duplicate ij-entries in 'Matrix[ ij ] <- value'; using last" #~ msgstr "" #~ "doppelte ij-Einträge in 'Matrix[ IJ ] <- value'. Letzter wird benutzt" #, fuzzy #~ msgid "method %s not applicable for qr() result class %s" #~ msgstr "Methode '%s' nicht nutzbar für das qr() Ergebniss der Klasse '%s'" #, fuzzy #~ msgid "too large index i > n = %d" #~ msgstr "zu großer Index i > n =" #~ msgid "," #~ msgstr "," #~ msgid "..." #~ msgstr "..." #~ msgid "arguments" #~ msgstr "Argumente" #~ msgid ")$" #~ msgstr ")$" #~ msgid "^list\\(" #~ msgstr "^list\\\\(" #~ msgid "dimnames(.) <- NULL: translated to" #~ msgstr "dimnames(.) <- NULL: übersetzt zu" #~ msgid ", ..." #~ msgstr ", ..." #~ msgid "should never happen; please report" #~ msgstr "Sollte niemals vorkommen. Bitte berichten." #~ msgid "" #~ msgstr "" #~ msgid "(0) is undefined" #~ msgstr "(0) ist undefiniert" #~ msgid "(0)" #~ msgstr "(0)" #~ msgid "no longer representable as 'rleDiff'" #~ msgstr "nicht länger als 'rleDiff' darstellbar" #~ msgid "hence, all k must have the same sign" #~ msgstr "daher müssen alle k das Zeichen haben" #~ msgid "too short; filling with NA's" #~ msgstr "zu kurz. Wird mit NAs gefüllt" #~ msgid "iterations" #~ msgstr "Iterationen" #~ msgid "'" #~ msgstr "'" #~ msgid "; please report" #~ msgstr ". Bitte berichten" #~ msgid "type '" #~ msgstr "Typ '" #~ msgid "representation '" #~ msgstr "Entsprechung '" #~ msgid "element type '" #~ msgstr "Elementtyp '" #~ msgid "symmetry form '" #~ msgstr "symmetrische Form '" #~ msgid "numeric()" #~ msgstr "numeric()" #~ msgid "must supply either 'formula' or 'data'" #~ msgstr "entweder 'formula' oder 'data' muss angegeben werden" #~ msgid "'formula' missing or incorrect" #~ msgstr "'formula' fehlt oder ist falsch" #~ msgid "interactions are not allowed" #~ msgstr "Wechselwirkungen sind nicht erlaubt" #~ msgid "xtabs(*, sparse=TRUE) applies only to two-way tables" #~ msgstr "xtabs(*, sparse=TRUE) liefert nur wechselseitige Tabellen" #~ msgid "cbind2() method for (%s,%s) not-yet defined" #~ msgstr "cbind2()-Methode für (%s,%s) noch nicht definiert" #~ msgid "not yet implemented for packed class" #~ msgstr "noch nicht für gepackte Klasse implementiert" #~ msgid "numeric(0)" #~ msgstr "numeric(0)" #~ msgid "'NA's coerced to 'FALSE' in coercion to logical sparse" #~ msgstr "'NA's zu 'FALSE' umwandeln in Umwandlung zu logisch dünne besetzt" #~ msgid "crossprod(x) calculated as x %*% x for sparse, symmetric x" #~ msgstr "" #~ "crossprod(x) berechnete als x %*% x für dünn besetztes,symmetrisches x" #~ msgid "tcrossprod(x) calculated as x %*% x for sparse, symmetric x" #~ msgstr "" #~ "tcrossprod(x) berechnete als x %*% x für dünn besetztes,symmetrisches x" #~ msgid "(j,p) --> RsparseMatrix : not yet implemented" #~ msgstr "(j,p) --> RsparseMatrix : Noch nicht implementiert" #~ msgid "unknown method" #~ msgstr "unbekannte Methode" #~ msgid "indexing out of range 0:" #~ msgstr "Indexierung außerhalb des Bereichs 0:" #~ msgid "nargs() =" #~ msgstr "nargs() =" #~ msgid "nrow * ncol < length(x)" #~ msgstr "'nrow' * ncol < length(x)" #~ msgid "nrow * ncol != length(x)" #~ msgstr "'nrow' * ncol != length(x)" Matrix/po/fr.po0000644000176200001440000010013613047321304013101 0ustar liggesusers# Translation of Matrix messages to French # Copyright (C) 2001 The R Foundation # This file is distributed under the same license as the Matrix package. # Philippe Grosjean, 2014- msgid "" msgstr "" "Project-Id-Version: Matrix 1.1-1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-10 12:21+0100\n" "PO-Revision-Date: 2014-03-30 09:05+0100\n" "Last-Translator: Philippe Grosjean \n" "Language-Team: none\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 1.6.4\n" #: CHMfactor.c:14 #, c-format msgid "cholmod_change_factor failed with status %d" msgstr "cholmod_change_factor a échoué avec le statut %d" #: CHMfactor.c:30 CHMfactor.c:60 msgid "system argument is not valid" msgstr "argument système incorrect" #: CHMfactor.c:47 #, c-format msgid "cholmod_updown() returned %d" msgstr "cholmod_updown() a renvoyé %d" #: CHMfactor.c:103 #, c-format msgid "diagonal element %d of Cholesky factor is missing" msgstr "l'élément de diagonale %d de la factorisation de Cholesky est manquant" #: CHMfactor.c:141 #, c-format msgid "cholmod_factorize_p failed: status %d, minor %d of ncol %d" msgstr "cholmod_factorize_p a échoué : statut %d, mineur %d de ncol %d" #: CHMfactor.c:146 msgid "cholmod_change_factor failed" msgstr "cholmod_change_factor a échoué" #: Csparse.c:58 msgid "Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrix" msgstr "" "Csparse_sort(x) : x est une CsparseMatrix incorrecte (au delà d'un problème " "de tri)" #: Csparse.c:76 msgid "slot p must have length = nrow(.) + 1" msgstr "le slot p doit avoir une longueur = nrow(.) = 1 " #: Csparse.c:78 msgid "first element of slot p must be zero" msgstr "le premier élément du slot p doit être à zéro" #: Csparse.c:81 msgid "last element of slot p must match length of slots j and x" msgstr "" "le dernier élément du slot p doit avoir même longueur que les slots j et x" #: Csparse.c:84 msgid "all column indices must be between 0 and ncol-1" msgstr "tous les indices de colonnes doivent être compris entre 0 et ncol-1" #: Csparse.c:89 msgid "slot p must be non-decreasing" msgstr "le slot p ne peut contenir de valeurs décroissantes" #: Csparse.c:100 msgid "slot j is not increasing inside a column" msgstr "le slot j ne contient pas de valeurs croissantes au sein d'une colonne" #: Csparse.c:102 msgid "slot j is not *strictly* increasing inside a column" msgstr "" "le slot j ne contient pas de valeurs *strictement* croissantes au sein d'une " "colonne" #: Csparse.c:214 msgid "Csparse_to_nz_pattern(x, tri = NA): 'tri' is taken as TRUE" msgstr "" #: Csparse.c:237 msgid "not a 'n.CMatrix'" msgstr "ceci n'est pas un 'n.CMatrix'" #: Csparse.c:267 #, c-format msgid "nz2Csparse(): invalid/non-implemented r_kind = %d" msgstr "nz2Csparse() : r_kind = %d est incorrect/non implémenté" #: Csparse.c:350 msgid "Nonsymmetric matrix in Csparse_symmetric_to_general" msgstr "Matrice non symétrique dans Csparse_symmetric_to_general" #: Csparse.c:361 msgid "Csparse_general_to_symmetric(): matrix is not square!" msgstr "Csparse_general_to_symmetric() : la matrice n'est pas carrée !" #: Csparse.c:770 msgid "Csparse_crossprod(): error return from cholmod_aat()" msgstr "Csparse_crossprod() :erreur renvoyée par cholmod_aat()" #: Csparse.c:799 msgid "cholmod_drop() failed" msgstr "cholmod_drop() a échoué" #: Csparse.c:825 #, c-format msgid "Impossible Rk_x/Rk_y in Csparse_%s(), please report" msgstr "" #: Csparse.c:827 #, c-format msgid "chm_MOD_xtype() was not successful in Csparse_%s(), please report" msgstr "" #: Csparse.c:931 msgid "Index i must be NULL or integer" msgstr "l'indice i doit être un entier ou NULL" #: Csparse.c:933 msgid "Index j must be NULL or integer" msgstr "l'indice j doit être un entier ou NULL" #: Csparse.c:992 #, c-format msgid "failure to open file \"%s\" for writing" msgstr "erreur lors de l'ouverture en écriture du fichier \"%s\"" #: Csparse.c:996 msgid "cholmod_write_sparse returned error code" msgstr "cholmod_write_sparse a renvoyé le code d'erreur" #: Csparse.c:1095 #, c-format msgid "%s = '%s' (back-permuted) is experimental" msgstr "%s = '%s' (back-permuted) est expérimental" #: Csparse.c:1105 msgid "diag_tC(): invalid 'resultKind'" msgstr "diag_tC() : 'resultKind' incorrect" #: Csparse.c:1177 #, c-format msgid "negative vector lengths not allowed: np = %d, nnz = %d" msgstr "" "les longueurs de vecteurs négatives ne sont pas autorisées : np = %d, nnz = " "%d" #: Csparse.c:1182 msgid "exactly 1 of 'i', 'j' or 'p' must be NULL" msgstr "exactement un des arguments 'i', 'j' ou 'p' doit être NULL" #: Csparse.c:1184 #, c-format msgid "np = %d, must be zero when p is NULL" msgstr "np = %d, il doit être égal à zéro lorsque p est NULL" #: Csparse.c:1187 #, c-format msgid "p[0] = %d, should be zero" msgstr "p[0] = %d, il devrait être égal à zéro" #: Csparse.c:1190 msgid "p must be non-decreasing" msgstr "p ne peut être décroissant" #: Csparse.c:1206 #, c-format msgid "Inconsistent dimensions: np = 0 and nnz = %d" msgstr "dimensions incohérentes : np = 0 et nnz = %d" #: Csparse.c:1214 #, c-format msgid "invalid row index at position %d" msgstr "indices de lignes erronés à la position %d" #: Csparse.c:1221 #, c-format msgid "invalid column index at position %d" msgstr "indices de colonnes erronés à la position %d" #: Csparse.c:1231 #, c-format msgid "strlen of cls argument = %d, should be 8" msgstr "strlen de l'argument cls = %d, il devrait valoir 8" #: Csparse.c:1233 #, c-format msgid "cls = \"%s\" does not end in \"CMatrix\"" msgstr "cls = \"%s\" ne se fini pas dans \"CMatrix\"" #: Csparse.c:1243 #, c-format msgid "cls = \"%s\" must begin with 'd', 'l' or 'n'" msgstr "cls = \"%s\" doit commencer par 'd', 'l', ou 'n'" #: Csparse.c:1246 msgid "Only 'g'eneral sparse matrix types allowed" msgstr "Seuls des types de matrices éparses 'g'énéraux sont acceptés" #: Csparse.c:1274 msgid "code not yet written for cls = \"lgCMatrix\"" msgstr "le code pour cls = \"lgCMatrix\" n'est pas encore écrit" #: Mutils.c:14 Mutils.c:33 #, c-format msgid "argument type[1]='%s' must be a one-letter character string" msgstr "" "l'argument type[1]='%s' doit être une chaîne de caractère à une seule lettre" #: Mutils.c:22 #, c-format msgid "argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'" msgstr "l'argument type[1]='%s' doit être 'M','1','O','I','F' ou 'E'" #: Mutils.c:39 #, c-format msgid "argument type[1]='%s' must be one of '1','O', or 'I'" msgstr "l'argument type[1]='%s' doit être '1','O' ou 'I'" #: Mutils.c:50 Mutils.c:66 msgid "object must be a named, numeric vector" msgstr "l'objet doit être un vecteur numérique nommé" #: Mutils.c:113 Mutils.c:137 msgid "'factors' slot must be a named list" msgstr "le slot 'factors' doit être une liste nommée" #: Mutils.c:172 msgid "Matrix object has no 'factors' slot" msgstr "" #: Mutils.c:262 #, c-format msgid "'%s' slot must have length 1" msgstr "le slot '%s' doit avoir une longueur de 1" #: Mutils.c:266 #, c-format msgid "'%s' must have string length 1" msgstr "'%s' doit avoir une longueur de chaîne de caractères de 1" #: Mutils.c:273 #, c-format msgid "'%s' must be in '%s'" msgstr "'%s' doit être compris dans '%s'" #: Mutils.c:292 msgid "'s1' and 's2' must be \"character\" vectors" msgstr "'s1' et 's2' doivent être des vecteurs de type \"character\"" #: Mutils.c:314 msgid "length of x slot != prod(Dim)" msgstr "la longueur du slot x != prod(Dim)" #: Mutils.c:320 msgid "Dim slot must have length 2" msgstr "Le slot Dim doit avoir une longueur de 2" #: Mutils.c:325 #, fuzzy msgid "Dim slot is not integer" msgstr "le slot x doit être un nombre \"double\"" #: Mutils.c:331 msgid "Negative value in Dim" msgid_plural "Negative values in Dim" msgstr[0] "Valeur négative dans Dim" msgstr[1] "Valeurs négatives dans Dim" #: Mutils.c:348 msgid "Dimnames slot is not a list" msgstr "" #: Mutils.c:350 msgid "Dimnames slot is a list, but not of length 2" msgstr "" #: Mutils.c:355 #, fuzzy, c-format msgid "Dimnames[%d] is not a character vector" msgstr "'s1' et 's2' doivent être des vecteurs de type \"character\"" #: Mutils.c:360 #, c-format msgid "length(Dimnames[%d]) differs from Dim[%d] which is %d" msgstr "" #: Mutils.c:387 Mutils.c:413 msgid "'uplo' must be UPP or LOW" msgstr "'uplo' doit être UPP ou LOW" #: Mutils.c:468 dgeMatrix.c:420 dtrMatrix.c:282 msgid "replacement diagonal has wrong length" msgstr "" #: Mutils.c:683 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_geMatrix" msgstr "classe '%s' incorrecte pour dup_mMatrix_as_geMatrix" #: Mutils.c:813 #, c-format msgid "unexpected ctype = %d in dup_mMatrix_as_geMatrix" msgstr "ctype = %d inattendu dans dup_mMatrix_as_geMatrix" #: Mutils.c:841 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_dgeMatrix" msgstr "classe '%s' incorrecte pour dup_mMatrix_as_dgeMatrix" #: Mutils.c:891 msgid "Argument ij must be 2-column integer matrix" msgstr "L'argument ij doit être une matrice d'entiers à 2 colonnes" #: Mutils.c:910 msgid "subscript 'i' out of bounds in M[ij]" msgstr "indice 'i' hors plage dans M[ij]" #: Mutils.c:912 msgid "subscript 'j' out of bounds in M[ij]" msgstr "indice 'j' hors plage dans M[ij]" #: Mutils.c:956 msgid "i and j must be integer vectors of the same length" msgstr "i et j doivent être des vecteurs d'entiers de même longueur" #: Mutils.c:1001 msgid "'data' must be of a vector type" msgstr "'data' doit être un vecteur de type" #: Mutils.c:1008 #, c-format msgid "invalid '%s' argument" msgstr "argument '%s' incorrect" #: Mutils.c:1015 Mutils.c:1023 msgid "non-numeric matrix extent" msgstr "étendue de matrice non numérique" #: Mutils.c:1018 msgid "invalid 'nrow' value (too large or NA)" msgstr "valeur 'nrow' incorrecte (trop large ou NA)" #: Mutils.c:1020 msgid "invalid 'nrow' value (< 0)" msgstr "valeur 'nrow' incorrecte (< 0)" #: Mutils.c:1026 msgid "invalid 'ncol' value (too large or NA)" msgstr "valeur 'ncol' incorrecte (trop large ou NA)" #: Mutils.c:1028 msgid "invalid 'ncol' value (< 0)" msgstr "valeur 'ncol' incorrecte (< 0)" #: Mutils.c:1046 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]" msgstr "" "la longueur des données [%d] n'est pas un sous-multiple ou un multiple du " "nombre de lignes [%d]" #: Mutils.c:1049 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of columns " "[%d]" msgstr "" "la longueur des données [%d] n'est pas un sous-multiple ou un multiple du " "nombre de colonnes [%d]" #: Mutils.c:1052 msgid "data length exceeds size of matrix" msgstr "la longueur des données excède la taille de la matrice" #: Mutils.c:1058 msgid "too many elements specified" msgstr "trop d'éléments sont spécifiés" #: Mutils.c:1131 #, c-format msgid "the number of columns differ in R_rbind2_vector: %d != %d" msgstr "" #: Mutils.c:1185 Mutils.c:1216 Mutils.c:1227 Mutils.c:1254 msgid "Argument must be numeric-like atomic vector" msgstr "" "L'argument doit être un vecteur atomique de type numérique ou convertible en " "nombres" #: Tsparse.c:20 msgid "lengths of slots i and j must match" msgstr "la longueur des slots i et j doit correspondre" #: Tsparse.c:23 msgid "slot Dim must have length 2" msgstr "le slot Dim doit avoir une longueur de 2" #: Tsparse.c:27 msgid "" "all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrix" msgstr "" "tous les indices de lignes (slot 'i') doivent être compris entre 0 et nrow-1 " "dans une TsparseMatrix" #: Tsparse.c:29 msgid "" "all column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrix" msgstr "" "tous les indices de colonnes (slot 'j') doivent être compris entre 0 et " "ncol-1 dans une TsparseMatrix" #: chm_common.c:76 msgid "Argument rho must be an environment" msgstr "L'argument rho doit être un environnement" #: chm_common.c:253 msgid "invalid class of object to as_cholmod_sparse" msgstr "classe d'objet incorrecte pour as_cholmod_sparse" #: chm_common.c:255 msgid "invalid object passed to as_cholmod_sparse" msgstr "objet incorrect passé à as_cholmod_sparse" #: chm_common.c:282 msgid "in_place cholmod_sort returned an error code" msgstr "in_place cholmod_sort a renvoyé le code d'erreur" #: chm_common.c:288 msgid "cholmod_sort returned an error code" msgstr "cholmod_sort a renvoyé le code d'erreur" #: chm_common.c:370 msgid "chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)" msgstr "chm_sparse_to_SEXP(, *) : 'Rkind' incorrect (real kind code)" #: chm_common.c:378 msgid "unknown xtype in cholmod_sparse object" msgstr "xtype inconnu dans cholmod_sparse object" #: chm_common.c:407 chm_common.c:638 chm_common.c:916 chm_common.c:966 msgid "complex sparse matrix code not yet written" msgstr "le code n'est pas encore écrit pour les matrices éparses complexes" #: chm_common.c:412 chm_common.c:643 msgid "Symmetric and triangular both set" msgstr "Symmetric et triangular sont tous deux sélectionnés" #: chm_common.c:488 msgid "invalid class of object to as_cholmod_triplet" msgstr "objet de classe incorrecte pour as_cholmod_triplet" #: chm_common.c:512 msgid "as_cholmod_triplet(): could not reallocate for internal diagU2N()" msgstr "" "as_cholmod_triplet() : impossible de réallouer de la mémoire pour la " "fonction interne diagU2N()" #: chm_common.c:610 msgid "unknown xtype in cholmod_triplet object" msgstr "xtype inconnu pour cholmod_triplet object" #: chm_common.c:689 msgid "invalid class of object to as_cholmod_dense" msgstr "classe d'objet incorrecte pour as_cholmod_dense" #: chm_common.c:757 #, c-format msgid "" "chm_transpose_dense(ans, x) not yet implemented for %s different from %s" msgstr "" #: chm_common.c:781 #, c-format msgid "Cholmod error '%s' at file %s, line %d" msgstr "Erreur Cholmod '%s' dans le fichier %s, ligne %d" #: chm_common.c:785 #, c-format msgid "Cholmod warning '%s' at file %s, line %d" msgstr "Avertissement Cholmod '%s' dans le fichier %s, ligne %d" #: chm_common.c:814 #, c-format msgid "Unable to initialize cholmod: error code %d" msgstr "Impossible d'initialiser cholmod : code d'erreur %d" #: chm_common.c:860 msgid "unknown 'Rkind'" msgstr "'Rkind' inconnu" #: chm_common.c:867 chm_common.c:952 msgid "unknown xtype" msgstr "xtype inconnu" #: chm_common.c:922 chm_common.c:975 msgid "code for cholmod_dense with holes not yet written" msgstr "le code pour cholmod_dense en présence de trous n'est pas encore écrit" #: chm_common.c:971 msgid "don't know if a dense pattern matrix makes sense" msgstr "je ne sais pas si une matrice pattern dense a un sens" #: chm_common.c:1038 msgid "invalid class of object to as_cholmod_factor" msgstr "class d'objet incorrecte pour as_cholmod_factor" #: chm_common.c:1052 msgid "Supernodal LDL' decomposition not available" msgstr "La décomposition 'supernodal LDL' n'est pas disponible" #: chm_common.c:1054 msgid "Supernodal/simplicial class inconsistent with type flags" msgstr "Classe supernodal/simplicial incohérente avec le drapeau de type" #: chm_common.c:1072 msgid "Number of supernodes must be positive when is_super is TRUE" msgstr "Le nombre de supernoeuds doit être positif losque is_super est TRUE" #: chm_common.c:1075 msgid "Lengths of super and pi must be equal" msgstr "Les longueurs de super et pi doivent être égales" #: chm_common.c:1079 msgid "Lengths of super and px must be equal" msgstr "Les longueurs de super et px doivent être égales" #: chm_common.c:1092 msgid "failure in as_cholmod_factor" msgstr "erreur dans as_cholmod_factor" #: chm_common.c:1120 msgid "CHOLMOD factorization was unsuccessful" msgstr "la factorisation CHOLMOD a échoué" #: chm_common.c:1133 #, c-format msgid "f->xtype of %d not recognized" msgstr "f->xtype de %d non reconnu" #: chm_common.c:1198 #, c-format msgid "chm_diagN2U(): nrow=%d, ncol=%d" msgstr "chm_diagN2U(): nrow=%d, ncol=%d" #: chm_common.c:1241 #, c-format msgid "chm_diagN2U(x, uploT = %d): uploT should be +- 1" msgstr "chm_diagN2U(x, uploT = %d): uploT doit être +- 1" #: cs_utils.c:37 msgid "csp_eye argument n must be positive" msgstr "l'argument n de csp_eye doit être positif" #: cs_utils.c:68 msgid "invalid class of 'x' in Matrix_as_cs(a, x)" msgstr "classe incorrecte de 'x' dans Matrix_as_cs(a, x)" #: cs_utils.c:127 cs_utils.c:174 cs_utils.c:189 cs_utils.c:209 cs_utils.c:222 #, c-format msgid "invalid class of object to %s" msgstr "classe incorrecte de l'objet à %s" #: cs_utils.c:141 #, c-format msgid "cs matrix not compatible with class '%s'" msgstr "matrice cs incompatible avec la classe '%s'" #: cs_utils.c:246 cs_utils.c:265 #, c-format msgid "Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)" msgstr "Classe inappropriée cl='%s' dans Matrix_css_to_SEXP(S, cl, ..)" #: cs_utils.c:292 cs_utils.c:311 #, c-format msgid "Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)" msgstr "Classe inappropriée cl='%s' dans Matrix_csn_to_SEXP(S, cl, ..)" #: dense.c:29 #, c-format msgid "incorrect left cyclic shift, j (%d) >= k (%d)" msgstr "décalage cyclique à gauche incorrect, j (%d) >= k (%d)" #: dense.c:31 #, c-format msgid "incorrect left cyclic shift, j (%d) < 0" msgstr "décalage cyclique à gauche incorrect, j (%d) < 0" #: dense.c:33 #, c-format msgid "incorrect left cyclic shift, k (%d) > ldx (%d)" msgstr "décalage cyclique à gauche incorrect, k (%d) > ldx (%d)" #: dense.c:78 msgid "Unknown error in getGivens" msgstr "Erreur inconnue dans getGivens" #: dense.c:90 dense.c:106 dense.c:139 msgid "X must be a numeric (double precision) matrix" msgstr "X doit être une matrice numérique (double précision)" #: dense.c:111 dense.c:144 msgid "y must be a numeric (double precision) matrix" msgstr "y doit être une matrice numérique (double précision)" #: dense.c:115 dense.c:148 #, c-format msgid "number of rows in y (%d) does not match number of rows in X (%d)" msgstr "" "le nombre de lignes de y (%d) ne correspond pas au nombre de lignes de X (%d)" #: dense.c:126 #, c-format msgid "Lapack routine dposv returned error code %d" msgstr "La routine Lapack dposv a renvoyé le code d'erreur %d" #: dense.c:158 #, c-format msgid "First call to Lapack routine dgels returned error code %d" msgstr "" "Le premier appel à la routine Lapack dgels a renvoyé le code d'erreur %d" #: dense.c:165 #, c-format msgid "Second call to Lapack routine dgels returned error code %d" msgstr "" "Le second appel à la routine Lapack dgels a renvoyé le code d'erreur %d" #: dense.c:178 msgid "X must be a real (numeric) matrix" msgstr "X doit être une matrice (numérique) de réels" #: dense.c:179 #, c-format msgid "tol, given as %g, must be non-negative" msgstr "tol, donné comme %g, doit être non négatif" #: dense.c:180 #, c-format msgid "tol, given as %g, must be <= 1" msgstr "tol, donné comme %g, doit être <= 1" #: dense.c:204 #, c-format msgid "First call to dgeqrf returned error code %d" msgstr "Le premier appel à dgeqrf a renvoyé le code d'erreur %d" #: dense.c:210 #, c-format msgid "Second call to dgeqrf returned error code %d" msgstr "Le second appel à dgeqrf a renvoyé le code d'erreur %d" #: dense.c:215 dense.c:235 #, c-format msgid "Lapack routine dtrcon returned error code %d" msgstr "La routine Lapack dtrcon a renvoyé le code d'erreur %d" #: dense.c:287 #, c-format msgid "Lower band %d > upper band %d" msgstr "La bande basse %d > la bande haute %d" #: dense.c:358 msgid "ddense_to_symmetric(): matrix is not square!" msgstr "ddense_to_symmetric() : la matrice n'est pas carrée !" #: dense.c:369 #, c-format msgid "matrix is not symmetric [%d,%d]" msgstr "la matrice n'est pas symétrique [%d,%d]" #: dense.c:430 msgid "matrix is not square! (symmetric part)" msgstr "la matrice n'est pas carrée ! (partie symétrique)" #: dense.c:488 msgid "matrix is not square! (skew-symmetric part)" msgstr "la matrice n'est pas carrée ! (partie 'skew-symetric')" #: dgCMatrix.c:24 msgid "lengths of slots 'i' and 'x' must match" msgstr "les longueurs des slots 'i' et 'x' doivent correspondre" #: dgCMatrix.c:36 msgid "lengths of slots 'j' and 'x' must match" msgstr "les longueurs des slots 'j' et 'x' doivent correspondre" #: dgCMatrix.c:58 #, c-format msgid "invalid class(x) '%s' in compressed_to_TMatrix(x)" msgstr "class(x) incorrecte '%s' dans compressed_to_TMatrix(x)" #: dgCMatrix.c:93 #, c-format msgid "invalid class(x) '%s' in R_to_CMatrix(x)" msgstr "class(x) incorrecte '%s' dans R_to_CMatrix(x)" #: dgCMatrix.c:164 msgid "dgCMatrix_lusol requires a square, non-empty matrix" msgstr "dgCMatrix_lusol nécessite une matrice carrée non vide" #: dgCMatrix.c:166 dgCMatrix.c:193 dgCMatrix.c:508 dgCMatrix.c:549 #: dgeMatrix.c:592 dpoMatrix.c:95 dpoMatrix.c:120 dppMatrix.c:80 dspMatrix.c:78 #: dsyMatrix.c:79 dtCMatrix.c:90 dtCMatrix.c:120 dtrMatrix.c:91 msgid "Dimensions of system to be solved are inconsistent" msgstr "Les dimensions du système à résoudre sont incohérentes" #: dgCMatrix.c:168 msgid "cs_lusol failed" msgstr "cs_lusol a échoué" #: dgCMatrix.c:190 msgid "dgCMatrix_qrsol(., order) needs order in {0,..,3}" msgstr "dgCMatrix_qrsol(., order) nécessite un ordre compris entre {0,..,3}" #: dgCMatrix.c:199 #, c-format msgid "dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrix" msgstr "" "dgCMatrix_qrsol(<%d x %d>-matrix) nécessite une matrice rectangulaire haute " "('tall')" #: dgCMatrix.c:210 msgid "cs_qrsol() failed inside dgCMatrix_qrsol()" msgstr "cs_qrsol() a échoué à l'intérieur de dgCMatrix_qrsol()" #: dgCMatrix.c:229 msgid "A must have #{rows} >= #{columns}" msgstr "A doit avoir #{lignes} >= #{colonnes}" #: dgCMatrix.c:234 msgid "cs_sqr failed" msgstr "cs_sqr a échoué" #: dgCMatrix.c:237 msgid "dgcMatrix_QR(*, keep_dimnames = NA): NA taken as TRUE" msgstr "" #: dgCMatrix.c:243 msgid "cs_qr failed" msgstr "cs_qr a échoué" #: dgCMatrix.c:329 msgid "SuiteSparseQR_C_QR returned an error code" msgstr "SuiteSparseQR_C_QR a renvoyé un code d'erreur" #: dgCMatrix.c:373 msgid "LU decomposition applies only to square matrices" msgstr "la décomposition LU n'est utilisable que pour des matrices carrées" #: dgCMatrix.c:382 msgid "cs_lu(A) failed: near-singular A (or out of memory)" msgstr "cs_lu(A) a échoué : A pratiquement singulière (ou manque de mémoire)" #: dgCMatrix.c:468 msgid "dgcMatrix_LU(*, keep_dimnames = NA): NA taken as TRUE" msgstr "" #: dgCMatrix.c:480 msgid "dgCMatrix_matrix_solve(.., sparse=TRUE) not yet implemented" msgstr "dgCMatrix_matrix_solve(.., sparse=TRUE) pas encore implémenté" #: dgCMatrix.c:547 msgid "dgCMatrix_cholsol requires a 'short, wide' rectangular matrix" msgstr "dgCMatrix_cholsol nécessite une matrice rectangulaire en longueur" #: dgCMatrix.c:555 msgid "cholmod_sdmult error (rhs)" msgstr "erreur cholmod_sdmult (partie droite de l'équation)" #: dgCMatrix.c:558 #, c-format msgid "cholmod_factorize failed: status %d, minor %d from ncol %d" msgstr "cholmod_factorize a échoué : statut %d, mineur %d pour ncol %d" #: dgCMatrix.c:562 #, c-format msgid "cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %d" msgstr "cholmod_solve (CHOLMOD_A) a échoué : statut %d, mineur %d pour ncol %d" #: dgCMatrix.c:579 msgid "cholmod_sdmult error (resid)" msgstr "erreur cholmod_sdmult (resid)" #: dgTMatrix.c:15 msgid "lengths of slots i and x must match" msgstr "les longueurs des slots i et x doivent correspondre" #: dgTMatrix.c:33 dgTMatrix.c:62 #, c-format msgid "too large matrix: %.0f" msgstr "" #: dgTMatrix.c:97 #, c-format msgid "Cannot coerce to too large *geMatrix with %.0f entries" msgstr "" "Impossible de convertir automatiquement vers une *geMatrix trop large avec " "%.0f entrées" #: dgeMatrix.c:9 msgid "x slot must be numeric \"double\"" msgstr "le slot x doit être un nombre \"double\"" #: dgeMatrix.c:25 msgid "factors slot must be named list" msgstr "le slot factors doit être une liste nommée" #: dgeMatrix.c:63 msgid "rcond requires a square, non-empty matrix" msgstr "rcond nécessite une matrice carrée non vide" #: dgeMatrix.c:159 dgeMatrix.c:252 #, c-format msgid "Dimensions of x and y are not compatible for %s" msgstr "Les dimensions de x et y ne sont pas compatibles pour %s" #: dgeMatrix.c:231 #, fuzzy msgid "Argument y must be numeric, integer or logical" msgstr "L'argument y doit être un nombre réel ou un entier" #: dgeMatrix.c:314 dgeMatrix.c:318 dspMatrix.c:154 dsyMatrix.c:119 #: dtrMatrix.c:127 msgid "Matrices are not conformable for multiplication" msgstr "Les matrices sont incohérentes pour leur multiplication" #: dgeMatrix.c:456 msgid "diagonal to be added has wrong length" msgstr "" #: dgeMatrix.c:475 msgid "Cannot factor a matrix with zero extents" msgstr "Impossible de factoriser une matrice de dimensions nulles" #: dgeMatrix.c:486 dpoMatrix.c:46 dppMatrix.c:36 dspMatrix.c:183 #, c-format msgid "Lapack routine %s returned error code %d" msgstr "la routine Lapack %s a renvoyé le code d'erreur %d" #: dgeMatrix.c:488 #, c-format msgid "Exact singularity detected during LU decomposition: %s, i=%d." msgstr "Singularité exacte détectée lors d'une décomposition LU : %s, i=%d." #: dgeMatrix.c:510 msgid "Determinant requires a square matrix" msgstr "Determinant nécessite une matrice carrée" #: dgeMatrix.c:552 msgid "Solve requires a square matrix" msgstr "Solve nécessite une matrice carrée" #: dgeMatrix.c:565 #, c-format msgid "error [%d] from Lapack 'dgecon()'" msgstr "erreur [%d] depuis Lapack 'dgecon()'" #: dgeMatrix.c:567 #, c-format msgid "" "Lapack dgecon(): system computationally singular, reciprocal condition " "number = %g" msgstr "" "Lapack dgecon() : système calculé singulier, nombre de condition réciproque " "= %g" #: dgeMatrix.c:577 msgid "Lapack routine dgetri: system is exactly singular" msgstr "la routine Lapack dgetri : le système est exactement singulier" #: dgeMatrix.c:598 msgid "Lapack routine dgetrs: system is exactly singular" msgstr "la routine Lapack dgetrs : le système est exactement singulier" #: dgeMatrix.c:681 msgid "Matrix exponential requires square, non-null matrix" msgstr "L'exponentiation de matrice nécessite une matrice carrée non nulle" #: dgeMatrix.c:698 dgeMatrix.c:700 #, c-format msgid "dgeMatrix_exp: LAPACK routine dgebal returned %d" msgstr "dgeMatrix_exp : la routine LAPACK dgebal a renvoyé %d" #: dgeMatrix.c:738 #, c-format msgid "dgeMatrix_exp: dgetrf returned error code %d" msgstr "dgeMatrix_exp : dgetrf a renvoyé le code d'erreur %d" #: dgeMatrix.c:740 #, c-format msgid "dgeMatrix_exp: dgetrs returned error code %d" msgstr "dgeMatrix_exp : dgetrs a renvoyé le code d'erreur %d" #: dgeMatrix.c:813 msgid "dgeMatrix_Schur: argument x must be a non-null square matrix" msgstr "dgeMatrix_Schur : l'argument x doit être une matrice carrée non nulle" #: dgeMatrix.c:824 msgid "dgeMatrix_Schur: first call to dgees failed" msgstr "dgeMatrix_Schur : le premier appel à dgees a échoué" #: dgeMatrix.c:833 #, c-format msgid "dgeMatrix_Schur: dgees returned code %d" msgstr "dgeMatrix_Schur : dgees a renvoyé le code d'erreur %d" #: dpoMatrix.c:16 msgid "dpoMatrix is not positive definite" msgstr "dpoMatrix n'est pas un entier positif fini" #: dpoMatrix.c:43 dppMatrix.c:33 #, c-format msgid "the leading minor of order %d is not positive definite" msgstr "le 'leading minor of order' %d n'est pas un entier fini" #: dpoMatrix.c:97 msgid "Cannot solve() for matrices with zero extents" msgstr "" "Impossible de résoudre avec solve() pour des matrices de dimensions nulles" #: dpoMatrix.c:118 msgid "Argument b must be a numeric matrix" msgstr "L'argument b doit être une matrice numérique" #: dsCMatrix.c:25 msgid "chm_factor_name(): did not get string of length 11" msgstr "" "chm_factor_name() : une chaîne de caractère de langueur 11 n'est pas obtenue" #: dsCMatrix.c:99 msgid "" "Cholesky factorization failed; unusually, please report to Matrix-authors" msgstr "" "la factorisation Cholesky a échoué ; inhabituel, veuillez reporter le " "problème aux auteurs du package Matrix" #: dsCMatrix.c:105 msgid "internal_chm_factor: Cholesky factorization failed" msgstr "internal_chm_factor : la factorisation Cholesky a échoué" #: dsCMatrix.c:250 msgid "Non-symmetric matrix passed to dsCMatrix_to_dgTMatrix" msgstr "Matrice non symétrique passé à dsCMatrix_to_dgTMatrix" #: dspMatrix.c:13 dtpMatrix.c:17 msgid "Incorrect length of 'x' slot" msgstr "Longueur incorrecte du slot 'x'" #: dspMatrix.c:146 dsyMatrix.c:112 #, c-format msgid "Matrix dimension %d x %d (= %g) is too large" msgstr "" #: dsyMatrix.c:7 dtrMatrix.c:10 msgid "'Dim' slot has length less than two" msgstr "le slot 'Dim' a une longueur inférieure à deux" #: dsyMatrix.c:9 dtrMatrix.c:12 msgid "Matrix is not square" msgstr "Matrix n'est pas carrée" #: dsyMatrix.c:164 #, c-format msgid "Lapack routine dsytrf returned error code %d" msgstr "la routine Lapack dsytrf a renvoyé le code d'erreur %d" #: dtCMatrix.c:28 dtCMatrix.c:63 dtTMatrix.c:24 msgid "uplo='U' must not have sparse entries below the diagonal" msgstr "uplo='U' ne peut avoir des entrées éparses en dessous de la diagonale" #: dtCMatrix.c:34 dtCMatrix.c:69 dtTMatrix.c:29 msgid "uplo='L' must not have sparse entries above the diagonal" msgstr "uplo='L' ne peut avoir des entrées éparses au dessus de la diagonale" #: dtpMatrix.c:124 dtpMatrix.c:152 dtpMatrix.c:183 #, c-format msgid "Dimensions of a (%d,%d) and b (%d,%d) do not conform" msgstr "Les dimensions de a (%d,%d) et b(%d,%d) ne sont pas conformes" #: dtpMatrix.c:131 msgid "right=TRUE is not yet implemented __ FIXME" msgstr "right=TRUE n'est pas implémenté __ FIXME" #: dtrMatrix.c:125 msgid "dtrMatrix must be square" msgstr "dtrMatrix doit être carrée" #: dtrMatrix.c:188 #, fuzzy msgid "\"dtrMatrix\" objects in '%*%' must have matching (square) dimension" msgstr "" "les objets \"dtrMatrix\" dans '%*%' doivent avoir des dimensions (carrées) " "cohérentes" #: dtrMatrix.c:277 msgid "cannot set diag() as long as 'diag = \"U\"'" msgstr "impossible d'utiliser diag() puisque 'diag = \"U\"'" #: dtrMatrix.c:311 msgid "cannot add diag() as long as 'diag = \"U\"'" msgstr "impossible d'ajouter diag() puisque 'diag = \"U\"'" #: factorizations.c:18 #, fuzzy msgid "x slot is not \"double\"" msgstr "le slot x doit être un nombre \"double\"" #: factorizations.c:20 msgid "x slot is not of correct length" msgstr "" #: init.c:370 msgid "missing 'Matrix' namespace: should never happen" msgstr "espace de nom 'Matrix' manquant : ceci ne devrait jamais se produire" #: init.c:381 msgid "Matrix namespace not determined correctly" msgstr "l'espace de nom Matrix n'est pas correctement déterminé" #: lgCMatrix.c:58 msgid "A must be a logical matrix" msgstr "A doit être une matrice de valeurs logiques" #: sparseQR.c:13 msgid "length(p) must match nrow(V)" msgstr "length(p) doit correspondre à nrow(V)" #: sparseQR.c:15 msgid "length(beta) must match ncol(V)" msgstr "length(beta) doit correspondre à ncol(V)" #: sparseQR.c:18 msgid "length(q) must be zero or ncol(R)" msgstr "length(q) doit valoir zéro ou ncol(R)" #: sparseQR.c:46 #, c-format msgid "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" msgstr "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" #: sparseQR.c:134 sparseQR.c:175 sparseQR.c:210 #, c-format msgid "%s(): structurally rank deficient case: possibly WRONG zeros" msgstr "" "%s() : cas structurellement déficient de rang : probablement des zéros " "ERRONES" #: t_Csparse_subassign.c:144 msgid "invalid class of 'x' in Csparse_subassign()" msgstr "classe de 'x' incorrecte dans Csparse_subassign()" #: t_Csparse_subassign.c:146 msgid "invalid class of 'value' in Csparse_subassign()" msgstr "classe de 'value' incorrecte dans Csparse_subassign()" #: t_Csparse_subassign.c:189 #, c-format msgid "x[] <- val: val is coerced to logical for \"%s\" x" msgstr "" "x[] <- val: val est converti automatiquement en valeurs logiques pour \"%s\" " "x" #: t_Csparse_subassign.c:194 #, c-format msgid "" "x[] <- val: val should be integer or logical, is coerced to integer, for \"%s" "\" x" msgstr "" "x[] <- val: val devrait être des entiers ou des valeurs logiques, il est " "converti automatiquement en entiers pour \"%s\" x" #: t_Csparse_subassign.c:201 msgid "programming error in Csparse_subassign() should never happen" msgstr "" "erreur de programmation dans Csparse_subassign() qui ne devrait jamais se " "produire" #~ msgid "not a CsparseMatrix" #~ msgstr "ceci n'est pas un CsparseMatrix" Matrix/po/ko.po0000644000176200001440000010603013047321304013102 0ustar liggesusers# Korean translations for Matrix package. # Recommended/Matrix/po/ko.po # # Thanks to Martin Maechler # # This file is distributed under the same license as the R Matrix package. # Maintained by Chel Hee Lee , 2013-2015. # # Notes: # Freezing on 15-JUL-2015 for R-3.3.0, QC: PASS # Freezing on 30-MAR-2015 for R-3.2.0, QC: PASS # Freezing on 28-FEB-2015 for R-3.1.3, QC: PASS # msgid "" msgstr "" "Project-Id-Version: Matrix 1.1-3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-10 12:21+0100\n" "PO-Revision-Date: 2015-07-15 17:14-0600\n" "Last-Translator:Chel Hee Lee \n" "Language-Team: Chel Hee Lee \n" "Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: CHMfactor.c:14 #, c-format msgid "cholmod_change_factor failed with status %d" msgstr "cholmod_change_factor가 실패했으며 상태 %d를 가집니다" #: CHMfactor.c:30 CHMfactor.c:60 msgid "system argument is not valid" msgstr "시스템 인자가 올바르지 않습니다" #: CHMfactor.c:47 #, c-format msgid "cholmod_updown() returned %d" msgstr "%d가 cholmod_updown()로부터 반환되었습니다" #: CHMfactor.c:103 #, c-format msgid "diagonal element %d of Cholesky factor is missing" msgstr "콜레스키 분해(Cholesky factor)의 대각요소 %d를 찾을 수 없습니다" #: CHMfactor.c:141 #, c-format msgid "cholmod_factorize_p failed: status %d, minor %d of ncol %d" msgstr "cholmod_factorize_p failed: status %d, minor %d of ncol %d" #: CHMfactor.c:146 msgid "cholmod_change_factor failed" msgstr "cholmod_change_factor failed" #: Csparse.c:58 msgid "Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrix" msgstr "Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrix" #: Csparse.c:76 msgid "slot p must have length = nrow(.) + 1" msgstr "슬롯 p는 반드시 nrow(.) + 1의 길이(length)를 가져야 합니다." #: Csparse.c:78 msgid "first element of slot p must be zero" msgstr "슬롯 p의 첫번째 요소는 반드시 0 이어야 합니다. " #: Csparse.c:81 msgid "last element of slot p must match length of slots j and x" msgstr "슬롯 p의 마지막 요소는 반드시 슬롯 j 와 x의 길이와 일치해야 합니다." #: Csparse.c:84 msgid "all column indices must be between 0 and ncol-1" msgstr "모든 열 인덱스는 반드시 0 부터 ncol-1 사이의 값이어야 합니다." #: Csparse.c:89 msgid "slot p must be non-decreasing" msgstr "슬롯 p는 반드시 감소하지 않아야(non-decreasing) 합니다." #: Csparse.c:100 msgid "slot j is not increasing inside a column" msgstr "슬롯 j는 열(column)내에서 증가하지 않습니다" #: Csparse.c:102 msgid "slot j is not *strictly* increasing inside a column" msgstr "슬롯 j는 열(column)내에서 *단조*증가하지 않습니다" #: Csparse.c:214 msgid "Csparse_to_nz_pattern(x, tri = NA): 'tri' is taken as TRUE" msgstr "" #: Csparse.c:237 msgid "not a 'n.CMatrix'" msgstr "'n.CMatrix'이 아닙니다. " #: Csparse.c:267 #, c-format msgid "nz2Csparse(): invalid/non-implemented r_kind = %d" msgstr "nz2Csparse(): 유효하지 않거나 구현되지 않은 r_kind = %d입니다" #: Csparse.c:350 msgid "Nonsymmetric matrix in Csparse_symmetric_to_general" msgstr "Csparse_symmetric_to_general에 비대칭행렬이 사용되었습니다" #: Csparse.c:361 msgid "Csparse_general_to_symmetric(): matrix is not square!" msgstr "Csparse_general_to_symmetric(): 정방행렬이 아닙니다!" #: Csparse.c:770 msgid "Csparse_crossprod(): error return from cholmod_aat()" msgstr "Csparse_crossprod(): cholmod_aat()로부터 에러가 반환되었습니다" #: Csparse.c:799 msgid "cholmod_drop() failed" msgstr "cholmod_drop() failed" #: Csparse.c:825 #, c-format msgid "Impossible Rk_x/Rk_y in Csparse_%s(), please report" msgstr "" #: Csparse.c:827 #, c-format msgid "chm_MOD_xtype() was not successful in Csparse_%s(), please report" msgstr "" #: Csparse.c:931 msgid "Index i must be NULL or integer" msgstr "인덱스 i는 반드시 NULL 또는 정수(integer)이어야 합니다." #: Csparse.c:933 msgid "Index j must be NULL or integer" msgstr "인덱스 j는 반드시 NULL 또는 정수(integer)이어야 합니다." #: Csparse.c:992 #, c-format msgid "failure to open file \"%s\" for writing" msgstr "쓰기 위하여 파일 \"%s\"을 여는데 실패했습니다." #: Csparse.c:996 msgid "cholmod_write_sparse returned error code" msgstr "cholmod_write_sparse가 에러코드를 반환하였습니다." #: Csparse.c:1095 #, c-format msgid "%s = '%s' (back-permuted) is experimental" msgstr "%s = '%s' (back-permuted)는 실험단계에 있습니다" #: Csparse.c:1105 msgid "diag_tC(): invalid 'resultKind'" msgstr "diag_tC(): 유효한 'resultKind'가 아닙니다" #: Csparse.c:1177 #, c-format msgid "negative vector lengths not allowed: np = %d, nnz = %d" msgstr "벡터의 길이가 음수입니다: np = %d, nnz = %d" #: Csparse.c:1182 msgid "exactly 1 of 'i', 'j' or 'p' must be NULL" msgstr "'i', 'j', 또는 'p' 중의 하나만이 반드시 NULL 이어야 합니다." #: Csparse.c:1184 #, c-format msgid "np = %d, must be zero when p is NULL" msgstr "p가 NULL인 경우에는 반드시 np의 값은 0이어야 하는데 %d 입니다." #: Csparse.c:1187 #, c-format msgid "p[0] = %d, should be zero" msgstr "p[0]의 값은 0 이어야 하는데 %d 를 가집니다." #: Csparse.c:1190 msgid "p must be non-decreasing" msgstr "p는 반드시 감소하지 않아야(non-decreasing) 합니다." #: Csparse.c:1206 #, c-format msgid "Inconsistent dimensions: np = 0 and nnz = %d" msgstr "차원정보가 일치하지 않습니다: np = 0 그리고 nnz = %d" #: Csparse.c:1214 #, c-format msgid "invalid row index at position %d" msgstr "%d번째 위치에서 유효하지 않은 행인덱스가 있습니다" #: Csparse.c:1221 #, c-format msgid "invalid column index at position %d" msgstr "%d번째 위치에서 유효하지 않은 열인덱스가 있습니다" #: Csparse.c:1231 #, c-format msgid "strlen of cls argument = %d, should be 8" msgstr "cls의 strlen 인자의 길이는 8 이어야 하는데 %d 입니다." #: Csparse.c:1233 #, c-format msgid "cls = \"%s\" does not end in \"CMatrix\"" msgstr "cls = \"%s\" does not end in \"CMatrix\"" #: Csparse.c:1243 #, c-format msgid "cls = \"%s\" must begin with 'd', 'l' or 'n'" msgstr "cls = \"%s\"는 반드시 'd', 'l' 또는 'n'으로 시작해야 합니다." #: Csparse.c:1246 msgid "Only 'g'eneral sparse matrix types allowed" msgstr "Only 'g'eneral sparse matrix types allowed" #: Csparse.c:1274 msgid "code not yet written for cls = \"lgCMatrix\"" msgstr "아직은 cls = \"lgCMatrix\"을 위하여 작성된 코드가 아닙니다" #: Mutils.c:14 Mutils.c:33 #, c-format msgid "argument type[1]='%s' must be a one-letter character string" msgstr "인자 type[1]='%s'는 반드시 길이가 1인 문자이어야 합니다." #: Mutils.c:22 #, c-format msgid "argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'" msgstr "" "인자 type[1]='%s'은 반드시 'M','1','O','I','F' 또는 'E' 중 하나의 값을 가져" "야 합니다." #: Mutils.c:39 #, c-format msgid "argument type[1]='%s' must be one of '1','O', or 'I'" msgstr "" "인자 type[1]='%s'은 반드시 '1', '0', 또는 'I' 중 하나의 값을 가져야 합니다." #: Mutils.c:50 Mutils.c:66 msgid "object must be a named, numeric vector" msgstr "객체는 반드시 원소에 이름이 주어진 수치형 벡터이어야 합니다." #: Mutils.c:113 Mutils.c:137 msgid "'factors' slot must be a named list" msgstr "'factors' 슬롯은 반드시 이름이 주어진 리스트이어야 합니다" #: Mutils.c:172 msgid "Matrix object has no 'factors' slot" msgstr "행렬의 객체가 'factors' 슬롯을 가지고 있지 않습니다" #: Mutils.c:262 #, c-format msgid "'%s' slot must have length 1" msgstr "슬롯 '%s'의 길이는 반드시 1이어야 합니다." #: Mutils.c:266 #, c-format msgid "'%s' must have string length 1" msgstr "'%s'는 반드시 길이가 1인 문자열(string)이어야 합니다." #: Mutils.c:273 #, c-format msgid "'%s' must be in '%s'" msgstr "'%s'는 반드시 '%s'내에 있어야 합니다." #: Mutils.c:292 msgid "'s1' and 's2' must be \"character\" vectors" msgstr "'s1'과 's2'는 반드시 \"character\"형 벡터이어야 합니다." #: Mutils.c:314 msgid "length of x slot != prod(Dim)" msgstr "x 슬롯의 길이가 prod(Dim)과 같지 않습니다." #: Mutils.c:320 msgid "Dim slot must have length 2" msgstr "Dim 슬롯(slot)의 길이는 반드시 2이어야 합니다." #: Mutils.c:325 #, fuzzy msgid "Dim slot is not integer" msgstr "x 슬롯(slot)은 반드시 \"double\"형 숫자(numeric)이어야 합니다." #: Mutils.c:331 msgid "Negative value in Dim" msgid_plural "Negative values in Dim" msgstr[0] "Dim 안에 음수가 있습니다." #: Mutils.c:348 msgid "Dimnames slot is not a list" msgstr "" #: Mutils.c:350 msgid "Dimnames slot is a list, but not of length 2" msgstr "" #: Mutils.c:355 #, fuzzy, c-format msgid "Dimnames[%d] is not a character vector" msgstr "'s1'과 's2'는 반드시 \"character\"형 벡터이어야 합니다." #: Mutils.c:360 #, c-format msgid "length(Dimnames[%d]) differs from Dim[%d] which is %d" msgstr "" #: Mutils.c:387 Mutils.c:413 msgid "'uplo' must be UPP or LOW" msgstr "'uplo'는 반드시 UPP 또는 LOW이어야 합니다." #: Mutils.c:468 dgeMatrix.c:420 dtrMatrix.c:282 msgid "replacement diagonal has wrong length" msgstr "" #: Mutils.c:683 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_geMatrix" msgstr "dup_mMatrix_as_geMatrix에 올바르지 않은 클래스 '%s'입니다" #: Mutils.c:813 #, c-format msgid "unexpected ctype = %d in dup_mMatrix_as_geMatrix" msgstr "dup_mMatrix_as_geMatrix에 사용할 수 없는 ctype = %d가 입력되었습니다." #: Mutils.c:841 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_dgeMatrix" msgstr "dup_mMatrix_as_dgeMatrix에 올바르지 않은 클래스 '%s'입니다" #: Mutils.c:891 msgid "Argument ij must be 2-column integer matrix" msgstr "인자 ij는 반드시 2개의 열을 가진 정수형 행렬이어야 합니다." #: Mutils.c:910 msgid "subscript 'i' out of bounds in M[ij]" msgstr "첨자 'i'가 M[ij]내에 존재하지 않습니다." #: Mutils.c:912 msgid "subscript 'j' out of bounds in M[ij]" msgstr "첨자 'j'가 M[ij]내에 존재하지 않습니다." #: Mutils.c:956 msgid "i and j must be integer vectors of the same length" msgstr "" "i와 j는 반드시 같은 길이를 가지는 정수형 벡터(integer vectors)이어야 합니다." #: Mutils.c:1001 msgid "'data' must be of a vector type" msgstr "'data'는 반드시 벡터형(vector type)이어야 합니다." #: Mutils.c:1008 #, c-format msgid "invalid '%s' argument" msgstr "'%s' 인자는 유효하지 않습니다" #: Mutils.c:1015 Mutils.c:1023 msgid "non-numeric matrix extent" msgstr "non-numeric matrix extent" #: Mutils.c:1018 msgid "invalid 'nrow' value (too large or NA)" msgstr "'nrow'의 값이 너무 크거나 NA이므로 올바르지 않습니다." #: Mutils.c:1020 msgid "invalid 'nrow' value (< 0)" msgstr "'nrow'의 값이 0 보다 작으므로 올바르지 않습니다." #: Mutils.c:1026 msgid "invalid 'ncol' value (too large or NA)" msgstr "'ncol'의 값이 너무 크거나 NA이므로 올바르지 않습니다." #: Mutils.c:1028 msgid "invalid 'ncol' value (< 0)" msgstr "'ncol'의 값이 0보다 작으므로 올바르지 않습니다." #: Mutils.c:1046 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]" msgstr "데이터의 길이[%d]가 행의 개수[%d]의 약수 또는 배수가 아닙니다" #: Mutils.c:1049 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of columns " "[%d]" msgstr "데이터의 길이[%d]가 열의 개수[%d]의 약수 또는 배수가 아닙니다" #: Mutils.c:1052 msgid "data length exceeds size of matrix" msgstr "데이터의 길이(data length)가 행렬의 크기(size of matrix)를 초과합니다." #: Mutils.c:1058 msgid "too many elements specified" msgstr "너무 많은 요소들이 지정되었습니다" #: Mutils.c:1131 #, c-format msgid "the number of columns differ in R_rbind2_vector: %d != %d" msgstr "" #: Mutils.c:1185 Mutils.c:1216 Mutils.c:1227 Mutils.c:1254 msgid "Argument must be numeric-like atomic vector" msgstr "인자는 반드시 수치형과 같은 기본형 벡터이어야합니다" #: Tsparse.c:20 msgid "lengths of slots i and j must match" msgstr "슬롯 i의 길이와 슬롯 j의 길이는 반드시 일치해야 합니다." #: Tsparse.c:23 msgid "slot Dim must have length 2" msgstr "슬롯 Dim의 길이는 반드시 2이어야 합니다." #: Tsparse.c:27 msgid "" "all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrix" msgstr "" "TsparseMatrix에 사용되는 모든 행에 대한 인덱스 (슬롯 'i')는 반드시 0과 " "nrow-1 사이에 존재하는 정수이어야 합니다." #: Tsparse.c:29 msgid "" "all column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrix" msgstr "" "TsparseMatrix에 사용되는 모든 열에 대한 인덱스 (슬롯 'j')는 반드시 0과 " "ncol-1 사이에 존재하는 정수이어야 합니다." #: chm_common.c:76 msgid "Argument rho must be an environment" msgstr "인자 rho는 반드시 인바이런먼트(environment)이어야 합니다." #: chm_common.c:253 msgid "invalid class of object to as_cholmod_sparse" msgstr "as_cholmod_sparse에 전달된 객체가 올바르지 않습니다." #: chm_common.c:255 msgid "invalid object passed to as_cholmod_sparse" msgstr "as_cholmod_sparse에 전달된 객체가 올바르지 않습니다." #: chm_common.c:282 msgid "in_place cholmod_sort returned an error code" msgstr "in_place cholmod_sort returned an error code" #: chm_common.c:288 msgid "cholmod_sort returned an error code" msgstr "에러코드가 cholmod_sort로부터 반환되었습니다." #: chm_common.c:370 msgid "chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)" msgstr "chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)" #: chm_common.c:378 msgid "unknown xtype in cholmod_sparse object" msgstr "cholmod_sparse 객체에 사용할 수 있는 xtype이 아닙니다." #: chm_common.c:407 chm_common.c:638 chm_common.c:916 chm_common.c:966 msgid "complex sparse matrix code not yet written" msgstr "complex sparse matrix code not yet written" #: chm_common.c:412 chm_common.c:643 msgid "Symmetric and triangular both set" msgstr "Symmetric and triangular both set" #: chm_common.c:488 msgid "invalid class of object to as_cholmod_triplet" msgstr "as_cholmod_triplet에 전달된 객체의 클래스가 올바르지 않습니다." #: chm_common.c:512 msgid "as_cholmod_triplet(): could not reallocate for internal diagU2N()" msgstr "as_cholmod_triplet(): could not reallocate for internal diagU2N()" #: chm_common.c:610 msgid "unknown xtype in cholmod_triplet object" msgstr "cholmod_triplet 객체에서 사용할 수 있는 xtype이 아닙니다." #: chm_common.c:689 msgid "invalid class of object to as_cholmod_dense" msgstr "as_cholmod_dense에 전달된 객체의 클래스가 올바르지 않습니다." #: chm_common.c:757 #, c-format msgid "" "chm_transpose_dense(ans, x) not yet implemented for %s different from %s" msgstr "" #: chm_common.c:781 #, c-format msgid "Cholmod error '%s' at file %s, line %d" msgstr "Cholmod error '%s' at file %s, line %d" #: chm_common.c:785 #, c-format msgid "Cholmod warning '%s' at file %s, line %d" msgstr "Cholmod warning '%s' at file %s, line %d" #: chm_common.c:814 #, c-format msgid "Unable to initialize cholmod: error code %d" msgstr "cholmod를 초기화 할 수 없습니다: 에러코드 %d" #: chm_common.c:860 msgid "unknown 'Rkind'" msgstr "사용할 수 있는 'Rkind'이 아닙니다." #: chm_common.c:867 chm_common.c:952 msgid "unknown xtype" msgstr "사용할 수 있는 xtype이 아닙니다." #: chm_common.c:922 chm_common.c:975 msgid "code for cholmod_dense with holes not yet written" msgstr "code for cholmod_dense with holes not yet written" #: chm_common.c:971 msgid "don't know if a dense pattern matrix makes sense" msgstr "don't know if a dense pattern matrix makes sense" #: chm_common.c:1038 msgid "invalid class of object to as_cholmod_factor" msgstr "invalid class of object to as_cholmod_factor" #: chm_common.c:1052 msgid "Supernodal LDL' decomposition not available" msgstr "Supernodal LDL' decomposition not available" #: chm_common.c:1054 msgid "Supernodal/simplicial class inconsistent with type flags" msgstr "Supernodal/simplicial class inconsistent with type flags" #: chm_common.c:1072 msgid "Number of supernodes must be positive when is_super is TRUE" msgstr "is_super가 TRUE인 경우에 supernodes의 개수는 반드시 양수이어야 합니다." #: chm_common.c:1075 msgid "Lengths of super and pi must be equal" msgstr "super의 길이와 pi의 길이는 반드시 서로 같아야 합니다." #: chm_common.c:1079 msgid "Lengths of super and px must be equal" msgstr "super의 길이와 px의 길이는 반드시 서로 같아야 합니다." #: chm_common.c:1092 msgid "failure in as_cholmod_factor" msgstr "failure in as_cholmod_factor" #: chm_common.c:1120 msgid "CHOLMOD factorization was unsuccessful" msgstr "CHOLMOD factorization was unsuccessful" #: chm_common.c:1133 #, c-format msgid "f->xtype of %d not recognized" msgstr "f->xtype of %d not recognized" #: chm_common.c:1198 #, c-format msgid "chm_diagN2U(): nrow=%d, ncol=%d" msgstr "chm_diagN2U(): nrow=%d, ncol=%d" #: chm_common.c:1241 #, c-format msgid "chm_diagN2U(x, uploT = %d): uploT should be +- 1" msgstr "chm_diagN2U(x, uploT = %d): uploT은 반드시 1 또는 -1이어야 합니다" #: cs_utils.c:37 msgid "csp_eye argument n must be positive" msgstr "csp_eye의 인자 n은 반드시 양수이어야 합니다" #: cs_utils.c:68 msgid "invalid class of 'x' in Matrix_as_cs(a, x)" msgstr "Matrix_as_cs(a, x)에 입력된 'x'의 클래스가 올바르지 않습니다." #: cs_utils.c:127 cs_utils.c:174 cs_utils.c:189 cs_utils.c:209 cs_utils.c:222 #, c-format msgid "invalid class of object to %s" msgstr "invalid class of object to %s" #: cs_utils.c:141 #, c-format msgid "cs matrix not compatible with class '%s'" msgstr "cs matrix not compatible with class '%s'" #: cs_utils.c:246 cs_utils.c:265 #, c-format msgid "Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)" msgstr "" "Matrix_css_to_SEXP(S, cl, ..)에 입력된 cl='%s'은 올바른 클래스가 아닙니다." #: cs_utils.c:292 cs_utils.c:311 #, c-format msgid "Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)" msgstr "" "Matrix_csn_to_SEXP(S, cl, ..)에 입력된 cl='%s'는 올바른 클래스가 아닙니다." #: dense.c:29 #, c-format msgid "incorrect left cyclic shift, j (%d) >= k (%d)" msgstr "incorrect left cyclic shift, j (%d) >= k (%d)" #: dense.c:31 #, c-format msgid "incorrect left cyclic shift, j (%d) < 0" msgstr "incorrect left cyclic shift, j (%d) < 0" #: dense.c:33 #, c-format msgid "incorrect left cyclic shift, k (%d) > ldx (%d)" msgstr "incorrect left cyclic shift, k (%d) > ldx (%d)" #: dense.c:78 msgid "Unknown error in getGivens" msgstr "getGivens에서 알 수 없는 에러가 발생했습니다" #: dense.c:90 dense.c:106 dense.c:139 msgid "X must be a numeric (double precision) matrix" msgstr "X는 반드시 double precision을 가진 수치형 행렬이어야 합니다." #: dense.c:111 dense.c:144 msgid "y must be a numeric (double precision) matrix" msgstr "y는 반드시 double precision을 가진 수치형 행렬이어야 합니다." #: dense.c:115 dense.c:148 #, c-format msgid "number of rows in y (%d) does not match number of rows in X (%d)" msgstr "y가 가진 행의 개수 (%d)가 X가 가진 행의 개수 (%d)와 일치하지 않습니다." #: dense.c:126 #, c-format msgid "Lapack routine dposv returned error code %d" msgstr "다음의 에러코드가 Lapack 루틴 dposv으로부터 반환되었습니다: %d" #: dense.c:158 #, c-format msgid "First call to Lapack routine dgels returned error code %d" msgstr "" "Lapack 루틴 dgels에 첫번째 호출로부터 다음과 같은 에러코드가 반환되었습니다: " "%d" #: dense.c:165 #, c-format msgid "Second call to Lapack routine dgels returned error code %d" msgstr "" "Lapack 루틴 dgels에 두번째 호출로부터 다음과 같은 에러코드가 반환되었습니다: " "%d" #: dense.c:178 msgid "X must be a real (numeric) matrix" msgstr "X는 반드시 실수(real)형 숫자를 가진 행렬이어야 합니다." #: dense.c:179 #, c-format msgid "tol, given as %g, must be non-negative" msgstr "tol의 값은 음이 아닌 수이어야 하는데 %g를 가지고 있습니다." #: dense.c:180 #, c-format msgid "tol, given as %g, must be <= 1" msgstr "tol의 값은 1보다 작거나 같아야 하는데 %g를 가지고 있습니다." #: dense.c:204 #, c-format msgid "First call to dgeqrf returned error code %d" msgstr "dgeqrf에 첫번째 호출로부터 다음과 같은 에러코드가 반환되었습니다: %d" #: dense.c:210 #, c-format msgid "Second call to dgeqrf returned error code %d" msgstr "dgeqrf에 두번째 호출로부터 다음과 같은 에러코드가 반환되었습니다: %d" #: dense.c:215 dense.c:235 #, c-format msgid "Lapack routine dtrcon returned error code %d" msgstr "에러코드 %d가 Lapack 루틴 dtrcon으로부터 반환되었습니다." #: dense.c:287 #, c-format msgid "Lower band %d > upper band %d" msgstr "Lower band %d > upper band %d" #: dense.c:358 msgid "ddense_to_symmetric(): matrix is not square!" msgstr "ddense_to_symmetric(): 정방행렬이 아닙니다!" #: dense.c:369 #, c-format msgid "matrix is not symmetric [%d,%d]" msgstr "행렬이 대칭(symmetric)적이지 않습니다 [%d,%d]." #: dense.c:430 msgid "matrix is not square! (symmetric part)" msgstr "정방행렬이 아닙니다! (symmetric part)" #: dense.c:488 msgid "matrix is not square! (skew-symmetric part)" msgstr "정방행렬이 아닙니다! (skew-symmetric part)" #: dgCMatrix.c:24 msgid "lengths of slots 'i' and 'x' must match" msgstr "슬롯 'i'의 길이와 슬롯 'x'의 길이는 반드시 일치해야 합니다." #: dgCMatrix.c:36 msgid "lengths of slots 'j' and 'x' must match" msgstr "슬롯 'j'의 길이와 슬롯 'x'의 길이는 반드시 일치해야 합니다." #: dgCMatrix.c:58 #, c-format msgid "invalid class(x) '%s' in compressed_to_TMatrix(x)" msgstr "compressed_to_TMatrix(x) 내에 유효하지 않은 class(x) '%s'가 존재합니다" #: dgCMatrix.c:93 #, c-format msgid "invalid class(x) '%s' in R_to_CMatrix(x)" msgstr "R_to_CMatrix(x) 내에 유효하지 않은 class(x) '%s'가 존재합니다." #: dgCMatrix.c:164 msgid "dgCMatrix_lusol requires a square, non-empty matrix" msgstr "" "dgCMatrix_lusol은 정방(square)이며 비어있지 않은(non-empty) 행렬을 필요로 합" "니다." #: dgCMatrix.c:166 dgCMatrix.c:193 dgCMatrix.c:508 dgCMatrix.c:549 #: dgeMatrix.c:592 dpoMatrix.c:95 dpoMatrix.c:120 dppMatrix.c:80 dspMatrix.c:78 #: dsyMatrix.c:79 dtCMatrix.c:90 dtCMatrix.c:120 dtrMatrix.c:91 msgid "Dimensions of system to be solved are inconsistent" msgstr "Dimensions of system to be solved are inconsistent" #: dgCMatrix.c:168 msgid "cs_lusol failed" msgstr "cs_lusol 실패" #: dgCMatrix.c:190 msgid "dgCMatrix_qrsol(., order) needs order in {0,..,3}" msgstr "dgCMatrix_qrsol(., order) needs order in {0,..,3}" #: dgCMatrix.c:199 #, c-format msgid "dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrix" msgstr "" "dgCMatrix_qrsol(<%d x %d>-matrix)은 'tall' 사각행렬(rectangular matrix)이 필" "요합니다." #: dgCMatrix.c:210 msgid "cs_qrsol() failed inside dgCMatrix_qrsol()" msgstr "dgCMatrix_qrsol()의 내에서 cs_qrsol()이 실패했습니다" #: dgCMatrix.c:229 msgid "A must have #{rows} >= #{columns}" msgstr "A는 반드시 #{rows} >= #{columns}을 만족해야 합니다." #: dgCMatrix.c:234 msgid "cs_sqr failed" msgstr "cs_sqr 실패" #: dgCMatrix.c:237 msgid "dgcMatrix_QR(*, keep_dimnames = NA): NA taken as TRUE" msgstr "" #: dgCMatrix.c:243 msgid "cs_qr failed" msgstr "cs_qr 실패" #: dgCMatrix.c:329 msgid "SuiteSparseQR_C_QR returned an error code" msgstr "에러코드가 SuiteSparseQR_C_QR로부터 반환되었습니다." #: dgCMatrix.c:373 msgid "LU decomposition applies only to square matrices" msgstr "LU 분해(decomposition)은 오로지 정방행렬에만 적용됩니다." #: dgCMatrix.c:382 msgid "cs_lu(A) failed: near-singular A (or out of memory)" msgstr "cs_lu(A) failed: near-singular A (or out of memory)" #: dgCMatrix.c:468 msgid "dgcMatrix_LU(*, keep_dimnames = NA): NA taken as TRUE" msgstr "" #: dgCMatrix.c:480 msgid "dgCMatrix_matrix_solve(.., sparse=TRUE) not yet implemented" msgstr "dgCMatrix_matrix_solve(.., sparse=TRUE)은 아직 구현되지 않았습니다" #: dgCMatrix.c:547 msgid "dgCMatrix_cholsol requires a 'short, wide' rectangular matrix" msgstr "dgCMatrix_cholsol requires a 'short, wide' rectangular matrix" #: dgCMatrix.c:555 msgid "cholmod_sdmult error (rhs)" msgstr "cholmod_sdmult error (rhs)" #: dgCMatrix.c:558 #, c-format msgid "cholmod_factorize failed: status %d, minor %d from ncol %d" msgstr "cholmod_factorize 실패: 상태 %d, minor %d from ncol %d" #: dgCMatrix.c:562 #, c-format msgid "cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %d" msgstr "cholmod_solve (CHOLMOD_A) 실패: 상태 %d, minor %d from ncol %d" #: dgCMatrix.c:579 msgid "cholmod_sdmult error (resid)" msgstr "cholmod_sdmult error (resid)" #: dgTMatrix.c:15 msgid "lengths of slots i and x must match" msgstr "슬롯 i의 길이와 슬롯 x의 길이는 서로 일치해야 합니다." #: dgTMatrix.c:33 dgTMatrix.c:62 #, c-format msgid "too large matrix: %.0f" msgstr "" #: dgTMatrix.c:97 #, c-format msgid "Cannot coerce to too large *geMatrix with %.0f entries" msgstr "Cannot coerce to too large *geMatrix with %.0f entries" #: dgeMatrix.c:9 msgid "x slot must be numeric \"double\"" msgstr "x 슬롯(slot)은 반드시 \"double\"형 숫자(numeric)이어야 합니다." #: dgeMatrix.c:25 msgid "factors slot must be named list" msgstr "factors slot must be named list" #: dgeMatrix.c:63 msgid "rcond requires a square, non-empty matrix" msgstr "rcond는 비어있지 않은 정방행렬이어야 합니다." #: dgeMatrix.c:159 dgeMatrix.c:252 #, c-format msgid "Dimensions of x and y are not compatible for %s" msgstr "x와 y의 차원정보가 %s와 일치하지 않습니다." #: dgeMatrix.c:231 msgid "Argument y must be numeric, integer or logical" msgstr "인자 y는 반드시 수치형, 정수형, 또는 논리형이어야 합니다." #: dgeMatrix.c:314 dgeMatrix.c:318 dspMatrix.c:154 dsyMatrix.c:119 #: dtrMatrix.c:127 msgid "Matrices are not conformable for multiplication" msgstr "곱셈연산을 할 수 있는 행렬들이 아닙니다" #: dgeMatrix.c:456 msgid "diagonal to be added has wrong length" msgstr "" #: dgeMatrix.c:475 msgid "Cannot factor a matrix with zero extents" msgstr "Cannot factor a matrix with zero extents" #: dgeMatrix.c:486 dpoMatrix.c:46 dppMatrix.c:36 dspMatrix.c:183 #, c-format msgid "Lapack routine %s returned error code %d" msgstr "에러코드 %2$d는 Lapack 루틴 %1$s로부터 얻어졌습니다." #: dgeMatrix.c:488 #, c-format msgid "Exact singularity detected during LU decomposition: %s, i=%d." msgstr "" #: dgeMatrix.c:510 msgid "Determinant requires a square matrix" msgstr "행렬식(determinant)를 얻기 위해서는 정방행렬을 사용해야 합니다." #: dgeMatrix.c:552 msgid "Solve requires a square matrix" msgstr "Solve를 이용하기 위해서는 정방행렬을 사용해야 합니다." #: dgeMatrix.c:565 #, c-format msgid "error [%d] from Lapack 'dgecon()'" msgstr "Lapack 'dgecon()'으로부터 에러 [%d]가 발생하였습니다." #: dgeMatrix.c:567 #, c-format msgid "" "Lapack dgecon(): system computationally singular, reciprocal condition " "number = %g" msgstr "" "Lapack dgecon(): 시스템이 계산적으로 특이하며, 역상태수(reciprocal " "condition number) %g를 가집니다" #: dgeMatrix.c:577 msgid "Lapack routine dgetri: system is exactly singular" msgstr "Lapack 루틴 dgetri: 시스템(system)이 정확하게 특이(singular)합니다." #: dgeMatrix.c:598 msgid "Lapack routine dgetrs: system is exactly singular" msgstr "Lapack 루틴 dgetrs: 시스템(system)이 정확하게 특이(singular)합니다." #: dgeMatrix.c:681 msgid "Matrix exponential requires square, non-null matrix" msgstr "행렬의 지수(exponential)은 정방이고 non-null인 행렬이어야 합니다" #: dgeMatrix.c:698 dgeMatrix.c:700 #, c-format msgid "dgeMatrix_exp: LAPACK routine dgebal returned %d" msgstr "dgeMatrix_exp: %d가 LAPACK 루틴 dgebal로부터 반환되었습니다." #: dgeMatrix.c:738 #, c-format msgid "dgeMatrix_exp: dgetrf returned error code %d" msgstr "dgeMatrix_exp: 에러코드 %d가 dgetrf로부터 반환되었습니다." #: dgeMatrix.c:740 #, c-format msgid "dgeMatrix_exp: dgetrs returned error code %d" msgstr "dgeMatrix_exp: 에러코드 %d가 dgetrs로부터 반환되었습니다." #: dgeMatrix.c:813 msgid "dgeMatrix_Schur: argument x must be a non-null square matrix" msgstr "" "dgeMatrix_Schur: 인자 x는 반드시 null이 아닌 정방(square)행렬이어야 합니다." #: dgeMatrix.c:824 msgid "dgeMatrix_Schur: first call to dgees failed" msgstr "dgeMatrix_Schur: dgees로의 첫번째 호출에 실패했습니다" #: dgeMatrix.c:833 #, c-format msgid "dgeMatrix_Schur: dgees returned code %d" msgstr "dgeMatrix_Schur: 코드 %d가 dgees로부터 반환되었습니다." #: dpoMatrix.c:16 msgid "dpoMatrix is not positive definite" msgstr "dpoMatrix는 양정치(positive definite)가 아닙니다." #: dpoMatrix.c:43 dppMatrix.c:33 #, c-format msgid "the leading minor of order %d is not positive definite" msgstr "the leading minor of order %d is not positive definite" #: dpoMatrix.c:97 msgid "Cannot solve() for matrices with zero extents" msgstr "크기가 0인 행렬에 solve()를 사용할 수 없습니다" #: dpoMatrix.c:118 msgid "Argument b must be a numeric matrix" msgstr "인자 b는 반드시 수치형 행렬(numeric matrix)이어야 합니다." #: dsCMatrix.c:25 msgid "chm_factor_name(): did not get string of length 11" msgstr "chm_factor_name(): 길이가 11인 문자열을 가지지 못했습니다" #: dsCMatrix.c:99 msgid "" "Cholesky factorization failed; unusually, please report to Matrix-authors" msgstr "" "콜레스키 분해에 실패했습니다. Matrix 패키지의 저자에게 보고해 주시길 부탁드" "립니다 " #: dsCMatrix.c:105 msgid "internal_chm_factor: Cholesky factorization failed" msgstr "internal_chm_factor: 콜레스키 분해에 실패했습니다" #: dsCMatrix.c:250 msgid "Non-symmetric matrix passed to dsCMatrix_to_dgTMatrix" msgstr "dsCMatrix_to_dgTMatrix에 비대칭 행렬이 전달되었습니다" #: dspMatrix.c:13 dtpMatrix.c:17 msgid "Incorrect length of 'x' slot" msgstr "'x' 슬롯의 길이가 올바르지 않습니다." #: dspMatrix.c:146 dsyMatrix.c:112 #, c-format msgid "Matrix dimension %d x %d (= %g) is too large" msgstr "" #: dsyMatrix.c:7 dtrMatrix.c:10 msgid "'Dim' slot has length less than two" msgstr "'Dim'은 2 보다 짧은 슬롯의 길이를 가지고 있습니다." #: dsyMatrix.c:9 dtrMatrix.c:12 msgid "Matrix is not square" msgstr "정방행렬이 아닙니다." #: dsyMatrix.c:164 #, c-format msgid "Lapack routine dsytrf returned error code %d" msgstr "Lapack 루틴 dsytrl로부터 다음의 에러코드가 반환되었습니다: %d" #: dtCMatrix.c:28 dtCMatrix.c:63 dtTMatrix.c:24 msgid "uplo='U' must not have sparse entries below the diagonal" msgstr "uplo='U'의 경우에는 어떠한 값들도 대각의 아랫부분에 있어서는 안됩니다." #: dtCMatrix.c:34 dtCMatrix.c:69 dtTMatrix.c:29 msgid "uplo='L' must not have sparse entries above the diagonal" msgstr "uplo='L'의 경우는 어떠한 값들도 대각의 윗부분에 있어서는 안됩니다." #: dtpMatrix.c:124 dtpMatrix.c:152 dtpMatrix.c:183 #, c-format msgid "Dimensions of a (%d,%d) and b (%d,%d) do not conform" msgstr "a (%d,%d)와 b (%d,%d)의 크기가 서로 일치하지 않습니다." #: dtpMatrix.c:131 msgid "right=TRUE is not yet implemented __ FIXME" msgstr "right=TRUE의 경우는 아직 구현되지 않았습니다 __ FIXME" #: dtrMatrix.c:125 msgid "dtrMatrix must be square" msgstr "dtrMatrix는 정방행렬이 아닙니다." #: dtrMatrix.c:188 msgid "\"dtrMatrix\" objects in '%*%' must have matching (square) dimension" msgstr "\"dtrMatrix\" objects in '%*%' must have matching (square) dimension" #: dtrMatrix.c:277 msgid "cannot set diag() as long as 'diag = \"U\"'" msgstr "'diag = \"U\"'이기 때문에 diag()를 정할 수 없습니다." #: dtrMatrix.c:311 msgid "cannot add diag() as long as 'diag = \"U\"'" msgstr "'diag = \"U\"'이기 때문에 diag()를 추가할 수 없습니다." #: factorizations.c:18 #, fuzzy msgid "x slot is not \"double\"" msgstr "x 슬롯(slot)은 반드시 \"double\"형 숫자(numeric)이어야 합니다." #: factorizations.c:20 msgid "x slot is not of correct length" msgstr "" #: init.c:370 msgid "missing 'Matrix' namespace: should never happen" msgstr "" "'Matrix' 네임스페이스(namespace)를 찾을 수 없습니다. 반드시 존재해야 합니다 " #: init.c:381 msgid "Matrix namespace not determined correctly" msgstr "올바르게 정의된 Matrix 네임스페이스(namespace)가 아닙니다" #: lgCMatrix.c:58 msgid "A must be a logical matrix" msgstr "A는 반드시 논리형 행렬(logical matrix)이어야 합니다." #: sparseQR.c:13 msgid "length(p) must match nrow(V)" msgstr "length(p)는 반드시 nrow(V)와 일치해야 합니다." #: sparseQR.c:15 msgid "length(beta) must match ncol(V)" msgstr "length(beta)는 반드시 ncol(V)와 일치해야 합니다." #: sparseQR.c:18 msgid "length(q) must be zero or ncol(R)" msgstr "length(q)는 반드시 0 또는 ncol(R)이어야 합니다." #: sparseQR.c:46 #, c-format msgid "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" msgstr "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" #: sparseQR.c:134 sparseQR.c:175 sparseQR.c:210 #, c-format msgid "%s(): structurally rank deficient case: possibly WRONG zeros" msgstr "%s(): 구조적으로 계수에 문제가 있는 경우입니다: possibly WRONG zeros" #: t_Csparse_subassign.c:144 msgid "invalid class of 'x' in Csparse_subassign()" msgstr "Csparse_subassign()에서 사용되는 'x'의 클래스가 올바르지 않습니다." #: t_Csparse_subassign.c:146 msgid "invalid class of 'value' in Csparse_subassign()" msgstr "Csparse_subassign()에서 사용되는 'value'의 클래스가 올바르지 않습니다." #: t_Csparse_subassign.c:189 #, c-format msgid "x[] <- val: val is coerced to logical for \"%s\" x" msgstr "x[] <- val: val is coerced to logical for \"%s\" x" #: t_Csparse_subassign.c:194 #, c-format msgid "" "x[] <- val: val should be integer or logical, is coerced to integer, for \"%s" "\" x" msgstr "" "x[] <- val: val should be integer or logical, is coerced to integer, for \"%s" "\" x" #: t_Csparse_subassign.c:201 msgid "programming error in Csparse_subassign() should never happen" msgstr "" "Csparse_subassign()를 사용 중 발생하지 말아야 하는 프로그래밍 에러" "(programming error)가 발견되었습니다." #~ msgid "not a CsparseMatrix" #~ msgstr "CsparseMatrix가 아닙니다." Matrix/po/R-en@quot.po0000644000176200001440000006244212124340341014310 0ustar liggesusers# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # msgid "" msgstr "" "Project-Id-Version: R 2.15.3\n" "Report-Msgid-Bugs-To: bugs.r-project.org\n" "POT-Creation-Date: 2013-03-26 16:27\n" "PO-Revision-Date: 2013-03-26 16:27\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" msgid "invalid 'mod': %s" msgstr "invalid ‘mod’: %s" msgid "" "not-yet-implemented method for %s(<%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "not-yet-implemented method for %s(<%s>).\n" " ->> Ask the package authors to implement the missing feature." msgid "" "not-yet-implemented method for %s(<%s>, <%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "not-yet-implemented method for %s(<%s>, <%s>).\n" " ->> Ask the package authors to implement the missing feature." msgid "'x' is not positive definite -- chol() undefined." msgstr "‘x’ is not positive definite -- chol() undefined." msgid "Matrices must have same dimensions in %s" msgstr "Matrices must have same dimensions in %s" msgid "non-conformable matrix dimensions in %s" msgstr "non-conformable matrix dimensions in %s" msgid "dimnames [%d] mismatch in %s" msgstr "dimnames [%d] mismatch in %s" msgid "Matrices must have same number of rows in %s" msgstr "Matrices must have same number of rows in %s" msgid "Matrices must have same number of columns in %s" msgstr "Matrices must have same number of columns in %s" msgid "[[ suppressing %d column names %s ... ]]" msgstr "[[ suppressing %d column names %s ... ]]" msgid "[[ suppressing %d column names %s ]]" msgstr "[[ suppressing %d column names %s ]]" msgid "'x' must be \"sparseMatrix\"" msgstr "‘x’ must be \"sparseMatrix\"" msgid "not yet implemented for class %s" msgstr "not yet implemented for class %s" msgid "not a triangular matrix" msgstr "not a triangular matrix" msgid "not yet implemented for matrix with typeof %s" msgstr "not yet implemented for matrix with typeof %s" msgid "not yet implemented for %s" msgstr "not yet implemented for %s" msgid "general Matrix class not yet implemented for %s" msgstr "general Matrix class not yet implemented for %s" msgid "" "arguments %s are disregarded in\n" " %s" msgstr "" "arguments %s are disregarded in\n" " %s" msgid "" "Quadratic matrix '%s' (=: A) is not formally\n" "\tsymmetric. Will be treated as\tA A'" msgstr "" "Quadratic matrix ‘%s’ (=: A) is not formally\n" "\tsymmetric. Will be treated as\tA A'" msgid "" "'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a \"CHMfactor\"" msgstr "" "‘update’ must be logical or ‘+’ or ‘-’; ‘C’ a matrix, and ‘L’ a \"CHMfactor\"" msgid "update must be TRUE/FALSE or '+' or '-'" msgstr "update must be TRUE/FALSE or ‘+’ or ‘-’" msgid "not a symmetric matrix; consider forceSymmetric() or symmpart()" msgstr "not a symmetric matrix; consider forceSymmetric() or symmpart()" msgid "Matrix-internal error in [i,,d]; please report" msgstr "Matrix-internal error in [i,,d]; please report" msgid "nothing to replace with" msgstr "nothing to replace with" msgid "number of items to replace is not a multiple of replacement length" msgstr "number of items to replace is not a multiple of replacement length" msgid "too many replacement values" msgstr "too many replacement values" msgid "i1[1] == 0 ==> C-level verbosity will not happen!" msgstr "i1[1] == 0 ==> C-level verbosity will not happen!" msgid "using\t \"old code\" part in Csparse subassignment" msgstr "using\t \"old code\" part in Csparse subassignment" msgid "" "Cholesky() -> *symbolic* factorization -- not yet implemented" msgstr "" "Cholesky() -> *symbolic* factorization -- not yet implemented" msgid "Not a valid format" msgstr "Not a valid format" msgid "'file' must be a character string or connection" msgstr "‘file’ must be a character string or connection" msgid "Invalid storage type: %s" msgstr "Invalid storage type: %s" msgid "Only numeric sparse matrices allowed" msgstr "Only numeric sparse matrices allowed" msgid "Invalid storage format: %s" msgstr "Invalid storage format: %s" msgid "Invalid assembled indicator: %s" msgstr "Invalid assembled indicator: %s" msgid "file is not a MatrixMarket file" msgstr "file is not a MatrixMarket file" msgid "type '%s' not recognized" msgstr "type ‘%s’ not recognized" msgid "representation '%s' not recognized" msgstr "representation ‘%s’ not recognized" msgid "element type '%s' not recognized" msgstr "element type ‘%s’ not recognized" msgid "symmetry form '%s' not recognized" msgstr "symmetry form ‘%s’ not recognized" msgid "readMM(): row\t values 'i' are not in 1:nr" msgstr "readMM(): row\t values ‘i’ are not in 1:nr" msgid "readMM(): column values 'j' are not in 1:nc" msgstr "readMM(): column values ‘j’ are not in 1:nc" msgid "symmetry form 'skew-symmetric' not yet implemented for reading" msgstr "symmetry form ‘skew-symmetric’ not yet implemented for reading" msgid "symmetry form 'hermitian' not yet implemented for reading" msgstr "symmetry form ‘hermitian’ not yet implemented for reading" msgid "symmetry form '%s' is not yet implemented" msgstr "symmetry form ‘%s’ is not yet implemented" msgid "element type 'complex' not yet implemented" msgstr "element type ‘complex’ not yet implemented" msgid "'%s()' is not yet implemented for element type '%s'" msgstr "‘%s()’ is not yet implemented for element type ‘%s’" msgid "'%s()' is not yet implemented for representation '%s'" msgstr "‘%s()’ is not yet implemented for representation ‘%s’" msgid "trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)" msgstr "trimmed mean of ‘sparseVector’ -- suboptimally using as.numeric(.)" msgid "'V' is not a square matrix" msgstr "‘V’ is not a square matrix" msgid "diag(.) had 0 or NA entries; non-finite result is doubtful" msgstr "diag(.) had 0 or NA entries; non-finite result is doubtful" msgid "invalid dimnames given for %s object" msgstr "invalid dimnames given for %s object" msgid "" "dimnames(.) <- NULL: translated to \n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" msgstr "" "dimnames(.) <- NULL: translated to \n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" msgid "'nrow', 'ncol', etc, are disregarded when 'data' is \"Matrix\" already" msgstr "'nrow', ‘ncol’, etc, are disregarded when ‘data’ is \"Matrix\" already" msgid "invalid 'data'" msgstr "invalid ‘data’" msgid "'nrow', 'ncol', etc, are disregarded for matrix 'data'" msgstr "'nrow', ‘ncol’, etc, are disregarded for matrix ‘data’" msgid "complex matrices not yet implemented in Matrix package" msgstr "complex matrices not yet implemented in Matrix package" msgid "using slow kronecker() method" msgstr "using slow kronecker() method" msgid "" "Cholesky(A) called for 'A' of class \"%s\";\n" "\t it is currently defined for sparseMatrix only; consider using chol() " "instead" msgstr "" "Cholesky(A) called for ‘A’ of class \"%s\";\n" "\t it is currently defined for sparseMatrix only; consider using chol() " "instead" msgid "'lag' and 'differences' must be integers >= 1" msgstr "‘lag’ and ‘differences’ must be integers >= 1" msgid "programming error: min() should have dispatched w/ 1st arg much earlier" msgstr "" "programming error: min() should have dispatched w/ 1st arg much earlier" msgid "invalid or not-yet-implemented 'Matrix' subsetting" msgstr "invalid or not-yet-implemented ‘Matrix’ subsetting" msgid "[ ] : .M.sub.i.logical() maybe inefficient" msgstr "[ ] : .M.sub.i.logical() maybe inefficient" msgid "" "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?" msgstr "" "nargs() = %d. Extraneous illegal arguments inside ‘[ .. ]’ (i.logical)?" msgid "m[ ]: inefficiently indexing single elements" msgstr "m[ ]: inefficiently indexing single elements" msgid "" ".M.sub.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.sub.i.2col(): ‘i’ has no integer column number;\n" " should never happen; please report" msgid "such indexing must be by logical or 2-column numeric matrix" msgstr "such indexing must be by logical or 2-column numeric matrix" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?" msgstr "nargs() = %d. Extraneous illegal arguments inside ‘[ .. ]’ (i.2col)?" msgid "" ".M.repl.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.repl.i.2col(): ‘i’ has no integer column number;\n" " should never happen; please report" msgid ".M.repl.i.2col(): drop 'matrix' case ..." msgstr ".M.repl.i.2col(): drop ‘matrix’ case ..." msgid "negative values are not allowed in a matrix subscript" msgstr "negative values are not allowed in a matrix subscript" msgid "NAs are not allowed in subscripted assignments" msgstr "NAs are not allowed in subscripted assignments" msgid "m[ ] <- v: inefficiently treating single elements" msgstr "m[ ] <- v: inefficiently treating single elements" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?" msgstr "nargs() = %d. Extraneous illegal arguments inside ‘[ .. ]’ ?" msgid "RHS 'value' (class %s) matches 'ANY', but must match matrix class %s" msgstr "RHS ‘value’ (class %s) matches ‘ANY’, but must match matrix class %s" msgid "not-yet-implemented 'Matrix[<-' method" msgstr "not-yet-implemented ‘Matrix[<-’ method" msgid "inefficient method used for \"- e1\"" msgstr "inefficient method used for \"- e1\"" msgid " %s %s is undefined" msgstr " %s %s is undefined" msgid "internal bug in \"Compare\" method (Cmp.Mat.atomic); please report" msgstr "internal bug in \"Compare\" method (Cmp.Mat.atomic); please report" msgid "Cmp.Mat.atomic() should not be called for diagonalMatrix" msgstr "Cmp.Mat.atomic() should not be called for diagonalMatrix" msgid "Matrices must have same number of rows for arithmetic" msgstr "Matrices must have same number of rows for arithmetic" msgid "number of rows are not compatible for %s" msgstr "number of rows are not compatible for %s" msgid "length of 2nd arg does not match dimension of first" msgstr "length of 2nd arg does not match dimension of first" msgid "length of 1st arg does not match dimension of 2nd" msgstr "length of 1st arg does not match dimension of 2nd" msgid "internal bug in \"Logic\" method (Logic.Mat.atomic); please report" msgstr "internal bug in \"Logic\" method (Logic.Mat.atomic); please report" msgid "Logic.Mat.atomic() should not be called for diagonalMatrix" msgstr "Logic.Mat.atomic() should not be called for diagonalMatrix" msgid "vector too long in Matrix - vector operation" msgstr "vector too long in Matrix - vector operation" msgid "" "longer object length\n" "\tis not a multiple of shorter object length" msgstr "" "longer object length\n" "\tis not a multiple of shorter object length" msgid "%s %s is undefined" msgstr "%s %s is undefined" msgid "longer object length" msgstr "longer object length" msgid "is not a multiple of shorter object length" msgstr "is not a multiple of shorter object length" msgid "dim [product %d] do not match the length of object [%d]" msgstr "dim [product %d] do not match the length of object [%d]" msgid "invalid class: %s" msgstr "invalid class: %s" msgid "not-yet-implemented coercion to \"TsparseMatrix\"" msgstr "not-yet-implemented coercion to \"TsparseMatrix\"" msgid "'NA' indices are not (yet?) supported for sparse Matrices" msgstr "‘NA’ indices are not (yet?) supported for sparse Matrices" msgid "you cannot mix negative and positive indices" msgstr "you cannot mix negative and positive indices" msgid "index larger than maximal %d" msgstr "index larger than maximal %d" msgid "logical subscript too long (%d, should be %d)" msgstr "logical subscript too long (%d, should be %d)" msgid "no 'dimnames[[.]]': cannot use character indexing" msgstr "no ‘dimnames[[.]]’: cannot use character indexing" msgid "invalid character indexing" msgstr "invalid character indexing" msgid "Matrix-internal error in [i,,d]; please report" msgstr "Matrix-internal error in [i,,d]; please report" msgid "FIXME: NOT YET FINISHED IMPLEMENTATION" msgstr "FIXME: NOT YET FINISHED IMPLEMENTATION" msgid "internal bug: missing 'i' in replTmat(): please report" msgstr "internal bug: missing ‘i’ in replTmat(): please report" msgid "[ ] indexing not allowed: forgot a \",\" ?" msgstr "[ ] indexing not allowed: forgot a \",\" ?" msgid "internal bug: matrix 'i' in replTmat(): please report" msgstr "internal bug: matrix ‘i’ in replTmat(): please report" msgid "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE." msgstr "" "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE." msgid "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgid "" "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE." msgstr "" "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE." msgid "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgid "x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrix" msgstr "x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrix" msgid "nargs() = %d should never happen; please report." msgstr "nargs() = %d should never happen; please report." msgid "row indices must be <= nrow(.) which is %d" msgstr "row indices must be <= nrow(.) which is %d" msgid "column indices must be <= ncol(.) which is %d" msgstr "column indices must be <= ncol(.) which is %d" msgid "duplicate ij-entries in 'Matrix[ ij ] <- value'; using last" msgstr "duplicate ij-entries in ‘Matrix[ ij ] <- value’; using last" msgid "'force' must be (coercable to) TRUE or FALSE" msgstr "‘force’ must be (coercable to) TRUE or FALSE" msgid "invalid (to - from)/by in seq(.)" msgstr "invalid (to - from)/by in seq(.)" msgid "wrong sign in 'by' argument" msgstr "wrong sign in ‘by’ argument" msgid "'by' argument is much too small" msgstr "‘by’ argument is much too small" msgid "length must be non-negative number" msgstr "length must be non-negative number" msgid "too many arguments" msgstr "too many arguments" msgid "c(,..) of different kinds, coercing all to 'rleDiff'" msgstr "c(,..) of different kinds, coercing all to ‘rleDiff’" msgid "[i] is not yet implemented" msgstr "[i] is not yet implemented" msgid "all() is not yet implemented" msgstr "all() is not yet implemented" msgid "sum() is not yet implemented" msgstr "sum() is not yet implemented" msgid "prod() is not yet implemented" msgstr "prod() is not yet implemented" msgid "not yet implemented" msgstr "not yet implemented" msgid "" "x / 0 for an x with sign-change\n" " no longer representable as 'rleDiff'" msgstr "" "x / 0 for an x with sign-change\n" " no longer representable as ‘rleDiff’" msgid " --> is not yet implemented" msgstr " --> is not yet implemented" msgid " --> is not yet implemented" msgstr " --> is not yet implemented" msgid "'diagonals' matrix must have %d columns (= length(k) )" msgstr "‘diagonals’ matrix must have %d columns (= length(k) )" msgid "'diagonals' must have the same length (%d) as 'k'" msgstr "‘diagonals’ must have the same length (%d) as ‘k’" msgid "" "for symmetric band matrix, only specify upper or lower triangle\n" " hence, all k must have the same sign" msgstr "" "for symmetric band matrix, only specify upper or lower triangle\n" " hence, all k must have the same sign" msgid "the %d-th (sub)-diagonal (k = %d) is too short; filling with NA's" msgstr "the %d-th (sub)-diagonal (k = %d) is too short; filling with NA's" msgid "'A' must be a square matrix" msgstr "‘A’ must be a square matrix" msgid "must either specify 'A' or the functions 'A.x' and 'At.x'" msgstr "must either specify ‘A’ or the functions ‘A.x’ and ‘At.x’" msgid "when 'A' is specified, 'A.x' and 'At.x' are disregarded" msgstr "when ‘A’ is specified, ‘A.x’ and ‘At.x’ are disregarded" msgid "not converged in %d iterations" msgstr "not converged in %d iterations" msgid "hit a cycle (1) -- stop iterations" msgstr "hit a cycle (1) -- stop iterations" msgid "hit a cycle (2) -- stop iterations" msgstr "hit a cycle (2) -- stop iterations" msgid "not enough new vecs -- stop iterations" msgstr "not enough new vecs -- stop iterations" msgid "\"dMatrix\" object with NAs cannot be coerced to \"nMatrix\"" msgstr "\"dMatrix\" object with NAs cannot be coerced to \"nMatrix\"" msgid "diagonalMatrix in .dense2C() -- should never happen, please report!" msgstr "diagonalMatrix in .dense2C() -- should never happen, please report!" msgid "undefined method for class %s" msgstr "undefined method for class %s" msgid "dim(.) value must be numeric of length 2" msgstr "dim(.) value must be numeric of length 2" msgid "dimensions don't match the number of cells" msgstr "dimensions don't match the number of cells" msgid "invalid nargs()= %d" msgstr "invalid nargs()= %d" msgid "cannot coerce non-symmetric \"dgTMatrix\" to \"dsCMatrix\" class" msgstr "cannot coerce non-symmetric \"dgTMatrix\" to \"dsCMatrix\" class" msgid "the matrix is not triangular" msgstr "the matrix is not triangular" msgid "'lwd' must be NULL or non-negative numeric" msgstr "‘lwd’ must be NULL or non-negative numeric" msgid "'x' has invalid data type" msgstr "‘x’ has invalid data type" msgid "length(x) must be either 1 or #{cols}" msgstr "length(x) must be either 1 or #{cols}" msgid "some arguments are not matrices" msgstr "some arguments are not matrices" msgid "%s kind not yet implemented" msgstr "%s kind not yet implemented" msgid "non-square matrix" msgstr "non-square matrix" msgid "" "matrix with non-zero off-diagonals cannot be coerced to \"diagonalMatrix\"" msgstr "" "matrix with non-zero off-diagonals cannot be coerced to \"diagonalMatrix\"" msgid "matrix is not diagonal" msgstr "matrix is not diagonal" msgid "Internal bug: nargs()=%d; please report" msgstr "Internal bug: nargs()=%d; please report" msgid "chol() is undefined for diagonal matrix with negative entries" msgstr "chol() is undefined for diagonal matrix with negative entries" msgid "non-matching dimensions" msgstr "non-matching dimensions" msgid "incompatible matrix dimensions" msgstr "incompatible matrix dimensions" msgid "intermediate 'r' is of type %s" msgstr "intermediate ‘r’ is of type %s" msgid "not yet implemented .. please report" msgstr "not yet implemented .. please report" msgid "not a positive definite matrix" msgstr "not a positive definite matrix" msgid "" "as(.,\"dsCMatrix\") is deprecated (since 2008); do use as(., " "\"symmetricMatrix\")" msgstr "" "as(.,\"dsCMatrix\") is deprecated (since 2008); do use as(., " "\"symmetricMatrix\")" msgid "inefficient coercion (lost triangularity); please report" msgstr "inefficient coercion (lost triangularity); please report" msgid "kronecker method must use default 'FUN'" msgstr "kronecker method must use default ‘FUN’" msgid "\"lMatrix\" object with NAs cannot be coerced to \"nMatrix\"" msgstr "\"lMatrix\" object with NAs cannot be coerced to \"nMatrix\"" msgid "Matrix seems negative semi-definite" msgstr "Matrix seems negative semi-definite" msgid "'nearPD()' did not converge in %d iterations" msgstr "‘nearPD()’ did not converge in %d iterations" msgid "cannot coerce 'NA's to \"nsparseMatrix\"" msgstr "cannot coerce 'NA's to \"nsparseMatrix\"" msgid "temporarily disabled" msgstr "temporarily disabled" msgid "coercion to \"pMatrix\" only works from integer numeric" msgstr "coercion to \"pMatrix\" only works from integer numeric" msgid "not a square matrix" msgstr "not a square matrix" msgid "the number of non-zero entries differs from nrow(.)" msgstr "the number of non-zero entries differs from nrow(.)" msgid "must have exactly one non-zero entry per row" msgstr "must have exactly one non-zero entry per row" msgid "replacing \"pMatrix\" entries is not allowed, as rarely sensible" msgstr "replacing \"pMatrix\" entries is not allowed, as rarely sensible" msgid "not-yet-implemented method for <%s> %%*%% <%s>" msgstr "not-yet-implemented method for <%s> %%*%% <%s>" msgid "method %s not applicable for qr() result class %s" msgstr "method %s not applicable for qr() result class %s" msgid "model frame and formula mismatch in model.matrix()" msgstr "model frame and formula mismatch in model.matrix()" msgid "variable '%s' converted to a factor" msgstr "variable ‘%s’ converted to a factor" msgid "invalid 'contrasts.arg' argument" msgstr "invalid ‘contrasts.arg’ argument" msgid "variable '%s' is absent, its contrast will be ignored" msgstr "variable ‘%s’ is absent, its contrast will be ignored" msgid "only 2-dimensional tables can be directly coerced to sparse matrices" msgstr "only 2-dimensional tables can be directly coerced to sparse matrices" msgid "exactly one of 'i', 'j', or 'p' must be missing from call" msgstr "exactly one of ‘i’, ‘j’, or ‘p’ must be missing from call" msgid "'p' must be a non-decreasing vector (0, ...)" msgstr "‘p’ must be a non-decreasing vector (0, ...)" msgid "NA's in (i,j) are not allowed" msgstr "NA's in (i,j) are not allowed" msgid "symmetric matrix must be square" msgstr "symmetric matrix must be square" msgid "length(i) is not a multiple of length(x)" msgstr "length(i) is not a multiple of length(x)" msgid "only square matrices can be used as incidence matrices for graphs" msgstr "only square matrices can be used as incidence matrices for graphs" msgid "Matrix-internal error in [i,,d]; please report" msgstr "Matrix-internal error in [i,,d]; please report" msgid "invalid 'col.names' string: %s" msgstr "invalid ‘col.names’ string: %s" msgid "logic programming error in printSpMatrix2(), please report" msgstr "logic programming error in printSpMatrix2(), please report" msgid "invalid 'type'" msgstr "invalid ‘type’" msgid "rcond(.) via sparse -> dense coercion" msgstr "rcond(.) via sparse -> dense coercion" msgid "'V' is not a *square* matrix" msgstr "‘V’ is not a *square* matrix" msgid "" "qr.R() may differ from qr.R() because of permutations. " "Possibly use our qrR() instead" msgstr "" "qr.R() may differ from qr.R() because of permutations. " "Possibly use our qrR() instead" msgid "cannot coerce 'NA's to \"nsparseVector\"" msgstr "cannot coerce 'NA's to \"nsparseVector\"" msgid "'x' must inherit from \"sparseVector\"" msgstr "‘x’ must inherit from \"sparseVector\"" msgid "'ncol' must be >= 0" msgstr "‘ncol’ must be >= 0" msgid "'nrow' must be >= 0" msgstr "‘nrow’ must be >= 0" msgid "Must specify 'nrow' when 'symmetric' is true" msgstr "Must specify ‘nrow’ when ‘symmetric’ is true" msgid "'nrow' and 'ncol' must be the same when 'symmetric' is true" msgstr "‘nrow’ and ‘ncol’ must be the same when ‘symmetric’ is true" msgid "'x' must have length nrow^2 when 'symmetric' is true" msgstr "‘x’ must have length nrow^2 when ‘symmetric’ is true" msgid "'ncol' is not a factor of length(x)" msgstr "‘ncol’ is not a factor of length(x)" msgid "'nrow' is not a factor of length(x)" msgstr "‘nrow’ is not a factor of length(x)" msgid "Class %s is not yet implemented" msgstr "Class %s is not yet implemented" msgid "too large index i > n = %d" msgstr "too large index i > n = %d" msgid "" "index must be numeric, logical or sparseVector for indexing sparseVectors" msgstr "" "index must be numeric, logical or sparseVector for indexing sparseVectors" msgid "'times >= 0' is required" msgstr "‘times >= 0’ is required" msgid "(un)packing only applies to dense matrices, class(x)='%s'" msgstr "(un)packing only applies to dense matrices, class(x)='%s'" msgid "'x' is not symmetric nor triangular" msgstr "‘x’ is not symmetric nor triangular" Matrix/po/en@quot.po0000644000176200001440000007241712124340341014114 0ustar liggesusers# English translations for R package. # Copyright (C) 2013 The R Core Team # This file is distributed under the same license as the R package. # Automatically generated, 2013. # # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # msgid "" msgstr "" "Project-Id-Version: R 2.15.3\n" "Report-Msgid-Bugs-To: bugs.r-project.org\n" "POT-Creation-Date: 2013-03-26 16:27+0100\n" "PO-Revision-Date: 2013-03-26 16:27+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: CHMfactor.c:14 #, c-format msgid "cholmod_change_factor failed with status %d" msgstr "cholmod_change_factor failed with status %d" #: CHMfactor.c:30 CHMfactor.c:60 msgid "system argument is not valid" msgstr "system argument is not valid" #: CHMfactor.c:47 #, c-format msgid "cholmod_updown() returned %d" msgstr "cholmod_updown() returned %d" #: CHMfactor.c:97 #, c-format msgid "diagonal element %d of Cholesky factor is missing" msgstr "diagonal element %d of Cholesky factor is missing" #: CHMfactor.c:135 #, c-format msgid "cholmod_factorize_p failed: status %d, minor %d of ncol %d" msgstr "cholmod_factorize_p failed: status %d, minor %d of ncol %d" #: CHMfactor.c:140 msgid "cholmod_change_factor failed" msgstr "cholmod_change_factor failed" #: Csparse.c:58 msgid "slot p must have length = ncol(.) + 1" msgstr "slot p must have length = ncol(.) + 1" #: Csparse.c:60 Csparse.c:119 msgid "first element of slot p must be zero" msgstr "first element of slot p must be zero" #: Csparse.c:63 msgid "last element of slot p must match length of slots i and x" msgstr "last element of slot p must match length of slots i and x" #: Csparse.c:66 msgid "all row indices must be between 0 and nrow-1" msgstr "all row indices must be between 0 and nrow-1" #: Csparse.c:71 Csparse.c:130 msgid "slot p must be non-decreasing" msgstr "slot p must be non-decreasing" #: Csparse.c:92 msgid "" "slot i is not *strictly* increasing inside a column (even after " "cholmod_l_sort)" msgstr "" "slot i is not *strictly* increasing inside a column (even after " "cholmod_l_sort)" #: Csparse.c:95 msgid "row indices are not sorted within columns" msgstr "row indices are not sorted within columns" #: Csparse.c:98 msgid "slot i is not *strictly* increasing inside a column" msgstr "slot i is not *strictly* increasing inside a column" #: Csparse.c:117 msgid "slot p must have length = nrow(.) + 1" msgstr "slot p must have length = nrow(.) + 1" #: Csparse.c:122 msgid "last element of slot p must match length of slots j and x" msgstr "last element of slot p must match length of slots j and x" #: Csparse.c:125 msgid "all column indices must be between 0 and ncol-1" msgstr "all column indices must be between 0 and ncol-1" #: Csparse.c:141 msgid "slot j is not increasing inside a column" msgstr "slot j is not increasing inside a column" #: Csparse.c:143 msgid "slot j is not *strictly* increasing inside a column" msgstr "slot j is not *strictly* increasing inside a column" #: Csparse.c:188 msgid "not a 'n.CMatrix'" msgstr "not a ‘n.CMatrix’" #: Csparse.c:189 msgid "not a CsparseMatrix" msgstr "not a CsparseMatrix" #: Csparse.c:216 #, c-format msgid "nz2Csparse(): invalid/non-implemented r_kind = %d" msgstr "nz2Csparse(): invalid/non-implemented r_kind = %d" #: Csparse.c:261 msgid "Nonsymmetric matrix in Csparse_symmetric_to_general" msgstr "Nonsymmetric matrix in Csparse_symmetric_to_general" #: Csparse.c:272 msgid "Csparse_general_to_symmetric(): matrix is not square!" msgstr "Csparse_general_to_symmetric(): matrix is not square!" #: Csparse.c:463 msgid "Csparse_crossprod(): error return from cholmod_aat()" msgstr "Csparse_crossprod(): error return from cholmod_aat()" #: Csparse.c:495 msgid "cholmod_drop() failed" msgstr "cholmod_drop() failed" #: Csparse.c:608 msgid "Index i must be NULL or integer" msgstr "Index i must be NULL or integer" #: Csparse.c:610 msgid "Index j must be NULL or integer" msgstr "Index j must be NULL or integer" #: Csparse.c:652 #, c-format msgid "failure to open file \"%s\" for writing" msgstr "failure to open file \"%s\" for writing" #: Csparse.c:656 msgid "cholmod_write_sparse returned error code" msgstr "cholmod_write_sparse returned error code" #: Csparse.c:729 #, c-format msgid "%s = '%s' (back-permuted) is experimental" msgstr "%s = ‘%s’ (back-permuted) is experimental" #: Csparse.c:739 msgid "diag_tC(): invalid 'resultKind'" msgstr "diag_tC(): invalid ‘resultKind’" #: Csparse.c:800 #, c-format msgid "negative vector lengths not allowed: np = %d, nnz = %d" msgstr "negative vector lengths not allowed: np = %d, nnz = %d" #: Csparse.c:805 msgid "exactly 1 of 'i', 'j' or 'p' must be NULL" msgstr "exactly 1 of ‘i’, ‘j’ or ‘p’ must be NULL" #: Csparse.c:807 #, c-format msgid "np = %d, must be zero when p is NULL" msgstr "np = %d, must be zero when p is NULL" #: Csparse.c:810 #, c-format msgid "p[0] = %d, should be zero" msgstr "p[0] = %d, should be zero" #: Csparse.c:813 msgid "p must be non-decreasing" msgstr "p must be non-decreasing" #: Csparse.c:829 #, c-format msgid "Inconsistent dimensions: np = 0 and nnz = %d" msgstr "Inconsistent dimensions: np = 0 and nnz = %d" #: Csparse.c:837 #, c-format msgid "invalid row index at position %d" msgstr "invalid row index at position %d" #: Csparse.c:844 #, c-format msgid "invalid column index at position %d" msgstr "invalid column index at position %d" #: Csparse.c:854 #, c-format msgid "strlen of cls argument = %d, should be 8" msgstr "strlen of cls argument = %d, should be 8" #: Csparse.c:856 #, c-format msgid "cls = \"%s\" does not end in \"CMatrix\"" msgstr "cls = \"%s\" does not end in \"CMatrix\"" #: Csparse.c:866 #, c-format msgid "cls = \"%s\" must begin with 'd', 'l' or 'n'" msgstr "cls = \"%s\" must begin with ‘d’, ‘l’ or ‘n’" #: Csparse.c:869 msgid "Only 'g'eneral sparse matrix types allowed" msgstr "Only 'g'eneral sparse matrix types allowed" #: Csparse.c:897 msgid "code not yet written for cls = \"lgCMatrix\"" msgstr "code not yet written for cls = \"lgCMatrix\"" #: Mutils.c:14 Mutils.c:33 #, c-format msgid "argument type[1]='%s' must be a one-letter character string" msgstr "argument type[1]='%s' must be a one-letter character string" #: Mutils.c:22 #, c-format msgid "argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'" msgstr "argument type[1]='%s' must be one of ‘M’,'1','O','I','F' or ‘E’" #: Mutils.c:39 #, c-format msgid "argument type[1]='%s' must be one of '1','O', or 'I'" msgstr "argument type[1]='%s' must be one of ‘1’,'O', or ‘I’" #: Mutils.c:50 Mutils.c:66 msgid "object must be a named, numeric vector" msgstr "object must be a named, numeric vector" #: Mutils.c:113 Mutils.c:133 msgid "'factors' slot must be a named list" msgstr "‘factors’ slot must be a named list" #: Mutils.c:241 #, c-format msgid "'%s' slot must have length 1" msgstr "‘%s’ slot must have length 1" #: Mutils.c:245 #, c-format msgid "'%s' must have string length 1" msgstr "‘%s’ must have string length 1" #: Mutils.c:252 #, c-format msgid "'%s' must be in '%s'" msgstr "‘%s’ must be in ‘%s’" #: Mutils.c:271 msgid "'s1' and 's2' must be \"character\" vectors" msgstr "‘s1’ and ‘s2’ must be \"character\" vectors" #: Mutils.c:293 msgid "length of x slot != prod(Dim)" msgstr "length of x slot != prod(Dim)" #: Mutils.c:314 Mutils.c:340 msgid "'uplo' must be UPP or LOW" msgstr "‘uplo’ must be UPP or LOW" #: Mutils.c:627 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_geMatrix" msgstr "invalid class ‘%s’ to dup_mMatrix_as_geMatrix" #: Mutils.c:747 #, c-format msgid "unexpected ctype = %d in dup_mMatrix_as_geMatrix" msgstr "unexpected ctype = %d in dup_mMatrix_as_geMatrix" #: Mutils.c:778 #, c-format msgid "invalid class '%s' to dup_mMatrix_as_dgeMatrix" msgstr "invalid class ‘%s’ to dup_mMatrix_as_dgeMatrix" #: Mutils.c:824 msgid "Argument ij must be 2-column integer matrix" msgstr "Argument ij must be 2-column integer matrix" #: Mutils.c:840 msgid "subscript 'i' out of bounds in M[ij]" msgstr "subscript ‘i’ out of bounds in M[ij]" #: Mutils.c:842 msgid "subscript 'j' out of bounds in M[ij]" msgstr "subscript ‘j’ out of bounds in M[ij]" #: Mutils.c:881 msgid "i and j must be integer vectors of the same length" msgstr "i and j must be integer vectors of the same length" #: Mutils.c:967 msgid "'data' must be of a vector type" msgstr "‘data’ must be of a vector type" #: Mutils.c:974 #, c-format msgid "invalid '%s' argument" msgstr "invalid ‘%s’ argument" #: Mutils.c:981 Mutils.c:989 msgid "non-numeric matrix extent" msgstr "non-numeric matrix extent" #: Mutils.c:984 msgid "invalid 'nrow' value (too large or NA)" msgstr "invalid ‘nrow’ value (too large or NA)" #: Mutils.c:986 msgid "invalid 'nrow' value (< 0)" msgstr "invalid ‘nrow’ value (< 0)" #: Mutils.c:992 msgid "invalid 'ncol' value (too large or NA)" msgstr "invalid ‘ncol’ value (too large or NA)" #: Mutils.c:994 msgid "invalid 'ncol' value (< 0)" msgstr "invalid ‘ncol’ value (< 0)" #: Mutils.c:1012 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]" msgstr "" "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]" #: Mutils.c:1015 #, c-format msgid "" "data length [%d] is not a sub-multiple or multiple of the number of columns " "[%d]" msgstr "" "data length [%d] is not a sub-multiple or multiple of the number of columns " "[%d]" #: Mutils.c:1018 msgid "data length exceeds size of matrix" msgstr "data length exceeds size of matrix" #: Mutils.c:1024 msgid "too many elements specified" msgstr "too many elements specified" #: Tsparse.c:20 msgid "lengths of slots i and j must match" msgstr "lengths of slots i and j must match" #: Tsparse.c:23 msgid "slot Dim must have length 2" msgstr "slot Dim must have length 2" #: Tsparse.c:27 msgid "" "all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrix" msgstr "" "all row indices (slot ‘i’) must be between 0 and nrow-1 in a TsparseMatrix" #: Tsparse.c:29 msgid "" "all column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrix" msgstr "" "all column indices (slot ‘j’) must be between 0 and ncol-1 in a TsparseMatrix" #: chm_common.c:67 msgid "Argument rho must be an environment" msgstr "Argument rho must be an environment" #: chm_common.c:230 msgid "invalid class of object to as_cholmod_sparse" msgstr "invalid class of object to as_cholmod_sparse" #: chm_common.c:232 msgid "invalid object passed to as_cholmod_sparse" msgstr "invalid object passed to as_cholmod_sparse" #: chm_common.c:259 msgid "in_place cholmod_sort returned an error code" msgstr "in_place cholmod_sort returned an error code" #: chm_common.c:265 msgid "cholmod_sort returned an error code" msgstr "cholmod_sort returned an error code" #: chm_common.c:346 msgid "chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)" msgstr "chm_sparse_to_SEXP(, *): invalid ‘Rkind’ (real kind code)" #: chm_common.c:354 msgid "unknown xtype in cholmod_sparse object" msgstr "unknown xtype in cholmod_sparse object" #: chm_common.c:383 chm_common.c:578 chm_common.c:813 chm_common.c:860 msgid "complex sparse matrix code not yet written" msgstr "complex sparse matrix code not yet written" #: chm_common.c:388 chm_common.c:583 msgid "Symmetric and triangular both set" msgstr "Symmetric and triangular both set" #: chm_common.c:428 msgid "invalid class of object to as_cholmod_triplet" msgstr "invalid class of object to as_cholmod_triplet" #: chm_common.c:452 msgid "as_cholmod_triplet(): could not reallocate for internal diagU2N()" msgstr "as_cholmod_triplet(): could not reallocate for internal diagU2N()" #: chm_common.c:550 msgid "unknown xtype in cholmod_triplet object" msgstr "unknown xtype in cholmod_triplet object" #: chm_common.c:629 msgid "invalid class of object to as_cholmod_dense" msgstr "invalid class of object to as_cholmod_dense" #: chm_common.c:699 #, c-format msgid "Cholmod error '%s' at file %s, line %d" msgstr "Cholmod error ‘%s’ at file %s, line %d" #: chm_common.c:703 #, c-format msgid "Cholmod warning '%s' at file %s, line %d" msgstr "Cholmod warning ‘%s’ at file %s, line %d" #: chm_common.c:732 #, c-format msgid "Unable to initialize cholmod: error code %d" msgstr "Unable to initialize cholmod: error code %d" #: chm_common.c:779 msgid "unknown 'Rkind'" msgstr "unknown ‘Rkind’" #: chm_common.c:786 chm_common.c:851 msgid "unknown xtype" msgstr "unknown xtype" #: chm_common.c:819 chm_common.c:869 msgid "code for cholmod_dense with holes not yet written" msgstr "code for cholmod_dense with holes not yet written" #: chm_common.c:865 msgid "don't know if a dense pattern matrix makes sense" msgstr "don't know if a dense pattern matrix makes sense" #: chm_common.c:910 msgid "invalid class of object to as_cholmod_factor" msgstr "invalid class of object to as_cholmod_factor" #: chm_common.c:924 msgid "Supernodal LDL' decomposition not available" msgstr "Supernodal LDL' decomposition not available" #: chm_common.c:926 msgid "Supernodal/simplicial class inconsistent with type flags" msgstr "Supernodal/simplicial class inconsistent with type flags" #: chm_common.c:944 msgid "Number of supernodes must be positive when is_super is TRUE" msgstr "Number of supernodes must be positive when is_super is TRUE" #: chm_common.c:947 msgid "Lengths of super and pi must be equal" msgstr "Lengths of super and pi must be equal" #: chm_common.c:951 msgid "Lengths of super and px must be equal" msgstr "Lengths of super and px must be equal" #: chm_common.c:964 msgid "failure in as_cholmod_factor" msgstr "failure in as_cholmod_factor" #: chm_common.c:992 msgid "CHOLMOD factorization was unsuccessful" msgstr "CHOLMOD factorization was unsuccessful" #: chm_common.c:1005 #, c-format msgid "f->xtype of %d not recognized" msgstr "f->xtype of %d not recognized" #: chm_common.c:1070 #, c-format msgid "chm_diagN2U(): nrow=%d, ncol=%d" msgstr "chm_diagN2U(): nrow=%d, ncol=%d" #: chm_common.c:1113 #, c-format msgid "chm_diagN2U(x, uploT = %d): uploT should be +- 1" msgstr "chm_diagN2U(x, uploT = %d): uploT should be +- 1" #: cs_utils.c:37 msgid "csp_eye argument n must be positive" msgstr "csp_eye argument n must be positive" #: cs_utils.c:68 msgid "invalid class of 'x' in Matrix_as_cs(a, x)" msgstr "invalid class of ‘x’ in Matrix_as_cs(a, x)" #: cs_utils.c:126 cs_utils.c:170 cs_utils.c:185 cs_utils.c:205 cs_utils.c:218 #, c-format msgid "invalid class of object to %s" msgstr "invalid class of object to %s" #: cs_utils.c:139 #, c-format msgid "cs matrix not compatible with class '%s'" msgstr "cs matrix not compatible with class ‘%s’" #: cs_utils.c:242 cs_utils.c:261 #, c-format msgid "Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)" msgstr "Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)" #: cs_utils.c:287 cs_utils.c:306 #, c-format msgid "Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)" msgstr "Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)" #: dense.c:29 #, c-format msgid "incorrect left cyclic shift, j (%d) >= k (%d)" msgstr "incorrect left cyclic shift, j (%d) >= k (%d)" #: dense.c:31 #, c-format msgid "incorrect left cyclic shift, j (%d) < 0" msgstr "incorrect left cyclic shift, j (%d) < 0" #: dense.c:33 #, c-format msgid "incorrect left cyclic shift, k (%d) > ldx (%d)" msgstr "incorrect left cyclic shift, k (%d) > ldx (%d)" #: dense.c:78 msgid "Unknown error in getGivens" msgstr "Unknown error in getGivens" #: dense.c:90 dense.c:106 dense.c:139 msgid "X must be a numeric (double precision) matrix" msgstr "X must be a numeric (double precision) matrix" #: dense.c:111 dense.c:144 msgid "y must be a numeric (double precision) matrix" msgstr "y must be a numeric (double precision) matrix" #: dense.c:115 dense.c:148 #, c-format msgid "number of rows in y (%d) does not match number of rows in X (%d)" msgstr "number of rows in y (%d) does not match number of rows in X (%d)" #: dense.c:126 #, c-format msgid "Lapack routine dposv returned error code %d" msgstr "Lapack routine dposv returned error code %d" #: dense.c:159 #, c-format msgid "First call to Lapack routine dgels returned error code %d" msgstr "First call to Lapack routine dgels returned error code %d" #: dense.c:166 #, c-format msgid "Second call to Lapack routine dgels returned error code %d" msgstr "Second call to Lapack routine dgels returned error code %d" #: dense.c:179 msgid "X must be a real (numeric) matrix" msgstr "X must be a real (numeric) matrix" #: dense.c:180 #, c-format msgid "tol, given as %g, must be non-negative" msgstr "tol, given as %g, must be non-negative" #: dense.c:181 #, c-format msgid "tol, given as %g, must be <= 1" msgstr "tol, given as %g, must be <= 1" #: dense.c:205 #, c-format msgid "First call to dgeqrf returned error code %d" msgstr "First call to dgeqrf returned error code %d" #: dense.c:211 #, c-format msgid "Second call to dgeqrf returned error code %d" msgstr "Second call to dgeqrf returned error code %d" #: dense.c:216 dense.c:236 #, c-format msgid "Lapack routine dtrcon returned error code %d" msgstr "Lapack routine dtrcon returned error code %d" #: dense.c:285 #, c-format msgid "Lower band %d > upper band %d" msgstr "Lower band %d > upper band %d" #: dense.c:354 msgid "ddense_to_symmetric(): matrix is not square!" msgstr "ddense_to_symmetric(): matrix is not square!" #: dense.c:365 #, c-format msgid "matrix is not symmetric [%d,%d]" msgstr "matrix is not symmetric [%d,%d]" #: dense.c:413 msgid "matrix is not square! (symmetric part)" msgstr "matrix is not square! (symmetric part)" #: dense.c:457 msgid "matrix is not square! (skew-symmetric part)" msgstr "matrix is not square! (skew-symmetric part)" #: dgCMatrix.c:17 msgid "lengths of slots 'i' and 'x' must match" msgstr "lengths of slots ‘i’ and ‘x’ must match" #: dgCMatrix.c:29 msgid "lengths of slots 'j' and 'x' must match" msgstr "lengths of slots ‘j’ and ‘x’ must match" #: dgCMatrix.c:51 #, c-format msgid "invalid class(x) '%s' in compressed_to_TMatrix(x)" msgstr "invalid class(x) ‘%s’ in compressed_to_TMatrix(x)" #: dgCMatrix.c:85 #, c-format msgid "invalid class(x) '%s' in R_to_CMatrix(x)" msgstr "invalid class(x) ‘%s’ in R_to_CMatrix(x)" #: dgCMatrix.c:155 msgid "dgCMatrix_lusol requires a square, non-empty matrix" msgstr "dgCMatrix_lusol requires a square, non-empty matrix" #: dgCMatrix.c:157 dgCMatrix.c:183 dgCMatrix.c:430 dgCMatrix.c:463 #: dgeMatrix.c:422 dpoMatrix.c:91 dpoMatrix.c:116 dppMatrix.c:80 #: dspMatrix.c:78 dsyMatrix.c:85 dtCMatrix.c:90 dtCMatrix.c:106 dtrMatrix.c:98 msgid "Dimensions of system to be solved are inconsistent" msgstr "Dimensions of system to be solved are inconsistent" #: dgCMatrix.c:159 msgid "cs_lusol failed" msgstr "cs_lusol failed" #: dgCMatrix.c:180 msgid "dgCMatrix_qrsol(., order) needs order in {0,..,3}" msgstr "dgCMatrix_qrsol(., order) needs order in {0,..,3}" #: dgCMatrix.c:189 #, c-format msgid "dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrix" msgstr "dgCMatrix_qrsol(<%d x %d>-matrix) requires a ‘tall’ rectangular matrix" #: dgCMatrix.c:200 msgid "cs_qrsol() failed inside dgCMatrix_qrsol()" msgstr "cs_qrsol() failed inside dgCMatrix_qrsol()" #: dgCMatrix.c:225 msgid "A must have #{rows} >= #{columns}" msgstr "A must have #{rows} >= #{columns}" #: dgCMatrix.c:230 msgid "cs_sqr failed" msgstr "cs_sqr failed" #: dgCMatrix.c:235 msgid "cs_qr failed" msgstr "cs_qr failed" #: dgCMatrix.c:298 msgid "SuiteSparseQR_C_QR returned an error code" msgstr "SuiteSparseQR_C_QR returned an error code" #: dgCMatrix.c:342 msgid "LU decomposition applies only to square matrices" msgstr "LU decomposition applies only to square matrices" #: dgCMatrix.c:351 msgid "cs_lu(A) failed: near-singular A (or out of memory)" msgstr "cs_lu(A) failed: near-singular A (or out of memory)" #: dgCMatrix.c:461 msgid "dgCMatrix_cholsol requires a 'short, wide' rectangular matrix" msgstr "dgCMatrix_cholsol requires a ‘short, wide’ rectangular matrix" #: dgCMatrix.c:469 msgid "cholmod_sdmult error (rhs)" msgstr "cholmod_sdmult error (rhs)" #: dgCMatrix.c:472 #, c-format msgid "cholmod_factorize failed: status %d, minor %d from ncol %d" msgstr "cholmod_factorize failed: status %d, minor %d from ncol %d" #: dgCMatrix.c:476 #, c-format msgid "cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %d" msgstr "cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %d" #: dgCMatrix.c:493 msgid "cholmod_sdmult error (resid)" msgstr "cholmod_sdmult error (resid)" #: dgTMatrix.c:15 msgid "lengths of slots i and x must match" msgstr "lengths of slots i and x must match" #: dgTMatrix.c:56 #, c-format msgid "Cannot coerce to too large *geMatrix with %.0f entries" msgstr "Cannot coerce to too large *geMatrix with %.0f entries" #: dgeMatrix.c:10 msgid "Dim slot must have length 2" msgstr "Dim slot must have length 2" #: dgeMatrix.c:14 msgid "Negative value in Dim" msgid_plural "Negative values in Dim" msgstr[0] "Negative value in Dim" msgstr[1] "Negative values in Dim" #: dgeMatrix.c:18 msgid "x slot must be numeric \"double\"" msgstr "x slot must be numeric \"double\"" #: dgeMatrix.c:31 msgid "factors slot must be named list" msgstr "factors slot must be named list" #: dgeMatrix.c:69 msgid "rcond requires a square, non-empty matrix" msgstr "rcond requires a square, non-empty matrix" #: dgeMatrix.c:126 dgeMatrix.c:183 #, c-format msgid "Dimensions of x and y are not compatible for %s" msgstr "Dimensions of x and y are not compatible for %s" #: dgeMatrix.c:165 msgid "Argument y must be numeric or integer" msgstr "Argument y must be numeric or integer" #: dgeMatrix.c:306 msgid "Cannot factor a matrix with zero extents" msgstr "Cannot factor a matrix with zero extents" #: dgeMatrix.c:316 dpoMatrix.c:42 dppMatrix.c:36 dspMatrix.c:181 #, c-format msgid "Lapack routine %s returned error code %d" msgstr "Lapack routine %s returned error code %d" #: dgeMatrix.c:318 #, c-format msgid "Exact singularity detected during LU decomposition: %s, i=%d." msgstr "Exact singularity detected during LU decomposition: %s, i=%d." #: dgeMatrix.c:340 msgid "Determinant requires a square matrix" msgstr "Determinant requires a square matrix" #: dgeMatrix.c:382 msgid "Solve requires a square matrix" msgstr "Solve requires a square matrix" #: dgeMatrix.c:395 #, c-format msgid "error [%d] from Lapack 'dgecon()'" msgstr "error [%d] from Lapack ‘dgecon()’" #: dgeMatrix.c:397 #, c-format msgid "" "Lapack dgecon(): system computationally singular, reciprocal condition " "number = %g" msgstr "" "Lapack dgecon(): system computationally singular, reciprocal condition " "number = %g" #: dgeMatrix.c:407 msgid "Lapack routine dgetri: system is exactly singular" msgstr "Lapack routine dgetri: system is exactly singular" #: dgeMatrix.c:427 msgid "Lapack routine dgetrs: system is exactly singular" msgstr "Lapack routine dgetrs: system is exactly singular" #: dgeMatrix.c:446 dgeMatrix.c:468 dspMatrix.c:152 dsyMatrix.c:122 #: dtrMatrix.c:122 msgid "Matrices are not conformable for multiplication" msgstr "Matrices are not conformable for multiplication" #: dgeMatrix.c:569 msgid "Matrix exponential requires square, non-null matrix" msgstr "Matrix exponential requires square, non-null matrix" #: dgeMatrix.c:586 dgeMatrix.c:588 #, c-format msgid "dgeMatrix_exp: LAPACK routine dgebal returned %d" msgstr "dgeMatrix_exp: LAPACK routine dgebal returned %d" #: dgeMatrix.c:626 #, c-format msgid "dgeMatrix_exp: dgetrf returned error code %d" msgstr "dgeMatrix_exp: dgetrf returned error code %d" #: dgeMatrix.c:628 #, c-format msgid "dgeMatrix_exp: dgetrs returned error code %d" msgstr "dgeMatrix_exp: dgetrs returned error code %d" #: dgeMatrix.c:701 msgid "dgeMatrix_Schur: argument x must be a non-null square matrix" msgstr "dgeMatrix_Schur: argument x must be a non-null square matrix" #: dgeMatrix.c:712 msgid "dgeMatrix_Schur: first call to dgees failed" msgstr "dgeMatrix_Schur: first call to dgees failed" #: dgeMatrix.c:720 #, c-format msgid "dgeMatrix_Schur: dgees returned code %d" msgstr "dgeMatrix_Schur: dgees returned code %d" #: dpoMatrix.c:12 msgid "dpoMatrix is not positive definite" msgstr "dpoMatrix is not positive definite" #: dpoMatrix.c:39 dppMatrix.c:33 #, c-format msgid "the leading minor of order %d is not positive definite" msgstr "the leading minor of order %d is not positive definite" #: dpoMatrix.c:93 msgid "Cannot solve() for matrices with zero extents" msgstr "Cannot solve() for matrices with zero extents" #: dpoMatrix.c:114 msgid "Argument b must be a numeric matrix" msgstr "Argument b must be a numeric matrix" #: dsCMatrix.c:71 msgid "" "Cholesky factorization failed; unusually, please report to Matrix-authors" msgstr "" "Cholesky factorization failed; unusually, please report to Matrix-authors" #: dsCMatrix.c:77 msgid "internal_chm_factor: Cholesky factorization failed" msgstr "internal_chm_factor: Cholesky factorization failed" #: dsCMatrix.c:213 msgid "Non-symmetric matrix passed to dsCMatrix_to_dgTMatrix" msgstr "Non-symmetric matrix passed to dsCMatrix_to_dgTMatrix" #: dspMatrix.c:13 dtpMatrix.c:17 msgid "Incorrect length of 'x' slot" msgstr "Incorrect length of ‘x’ slot" #: dsyMatrix.c:7 dtrMatrix.c:10 msgid "'Dim' slot has length less than two" msgstr "‘Dim’ slot has length less than two" #: dsyMatrix.c:9 dtrMatrix.c:12 msgid "Matrix is not square" msgstr "Matrix is not square" #: dsyMatrix.c:158 #, c-format msgid "Lapack routine dsytrf returned error code %d" msgstr "Lapack routine dsytrf returned error code %d" #: dtCMatrix.c:28 dtCMatrix.c:63 dtTMatrix.c:24 msgid "uplo='U' must not have sparse entries below the diagonal" msgstr "uplo='U' must not have sparse entries below the diagonal" #: dtCMatrix.c:34 dtCMatrix.c:69 dtTMatrix.c:29 msgid "uplo='L' must not have sparse entries above the diagonal" msgstr "uplo='L' must not have sparse entries above the diagonal" #: dtpMatrix.c:120 dtpMatrix.c:141 dtpMatrix.c:164 #, c-format msgid "Dimensions of a (%d,%d) and b (%d,%d) do not conform" msgstr "Dimensions of a (%d,%d) and b (%d,%d) do not conform" #: dtrMatrix.c:120 msgid "dtrMatrix must be square" msgstr "dtrMatrix must be square" #: dtrMatrix.c:160 msgid "dtrMatrices in %*% must have matching (square) dim." msgstr "dtrMatrices in %*% must have matching (square) dim." #: dtrMatrix.c:247 msgid "cannot set diag() as long as 'diag = \"U\"'" msgstr "cannot set diag() as long as ‘diag = \"U\"’" #: dtrMatrix.c:268 msgid "cannot add diag() as long as 'diag = \"U\"'" msgstr "cannot add diag() as long as ‘diag = \"U\"’" #: init.c:350 msgid "missing 'Matrix' namespace: should never happen" msgstr "missing ‘Matrix’ namespace: should never happen" #: init.c:361 msgid "Matrix namespace not determined correctly" msgstr "Matrix namespace not determined correctly" #: lgCMatrix.c:58 msgid "A must be a logical matrix" msgstr "A must be a logical matrix" #: sparseQR.c:13 msgid "length(p) must match nrow(V)" msgstr "length(p) must match nrow(V)" #: sparseQR.c:15 msgid "length(beta) must match ncol(V)" msgstr "length(beta) must match ncol(V)" #: sparseQR.c:18 msgid "length(q) must be zero or ncol(R)" msgstr "length(q) must be zero or ncol(R)" #: sparseQR.c:46 #, c-format msgid "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" msgstr "sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)" #: sparseQR.c:121 sparseQR.c:159 sparseQR.c:195 #, c-format msgid "%s(): structurally rank deficient case: possibly WRONG zeros" msgstr "%s(): structurally rank deficient case: possibly WRONG zeros" #: t_Csparse_subassign.c:144 msgid "invalid class of 'x' in Csparse_subassign()" msgstr "invalid class of ‘x’ in Csparse_subassign()" #: t_Csparse_subassign.c:146 msgid "invalid class of 'value' in Csparse_subassign()" msgstr "invalid class of ‘value’ in Csparse_subassign()" #: t_Csparse_subassign.c:189 #, c-format msgid "x[] <- val: val must be logical for \"%s\" x" msgstr "x[] <- val: val must be logical for \"%s\" x" #: t_Csparse_subassign.c:194 #, c-format msgid "x[] <- val: val must be integer or logical for \"%s\" x" msgstr "x[] <- val: val must be integer or logical for \"%s\" x" #: t_Csparse_subassign.c:201 msgid "programming error in Csparse_subassign() should never happen" msgstr "programming error in Csparse_subassign() should never happen" Matrix/po/R-pl.po0000644000176200001440000016245413047321304013317 0ustar liggesusersmsgid "" msgstr "" "Project-Id-Version: Matrix 1.1-2-2\n" "Report-Msgid-Bugs-To: bugs.r-project.org\n" "POT-Creation-Date: 2017-02-10 12:21\n" "PO-Revision-Date: 2014-03-27 14:47+0100\n" "Last-Translator: Łukasz Daniel \n" "Language-Team: Łukasz Daniel \n" "Language: pl_PL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" "X-Poedit-SourceCharset: iso-8859-1\n" "X-Generator: Poedit 1.5.4\n" # Matrix/R/Auxiliaries.R: 23 # stop(gettextf("invalid 'mod': %s", mod), domain = "R-Matrix") # Matrix/R/Auxiliaries.R: 26 # stop(gettextf("invalid 'mod': %s", mod), domain = "R-Matrix") msgid "invalid 'mod': %s" msgstr "niepoprawne 'mod': %s" # Matrix/R/Auxiliaries.R: 65 # stop(gettextf("not-yet-implemented method for %s(<%s>).\n ->> Ask the package authors to implement the missing feature.", fun, cl), call. = FALSE, domain = "R-Matrix") msgid "" "not-yet-implemented method for %s(<%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "metoda jeszcze niezaimplementowana dla %s(<%s>).\n" " ->> Poproś autorów pakietu o zaimplementowanie brakującej funkcjonalności." # Matrix/R/Auxiliaries.R: 68 # stop(gettextf("not-yet-implemented method for %s(<%s>, <%s>).\n ->> Ask the package authors to implement the missing feature.", fun, cl1, cl2), call. = FALSE, domain = "R-Matrix") msgid "" "not-yet-implemented method for %s(<%s>, <%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "metoda jeszcze niezaimplementowana dla %s(<%s>, <%s>).\n" " ->> Poproś autorów pakietu o zaimplementowanie brakującej funkcjonalności." # Matrix/R/Auxiliaries.R: 167 # stop("'x' is not positive definite -- chol() undefined.") # Matrix/R/dsparseMatrix.R: 18 # stop("'x' is not positive definite -- chol() undefined.") msgid "'x' is not positive definite -- chol() undefined." msgstr "'x' nie jest dodatnio określone -- nieokreślony 'chol()'." # Matrix/R/Auxiliaries.R: 248 # stop(gettextf("Matrices must have same dimensions in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain = "R-Matrix") msgid "Matrices must have same dimensions in %s" msgstr "Macierze muszą mieć te same wymiary w %s" # Matrix/R/Auxiliaries.R: 273 # stop(gettextf("non-conformable matrix dimensions in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain = "R-Matrix") msgid "non-conformable matrix dimensions in %s" msgstr "niezgodne wymiary macierzy w %s" # Matrix/R/Auxiliaries.R: 292 # warning(gettextf("dimnames [%d] mismatch in %s", j, deparse(sys.call(sys.parent()))), call. = FALSE, domain = "R-Matrix") msgid "dimnames [%d] mismatch in %s" msgstr "niezgodność nazw wymiarów [%d] w %s" msgid "names(dimnames()) must be NULL or of length two" msgstr "" # Matrix/R/Auxiliaries.R: 305 # stop(gettextf("Matrices must have same number of rows in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain = "R-Matrix") msgid "Matrices must have same number of rows in %s" msgstr "Macierze muszą mieć tę samą liczbę wierszy w %s" # Matrix/R/bind2.R: 395 # stop(gettextf("Matrices must have same number of columns in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain = "R-Matrix") # Matrix/R/Auxiliaries.R: 314 # stop(gettextf("Matrices must have same number of columns in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain = "R-Matrix") msgid "Matrices must have same number of columns in %s" msgstr "Macierze muszą mieć tę samą liczbę kolumn w %s" # Matrix/R/Auxiliaries.R: 373 # message(sprintf(gettext(" [[ suppressing %d column names %s... ]]", domain = "R-Matrix"), nc, paste(sQuote(cn[1:3]), collapse = ", ")), domain = NA) msgid "[[ suppressing %d column names %s ... ]]" msgstr "[[ zmniejszanie %d nazw kolumn %s ... ]]" # Matrix/R/Auxiliaries.R: 375 # message(sprintf(gettext(" [[ suppressing %d column names %s ]]", domain = "R-Matrix"), nc, paste(sQuote(cn[1:lc]), collapse = ", ")), domain = NA) msgid "[[ suppressing %d column names %s ]]" msgstr "[[ zmniejszanie %d nazw kolumn %s ]]" # Matrix/R/Auxiliaries.R: 521 # stop(gettext("'x' must be \"sparseMatrix\""), domain = "R-Matrix") msgid "'x' must be \"sparseMatrix\"" msgstr "'x' musi być obiektem klasy \"sparseMatrix\"" # Matrix/R/Auxiliaries.R: 641 # stop(gettextf("not yet implemented for class %s", dQuote(class.x)), domain = "R-Matrix") msgid "not yet implemented for class %s" msgstr "jeszcze niezaimplementowane dla klasy %s" # Matrix/R/ndenseMatrix.R: 86 # stop("not a triangular matrix") # Matrix/R/ldenseMatrix.R: 74 # stop("not a triangular matrix") # Matrix/R/Auxiliaries.R: 805 # stop("not a triangular matrix") # Matrix/R/Auxiliaries.R: 1035 # stop("not a triangular matrix") msgid "not a triangular matrix" msgstr "to nie jest macierz trójkątną" # Matrix/R/ndenseMatrix.R: 77 # stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") # Matrix/R/dgTMatrix.R: 37 # stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") # Matrix/R/ldenseMatrix.R: 65 # stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") # Matrix/R/Csparse.R: 76 # stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") # Matrix/R/dsyMatrix.R: 8 # stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") msgid "not a symmetric matrix; consider forceSymmetric() or symmpart()" msgstr "" "to nie jest macierz symetryczna; rozważ 'forceSymmetric()' lub 'symmpart()'" # Matrix/R/Auxiliaries.R: 821 # stop(gettextf("not yet implemented for matrix with typeof %s", typeof(x)), domain = "R-Matrix") # Matrix/R/Auxiliaries.R: 834 # stop(gettextf("not yet implemented for matrix with typeof %s", typeof(x)), domain = "R-Matrix") msgid "not yet implemented for matrix with typeof %s" msgstr "jeszcze niezaimplementowana dla macierzy z typem %s" # Matrix/R/Auxiliaries.R: 850 # stop(gettextf(" not yet implemented for %s", clx@className), domain = "R-Matrix") msgid "not yet implemented for %s" msgstr "jeszcze nie jest zaimplementowana dla %s" # Matrix/R/Auxiliaries.R: 906 # stop(gettextf("general Matrix class not yet implemented for %s", dQuote(class(x))), domain = "R-Matrix") msgid "general Matrix class not yet implemented for %s" msgstr "ogólna klasa 'Matrix' jeszcze nie jest zaimplementowana dla %s" # Matrix/R/CHMfactor.R: 122 # message(sprintf(gettext("Quadratic matrix '%s' (=: A) is not formally symmetric. Will be treated as A A'", domain = "R-Matrix"), "parent"), domain = NA) msgid "" "Quadratic matrix '%s' (=: A) is not formally\n" "\tsymmetric. Will be treated as\tA A'" msgstr "" "Macierz kwadratowa '%s' (=: A) nie jest formalnie symetryczna. Będzie " "traktowana jako A A'" # Matrix/R/CHMfactor.R: 134 # stop("'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a \"CHMfactor\"") msgid "" "'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a \"CHMfactor\"" msgstr "" "'update' musi być wartością logiczną lub '+' lub '-'; 'C' musi być macierzą, " "oraz 'L' musi być obiektem klasy 'CHMfactor'" # Matrix/R/CHMfactor.R: 145 # stop("update must be TRUE/FALSE or '+' or '-'") msgid "update must be TRUE/FALSE or '+' or '-'" msgstr "'update' musi wynosić TRUE/FALSE lub '+' lub '-'" # Matrix/R/Csparse.R: 190 # stop("Matrix-internal error in [i,,d]; please report") msgid "Matrix-internal error in [i,,d]; please report" msgstr "" "błąd wewnętrzny w pakiecie 'Matrix' w '[i,,d]'; proszę zgłosić " "raport" # Matrix/R/Csparse.R: 240 # stop("nothing to replace with") # Matrix/R/Tsparse.R: 400 # stop("nothing to replace with") # Matrix/R/Tsparse.R: 653 # stop("nothing to replace with") # Matrix/R/sparseVector.R: 525 # stop("nothing to replace with") msgid "nothing to replace with" msgstr "nic do zastąpienia" # Matrix/R/Matrix.R: 713 # warning("number of items to replace is not a multiple of replacement length") # Matrix/R/Csparse.R: 245 # stop("number of items to replace is not a multiple of replacement length") # Matrix/R/Tsparse.R: 366 # warning("number of items to replace is not a multiple of replacement length") # Matrix/R/Tsparse.R: 405 # stop("number of items to replace is not a multiple of replacement length") # Matrix/R/Tsparse.R: 657 # warning("number of items to replace is not a multiple of replacement length") # Matrix/R/sparseVector.R: 530 # stop("number of items to replace is not a multiple of replacement length") msgid "number of items to replace is not a multiple of replacement length" msgstr "" "liczba pozycji do zastąpienia nie jest wielokrotnością długości elementu " "zastępującego" # Matrix/R/Csparse.R: 247 # stop("too many replacement values") # Matrix/R/Tsparse.R: 495 # stop("too many replacement values") # Matrix/R/sparseVector.R: 557 # stop("too many replacement values") msgid "too many replacement values" msgstr "zbyt dużo wartości zamieniających" # Matrix/R/Csparse.R: 284 # warning("i1[1] == 0 ==> C-level verbosity will not happen!") msgid "i1[1] == 0 ==> C-level verbosity will not happen!" msgstr "i1[1] == 0 ==> tryb 'verbose' poziomu C nie zostanie wykonany!" msgid "using\t \"old code\" part in Csparse subassignment" msgstr "używanie\t części 'old code' w przypisaniu w 'Csparse'" msgid "" "using\"old code\" part in Csparse subassignment\n" " >>> please report to Matrix-authors@r-project.org" msgstr "" "używanie części 'old code' w przypisaniu w 'Csparse'\n" ">>> proszę zgłosić raport na adres 'Matrix-authors@r-project.org'" # Matrix/R/Csparse.R: 498 # stop("Cholesky() -> *symbolic* factorization -- not yet implemented") msgid "" "Cholesky() -> *symbolic* factorization -- not yet implemented" msgstr "" "Cholesky() -> *symboliczna* faktoryzacja -- jeszcze " "niezaimplementowana" # Matrix/R/HBMM.R: 13 # stop("Not a valid format") msgid "Not a valid format" msgstr "Niepoprawny format" # Matrix/R/HBMM.R: 33 # stop("'file' must be a character string or connection") # Matrix/R/HBMM.R: 82 # stop("'file' must be a character string or connection") msgid "'file' must be a character string or connection" msgstr "'file' musi być łańcuchem tekstowym lub połączeniem" # Matrix/R/HBMM.R: 47 # stop(gettextf("Invalid storage type: %s", t1), domain = "R-Matrix") msgid "Invalid storage type: %s" msgstr "Niepoprawny typ przechowywania: %s" # Matrix/R/HBMM.R: 48 # stop("Only numeric sparse matrices allowed") msgid "Only numeric sparse matrices allowed" msgstr "Dozwolone są jedynie liczbowe rzadkie macierze" # Matrix/R/HBMM.R: 51 # stop(gettextf("Invalid storage format: %s", t2), domain = NA) msgid "Invalid storage format: %s" msgstr "Niepoprawny format przechowywania: %s" # Matrix/R/HBMM.R: 53 # stop(gettextf("Invalid assembled indicator: %s", t3), domain = "R-Matrix") msgid "Invalid assembled indicator: %s" msgstr "Niepoprawnie złożony wskaźnik: %s" # Matrix/R/HBMM.R: 91 # stop("file is not a MatrixMarket file") msgid "file is not a MatrixMarket file" msgstr "plik nie jest plikiem typu 'MatrixMarket'" # Matrix/R/HBMM.R: 93 # stop(gettextf("type '%s' not recognized", typ), domain = "R-Matrix") msgid "type '%s' not recognized" msgstr "typ '%s' nie został rozpoznany" # Matrix/R/HBMM.R: 95 # stop(gettextf("representation '%s' not recognized", repr), domain = "R-Matrix") msgid "representation '%s' not recognized" msgstr "reprezentacja '%s' nie została rozpoznana" # Matrix/R/HBMM.R: 98 # stop(gettextf("element type '%s' not recognized", elt), domain = "R-Matrix") msgid "element type '%s' not recognized" msgstr "element typu '%s' nie został rozpoznany" # Matrix/R/HBMM.R: 102 # stop(gettextf("symmetry form '%s' not recognized", sym), domain = "R-Matrix") msgid "symmetry form '%s' not recognized" msgstr "forma symetryczna '%s' nie została rozpoznana" msgid "readMM(): row\t values 'i' are not in 1:nr" msgstr "readMM(): wartości wiersza 'i' nie są w przedziale 1:nr" # Matrix/R/HBMM.R: 110 # stop("readMM(): column values 'j' are not in 1:nc", call.=FALSE) msgid "readMM(): column values 'j' are not in 1:nc" msgstr "readMM(): wartości kolumny 'j' nie są w przedziale 1:nc" # Matrix/R/HBMM.R: 131 # stop("symmetry form 'skew-symmetric' not yet implemented for reading") # Matrix/R/HBMM.R: 158 # stop("symmetry form 'skew-symmetric' not yet implemented for reading") msgid "symmetry form 'skew-symmetric' not yet implemented for reading" msgstr "" "forma symetryczna 'skew-symmetric' nie jest jeszcze zaimplementowana na " "potrzeby odczytu" # Matrix/R/HBMM.R: 138 # stop("symmetry form 'hermitian' not yet implemented for reading") # Matrix/R/HBMM.R: 165 # stop("symmetry form 'hermitian' not yet implemented for reading") msgid "symmetry form 'hermitian' not yet implemented for reading" msgstr "" "forma symetryczna 'hermitian' nie jest jeszcze zaimplementowana na potrzeby " "odczytu" # Matrix/R/HBMM.R: 141 # stop(gettextf("symmetry form '%s' is not yet implemented", sym), domain = "R-Matrix") # Matrix/R/HBMM.R: 168 # stop(gettextf("symmetry form '%s' is not yet implemented", sym), domain = "R-Matrix") msgid "symmetry form '%s' is not yet implemented" msgstr "forma symetryczna '%s' nie jest jeszcze zaimplementowana" # Matrix/R/HBMM.R: 172 # stop("element type 'complex' not yet implemented") msgid "element type 'complex' not yet implemented" msgstr "typ elementu 'complex' nie jest jeszcze zaimplementowany" # Matrix/R/HBMM.R: 175 # stop(sprintf(gettext("'%s()' is not yet implemented for element type '%s'", domain = "R-Matrix"), "readMM", elt), domain = NA) msgid "'%s()' is not yet implemented for element type '%s'" msgstr "'%s()' nie jest jeszcze zaimplementowany dla typu '%s' elementu" # Matrix/R/HBMM.R: 178 # stop(sprintf(gettext("'%s()' is not yet implemented for representation '%s'", domain = "R-Matrix"), "readMM", repr), domain = NA) msgid "'%s()' is not yet implemented for representation '%s'" msgstr "'%s()' nie jest jeszcze zaimplementowane dla reprezentacji '%s'" # Matrix/R/Matrix.R: 71 # warning("trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)") msgid "trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)" msgstr "" "przycięta średnia 'sparseVector' -- optymalnie używając 'as.numeric(.)'" # Matrix/R/Matrix.R: 91 # stop("'V' is not a square matrix") msgid "'V' is not a square matrix" msgstr "'V' nie jest macierzą kwadratową" # Matrix/R/Matrix.R: 94 # warning("diag(.) had 0 or NA entries; non-finite result is doubtful") # Matrix/R/sparseMatrix.R: 764 # warning("diag(.) had 0 or NA entries; non-finite result is doubtful") msgid "diag(.) had 0 or NA entries; non-finite result is doubtful" msgstr "'diag(.)' posiadało wpisy 0 lub NA; nieskończony wynik jest wątpliwy" # Matrix/R/Matrix.R: 144 # stop(gettextf("invalid dimnames given for %s object", dQuote(class(x))), domain = "R-Matrix") msgid "invalid dimnames given for %s object" msgstr "podano niepoprawne nazwy wymiarów dla obiektu %s" # Matrix/R/Matrix.R: 154 # message("dimnames(.) <- NULL: translated to \ndimnames(.) <- list(NULL,NULL) <==> unname(.)") msgid "" "dimnames(.) <- NULL: translated to \n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" msgstr "" "dimnames(.) <- NULL: przetłumaczono na\n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" # Matrix/R/Matrix.R: 186 # warning("'nrow', 'ncol', etc, are disregarded when 'data' is \"Matrix\" already") msgid "'nrow', 'ncol', etc, are disregarded when 'data' is \"Matrix\" already" msgstr "" "'nrow', 'ncol', itd., nie są uwzględniane gdy 'data' ma już typ 'Matrix'" # Matrix/R/Matrix.R: 206 # stop("invalid 'data'") msgid "invalid 'data'" msgstr "niepoprawne 'data'" # Matrix/R/Matrix.R: 224 # warning("'nrow', 'ncol', etc, are disregarded for matrix 'data'") msgid "'nrow', 'ncol', etc, are disregarded for matrix 'data'" msgstr "'nrow', 'ncol', itd., są nieuwzględniane dla 'data' typu macierzowego" # Matrix/R/Matrix.R: 251 # stop("complex matrices not yet implemented in Matrix package") msgid "complex matrices not yet implemented in Matrix package" msgstr "macierze zespolone nie są jeszcze zaimplementowane w pakiecie 'Matrix'" # Matrix/R/Matrix.R: 311 # warning("using slow kronecker() method") # Matrix/R/Matrix.R: 318 # warning("using slow kronecker() method") msgid "using slow kronecker() method" msgstr "używanie powolnej metody 'kronecker()'" # Matrix/R/Matrix.R: 334 # stop(gettextf("Cholesky(A) called for 'A' of class \"%s\";\n\t it is currently defined for sparseMatrix only; consider using chol() instead", class(A)), call. = FALSE, domain = "R-Matrix") msgid "" "Cholesky(A) called for 'A' of class \"%s\";\n" "\t it is currently defined for sparseMatrix only; consider using chol() " "instead" msgstr "" "metoda 'Cholesky(A)' poprosiła o 'A' klasy '%s';\n" "\t aktualnie jest ona zdefiniowana jedynie dla klasy 'sparseMatrix'; rozważ " "w zamian użycie 'metodychol()'" # Matrix/R/Matrix.R: 400 # stop("'lag' and 'differences' must be integers >= 1") msgid "'lag' and 'differences' must be integers >= 1" msgstr "'lag' oraz 'differences' muszą być liczbami całkowitymi >= 1" # Matrix/R/Matrix.R: 563 # stop("invalid or not-yet-implemented 'Matrix' subsetting") msgid "invalid or not-yet-implemented 'Matrix' subsetting" msgstr "niepoprawne lub jeszcze niezaimplementowane podstawienie 'Matrix'" # Matrix/R/Matrix.R: 574 # message("[ ] : .M.sub.i.logical() maybe inefficient") msgid "[ ] : .M.sub.i.logical() maybe inefficient" msgstr "[ ] : '.M.sub.i.logical()' może być niewydajne" # Matrix/R/Matrix.R: 590 # stop(gettextf("nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?", nA), domain = "R-Matrix") msgid "" "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?" msgstr "" "nargs() = %d. Obce nielegalne argumenty wewnątrz '[ .. ]' (i.logical)?" # Matrix/R/Matrix.R: 644 # message("m[ ]: inefficiently indexing single elements") msgid "m[ ]: inefficiently indexing single elements" msgstr "m[ ]: nieefektywne indeksowanie pojedynczych elementów" # Matrix/R/Matrix.R: 673 # stop(gettextf("nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?", nA), domain = "R-Matrix") msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?" msgstr "nargs() = %d. Obce nielegalne argumenty wewnątrz '[ .. ]' (i.2col)?" # Matrix/R/Matrix.R: 663 # stop(".M.sub.i.2col(): 'i' has no integer column number;\n should never happen; please report") msgid "" ".M.sub.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.sub.i.2col(): 'i' posiada niecałkowitą liczbę kolumn;\n" "to nie powinno się nigdy wydarzyć; proszę zgłosić raport" # Matrix/R/Matrix.R: 667 # stop("such indexing must be by logical or 2-column numeric matrix") # Matrix/R/Matrix.R: 696 # stop("such indexing must be by logical or 2-column numeric matrix") # Matrix/R/Tsparse.R: 638 # stop("such indexing must be by logical or 2-column numeric matrix") msgid "such indexing must be by logical or 2-column numeric matrix" msgstr "" "takie indeksowanie musi być wykonane poprzez macierz logiczną lub 2-" "kolumnową macierz liczbową" # Matrix/R/Matrix.R: 694 # stop(".M.repl.i.2col(): 'i' has no integer column number;\n should never happen; please report") msgid "" ".M.repl.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.repl.i.2col(): 'i' posiada niecałkowitą liczbę kolumn;\n" "to nie powinno się nigdy wydarzyć; proszę zgłosić raport" # Matrix/R/Matrix.R: 698 # message(".M.repl.i.2col(): drop 'matrix' case ...") msgid ".M.repl.i.2col(): drop 'matrix' case ..." msgstr ".M.repl.i.2col(): zrzuć przypadek 'matrix' ..." # Matrix/R/Matrix.R: 704 # stop("negative values are not allowed in a matrix subscript") # Matrix/R/Tsparse.R: 641 # stop("negative values are not allowed in a matrix subscript") msgid "negative values are not allowed in a matrix subscript" msgstr "ujemne wartości nie są dozwolone w indeksach macierzy" # Matrix/R/Matrix.R: 706 # stop("NAs are not allowed in subscripted assignments") # Matrix/R/Tsparse.R: 643 # stop("NAs are not allowed in subscripted assignments") msgid "NAs are not allowed in subscripted assignments" msgstr "wartości NA nie są dozwolone w indeksowanych przypisaniach" # Matrix/R/Matrix.R: 719 # message("m[ ] <- v: inefficiently treating single elements") msgid "m[ ] <- v: inefficiently treating single elements" msgstr "m[ ] <- v: nieefektywne traktowanie pojedynczych elementów" # Matrix/R/Matrix.R: 725 # stop(gettextf("nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?", nA), domain = "R-Matrix") msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?" msgstr "nargs() = %d. Obce nielegalne argumenty wewnątrz '[ .. ]' ?" # Matrix/R/Matrix.R: 796 # stop(gettextf("RHS 'value' (class %s) matches 'ANY', but must match matrix class %s", class(value), class(x)), domain = "R-Matrix") msgid "RHS 'value' (class %s) matches 'ANY', but must match matrix class %s" msgstr "" "prawa strona 'value' (klasa %s) pasuje do 'ANY', a musi pasować do klasy " "macierzy '%s'" # Matrix/R/Matrix.R: 797 # stop("not-yet-implemented 'Matrix[<-' method") msgid "not-yet-implemented 'Matrix[<-' method" msgstr "jeszcze niezaimplementowana metoda 'Matrix[<-'" # Matrix/R/Ops.R: 35 # warning("inefficient method used for \"- e1\"") msgid "inefficient method used for \"- e1\"" msgstr "nieefektywna metoda użyta dla '- e1'" # Matrix/R/Ops.R: 1595 # stop(sprintf( # "dim [product %d] do not match the length of object [%d]", # n1, n2)) # Matrix/R/Ops.R: 1621 # stop(sprintf( # "dim [product %d] do not match the length of object [%d]", # n2, n1)) msgid "dim [product %d] do not match the length of object [%d]" msgstr "wymiar [produkt %d] nie zgadza się z długością obiektu [%d]" # Matrix/R/Ops.R: 174 # stop("internal bug in \"Compare\" method (Cmp.Mat.atomic); please report") msgid "internal bug in \"Compare\" method (Cmp.Mat.atomic); please report" msgstr "" "błąd wewnętrzny w metodzie 'Compare' (Cmp.Mat.atomic); proszę zgłosić raport" # Matrix/R/Ops.R: 183 # stop("Cmp.Mat.atomic() should not be called for diagonalMatrix") msgid "Cmp.Mat.atomic() should not be called for diagonalMatrix" msgstr "'Cmp.Mat.atomic()' nie powinien być wywołany dla 'diagonalMatrix'" # Matrix/R/Ops.R: 422 # stop("Matrices must have same number of rows for arithmetic") msgid "Matrices must have same number of rows for arithmetic" msgstr "" "Macierze muszą mieć tę samą liczbę wierszy jeśli mają być przeprowadzane " "działania arytmetyczne" # Matrix/R/Ops.R: 438 # stop(gettextf("number of rows are not compatible for %s", .Generic), domain = "R-Matrix") msgid "number of rows are not compatible for %s" msgstr "liczba wierszy nie jest zgodna dla %s" # Matrix/R/Ops.R: 449 # stop ("length of 2nd arg does not match dimension of first") # Matrix/R/Ops.R: 503 # stop ("length of 2nd arg does not match dimension of first") msgid "length of 2nd arg does not match dimension of first" msgstr "długość drugiego argumentu nie zgadza się z wymiarem pierwszego" # Matrix/R/Ops.R: 461 # stop ("length of 1st arg does not match dimension of 2nd") # Matrix/R/Ops.R: 534 # stop ("length of 1st arg does not match dimension of 2nd") msgid "length of 1st arg does not match dimension of 2nd" msgstr "długość pierwszego argumentu nie zgadza się z wymiarem drugiego" # Matrix/R/Ops.R: 674 # stop("internal bug in \"Logic\" method (Logic.Mat.atomic); please report") msgid "internal bug in \"Logic\" method (Logic.Mat.atomic); please report" msgstr "" "błąd wewnętrzny w metodzie 'Logic' (.Logic.Mat.atomic); proszę zgłosić raport" # Matrix/R/Ops.R: 683 # stop("Logic.Mat.atomic() should not be called for diagonalMatrix") msgid "Logic.Mat.atomic() should not be called for diagonalMatrix" msgstr "'Logic.Mat.atomic()' nie powinien być wywołany dla 'diagonalMatrix'" # Matrix/R/Ops.R: 1115 # stop("vector too long in Matrix - vector operation") msgid "vector too long in Matrix - vector operation" msgstr "wektor jest zbyt długi w operacji macierz-wektor" # Matrix/R/Ops.R: 1117 # warning("longer object length\n\tis not a multiple of shorter object length") # Matrix/R/Ops.R: 1512 # warning("longer object length\n\tis not a multiple of shorter object length") # Matrix/R/Ops.R: 1604 # warning("longer object length\n\tis not a multiple of shorter object length") # Matrix/R/Ops.R: 1630 # warning("longer object length\n\tis not a multiple of shorter object length") msgid "" "longer object length\n" "\tis not a multiple of shorter object length" msgstr "" "długość dłuższego obiektu\n" "\tnie jest wielokrotnością długości krótszego obiektu" # Matrix/R/Ops.R: 134 # stop(sprintf(gettext(" %s %s is undefined", domain = "R-Matrix"), .Generic, paste0(class(e2),"(0)")), domain = NA) # Matrix/R/Ops.R: 634 # stop(sprintf(gettext(" %s %s is undefined", domain = "R-Matrix"), .Generic, paste0(class(e2),"(0)")), domain = NA) # Matrix/R/Ops.R: 1126 # stop(sprintf(gettext(" %s %s is undefined", domain = "R-Matrix"), .Generic, paste0(class(e2),"(0)")), domain = NA) msgid " %s %s is undefined" msgstr " %s %s nie jest określone" # Matrix/R/Ops.R: 1165 # stop(sprintf(gettext("%s %s is undefined", domain = "R-Matrix"), paste0(class(e2),"(0)"), .Generic), domain = NA) msgid "%s %s is undefined" msgstr "%s %s nie jest określone" # Matrix/R/Ops.R: 1117 # warning("longer object length\n\tis not a multiple of shorter object length") # Matrix/R/Ops.R: 1512 # warning("longer object length\n\tis not a multiple of shorter object length") # Matrix/R/Ops.R: 1604 # warning("longer object length\n\tis not a multiple of shorter object length") # Matrix/R/Ops.R: 1630 # warning("longer object length\n\tis not a multiple of shorter object length") msgid "longer object length is not a multiple of shorter object length" msgstr "" "długość dłuższego obiektu nie jest wielokrotnością długości krótszego obiektu" # Matrix/R/Rsparse.R: 32 # stop(gettextf("invalid class: %s", dQuote(cl)), domain = "R-Matrix") # Matrix/R/Rsparse.R: 59 # stop(gettextf("invalid class: %s", dQuote(cl)), domain = "R-Matrix") msgid "invalid class: %s" msgstr "niepoprawna klasa: %s" # Matrix/R/Matrix.R: 459 # stop("programming error: min() should have dispatched w/ 1st arg much earlier") msgid "programming error: min() should have dispatched w/ 1st arg much earlier" msgstr "" "błąd programistyczny: 'min()' powinno zostać wysłane z pierwszym argumentem " "znacznie wcześniej" msgid "in Summary(, .): %s(<%s>, <%s>,...)" msgstr "w funkcji 'Summary(, .): %s(<%s>, <%s>,...)'" #, fuzzy msgid "in Summary(, .): %s(<%s>, <%s>)" msgstr "w funkcji 'Summary(, .): %s(<%s>, <%s>,...)'" # Matrix/R/Tsparse.R: 8 # stop("not-yet-implemented coercion to \"TsparseMatrix\"") msgid "not-yet-implemented coercion to \"TsparseMatrix\"" msgstr "jeszcze niezaimplementowane przekształcenie na 'TsparseMatrix'" # Matrix/R/Tsparse.R: 126 # stop("you cannot mix negative and positive indices") # Matrix/R/sparseVector.R: 395 # stop("you cannot mix negative and positive indices") # Matrix/R/sparseVector.R: 462 # stop("you cannot mix negative and positive indices") msgid "you cannot mix negative and positive indices" msgstr "nie można mieszać ujemnych oraz dodatnich indeksów" # Matrix/R/Tsparse.R: 130 # stop(gettextf("index larger than maximal %d", n), domain = "R-Matrix") msgid "index larger than maximal %d" msgstr "indeks dłuższy niż maksymalny możliwy %d" # Matrix/R/Tsparse.R: 123 # stop("'NA' indices are not (yet?) supported for sparse Matrices") msgid "'NA' indices are not (yet?) supported for sparse Matrices" msgstr "indeksy 'NA' nie są (jeszcze?) wspierane dla rzadkich macierzy" # Matrix/R/Tsparse.R: 138 # stop(gettextf("logical subscript too long (%d, should be %d)", length(i), n), domain = "R-Matrix") msgid "logical subscript too long (%d, should be %d)" msgstr "indeks logiczny jest zbyt długi (%d, powinien być %d)" # Matrix/R/Tsparse.R: 143 # stop("no 'dimnames[[.]]': cannot use character indexing") msgid "no 'dimnames[[.]]': cannot use character indexing" msgstr "brak 'dimnames[[.]]': nie można używać indeksowania tekstowego" # Matrix/R/Tsparse.R: 145 # stop("invalid character indexing") msgid "invalid character indexing" msgstr "niepoprawne tekstowe indeksowanie" # Matrix/R/Tsparse.R: 206 # stop("Matrix-internal error in [i,,d]; please report") msgid "Matrix-internal error in [i,,d]; please report" msgstr "" "błąd wewnętrzny pakiecie 'Matrix' w '[i,,d]'; proszę zgłosić raport" # Matrix/R/Tsparse.R: 256 # stop("FIXME: NOT YET FINISHED IMPLEMENTATION") msgid "FIXME: NOT YET FINISHED IMPLEMENTATION" msgstr "FIXME: JESZCZE NIEZAKOŃCZONA IMPLEMENTACJA" # Matrix/R/Tsparse.R: 309 # stop("internal bug: missing 'i' in replTmat(): please report") msgid "internal bug: missing 'i' in replTmat(): please report" msgstr "błąd wewnętrzny: brakuje 'i' w 'replTmat()': proszę zgłosić raport" # Matrix/R/Tsparse.R: 311 # stop("[ ] indexing not allowed: forgot a \",\" ?") msgid "[ ] indexing not allowed: forgot a \",\" ?" msgstr "indeksowanie [ ] nie jest dozwolone: zapomniałeś ',' ?" # Matrix/R/Tsparse.R: 313 # stop("internal bug: matrix 'i' in replTmat(): please report") msgid "internal bug: matrix 'i' in replTmat(): please report" msgstr "wewnętrzny błąd: macierz 'i' w 'replTmat()': proszę zgłosić raport" # Matrix/R/Tsparse.R: 342 # warning(if(iNA) # gettextf("x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.", dQuote(clx)) # else # gettextf("x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.", dQuote(clx)), domain = "R-Matrix") msgid "" "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE." msgstr "" "x[.] <- wartość: 'x' to %s, wartość nie w zakresie {TRUE, FALSE} zostaje " "przekształcona; NA |--> TRUE." # Matrix/R/Tsparse.R: 342 # warning(if(iNA) # gettextf("x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.", dQuote(clx)) # else # gettextf("x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.", dQuote(clx)), domain = "R-Matrix") msgid "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "" "x[.] <- wartość: 'x' to %s, wartość nie w zakresie {TRUE, FALSE} zostaje " "przekształcona." # Matrix/R/Tsparse.R: 500 # warning(if(iNA) # gettextf("x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.", dQuote(clx)) # else # gettextf("x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.", dQuote(clx)), domain = "R-Matrix") msgid "" "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE." msgstr "" "x[.,.] <- wartość: 'x' to %s, wartość nie w zakresie {TRUE, FALSE} zostaje " "przekształcona NA |--> TRUE." # Matrix/R/Tsparse.R: 500 # warning(if(iNA) # gettextf("x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.", dQuote(clx)) # else # gettextf("x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.", dQuote(clx)), domain = "R-Matrix") msgid "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "" "x[.,.] <- wartość: 'x' to %s, wartość nie w zakresie {TRUE, FALSE} zostaje " "przekształcona." # Matrix/R/Tsparse.R: 529 # message(gettextf("x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrix"), domain = "R-Matrix") msgid "x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrix" msgstr "" "x[.,.] <- wartość : 'x' zostaje przekształcone z 'Tsparse*' na " "'CsparseMatrix'" # Matrix/R/Matrix.R: 769 # stop(gettextf("nargs() = %d should never happen; please report.", nA), domain = "R-Matrix") # Matrix/R/Matrix.R: 781 # stop(gettextf("nargs() = %d should never happen; please report.", nA), domain = "R-Matrix") # Matrix/R/Tsparse.R: 624 # stop(gettextf("nargs() = %d should never happen; please report.", nA), domain = "R-Matrix") msgid "nargs() = %d should never happen; please report." msgstr "'nargs() = %d' nie powinno się wydarzyć; proszę zgłosić raport." # Matrix/R/Tsparse.R: 669 # stop(gettextf("row indices must be <= nrow(.) which is %d", nr), domain = "R-Matrix") msgid "row indices must be <= nrow(.) which is %d" msgstr "indeksy wiersza muszą być <= 'nrow(.)' który wynosi %d" # Matrix/R/Tsparse.R: 670 # stop(gettextf("column indices must be <= ncol(.) which is %d", nc), domain = "R-Matrix") msgid "column indices must be <= ncol(.) which is %d" msgstr "indeksy kolumn muszą być <= 'ncol(.)' który wynosi %d" # Matrix/R/abIndex.R: 13 # stop("'force' must be (coercable to) TRUE or FALSE") msgid "'force' must be (coercable to) TRUE or FALSE" msgstr "'force' musi być (przekształcalne do) TRUE lub FALSE" # Matrix/R/abIndex.R: 162 # stop("invalid (to - from)/by in 'seq(.)'") msgid "invalid (to - from)/by in seq(.)" msgstr "niepoprawne '(to - from)/by' w 'seq(.)'" # Matrix/R/abIndex.R: 165 # stop("wrong sign in 'by' argument") msgid "wrong sign in 'by' argument" msgstr "niepoprawny znak w argumencie 'by'" # Matrix/R/abIndex.R: 167 # stop("'by' argument is much too small") msgid "'by' argument is much too small" msgstr "argument 'by' jest znacznie za mały" # Matrix/R/abIndex.R: 177 # stop("length must be non-negative number") msgid "length must be non-negative number" msgstr "długość musi być nieujemną liczbą" # Matrix/R/abIndex.R: 198 # stop("too many arguments") msgid "too many arguments" msgstr "zbyt wiele argumentów" # Matrix/R/abIndex.R: 286 # warning("c(,..) of different kinds, coercing all to 'rleDiff'") msgid "c(,..) of different kinds, coercing all to 'rleDiff'" msgstr "" "'c(,..)' różnych rodzajów, przekształcanie wszystkich do 'rleDiff'" # Matrix/R/abIndex.R: 345 # stop("[i] is not yet implemented") msgid "[i] is not yet implemented" msgstr "'[i]' nie jest jeszcze zaimplementowane" # Matrix/R/abIndex.R: 423 # stop("all() is not yet implemented") msgid "all() is not yet implemented" msgstr "'all()' nie jest jeszcze zaimplementowane" # Matrix/R/abIndex.R: 429 # stop("sum() is not yet implemented") msgid "sum() is not yet implemented" msgstr "'sum()' nie jest jeszcze zaimplementowane" # Matrix/R/abIndex.R: 432 # stop("prod() is not yet implemented") msgid "prod() is not yet implemented" msgstr "'prod()' nie jest jeszcze zaimplementowane" # Matrix/R/abIndex.R: 460 # stop("not yet implemented") # Matrix/R/sparseMatrix.R: 676 # stop("not yet implemented") msgid "not yet implemented" msgstr "jeszcze niezaimplementowane" # Matrix/R/abIndex.R: 518 # warning("x / 0 for an x with sign-change\nno longer representable as 'rleDiff'") msgid "" "x / 0 for an x with sign-change\n" " no longer representable as 'rleDiff'" msgstr "" "x / 0 dla ' x' ze zmianą znaku nie jest dłużej reprezentowalne jako " "'rleDiff'" # Matrix/R/abIndex.R: 693 # stop(" --> is not yet implemented") msgid " --> is not yet implemented" msgstr " --> nie jest jeszcze zaimplementowane" # Matrix/R/abIndex.R: 698 # stop(" --> is not yet implemented") msgid " --> is not yet implemented" msgstr " --> nie jest jeszcze zaimplementowane" # Matrix/R/bandSparse.R: 26 # stop(sprintf(ngettext(len.k, "'diagonals' matrix must have %d column (= length(k) )", "'diagonals' matrix must have %d columns (= length(k) )", domain = "R-Matrix"), len.k), domain = NA) msgid "'diagonals' matrix must have %d columns (= length(k) )" msgstr "macierz 'diagonals' musi mieć %d kolumnę (= length(k) )" # Matrix/R/bandSparse.R: 31 # stop(gettextf("'diagonals' must have the same length (%d) as 'k'", len.k), domain = "R-Matrix") msgid "'diagonals' must have the same length (%d) as 'k'" msgstr "'diagonals' musi mieć tę samą długość (%d) co 'k'" msgid "matrix can only be symmetric if square, but n != m" msgstr "" # Matrix/R/bandSparse.R: 36 # stop("for symmetric band matrix, only specify upper or lower triangle\n hence, all k must have the same sign") msgid "" "for symmetric band matrix, only specify upper or lower triangle\n" " hence, all k must have the same sign" msgstr "" "dla symetrycznej macierzy wstęgowej, określ jedynie górny oraz dolny " "trójkąt\n" "tak więc, wszystkie k muszą mieć ten sam znak" # Matrix/R/bandSparse.R: 64 # warning(gettextf("the %d-th (sub)-diagonal (k = %d) is too short; filling with NA's", s, kk), domain = "R-Matrix") msgid "the %d-th (sub)-diagonal (k = %d) is too short; filling with NA's" msgstr "" "(pod)-diagonala %d (k = %d) jest zbyt krótkal wypełnianie wartościami NA" msgid "resulting x-slot has different type than x's or y's" msgstr "" # Matrix/R/condest.R: 74 # stop("'A' must be a square matrix") # Matrix/R/condest.R: 194 # stop("'A' must be a square matrix") msgid "'A' must be a square matrix" msgstr "'A' musi być macierzą kwadratową" # Matrix/R/condest.R: 186 # stop("must either specify 'A' or the functions 'A.x' and 'At.x'") msgid "must either specify 'A' or the functions 'A.x' and 'At.x'" msgstr "potrzeba określić 'A' lub funkcje 'A.x' oraz 'At.x'" # Matrix/R/condest.R: 188 # warning("when 'A' is specified, 'A.x' and 'At.x' are disregarded") msgid "when 'A' is specified, 'A.x' and 'At.x' are disregarded" msgstr "gdy 'A' jest określone, 'A.x' oraz 'At.x' są odrzucane" # Matrix/R/condest.R: 234 # warning(gettextf("not converged in %d iterations", iter.max), domain = "R-Matrix") msgid "not converged in %d iterations" msgstr "nie uzbieżnił się w %d iteracjach" # Matrix/R/condest.R: 249 # message("hit a cycle (1) -- stop iterations") msgid "hit a cycle (1) -- stop iterations" msgstr "natrafiona na cykl (1) -- zatrzymywanie iteracji" # Matrix/R/condest.R: 283 # message("hit a cycle (2) -- stop iterations") msgid "hit a cycle (2) -- stop iterations" msgstr "natrafiona na cykl (2) -- zatrzymywanie iteracji" # Matrix/R/condest.R: 300 # message("not enough new vecs -- stop iterations") msgid "not enough new vecs -- stop iterations" msgstr "zbyt mało nowych wektorów -- zatrzymywanie iteracji" # Matrix/R/denseMatrix.R: 30 # stop("diagonalMatrix in .dense2C() -- should never happen, please report!") msgid "diagonalMatrix in .dense2C() -- should never happen, please report!" msgstr "" "'diagonalMatrix' w '.dense2C()' -- nie powinno nigdy się wydarzyć, proszę " "zgłosić raport!" # Matrix/R/denseMatrix.R: 36 # stop(gettextf("undefined method for class %s", dQuote(cl)), domain = "R-Matrix") msgid "undefined method for class %s" msgstr "niezdefiniowana metoda dla klasy %s" # Matrix/R/denseMatrix.R: 71 # stop("dim(.) value must be numeric of length 2") # Matrix/R/sparseVector.R: 317 # stop("dim(.) value must be numeric of length 2") # Matrix/R/sparseMatrix.R: 711 # stop("dim(.) value must be numeric of length 2") msgid "dim(.) value must be numeric of length 2" msgstr "wartości 'dim(.)' muszą być liczbami o długości 2" # Matrix/R/denseMatrix.R: 73 # stop("dimensions don't match the number of cells") # Matrix/R/sparseVector.R: 319 # stop("dimensions don't match the number of cells") # Matrix/R/sparseMatrix.R: 713 # stop("dimensions don't match the number of cells") msgid "dimensions don't match the number of cells" msgstr "wymiary nie zgadzają się z liczbą komórek" # Matrix/R/denseMatrix.R: 101 # stop(gettextf("invalid nargs()= %d", na), domain = "R-Matrix") # Matrix/R/denseMatrix.R: 164 # stop(gettextf("invalid nargs()= %d", na), domain = "R-Matrix") msgid "invalid nargs()= %d" msgstr "niepoprawne nargs()=%d" # Matrix/R/dgCMatrix.R: 94 # stop(gettextf("LU computationally singular: ratio of extreme entries in |diag(U)| = %9.4g", # rU[1] / rU[2]), # domain = "R-Matrix") msgid "" "LU computationally singular: ratio of extreme entries in |diag(U)| = %9.4g" msgstr "" "LU obliczeniowo osobliwa: stosunek ekstremalnych wpisów w |diag(U)| = %9.4g" msgid "RHS 'b' has wrong number of rows:" msgstr "" msgid "RHS 'b' has wrong length" msgstr "" # Matrix/R/dgTMatrix.R: 20 # stop("cannot coerce non-symmetric \"dgTMatrix\" to \"dsCMatrix\" class") msgid "cannot coerce non-symmetric \"dgTMatrix\" to \"dsCMatrix\" class" msgstr "" "nie można przekształcić niesymetrycznej macierzy klasy \"dgTMatrix\" na " "klasę \"dsCMatrix\"" # Matrix/R/dgTMatrix.R: 44 # stop("the matrix is not triangular") msgid "the matrix is not triangular" msgstr "macierz nie jest trójkątna" # Matrix/R/dgTMatrix.R: 106 # stop("'lwd' must be NULL or non-negative numeric") msgid "'lwd' must be NULL or non-negative numeric" msgstr "'lwd' musi mieć wartość NULL lub być nieujemną liczbą" # Matrix/R/diagMatrix.R: 28 # stop("'x' has invalid data type") msgid "'x' has invalid data type" msgstr "'x' posiada niepoprawny typ danych" # Matrix/R/diagMatrix.R: 72 # stop("length(x) must be either 1 or #{cols}") msgid "length(x) must be either 1 or #{cols}" msgstr "'length(x)' musi wynosić 1 lub #{kolumn}" # Matrix/R/diagMatrix.R: 101 # stop("some arguments are not matrices") msgid "some arguments are not matrices" msgstr "niektóre argumenty nie są macierzami" # Matrix/R/diagMatrix.R: 225 # stop(gettextf("%s kind not yet implemented", sQuote(kind)), domain = "R-Matrix") msgid "%s kind not yet implemented" msgstr "rodzaj %s nie jest jeszcze zaimplementowany" # Matrix/R/diagMatrix.R: 337 # stop("non-square matrix") # Matrix/R/diagMatrix.R: 357 # stop("non-square matrix") msgid "non-square matrix" msgstr "niekwadratowa macierz" # Matrix/R/diagMatrix.R: 339 # stop("matrix with non-zero off-diagonals cannot be coerced to \"diagonalMatrix\"") msgid "" "matrix with non-zero off-diagonals cannot be coerced to \"diagonalMatrix\"" msgstr "" "macierz z niezerowaymi wartościami pozadiagonalnymi nie może zostać " "przekształcona w na obiekt klasy \"diagonalMatrix\"" # Matrix/R/diagMatrix.R: 358 # stop("matrix is not diagonal") msgid "matrix is not diagonal" msgstr "macierz nie jest diagonalna" # Matrix/R/diagMatrix.R: 418 # stop(gettextf("Internal bug: nargs()=%d; please report", na), domain = "R-Matrix") msgid "Internal bug: nargs()=%d; please report" msgstr "Błąd wewnętrzny: nargs()=%d; proszę zgłosić raport" # Matrix/R/diagMatrix.R: 528 # stop("chol() is undefined for diagonal matrix with negative entries") msgid "chol() is undefined for diagonal matrix with negative entries" msgstr "" "'chol()' jest nieokreślona dla macierzy diagonalnych z ujemnymi wpisami" # Matrix/R/diagMatrix.R: 586 # stop("non-matching dimensions") # Matrix/R/diagMatrix.R: 599 # stop("non-matching dimensions") # Matrix/R/diagMatrix.R: 615 # stop("non-matching dimensions") # Matrix/R/diagMatrix.R: 627 # stop("non-matching dimensions") # Matrix/R/diagMatrix.R: 658 # stop("non-matching dimensions") # Matrix/R/diagMatrix.R: 676 # stop("non-matching dimensions") msgid "non-matching dimensions" msgstr "niezgodne wymiary" # Matrix/R/diagMatrix.R: 744 # stop("incompatible matrix dimensions") msgid "incompatible matrix dimensions" msgstr "niezgodne wymiary macierzy" # Matrix/R/diagMatrix.R: 779 # stop(gettextf("intermediate 'r' is of type %s", typeof(r)), domain = "R-Matrix") msgid "intermediate 'r' is of type %s" msgstr "pośrednie 'r' jest typu %s" # Matrix/R/diagMatrix.R: 796 # stop("not yet implemented .. please report") msgid "not yet implemented .. please report" msgstr "jeszcze niezaimplementowane .. proszę zgłosić raport" # Matrix/R/dppMatrix.R: 27 # stop("not a positive definite matrix") # Matrix/R/dsyMatrix.R: 94 # stop("not a positive definite matrix") msgid "not a positive definite matrix" msgstr "to nie jest dodatnio określona macierz" # Matrix/R/dsCMatrix.R: 5 # warning("as(.,\"dsCMatrix\") is deprecated (since 2008); do use as(., \"symmetricMatrix\")") msgid "" "as(.,\"dsCMatrix\") is deprecated (since 2008); do use as(., " "\"symmetricMatrix\")" msgstr "" "'as(.,\"dsCMatrix\")' jest przestarzałe (0d 2008); używaj 'as(., " "\"symmetricMatrix\")'" # Matrix/R/dtpMatrix.R: 14 # warning("inefficient coercion (lost triangularity); please report") msgid "inefficient coercion (lost triangularity); please report" msgstr "" "nieefektywne przekształcenie (utracono trójkątność); proszę zgłosić raport" # Matrix/R/indMatrix.R: 13 # stop("coercion to \"indMatrix\" only works from integer numeric") msgid "coercion to \"indMatrix\" only works from integer numeric" msgstr "przekształcenie na \"indMatrix\" działa jedynie dla liczb całkowitych" msgid "" "coercion from list(i1,...,ik, d) to \"indMatrix\" failed.\n" " All entries must be integer valued and the number of columns, d, not " "smaller\n" " than the maximal index i*." msgstr "" "przekształcenie z 'list(i1,...,ik, d)' na obiekt klasy \"indMatrix\" nie " "powiodło się.\n" " Wszystkie wpisy muszą być wartościami całkowitymi a liczba kolumn d nie " "może być mniejsza niż maksymalny indeks i*." # Matrix/R/indMatrix.R: 65 # stop("the number of non-zero entries differs from nrow(.)") # Matrix/R/pMatrix.R: 27 # stop("the number of non-zero entries differs from nrow(.)") msgid "the number of non-zero entries differs from nrow(.)" msgstr "liczba niezerowych wpisów różni się od 'nrow(.)'" # Matrix/R/indMatrix.R: 71 # stop("must have exactly one non-zero entry per row") # Matrix/R/pMatrix.R: 33 # stop("must have exactly one non-zero entry per row") msgid "must have exactly one non-zero entry per row" msgstr "potrzeba mieć dokładnie jeden niezerowy wpis na wiersz" # Matrix/R/indMatrix.R: 133 # stop("kronecker method must use default 'FUN'") # Matrix/R/kronecker.R: 33 # stop("kronecker method must use default 'FUN'") # Matrix/R/kronecker.R: 51 # stop("kronecker method must use default 'FUN'") msgid "kronecker method must use default 'FUN'" msgstr "metoda kroneckera musi użyć domyślnej 'FUN'" # Matrix/R/indMatrix.R: 158 # stop('replacing "indMatrix" entries is not allowed, as rarely sensible') msgid "replacing \"indMatrix\" entries is not allowed, as rarely sensible" msgstr "" "zastępowanie wpisów \"indMatrix\" jest niedozwolone, ponieważ jest to rzadko " "sensowne" # Matrix/R/nearPD.R: 52 # stop("Matrix seems negative semi-definite") msgid "Matrix seems negative semi-definite" msgstr "Macierz wydaje się być ujemnie określona" # Matrix/R/nearPD.R: 79 # warning(gettextf("'nearPD()' did not converge in %d iterations", iter), domain = "R-Matrix") msgid "'nearPD()' did not converge in %d iterations" msgstr "funkcja 'nearPD()' nie uzbieżniła się w %d iteracjach" # Matrix/R/ngTMatrix.R: 24 # stop("cannot coerce 'NA's to \"nsparseMatrix\"") msgid "cannot coerce 'NA's to \"nsparseMatrix\"" msgstr "nie można przekształcić wartości 'NA' na 'nsparseMatrix'" # Matrix/R/nsCMatrix.R: 58 # stop("function is temporarily disabled") msgid "temporarily disabled" msgstr "funkcja jest tymczasowo niedostępna" # Matrix/R/pMatrix.R: 17 # stop("coercion to \"pMatrix\" only works from integer numeric") msgid "coercion to \"pMatrix\" only works from integer numeric" msgstr "" "przekształcenie na obiekt klasy \"pMatrix\" działa jedynie dla liczb " "całkowitych" # Matrix/R/pMatrix.R: 25 # stop("not a square matrix") msgid "not a square matrix" msgstr "to nie jest macierz kwadratowa" # Matrix/R/products.R: 186 # stop(gettextf("not-yet-implemented method for <%s> %%*%% <%s>", class(x), class(y)), domain = "R-Matrix") msgid "not-yet-implemented method for <%s> %%*%% <%s>" msgstr "jeszcze niezaimplementowana metoda dla <%s> %%*%% <%s>" # Matrix/R/Auxiliaries.R: 273 # stop(gettextf("non-conformable matrix dimensions in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain = "R-Matrix") #, fuzzy msgid "non-conformable arguments" msgstr "niezgodne wymiary macierzy w %s" # Matrix/R/diagMatrix.R: 225 # stop(gettextf("%s kind not yet implemented", sQuote(kind)), domain = "R-Matrix") #, fuzzy msgid "'boolArith = %d' not yet implemented" msgstr "rodzaj %s nie jest jeszcze zaimplementowany" msgid "" "rankMatrix(, method = '%s') coerces to dense matrix.\n" " Probably should rather use method = 'qr' !?" msgstr "" "rankMatrix(, method = '%s') przekształca macierz do " "gęstej macierzy.\n" " Prawdopodobnie należy użyć 'method = \"qr\"' !?" # Matrix/R/rankMatrix.R: 73 # warning(gettextf("rankMatrix(x, method='qrLINPACK'): computing t(x) as nrow(x) < ncol(x)")) msgid "rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)" msgstr "rankMatrix(x, method='qr'): obliczanie t(x) jako nrow(x) < ncol(x)" # Matrix/R/spModels.R: 113 # stop("model frame and formula mismatch in model.matrix()") msgid "model frame and formula mismatch in model.matrix()" msgstr "niezgodność ramki modelu oraz formuły w 'model.matrix()'" # Matrix/R/spModels.R: 137 # stop("invalid 'contrasts.arg' argument") msgid "invalid 'contrasts.arg' argument" msgstr "niepoprawny argument 'contrasts.arg'" # Matrix/R/spModels.R: 140 # warning(gettextf("variable '%s' is absent, its contrast will be ignored", nn), domain = "R-Matrix") msgid "variable '%s' is absent, its contrast will be ignored" msgstr "zmienna '%s' jest nieobecna, jej kontrast zostanie zignorowany" # Matrix/R/sparseMatrix.R: 13 # stop("only 2-dimensional tables can be directly coerced to sparse matrices") msgid "only 2-dimensional tables can be directly coerced to sparse matrices" msgstr "" "jedynie 2-wymiarowe tablice mogą zostać bezpośrednio przekształcone w " "rzadkie macierze" # Matrix/R/sparseMatrix.R: 44 # stop("exactly one of 'i', 'j', or 'p' must be missing from call") msgid "exactly one of 'i', 'j', or 'p' must be missing from call" msgstr "dokłanie jeden z 'i', 'j', lub 'p' musi być nieobecny w wywołaniu" # Matrix/R/sparseMatrix.R: 48 # stop("'p' must be a non-decreasing vector (0, ...)") msgid "'p' must be a non-decreasing vector (0, ...)" msgstr "'p' musi być niemalejącym wektorem (0, ...)" # Matrix/R/sparseMatrix.R: 58 # stop("NA's in (i,j) are not allowed") msgid "NA's in (i,j) are not allowed" msgstr "wartości NA w (i,j) nie są dozwolone" msgid "" "Both 'symmetric' and 'triangular', i.e. asking for diagonal matrix. Use " "'Diagonal()' instead" msgstr "" # Matrix/R/sparseMatrix.R: 67 # stop("symmetric matrix must be square") msgid "symmetric matrix must be square" msgstr "macierz symetryczna musi być kwadratowa" # Matrix/R/sparseMatrix.R: 67 # stop("symmetric matrix must be square") #, fuzzy msgid "triangular matrix must be square" msgstr "macierz symetryczna musi być kwadratowa" msgid "triangular matrix must have all i >= j or i <= j" msgstr "" # Matrix/R/sparseMatrix.R: 79 # warning("length(i) is not a multiple of length(x)") msgid "length(i) is not a multiple of length(x)" msgstr "'length(i)' nie jest wielokrotnością 'length(x)'" # Matrix/R/sparseMatrix.R: 198 # stop("only square matrices can be used as incidence matrices for graphs") msgid "only square matrices can be used as incidence matrices for graphs" msgstr "" "jedynie kwadratowe macierze mogą zostać użyte jako macierz incydencji dla " "grafów" # Matrix/R/sparseMatrix.R: 240 # stop("Matrix-internal error in [i,,d]; please report") msgid "Matrix-internal error in [i,,d]; please report" msgstr "" "błąd wewnętrzny pakietu 'Matrix' w '[i,,d]'; proszę zgłosić raport" # Matrix/R/sparseMatrix.R: 372 # stop(gettextf("invalid 'col.names' string: %s", cn), domain = "R-Matrix") msgid "invalid 'col.names' string: %s" msgstr "niepoprawny łańcuch 'col.names': %s" msgid "uniDiag=TRUE, but not all diagonal entries are 1" msgstr "" msgid "uniDiag=TRUE, not all entries in diagonal coded as 1" msgstr "" msgid "in show(); maybe adjust 'options(max.print= *, width = *)'" msgstr "" # Matrix/R/Auxiliaries.R: 375 # message(sprintf(gettext(" [[ suppressing %d column names %s ]]", domain = "R-Matrix"), nc, paste(sQuote(cn[1:lc]), collapse = ", ")), domain = NA) #, fuzzy msgid "suppressing columns and rows" msgstr "[[ zmniejszanie %d nazw kolumn %s ]]" msgid "suppressing rows" msgstr "" # Matrix/R/Auxiliaries.R: 375 # message(sprintf(gettext(" [[ suppressing %d column names %s ]]", domain = "R-Matrix"), nc, paste(sQuote(cn[1:lc]), collapse = ", ")), domain = NA) #, fuzzy msgid "suppressing columns" msgstr "[[ zmniejszanie %d nazw kolumn %s ]]" # Matrix/R/sparseMatrix.R: 599 # stop("logic programming error in printSpMatrix2(), please report") msgid "logic programming error in printSpMatrix2(), please report" msgstr "błąd logiczny programu w 'printSpMatrix2()', proszę zgłosić raport" # Matrix/R/sparseMatrix.R: 731 # stop("invalid 'type'") msgid "invalid 'type'" msgstr "niepoprawny 'type'" # Matrix/R/sparseMatrix.R: 748 # warning("rcond(.) via sparse -> dense coercion") msgid "rcond(.) via sparse -> dense coercion" msgstr "'rcond(.)' poprzez przekształcenie rzadkie -> gęste" # Matrix/R/sparseMatrix.R: 759 # stop("'V' is not a *square* matrix") msgid "'V' is not a *square* matrix" msgstr "'V' nie jest macierzą *kwadratową*" msgid "number of non zeros is smaller than 'nnz' because of duplicated (i,j)s" msgstr "" # Matrix/R/sparseQR.R: 16 # warning("qr.R() may differ from qr.R() because of permutations. Possibly use our qrR() instead") msgid "" "qr.R() may differ from qr.R() because of permutations. " "Possibly use our qrR() instead" msgstr "" "'qr.R()' może różnić się od 'qr.R()' z powodu permutacji. " "Być może użyj metody qrR() w zamian" # Matrix/R/sparseVector.R: 53 # stop("cannot coerce 'NA's to \"nsparseVector\"") msgid "cannot coerce 'NA's to \"nsparseVector\"" msgstr "nie można przekształcić wartości NA na obiekt klasy \"nsparseVector\"" # Matrix/R/sparseVector.R: 235 # stop("'x' must inherit from \"sparseVector\"") msgid "'x' must inherit from \"sparseVector\"" msgstr "argument 'x' musi być obiektem klasy \"sparseVector\"" # Matrix/R/sparseVector.R: 237 # stop("'ncol' must be >= 0") msgid "'ncol' must be >= 0" msgstr "'ncol' musi być >= 0" # Matrix/R/sparseVector.R: 239 # stop("'nrow' must be >= 0") msgid "'nrow' must be >= 0" msgstr "'nrow' musi być >= 0" # Matrix/R/sparseVector.R: 242 # stop("Must specify 'nrow' when 'symmetric' is true") msgid "Must specify 'nrow' when 'symmetric' is true" msgstr "'nrow' musi być określone, gdy 'symmetric' ma wartość TRUE" # Matrix/R/sparseVector.R: 244 # stop("'nrow' and 'ncol' must be the same when 'symmetric' is true") msgid "'nrow' and 'ncol' must be the same when 'symmetric' is true" msgstr "" "'nrow' oraz 'ncol' muszą mieć tę samą wartość gdy 'symmetric' ma wartość TRUE" # Matrix/R/sparseVector.R: 247 # stop("'x' must have length nrow^2 when 'symmetric' is true") msgid "'x' must have length nrow^2 when 'symmetric' is true" msgstr "'x' musi mieć długość równą 'nrow'^2 gdy 'symmetric' ma wartość TRUE" # Matrix/R/sparseVector.R: 255 # warning("'ncol' is not a factor of length(x)") msgid "'ncol' is not a factor of length(x)" msgstr "'ncol' nie jest czynnikiem długości 'length(x)'" # Matrix/R/sparseVector.R: 260 # warning("'nrow' is not a factor of length(x)") msgid "'nrow' is not a factor of length(x)" msgstr "'nrow' nie jest czynnikiem długości 'length(x)'" # Matrix/R/sparseVector.R: 278 # stop(gettextf("Class %s is not yet implemented", dQuote(cNam)), domain = "R-Matrix") msgid "Class %s is not yet implemented" msgstr "Klasa %s nie jest jeszcze zaimplementowana" # Matrix/R/sparseVector.R: 415 # stop("index must be numeric, logical or sparseVector for indexing sparseVectors") msgid "" "index must be numeric, logical or sparseVector for indexing sparseVectors" msgstr "" "indeks musi być typem liczbowym, logicznym lub obiektem klasy 'sparseVector' " "na potrzeby indeksowania obiektów klasy 'sparseVector'" # Matrix/R/sparseVector.R: 740 # stop("'times >= 0' is required") msgid "'times >= 0' is required" msgstr "wymagane jest 'times >= 0'" # Matrix/R/symmetricMatrix.R: 72 # stop(sprintf("(un)packing only applies to dense matrices, class(x)='%s'", # cx)) # Matrix/R/symmetricMatrix.R: 93 # stop(sprintf("(un)packing only applies to dense matrices, class(x)='%s'", # class(x))) msgid "(un)packing only applies to dense matrices, class(x)='%s'" msgstr "(roz)pakowanie stosuje się jedynie do gęstych macierzy, class(x)='%s'" # Matrix/R/symmetricMatrix.R: 114 # stop("'x' is not symmetric nor triangular") msgid "'x' is not symmetric nor triangular" msgstr "'x' nie jest macierzą symetryczną ani trójkątną" # Matrix/R/Auxiliaries.R: 1376 # warning(sprintf(gettext("arguments %s are disregarded in\n %s", domain = "R-Matrix"), # sub(")$", '', sub("^list\\(", '', deparse(list(...), control=c()))), # deparse(sys.call(-1), control=c())), call. = FALSE, domain = NA) #, fuzzy msgid "" "extra argument %s will be disregarded in\n" " %s" msgid_plural "" "extra arguments %s will be disregarded in\n" " %s" msgstr[0] "" "argumenty %s zostały odrzucone w\n" " %s" msgstr[1] "" "argumenty %s zostały odrzucone w\n" " %s" msgstr[2] "" "argumenty %s zostały odrzucone w\n" " %s" # Matrix/R/spModels.R: 125 # warning(gettextf("variable '%s' converted to a factor", i), domain = "R-Matrix") #~ msgid "variable '%s' converted to a factor" #~ msgstr "zmienna '%s' została zamieniona na czynnik" # Matrix/R/lMatrix.R: 8 # stop("\"lMatrix\" object with NAs cannot be coerced to \"nMatrix\"") #~ msgid "\"dMatrix\" object with NAs cannot be coerced to \"nMatrix\"" #~ msgstr "" #~ "obiekt klasy \"dMatrix\" z wartościami NA nie może zostać przekształcony " #~ "na obiekt klasy \"nMatrix\"" # Matrix/R/lMatrix.R: 8 # stop("\"lMatrix\" object with NAs cannot be coerced to \"nMatrix\"") #~ msgid "\"lMatrix\" object with NAs cannot be coerced to \"nMatrix\"" #~ msgstr "" #~ "obiekt klasy \"lMatrix\" z wartościami NA nie może zostać przekształcony " #~ "na obiekt klasy \"nMatrix\"" # Matrix/R/indMatrix.R: 63 # stop("not a skinny matrix") #~ msgid "not a skinny matrix" #~ msgstr "to nie jest chuda macierz" #~ msgid "longer object length" #~ msgstr "długość dłuższego obiektu" Matrix/po/R-ko.po0000644000176200001440000010530713047321304013307 0ustar liggesusers# Korean translations for Matrix package. # Recommended/Matrix/po/R-ko.po # # Thanks to Martin Maechler # # This file is distributed under the same license as the R Matrix package. # Maintained by Chel Hee Lee , 2013-2015. # # Notes: # Freezing on 15-JUL-2015 for R-3.3.0, QC: PASS # Freezing on 30-MAR-2015 for R-3.2.0, QC: PASS # Freezing on 28-FEB-2015 for R-3.1.3, QC: PASS # msgid "" msgstr "" "Project-Id-Version: Matrix 1.1-3\n" "POT-Creation-Date: 2017-02-10 12:21\n" "PO-Revision-Date: 2015-07-15 17:14-0600\n" "Last-Translator:Chel Hee Lee \n" "Language-Team: Chel Hee Lee \n" "Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" msgid "invalid 'mod': %s" msgstr "사용할 수 있는 'mod'(%s)가 아닙니다." msgid "" "not-yet-implemented method for %s(<%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "%s(<%s>)의 경우에 대하여 아직 구현되지 않은 메소드(method)입니다.\n" " ->> 이 기능에 대한 구현을 패키지 관리자에게 문의해 주셨으면 합니다." msgid "" "not-yet-implemented method for %s(<%s>, <%s>).\n" " ->> Ask the package authors to implement the missing feature." msgstr "" "%s(<%s>, <%s>)의 경우에 대하여 아직 구현되지 않은 메소드(method)입니다.\n" " ->> 이 기능에 대한 구현을 패키지 관리자에게 문의해 주시길 바랍니다." msgid "'x' is not positive definite -- chol() undefined." msgstr "" "'x'는 양정치(positive definite) 행렬이 아니므로 chol()가 정의되어지지 않습니" "다." msgid "Matrices must have same dimensions in %s" msgstr "" "%s에 입력된 행렬들은 반드시 같은 차원(dimensions)을 가지고 있어야 합니다." msgid "non-conformable matrix dimensions in %s" msgstr "%s에 입력된 행렬의 차원이 정합(conformable)하지 않습니다." msgid "dimnames [%d] mismatch in %s" msgstr "%2$s에 입력된 dimnames [%1$d]가 일치하지 않습니다." msgid "names(dimnames()) must be NULL or of length two" msgstr "names(dimnames())의 길이는 2이거나 NULL이어야 합니다." msgid "Matrices must have same number of rows in %s" msgstr "%s에 사용된 각 행렬이 가지는 행의 개수는 서로 같아야 합니다." msgid "Matrices must have same number of columns in %s" msgstr "%s에 사용된 각 행렬이 가지는 열의 개수는 서로 같아야 합니다." msgid "[[ suppressing %d column names %s ... ]]" msgstr "[[ %d개의 열이름 %s ...를 제거합니다 ]]" msgid "[[ suppressing %d column names %s ]]" msgstr "[[ %d개의 열이름 %s를 제거합니다 ]]" msgid "'x' must be \"sparseMatrix\"" msgstr "'x'는 반드시 \"sparseMatrix\"이어야 합니다." msgid "not yet implemented for class %s" msgstr "클래스 %s의 경우에 아직 구현되지 않았습니다." msgid "not a triangular matrix" msgstr "삼각행렬(triangular matrix)가 아닙니다." msgid "not a symmetric matrix; consider forceSymmetric() or symmpart()" msgstr "" "대칭행렬(symmetric matrix)가 아닙니다. forceSymmtric() 또는 symmpart() 함수" "의 사용을 고려해 보시길 바랍니다." msgid "not yet implemented for matrix with typeof %s" msgstr "저장방식(typeof) %s를 가지는 행렬의 경우에는 아직 구현되지 않았습니다." msgid "not yet implemented for %s" msgstr "%s의 경우에는 아직 구현되지 않았습니다." msgid "general Matrix class not yet implemented for %s" msgstr "%s의 경우에는 아직 구현되지 않은 일반적인 Matrix 클래스입니다." msgid "" "Quadratic matrix '%s' (=: A) is not formally\n" "\tsymmetric. Will be treated as\tA A'" msgstr "" "이차행렬(quadratic matrix) '%s' (=: A)는 형식적으로\n" "\t대칭(symmetric)이 아닙니다. \tA A'와 같이 다루겠나요?" msgid "" "'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a \"CHMfactor\"" msgstr "" "'update'는 반드시 논리형(logical) 또는 '+' 또는 '-'이어야 하며, 'C'는 행렬이" "어야 하고 'L'은 \"CHMfactor\"이어야 합니다." msgid "update must be TRUE/FALSE or '+' or '-'" msgstr "update는 반드시 TRUE/FALSE 또는 '+' 또는 '-'이어야 합니다." msgid "Matrix-internal error in [i,,d]; please report" msgstr "" "[i,,d]에서 Matrix-내부오류(internal error)가 발생한 경우입니다. 이" "를 보고해 주시길 부탁드립니다." msgid "nothing to replace with" msgstr "교체(replace)해야 할 것이 아무것도 없습니다." msgid "number of items to replace is not a multiple of replacement length" msgstr "" "교체(replace)할 항목의 개수가 입력된 value가 가지는 길이의 배수가 아닙니다." msgid "too many replacement values" msgstr "교체에 이용될 값이 너무 많이 입력되었습니다." msgid "i1[1] == 0 ==> C-level verbosity will not happen!" msgstr "i1[1] == 0 ==> C-레벨에서의 진행과정표시는 나타나지 않을 것입니다!" msgid "using\t \"old code\" part in Csparse subassignment" msgstr "using\t \"old code\" part in Csparse subassignment" msgid "" "using\"old code\" part in Csparse subassignment\n" " >>> please report to Matrix-authors@r-project.org" msgstr "" "using\"old code\" part in Csparse subassignment\n" " >>> Matrix-authors@r-project.org으로 이를 보고해 주시길 바랍니다." msgid "" "Cholesky() -> *symbolic* factorization -- not yet implemented" msgstr "" "Cholesky() -> *symbolic* factorization -- 아직 구현되지 않았습니" "다." msgid "Not a valid format" msgstr "올바른 형식(format)이 아닙니다." msgid "'file' must be a character string or connection" msgstr "" "'file'은 반드시 문자열(character string) 또는 커넥션(connection)이어야 합니" "다." msgid "Invalid storage type: %s" msgstr "%s는 사용할 수 없는 저장형식(storage format)입니다." msgid "Only numeric sparse matrices allowed" msgstr "오로지 수치형 희소행렬(sparse matrices)만을 사용할 수 있습니다." msgid "Invalid storage format: %s" msgstr "%s는 사용할 수 있는 저장형식(storage format)이 아닙니다." msgid "Invalid assembled indicator: %s" msgstr "Invalid assembled indicator: %s" msgid "file is not a MatrixMarket file" msgstr "file에 MatrixMarket 형식의 파일이 입력되지 않았습니다." msgid "type '%s' not recognized" msgstr "'%s'는 사용가능한 유형(type)이 아닙니다." msgid "representation '%s' not recognized" msgstr "'%s'는 사용가능한 표현(representation)이 아닙니다." msgid "element type '%s' not recognized" msgstr "'%s'는 사용가능한 원소유형(element type)이 아닙니다." msgid "symmetry form '%s' not recognized" msgstr "'%s'는 사용가능한 대칭형식(symmetry form)이 아닙니다." msgid "readMM(): row\t values 'i' are not in 1:nr" msgstr "readMM(): 행(row) 'i'는 1:nr 내에 존재하지 않습니다." msgid "readMM(): column values 'j' are not in 1:nc" msgstr "readMM(): 열(column) 'j'는 1:nc 내에 존재하지 않습니다." msgid "symmetry form 'skew-symmetric' not yet implemented for reading" msgstr "" "대칭형식(symmetry form)이 'skew-symmetric'인 경우에는 아직 구현되지 않았습니" "다." msgid "symmetry form 'hermitian' not yet implemented for reading" msgstr "" "대칭형식(symmetry form)이 'hermitian'의 경우에는 아직 구현되지 않았습니다." msgid "symmetry form '%s' is not yet implemented" msgstr "대칭형식(symmetry form)이 '%s'인 경우에는 아직 구현되지 않았습니다." msgid "element type 'complex' not yet implemented" msgstr "" "원소유형(element type)이 'complex'인 경우에는 아직 구현되지 않았습니다." msgid "'%s()' is not yet implemented for element type '%s'" msgstr "" "원소유형(element type)이 '%2$s'의 경우에 아직 구현되지 않은 '%1$s()'입니다." msgid "'%s()' is not yet implemented for representation '%s'" msgstr "" "표현(representation)이 '%2$s'의 경우에 아직 구현되지 않은 '%1$s()'입니다." msgid "trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)" msgstr "trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)" msgid "'V' is not a square matrix" msgstr "'V'는 정방행렬(square matrix)이 아닙니다." msgid "diag(.) had 0 or NA entries; non-finite result is doubtful" msgstr "" "diag(.)에 0 또는 NA가 존재하므로 유한하지 않은 결과(non-finite result)를 얻" "을 것으로 생각됩니다." msgid "invalid dimnames given for %s object" msgstr "객체 %s에 주어진 dimnames가 올바르지 않습니다." msgid "" "dimnames(.) <- NULL: translated to \n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" msgstr "" "dimnames(.) <- NULL:은 다음과 같이 변경되었습니다. \n" "dimnames(.) <- list(NULL,NULL) <==> unname(.)" msgid "'nrow', 'ncol', etc, are disregarded when 'data' is \"Matrix\" already" msgstr "" "'data'가 이미 \"Matrix\"인 경우에는 입력된 'nrow', 'ncol' 등은 사용되지 않습" "니다." msgid "invalid 'data'" msgstr "입력된 'data'는 올바르지 않습니다." msgid "'nrow', 'ncol', etc, are disregarded for matrix 'data'" msgstr "행렬 'data'인 경우에 입력된 'nrow', 'ncol' 등은 사용되지 않습니다." msgid "complex matrices not yet implemented in Matrix package" msgstr "" "복소수형(complex) 행렬을 다루는 경우는 아직 Matrix 패키지내에서는 아직 구현되" "지 않았습니다." msgid "using slow kronecker() method" msgstr "느린 크로넥커 방법(slow kronecker method)를 사용합니다." msgid "" "Cholesky(A) called for 'A' of class \"%s\";\n" "\t it is currently defined for sparseMatrix only; consider using chol() " "instead" msgstr "" "Cholesky(A)는 클래스 \"%s\"를 가지는 'A'를 호출합니다.\n" "\t 이것은 현재 sparseMatrix 만을 위하여 정의되었으므로 chol()을 사용하시길 바" "랍니다." msgid "'lag' and 'differences' must be integers >= 1" msgstr "'lag'과 'differences'는 반드시 1보다 크거나 같은 정수이어야 합니다." msgid "invalid or not-yet-implemented 'Matrix' subsetting" msgstr "" "올바르지 않거나 아직 구현되지 않은 'Matrix' 부분추출(subsetting)입니다." msgid "[ ] : .M.sub.i.logical() maybe inefficient" msgstr "" "[ ] : .M.sub.i.logical()의 사용은 비효율적(inefficient) 일 " "수 있습니다." msgid "" "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?" msgstr "" "nargs() = %d. 필요이상의 인자들이 '[ .. ]' (i.logical)에 이용되었나요?" msgid "m[ ]: inefficiently indexing single elements" msgstr "m[ ]: inefficiently indexing single elements" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?" msgstr "nargs() = %d. 필요이상의 인자들이 '[ .. ]' (i.2col)에 이용되었나요?" msgid "" ".M.sub.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.sub.i.2col(): 'i'는 정수형 행번호(integer column number)를 가지고 있지 않" "습니다.\n" " 이런 경우는 존재할 수 없으므로 패키지 관리자에게 보고해 주시길 부탁드립니다." msgid "such indexing must be by logical or 2-column numeric matrix" msgstr "" "이와 같은 유형의 인덱싱(indexing)은 반드시 논리형(logical) 또는 2개의 열로 구" "성된 수치형(numeric) 행렬에 의해서만 이루어져야 합니다." msgid "" ".M.repl.i.2col(): 'i' has no integer column number;\n" " should never happen; please report" msgstr "" ".M.repl.i.2col(): 'i'는 정수형 행번호(integer column number)을 가지고 있지 않" "습니다.\n" " 이런 경우는 존재할 수 없으므로 패키지 관리자에게 보고해 주시길 부탁드립니다." msgid ".M.repl.i.2col(): drop 'matrix' case ..." msgstr ".M.repl.i.2col(): drop 'matrix' case ..." msgid "negative values are not allowed in a matrix subscript" msgstr "음수(negative values)는 행렬의 첨자(subscript)로 사용할 수 없습니다." msgid "NAs are not allowed in subscripted assignments" msgstr "NA는 행렬의 첨자(subscripted assignment)로 사용할 수 없습니다." msgid "m[ ] <- v: inefficiently treating single elements" msgstr "m[ ] <- v: inefficiently treating single elements" msgid "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?" msgstr "nargs() = %d. 필요이상의 인자들이 '[ .. ]' 내에 이용되었나요?" msgid "RHS 'value' (class %s) matches 'ANY', but must match matrix class %s" msgstr "" "클래스 %s를 가지는 우변의 'value'는 'ANY'에 매치되지만, 반드시 행렬의 클래스 " "%s에 매치되어야 합니다." msgid "not-yet-implemented 'Matrix[<-' method" msgstr "아직 구현되지 않은 'Matrix[<-' 메소드입(method)니다." msgid "inefficient method used for \"- e1\"" msgstr "\"- e1\"를 사용하는데 비효율적인 메소드(method)입니다." msgid "dim [product %d] do not match the length of object [%d]" msgstr "dim [product %d]의 값이 객체 [%d]의 길이와 일치하지 않습니다." msgid "internal bug in \"Compare\" method (Cmp.Mat.atomic); please report" msgstr "" "메소드 \"Compare\" (Cmp.Mat.atomic)내에서 버그(internal bug)가 발생했습니다. " "이를 꼭 보고해 주셨으면 합니다." msgid "Cmp.Mat.atomic() should not be called for diagonalMatrix" msgstr "Cmp.Mat.atomic()은 digonalMatrix에 의하여 호출될 수 없습니다." msgid "Matrices must have same number of rows for arithmetic" msgstr "" "원소단위의 연산을 수행하기 위해서는 입력된 각 행렬이 가지는 열의 개수가 서로 " "같아야 합니다." msgid "number of rows are not compatible for %s" msgstr "%s의 경우 행의 개수가 올바르지 않습니다." msgid "length of 2nd arg does not match dimension of first" msgstr "" "두번째 인자(arg)의 길이가 첫번째 인자의 차원(dimension)과 일치하지 않습니다." msgid "length of 1st arg does not match dimension of 2nd" msgstr "" "첫번째 인자(arg)의 길이는 두번째 인자의 차원(dimension)과 일치하지 않습니다." msgid "internal bug in \"Logic\" method (Logic.Mat.atomic); please report" msgstr "" "메소드 \"Logic\" (Logic.Mat.atomic)내에서 버그가 발생되었습니다. 이를 꼭 보" "고해 주셨으면 합니다." msgid "Logic.Mat.atomic() should not be called for diagonalMatrix" msgstr "Logic.Mat.atomic()은 diagonalMatrix에 호출될 수 없습니다." msgid "vector too long in Matrix - vector operation" msgstr "" "행렬과 벡터 연산(Matrix - vector operation)에 사용될 벡터의 길이가 너무 깁니" "다." msgid "" "longer object length\n" "\tis not a multiple of shorter object length" msgstr "" "객체의 길이(긴 것)가\n" "\t 다른 객체가 가지는 길이(짧은 것)의 배수가 아닙니다." msgid " %s %s is undefined" msgstr " %1$s %2$s는 정의되지 않았습니다." msgid "%s %s is undefined" msgstr "%s %s 은 정의되지 않았습니다." msgid "longer object length is not a multiple of shorter object length" msgstr "객체의 길이(긴 것)이 다른 객체의 길이(짧은 것)의 배수가 아닙니다." msgid "invalid class: %s" msgstr "%s는 사용가능한 클래스(class)가 아닙니다." msgid "programming error: min() should have dispatched w/ 1st arg much earlier" msgstr "" "programming error: min() should have dispatched w/ 1st arg much earlier" msgid "in Summary(, .): %s(<%s>, <%s>,...)" msgstr "in Summary(, .): %s(<%s>, <%s>,...)" msgid "in Summary(, .): %s(<%s>, <%s>)" msgstr "in Summary(, .): %s(<%s>, <%s>)" msgid "not-yet-implemented coercion to \"TsparseMatrix\"" msgstr "\"TsparseMatrix\"으로의 강제변환(coercion)은 아직 구현되지 않았습니다." msgid "you cannot mix negative and positive indices" msgstr "인덱스에 음수와 양수를 혼용하여 사용할 수 없습니다." msgid "index larger than maximal %d" msgstr "인덱스가 %d 보다 큽니다." msgid "'NA' indices are not (yet?) supported for sparse Matrices" msgstr "'NA'는 sparse Matrices에 (아직은?) 사용할 수 없는 인덱스입니다" msgid "logical subscript too long (%d, should be %d)" msgstr "" "길이가 너무 긴 논리형 첨자(subscript)입니다 (%2$d이어야 하는데 %1$d입니다)." msgid "no 'dimnames[[.]]': cannot use character indexing" msgstr "no 'dimnames[[.]]': 문자형 인덱싱을 사용할 수 없습니다" msgid "invalid character indexing" msgstr "유효하지 않은 문자형 인덱싱입니다" msgid "Matrix-internal error in [i,,d]; please report" msgstr "" "[i,,d] 내에서 행렬과 관련한 내부에러가 발생했습니다; 꼭 보고를 부탁" "드립니다" msgid "FIXME: NOT YET FINISHED IMPLEMENTATION" msgstr "FIXME: 완전한 구현이 아직 이루어지지 않았습니다." msgid "internal bug: missing 'i' in replTmat(): please report" msgstr "" "내부버그 발견: replTmat()내에서 'i'를 찾을 수 없습니다. 이를 보고해 주시길 부" "탁드립니다." msgid "[ ] indexing not allowed: forgot a \",\" ?" msgstr "" "[ ]와 같은 인덱싱은 사용할 수 없습니다. \",\"의 사용을 잊었나요?" msgid "internal bug: matrix 'i' in replTmat(): please report" msgstr "" "내부버그 발견: replTmat()내에서 'i'는 행렬입니다. 이를 보고해 주시길 부탁드립" "니다." msgid "" "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE." msgstr "" "x[.] <- val: x의 클래스는 %s입니다. {TRUE, FALSE}에 해당하지 않는 val의 값" "은 TRUE로 강제변환(coerced) 되었습니다." msgid "x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "" "x[.] <- val: x의 클래스는 %s입니다. {TRUE, FALSE}에 해당하지 않는 val의 값" "은 강제변환(coerced) 되었습니다." msgid "" "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE." msgstr "" "x[.,.] <- val: x의 클래스는 %s입니다. {TRUE, FALSE}에 해당하지 않는 val의 값" "은 TRUE로 강제변환(coerced) 되었습니다. " msgid "x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced." msgstr "" "x[.,.] <- val: x의 클래스는 %s입니다. {TRUE, FALSE}에 해당하지 않는 val의 값" "은 강제변환(coerced) 되었습니다. " msgid "x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrix" msgstr "" "x[.,.] <- val : Tsparse* 에서 CsparseMatrix로 강제변환(coerced)된 x입니다." msgid "nargs() = %d should never happen; please report." msgstr "" "nargs() = %d 와 같은 경우는 발생할 수 없으므로 꼭 보고해 주시기를 부탁드립니" "다." msgid "row indices must be <= nrow(.) which is %d" msgstr "행에 사용되는 인덱스는 반드시 %d 보다 같거나 작아야 합니다." msgid "column indices must be <= ncol(.) which is %d" msgstr "열에 사용되는 인덱스는 %d 보다 같거나 작아야 합니다. " msgid "'force' must be (coercable to) TRUE or FALSE" msgstr "'force'는 반드시 (강제변환될 수 있는) TRUE 또는 FALSE 이어야 합니다." msgid "invalid (to - from)/by in seq(.)" msgstr "seq(.)의 사용시 (to - from)/by의 값이 올바르지 않습니다." msgid "wrong sign in 'by' argument" msgstr "'by' 인자에 사용된 부호(sign)가 올바르지 않습니다." msgid "'by' argument is much too small" msgstr "'by' 인자에 사용된 값이 너무 작습니다." msgid "length must be non-negative number" msgstr "길이(length)는 반드시 음이 아닌 수이어야 합니다." msgid "too many arguments" msgstr "입력된 인자의 개수가 너무 많습니다." msgid "c(,..) of different kinds, coercing all to 'rleDiff'" msgstr "c(,..) of different kinds, 모두 'rleDiff'로 강제변환합니다" msgid "[i] is not yet implemented" msgstr "[i]는 아직 구현되지 않았습니다." msgid "all() is not yet implemented" msgstr "all()는 아직 구현되지 않았습니다." msgid "sum() is not yet implemented" msgstr "sum()는 아직 구현되지 않았습니다." msgid "prod() is not yet implemented" msgstr "prod()는 아직 구현되지 않았습니다." msgid "not yet implemented" msgstr "아직 구현되지 않았습니다." msgid "" "x / 0 for an x with sign-change\n" " no longer representable as 'rleDiff'" msgstr "" "x / 0 for an x with sign-change\n" " no longer representable as 'rleDiff'" msgid " --> is not yet implemented" msgstr " --> 은 아직 구현되지 않았습니다." msgid " --> is not yet implemented" msgstr " --> 은 아직 구현되지 않았습니다." msgid "'diagonals' matrix must have %d columns (= length(k) )" msgstr "" "'diagonals' 행렬은 반드시 %d (=length(k))개의 열을 가지고 있어야 합니다." msgid "'diagonals' must have the same length (%d) as 'k'" msgstr "'diagnoals'의 길이는 반드시 'k'(=%d)이어야 합니다." msgid "matrix can only be symmetric if square, but n != m" msgstr "" msgid "" "for symmetric band matrix, only specify upper or lower triangle\n" " hence, all k must have the same sign" msgstr "" "대칭 띠 행렬(symmetric band matrix)의 경우, 오로지 상삼각(upper triangle) 또" "는 하삼각(lower)만을 지정합니다. \n" " 따라서, 모든 k는 반드시 같은 부호(sign)를 가져야 합니다." msgid "the %d-th (sub)-diagonal (k = %d) is too short; filling with NA's" msgstr "%d-번째 (부분)-대각 (k = %d)이 너무 짧아 NA로 채웁니다." msgid "resulting x-slot has different type than x's or y's" msgstr "" msgid "'A' must be a square matrix" msgstr "'A'는 반드시 정방행렬(square matrix)이어야 합니다." msgid "must either specify 'A' or the functions 'A.x' and 'At.x'" msgstr "'A' 또는 'A.x'와 'At.x'는 반드시 주어져야 합니다." msgid "when 'A' is specified, 'A.x' and 'At.x' are disregarded" msgstr "'A'가 주어진 경우에 입력된 'A.x'와 'At.x'는 사용되지 않습니다." msgid "not converged in %d iterations" msgstr "%d번째 반복에서도 수렴하지 않습니다." msgid "hit a cycle (1) -- stop iterations" msgstr "cycle (1)에 도달했습니다 -- 반복을 중지합니다" msgid "hit a cycle (2) -- stop iterations" msgstr "cycle (2)에 도달했습니다 -- 반복을 중지합니다" msgid "not enough new vecs -- stop iterations" msgstr "not enough new vecs -- stop iterations" msgid "diagonalMatrix in .dense2C() -- should never happen, please report!" msgstr "" "diagonalMatrix in .dense2C() -- 발생해서는 안되는 경우이므로 꼭 보고를 부탁드" "립니다!" msgid "undefined method for class %s" msgstr "클래스 %s에 정의된 메소드가 아닙니다." msgid "dim(.) value must be numeric of length 2" msgstr "dim(.)의 값은 반드시 길이가 2인 수치형 벡터이어야 합니다." msgid "dimensions don't match the number of cells" msgstr "차원정보가 cell의 개수와 일치하지 않습니다" msgid "invalid nargs()= %d" msgstr "nargs()= %d의 값이 올바르지 않습니다." msgid "" "LU computationally singular: ratio of extreme entries in |diag(U)| = %9.4g" msgstr "" "LU computationally singular: ratio of extreme entries in |diag(U)| = %9.4g" msgid "RHS 'b' has wrong number of rows:" msgstr "우변의 'b'는 다음과 같은 올바르지 않은 행의 수를 가지고 있습니다: " msgid "RHS 'b' has wrong length" msgstr "우변의 'b'가 올바르지 않은 길이(length)를 가지고 있습니다." msgid "cannot coerce non-symmetric \"dgTMatrix\" to \"dsCMatrix\" class" msgstr "" "비대칭(non-symmetric) \"dgTMatrix\"는 \"dsCMatrix\" 클래스로 강제변환" "(coerce) 할 수 없습니다. " msgid "the matrix is not triangular" msgstr "삼각행렬이 아닙니다." msgid "'lwd' must be NULL or non-negative numeric" msgstr "'lwd'는 반드시 NULL 또는 음이 아닌 수 이어야 합니다." msgid "'x' has invalid data type" msgstr "'x'의 데이터형(data type)은 사용가능하지 않습니다." msgid "length(x) must be either 1 or #{cols}" msgstr "length(x)는 반드시 1 또는 #{cols} 이어야 합니다. " msgid "some arguments are not matrices" msgstr "일부 인자가 행렬이 아닙니다." msgid "%s kind not yet implemented" msgstr "아직 구현되지 않은 종류 %s입니다." msgid "non-square matrix" msgstr "비정방(non-square) 행렬입니다." msgid "" "matrix with non-zero off-diagonals cannot be coerced to \"diagonalMatrix\"" msgstr "" "비대각원소의 값이 영이 아닌 행렬은 \"diagonalMatrix\"로 강제변환(coerced) 할 " "수 없습니다." msgid "matrix is not diagonal" msgstr "대각행렬이 아닙니다." msgid "Internal bug: nargs()=%d; please report" msgstr "내부버그 발견: nargs()=%d. 꼭 보고를 부탁드립니다." msgid "chol() is undefined for diagonal matrix with negative entries" msgstr "chol()은 음의 값을 가진 대각행렬에 대하여 정의되지 않았습니다." msgid "non-matching dimensions" msgstr "차원(dimensions) 정보가 일치하지 않습니다." msgid "incompatible matrix dimensions" msgstr "차원(dimensions) 정보가 일치하지 않습니다." msgid "intermediate 'r' is of type %s" msgstr "intermediate 'r' is of type %s" msgid "not yet implemented .. please report" msgstr "아직 구현되지 않았습니다. 보고를 부탁드립니다." msgid "not a positive definite matrix" msgstr "양정치(positive definite) 행렬이 아닙니다." msgid "" "as(.,\"dsCMatrix\") is deprecated (since 2008); do use as(., " "\"symmetricMatrix\")" msgstr "" "as(.,\"dsCMatrix\")은 2008년 이후로 지원되지 않으므로 as(., \"symmetricMatrix" "\")를 이용해 주시길 바랍니다." msgid "inefficient coercion (lost triangularity); please report" msgstr "" "비효율적인 강제변환입니다 (triangularity를 소실하였기 때문입니다). 꼭 보고" "를 부탁드립니다." msgid "coercion to \"indMatrix\" only works from integer numeric" msgstr "" "\"indMatrix\"로의 강제변환(coercion)은 오로지 정수를 가지는 숫자(integer " "numeric)인 경우만 가능합니다." msgid "" "coercion from list(i1,...,ik, d) to \"indMatrix\" failed.\n" " All entries must be integer valued and the number of columns, d, not " "smaller\n" " than the maximal index i*." msgstr "" "list(i1,...,ik, d)으로부터 \"indMatrix\"로의 강제변환(coercion)은 이루어지지 " "않았습니다.\n" " 모든 원소들은 반드시 정수이어야 하며 행의 개수 d는 인덱스 i* 중 \n" " 가장 큰 수보다 보다 작지 않아야 합니다." msgid "the number of non-zero entries differs from nrow(.)" msgstr "영이 아닌 항목들의 개수가 nrow(.)와 다릅니다." msgid "must have exactly one non-zero entry per row" msgstr "각 행마다 반드시 정확히 하나의 영이 아닌 항목을 가지고 있어야 합니다." msgid "kronecker method must use default 'FUN'" msgstr "" "크로넥커 메소드(kronecker method)는 반드시 기본 'FUN'을 사용해야 합니다." msgid "replacing \"indMatrix\" entries is not allowed, as rarely sensible" msgstr "" "\"indMatrix\" 요소를 변경하는 것은 허용되지 않습니다, as rarely sensible" msgid "Matrix seems negative semi-definite" msgstr "음의 반정치(negative semi-definite) 행렬 같습니다." msgid "'nearPD()' did not converge in %d iterations" msgstr "'nearPD()'는 %d 번째 반복에서도 수렴하지 않았습니다." msgid "cannot coerce 'NA's to \"nsparseMatrix\"" msgstr "'NA'를 \"nsparseMatrix\"으로 강제변환(coerce)할 수 없습니다." msgid "temporarily disabled" msgstr "일시적으로 사용할 수 없습니다." msgid "coercion to \"pMatrix\" only works from integer numeric" msgstr "" "\"pMatrix\"로의 강제변환(coercion)은 오로지 정수값을 가진 숫자(integer " "numeric)인 경우로부터만 가능합니다." msgid "not a square matrix" msgstr "정방행렬(square matrix)이 아닙니다." msgid "not-yet-implemented method for <%s> %%*%% <%s>" msgstr "<%s> %%*%% <%s>에 사용할 수 있는 메소드가 아직 구현되지 않았습니다." msgid "non-conformable arguments" msgstr "non-conformable arguments" #, fuzzy msgid "'boolArith = %d' not yet implemented" msgstr "아직 구현되지 않은 종류 %s입니다." msgid "" "rankMatrix(, method = '%s') coerces to dense matrix.\n" " Probably should rather use method = 'qr' !?" msgstr "" msgid "rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)" msgstr "rankMatrix(x, method='qr'): nrow(x) < ncol(x)이므로 t(x)를 계산합니다." msgid "model frame and formula mismatch in model.matrix()" msgstr "" "model.matrix()를 사용할 때 모델프레임(model frame)과 모델식(formula)가 일치하" "지 않습니다." msgid "invalid 'contrasts.arg' argument" msgstr "'contrasts.arg' 인자가 올바르지 않습니다." msgid "variable '%s' is absent, its contrast will be ignored" msgstr "변수 '%s'를 찾을 수 없어 관련 대비(contrast)는 계산되지 않을 것입니다." msgid "only 2-dimensional tables can be directly coerced to sparse matrices" msgstr "" "오로지 2차원 테이블만이 희소행렬(sparse matrice)로 강제변환(coerced)될 수 있" "습니다." msgid "exactly one of 'i', 'j', or 'p' must be missing from call" msgstr "'i', 'j', 또는 'p' 중 하나가 호출(call)로부터 누락된 것 같습니다. " msgid "'p' must be a non-decreasing vector (0, ...)" msgstr "'p'는 반드시 감소하지 않는(non-decreasing) 벡터 (0, ...)이어야 합니다." msgid "NA's in (i,j) are not allowed" msgstr "(i,j) 위치에 NA는 사용될 수 없습니다." msgid "" "Both 'symmetric' and 'triangular', i.e. asking for diagonal matrix. Use " "'Diagonal()' instead" msgstr "" msgid "symmetric matrix must be square" msgstr "대칭행렬(symmetric matrix)는 반드시 정방(square)이어야 합니다." #, fuzzy msgid "triangular matrix must be square" msgstr "대칭행렬(symmetric matrix)는 반드시 정방(square)이어야 합니다." msgid "triangular matrix must have all i >= j or i <= j" msgstr "" msgid "length(i) is not a multiple of length(x)" msgstr "length(i)는 length(x)의 배수가 아닙니다." msgid "only square matrices can be used as incidence matrices for graphs" msgstr "" "오로지 정방(square) 행렬만이 그래프를 위한 접속행렬(incidence matrices)로서 " "사용할 수 있습니다." msgid "Matrix-internal error in [i,,d]; please report" msgstr "" "[i,,d]를 사용중 행렬-내부 오류(matrix-internal error)가 발생했습니" "다. 이를 꼭 보고 부탁드립니다." msgid "invalid 'col.names' string: %s" msgstr "%s은 올바른 'col.names' 문자열이 아닙니다" msgid "uniDiag=TRUE, but not all diagonal entries are 1" msgstr "" msgid "uniDiag=TRUE, not all entries in diagonal coded as 1" msgstr "" msgid "in show(); maybe adjust 'options(max.print= *, width = *)'" msgstr "" #, fuzzy msgid "suppressing columns and rows" msgstr "[[ %d개의 열이름 %s를 제거합니다 ]]" msgid "suppressing rows" msgstr "" #, fuzzy msgid "suppressing columns" msgstr "[[ %d개의 열이름 %s를 제거합니다 ]]" msgid "logic programming error in printSpMatrix2(), please report" msgstr "" "printSpMatrix2()를 이용 도중 논리적 프로그래밍 에러(logic programming error)" "가 발생했습니다. 이를 꼭 보고를 부탁드립니다." msgid "invalid 'type'" msgstr "올바르지 않은 'type'입니다." msgid "rcond(.) via sparse -> dense coercion" msgstr "rcond(.) via sparse -> dense coercion" msgid "'V' is not a *square* matrix" msgstr "'V'는 정방행렬(square matrix)이 아닙니다." msgid "number of non zeros is smaller than 'nnz' because of duplicated (i,j)s" msgstr "" "중복된 (i,j)에 위치한 값들 때문에 영이 아닌 요소의 개수가 'nnz' 보다 작습니" "다." msgid "" "qr.R() may differ from qr.R() because of permutations. " "Possibly use our qrR() instead" msgstr "" "qr.R()은 아마도 순열(permutations) 때문에 qr.R()와 다를 수 있" "습니다. 따라서, qrR()을 사용하시길 바랍니다." msgid "cannot coerce 'NA's to \"nsparseVector\"" msgstr "'NA'를 \"nsparseVector\"로 강제변환(coerce) 할 수 없습니다." msgid "'x' must inherit from \"sparseVector\"" msgstr "'x'는 \"sparseVector\"로부터의 상속(inherit)이어야 합니다." msgid "'ncol' must be >= 0" msgstr "'ncol'은 반드시 >= 0 이어야 합니다. " msgid "'nrow' must be >= 0" msgstr "'nrow'는 반드시 >= 0 이어야 합니다." msgid "Must specify 'nrow' when 'symmetric' is true" msgstr "'symmetric'이 참인 경우에는 반드시 'nrow'를 지정해 주어야 합니다." msgid "'nrow' and 'ncol' must be the same when 'symmetric' is true" msgstr "" "'symmetric'이 참인 경우에는 반드시 'nrow'와 'ncol'을 지정해 주어야 합니다." msgid "'x' must have length nrow^2 when 'symmetric' is true" msgstr "" "'symmetric'이 참인 경우에는 'x'의 길이는 반드시 nrow^2와 같아야 합니다." msgid "'ncol' is not a factor of length(x)" msgstr "'ncol'는 길이가 length(x)인 요인(factor)가 아닙니다." msgid "'nrow' is not a factor of length(x)" msgstr "'nrow'는 길이가 length(x)인 요인(factor)가 아닙니다." msgid "Class %s is not yet implemented" msgstr "클래스 %s는 아직 구현되지 않았습니다." msgid "" "index must be numeric, logical or sparseVector for indexing sparseVectors" msgstr "" "sparseVectors를 인덱싱하기 위해서는 인덱스는 반드시 수치형, 논리형 또는 " "sparseVectors이어야 합니다." msgid "'times >= 0' is required" msgstr "'times >= 0'이 요구되어집니다." msgid "(un)packing only applies to dense matrices, class(x)='%s'" msgstr "(un)packing only applies to dense matrices, class(x)='%s'" msgid "'x' is not symmetric nor triangular" msgstr "'x'는 대칭(symmetric)도 아니고 삼각(triangular)도 아닙니다." msgid "" "extra argument %s will be disregarded in\n" " %s" msgid_plural "" "extra arguments %s will be disregarded in\n" " %s" msgstr[0] "추가 인자들(extra arguments) %s는 %s에서 사용되지 않을 것입니다." #~ msgid "variable '%s' converted to a factor" #~ msgstr "변수 '%s'가 요인(factor)로 변환되었습니다." #~ msgid "\"dMatrix\" object with NAs cannot be coerced to \"nMatrix\"" #~ msgstr "" #~ "NA를 가진 \"dMatrix\" 객체는 \"nMatrix\"로 강제변환(coerced) 할 수 없습니" #~ "다." #~ msgid "not a skinny matrix" #~ msgstr "not a skinny matrix" #~ msgid "\"lMatrix\" object with NAs cannot be coerced to \"nMatrix\"" #~ msgstr "" #~ "NA를 가진 \"lMatrix\" 객체는 \"nMatrix\"로 강제변환(coerced) 될 수 없습니" #~ "다." Matrix/inst/0000755000176200001440000000000013203323314012465 5ustar liggesusersMatrix/inst/po/0000755000176200001440000000000013203323315013104 5ustar liggesusersMatrix/inst/po/pl/0000755000176200001440000000000013203323315013517 5ustar liggesusersMatrix/inst/po/pl/LC_MESSAGES/0000755000176200001440000000000013203323315015304 5ustar liggesusersMatrix/inst/po/pl/LC_MESSAGES/Matrix.mo0000644000176200001440000006242513047321304017120 0ustar liggesusersL )<-L#i#)!0#R+v+#&6(P-yI&(4A5vD$422g/=9+B<n<,2R0rR(11Q+,,% %/U/s3),5C3y;*:,O|)+8!*+Lx-!M/1Ja;4?A]))20& 2W ?  + !:)!:d!!!B!#">"(["$"*"1"*#*1#(\#3## #*# $#$P3$M$"$,$="%3`%;%1%F&<I&'&+&0&, ',8'e'1'0'"' (!$()F(p(((%($(2),I)'v)-).)2).*D*&_**&*.*-*/%++U+*++++,+,#,-P,(~,1,#,*, (-9I----!-'.'(.#P.#t.+.&../ /6;/r//$/@/10&60]0v0<0)0*0"13>1(r11%1.1(2$72$\22622&23073h3 x3&3'38384G40g4O4-4 56 7MW77&7$7.868+S8/88!8/8*9AI9.9&9)9@ :3L:D:h:*.;0Y;7;<;c;.c<%<8<;<,-=BZ=H=8=;>;[>,>">B>B*?;m?L?/?:&@:a@2@5@5A/;A/kA3A-A@A>B;ZBkBGC7JCSC8CFD.VD-D5D0D7E5RE;E'E9E0&FjWF;FkFDjG9GDG[.H/H1H6H;#IM_IDI*I?J#]JNJNJ(K.HK_wK-KL,$L)QL7{LFL8LB3M)vMPMM#NM3N'N4N]N^ T(KT+tT-T.T,TL*U:wU4U:U;"VA^VV"V:V"W:;WIvWHW9 X5CX>yX.XFXG.YGvYHY7Z@?Z(Z>Z(ZS[2e[-[*[,[1\1P\1\1\;\3"]$V]={]>]]^5-^Fc^;^,^_._MM_8_?_%`::`/u`"`/`.`3'a"[a"~a$a5a?a3T-8+7B":~m?YDo[=cU*GF#6(^9\3RQ|iz Z O}])LK%jf;JsHP </reCn2W E5!4I,xt0ah@dV1uwXv&N`_q. {yb'%s = '%s' (back-permuted) is experimental%s(): structurally rank deficient case: possibly WRONG zeros'%s' must be in '%s''%s' must have string length 1'%s' slot must have length 1'Dim' slot has length less than two'data' must be of a vector type'factors' slot must be a named list's1' and 's2' must be "character" vectors'uplo' must be UPP or LOWA must be a logical matrixA must have #{rows} >= #{columns}Argument b must be a numeric matrixArgument ij must be 2-column integer matrixArgument must be numeric-like atomic vectorArgument rho must be an environmentCHOLMOD factorization was unsuccessfulCannot coerce to too large *geMatrix with %.0f entriesCannot factor a matrix with zero extentsCannot solve() for matrices with zero extentsCholesky factorization failed; unusually, please report to Matrix-authorsCholmod error '%s' at file %s, line %dCholmod warning '%s' at file %s, line %dCsparse_crossprod(): error return from cholmod_aat()Csparse_general_to_symmetric(): matrix is not square!Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrixDeterminant requires a square matrixDim slot must have length 2Dimensions of a (%d,%d) and b (%d,%d) do not conformDimensions of system to be solved are inconsistentDimensions of x and y are not compatible for %sExact singularity detected during LU decomposition: %s, i=%d.First call to Lapack routine dgels returned error code %dFirst call to dgeqrf returned error code %dInappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)Inconsistent dimensions: np = 0 and nnz = %dIncorrect length of 'x' slotIndex i must be NULL or integerIndex j must be NULL or integerLU decomposition applies only to square matricesLapack dgecon(): system computationally singular, reciprocal condition number = %gLapack routine %s returned error code %dLapack routine dgetri: system is exactly singularLapack routine dgetrs: system is exactly singularLapack routine dposv returned error code %dLapack routine dsytrf returned error code %dLapack routine dtrcon returned error code %dLengths of super and pi must be equalLengths of super and px must be equalLower band %d > upper band %dMatrices are not conformable for multiplicationMatrix exponential requires square, non-null matrixMatrix is not squareMatrix namespace not determined correctlyNegative value in DimNegative values in DimNon-symmetric matrix passed to dsCMatrix_to_dgTMatrixNonsymmetric matrix in Csparse_symmetric_to_generalNumber of supernodes must be positive when is_super is TRUEOnly 'g'eneral sparse matrix types allowedSecond call to Lapack routine dgels returned error code %dSecond call to dgeqrf returned error code %dSolve requires a square matrixSuiteSparseQR_C_QR returned an error codeSupernodal LDL' decomposition not availableSupernodal/simplicial class inconsistent with type flagsSymmetric and triangular both setUnable to initialize cholmod: error code %dUnknown error in getGivensX must be a numeric (double precision) matrixX must be a real (numeric) matrixall column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrixall column indices must be between 0 and ncol-1all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrixargument type[1]='%s' must be a one-letter character stringargument type[1]='%s' must be one of '1','O', or 'I'argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'as_cholmod_triplet(): could not reallocate for internal diagU2N()cannot add diag() as long as 'diag = "U"'cannot set diag() as long as 'diag = "U"'chm_diagN2U(): nrow=%d, ncol=%dchm_diagN2U(x, uploT = %d): uploT should be +- 1chm_factor_name(): did not get string of length 11chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)cholmod_change_factor failedcholmod_change_factor failed with status %dcholmod_drop() failedcholmod_factorize failed: status %d, minor %d from ncol %dcholmod_factorize_p failed: status %d, minor %d of ncol %dcholmod_sdmult error (resid)cholmod_sdmult error (rhs)cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %dcholmod_sort returned an error codecholmod_updown() returned %dcholmod_write_sparse returned error codecls = "%s" does not end in "CMatrix"cls = "%s" must begin with 'd', 'l' or 'n'code for cholmod_dense with holes not yet writtencode not yet written for cls = "lgCMatrix"complex sparse matrix code not yet writtencs matrix not compatible with class '%s'cs_lu(A) failed: near-singular A (or out of memory)cs_lusol failedcs_qr failedcs_qrsol() failed inside dgCMatrix_qrsol()cs_sqr failedcsp_eye argument n must be positivedata length [%d] is not a sub-multiple or multiple of the number of columns [%d]data length [%d] is not a sub-multiple or multiple of the number of rows [%d]data length exceeds size of matrixddense_to_symmetric(): matrix is not square!dgCMatrix_cholsol requires a 'short, wide' rectangular matrixdgCMatrix_lusol requires a square, non-empty matrixdgCMatrix_matrix_solve(.., sparse=TRUE) not yet implementeddgCMatrix_qrsol(., order) needs order in {0,..,3}dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrixdgeMatrix_Schur: argument x must be a non-null square matrixdgeMatrix_Schur: dgees returned code %ddgeMatrix_Schur: first call to dgees faileddgeMatrix_exp: LAPACK routine dgebal returned %ddgeMatrix_exp: dgetrf returned error code %ddgeMatrix_exp: dgetrs returned error code %ddiag_tC(): invalid 'resultKind'diagonal element %d of Cholesky factor is missingdon't know if a dense pattern matrix makes sensedpoMatrix is not positive definitedtrMatrix must be squareerror [%d] from Lapack 'dgecon()'exactly 1 of 'i', 'j' or 'p' must be NULLf->xtype of %d not recognizedfactors slot must be named listfailure in as_cholmod_factorfailure to open file "%s" for writingfirst element of slot p must be zeroi and j must be integer vectors of the same lengthin_place cholmod_sort returned an error codeincorrect left cyclic shift, j (%d) < 0incorrect left cyclic shift, j (%d) >= k (%d)incorrect left cyclic shift, k (%d) > ldx (%d)internal_chm_factor: Cholesky factorization failedinvalid '%s' argumentinvalid 'ncol' value (< 0)invalid 'ncol' value (too large or NA)invalid 'nrow' value (< 0)invalid 'nrow' value (too large or NA)invalid class '%s' to dup_mMatrix_as_dgeMatrixinvalid class '%s' to dup_mMatrix_as_geMatrixinvalid class of 'value' in Csparse_subassign()invalid class of 'x' in Csparse_subassign()invalid class of 'x' in Matrix_as_cs(a, x)invalid class of object to %sinvalid class of object to as_cholmod_denseinvalid class of object to as_cholmod_factorinvalid class of object to as_cholmod_sparseinvalid class of object to as_cholmod_tripletinvalid class(x) '%s' in R_to_CMatrix(x)invalid class(x) '%s' in compressed_to_TMatrix(x)invalid column index at position %dinvalid object passed to as_cholmod_sparseinvalid row index at position %dlast element of slot p must match length of slots j and xlength of x slot != prod(Dim)length(beta) must match ncol(V)length(p) must match nrow(V)length(q) must be zero or ncol(R)lengths of slots 'i' and 'x' must matchlengths of slots 'j' and 'x' must matchlengths of slots i and j must matchlengths of slots i and x must matchmatrix is not square! (skew-symmetric part)matrix is not square! (symmetric part)matrix is not symmetric [%d,%d]missing 'Matrix' namespace: should never happennegative vector lengths not allowed: np = %d, nnz = %dnon-numeric matrix extentnot a 'n.CMatrix'np = %d, must be zero when p is NULLnumber of rows in y (%d) does not match number of rows in X (%d)nz2Csparse(): invalid/non-implemented r_kind = %dobject must be a named, numeric vectorp must be non-decreasingp[0] = %d, should be zeroprogramming error in Csparse_subassign() should never happenrcond requires a square, non-empty matrixright=TRUE is not yet implemented __ FIXMEslot Dim must have length 2slot j is not *strictly* increasing inside a columnslot j is not increasing inside a columnslot p must be non-decreasingslot p must have length = nrow(.) + 1sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)strlen of cls argument = %d, should be 8subscript 'i' out of bounds in M[ij]subscript 'j' out of bounds in M[ij]system argument is not validthe leading minor of order %d is not positive definitetol, given as %g, must be <= 1tol, given as %g, must be non-negativetoo many elements specifiedunexpected ctype = %d in dup_mMatrix_as_geMatrixunknown 'Rkind'unknown xtypeunknown xtype in cholmod_sparse objectunknown xtype in cholmod_triplet objectuplo='L' must not have sparse entries above the diagonaluplo='U' must not have sparse entries below the diagonalx slot must be numeric "double"x[] <- val: val is coerced to logical for "%s" xx[] <- val: val should be integer or logical, is coerced to integer, for "%s" xy must be a numeric (double precision) matrixProject-Id-Version: Matrix 1.1-2-2 Report-Msgid-Bugs-To: POT-Creation-Date: 2017-02-10 12:21+0100 PO-Revision-Date: 2014-03-24 17:53+0100 Last-Translator: Łukasz Daniel Language-Team: Łukasz Daniel Language: pl_PL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); X-Poedit-SourceCharset: iso-8859-1 X-Generator: Poedit 1.5.4 %s = '%s' (wstecznie permutowany) jest eksperymentalny%s(): przypadek strukturalnie z niedoborem rang: prawdopodobnie BŁĘDNE zera'%s' musi być w '%s''%s' musi mieć łańcuch długości 1gniazdo '%s' musi mieć długość 1gniazdo 'dim' ma długość mniejszą niż dwa'data' musi być type wektorgniazdo 'factors' musi być nazwaną listą's1' oraz 's2' muszą być wektorami tekstowymi'uplo' musi być UPP lub LOW'A' musi być macierzą logiczną'A' musi mieć liczbę wierszy >= liczba kolumnArgument 'b' musi być macierzą liczbowąArgument 'ij' musi być 2-kolumnową macierzą liczb całkowitychArgument musi być atomowym wektorem liczbowymArgument 'rho' musi być środowiskiemFaktoryzacja 'CHOLMOD' nie powiodła sięNie można przekształcić do dużego '*geMatrix' z %.0f wpisamiNie można faktoryzować macierzy o zerowym stopniuNie można wykonać funkcji 'solve()' dla macierzy o zerowym stopniufaktoryzacja Cholesky'ego nie powiodła się; nietypowo, proszę zgłosić raport autorom pakietu MatrixBłąd 'cholmod' '%s' w pliku %s, linia %dOstrzeżenie 'cholmod' '%s' w pliku %s, linia %dCsparse_crossprod(): błąd zwrócony z 'cholmod_aat()'Csparse_general_to_symmetric(): macierz nie jest kwadratowa!Csparse_sort(x): 'x' nie jest poprawnym (niezależnie od sortowania) obiektem klasy "CsparseMatrix"Wyznacznik wymaga aby macierz była kwadratowagniazdo 'Dim' musi mieć długość 2Wymiary 'a' (%d,%d) oraz 'b' (%d,%d) nie pokrywają sięWymiary systemu, który ma być rozwiązany, są niespójneWymiary 'x' oraz 'y' nie są zgodne dla '%s'Wykryto dokładną osobliwość podczas dekompozycji LU: %s, i=%d.Pierwsze wywołanie procedury Lapack 'dgels()' zwróciło kod błędu %dPierwsze wywołanie 'dgeqrf()' zwróciło kod błędu %dNiepoprawna klasa cl='%s' w 'Matrix_csn_to_SEXP(S, cl, ..)'Niepoprawna klasa cl='%s' w 'Matrix_css_to_SEXP(S, cl, ..)'Niespójne wymiary: 'np = 0' oraz 'nnz = %d'Niepoprawna długość gniazda 'x'Indeks 'i' musi być wartością NULL lub być liczbą całkowitąIndeks 'j' musi być wartością NULL lub być liczbą całkowitądekompozycja LU stosuje się tylko do macierzy kwadratowychLapack dgecon(): system obliczeniowo osobliwy, numer obustronnego stanu = %gProcedura Lapack '%s' zwróciła kod błędu %dprocedura Lapack 'dgetri()': system jest ściśle osobliwyprocedura Lapack 'dgetrs()': system jest ściśle osobliwyprocedura Lapack 'dposv' zwróciła kod błędu %dprocedura Lapack 'dsytrf()' zwróciła kod błędu %dProcedura Lapack 'dtrcon()' zwróciła kod błędu %dDługości 'super' oraz 'pi' muszą być równeDługości 'super' oraz 'px' muszą być równeNiższe pasmo %d jest większe niż górne pasmo %dMacierze nie są dostosowane do przemnożeniaEksponencjowanie macierzy wymaga kwadratowej, niepustej macierzyMacierz nie jest kwadratowaprzestrzeń nazw macierzy nie została poprawnie określonaUjemna wartość w gnieździe 'Dim'Ujemne wartości w gnieździe 'Dim'Ujemne wartości w gnieździe 'Dim'Niesymetryczna macierz przekazana do funkcji 'dsCMatrix_to_dgTMatrix()'Niesymetryczna macierz w 'Csparse_symmetric_to_general'Liczba super węzłów musi być dodatnia gdy argument 'is_super' ma wartość TRUETylko ogólne ('g') typy rzadkich macierzy są dozwoloneDrugie wywołanie procedury Lapack 'dgels()' zwróciło kod błędu %dDrugie wywołanie 'dgeqrf()' zwróciło kod %dfunkcja 'solve()' wymaga kwadratowej macierzyfunkcja 'SuiteSparseQR_C_QR()' zwróciła kod błęduDekompozycja supernodalna LDL nie jest dostępnaklasa supernodal/simplicial niespójna z flagami 'type'Ustawiono jednocześnie 'symmetric' oraz 'triangular'Nie można zainicjować funkcji 'cholmod()': kod błędu %dNieznany błąd w funkcji 'getGivens()''X' musi być macierzą liczbową (o podwójnej precyzji)'X' musi być rzeczywistą (liczbową) macierząwszystkie indeksy kolumn (gniazdo 'j') muszą być pomiędzy 0 a 'ncol-1' w obiekcie klasy "TsparseMatrix"wszystkie indeksy kolumn muszą być pomiędzy 0 a 'ncol-1'wszystkie indeksy wierszy (gniazdo 'i') muszą być pomiędzy 0 a 'nrow-1' w obiekcie klasy "TsparseMatrix"argument type[1]='%s' musi być jednoliterowym łańcuchem tekstowymargument type[1]='%s' musi być jednym z '1','O', lub 'I'argument type[1]='%s' musi być jednym z 'M','1','O','I','F' lub 'E'as_cholmod_triplet(): nie można ponownie przydzielić dla wewnętrznej funkcji 'diagU2N()'nie można dodać 'diag()' dopóki 'diag = "U"'nie można ustawić 'diag()' dopóki 'diag = "U"'chm_diagN2U(): nrow=%d, ncol=%dchm_diagN2U(x, uploT = %d): 'uploT' powinien wynosić +/- 1chm_factor_name(): nie uzyskano łańcucha tekstowego o długości 11 znakówchm_sparse_to_SEXP(, *): niepoprawny 'Rkind' (kod 'real kind')'cholmod_change_factor' nie powiódł się'cholmod_change_factor' nie powiódł się zwracając status %d'cholmod_drop()' nie powiódł się'cholmod_factorize_p' nie powiódł się: status %d, minor %d liczba kolumn %d'cholmod_factorize_p' nie powiódł się: status %d, minor %d liczba kolumn %dbłąd funkcji 'cholmod_sdmult' (reszta)błąd funkcji 'cholmod_sdmult' (prawa strona)funkcja 'cholmod_solve' (CHOLMOD_A) nie powiodła się: status %d, minor %d z liczbą kolumn %dfunkcja 'cholmod_sort' zwróciła kod błęducholmod_updown() zwróciło %d'cholmod_write_sparse' zwrócił kod błędu'cls = "%s"' nie kończy się w 'CMatrix''cls = "%s"' musi rozpoczynać się od 'd', 'l' lub 'n'kod dla funkcji 'cholmod_dense()' z dziurami nie jest jeszcze napisanykod dla 'cls = "lgCMatrix"' nie został jeszcze napisanykod dla zespolonych rzadkich macierzy nie został jeszcze napisany'cs matrix' nie jest zgodne z klasą '%s''cs_lu(A)' nie powiódł się: 'A' jest bliskie osobliwości (lub brak pamięci)'cs_lusol' nie powiódł sięfunkcja 'cs_qr' nie powiodła się funkcja 'cs_qrsol()' nie powiodła się wewnątrz funkcji 'dgCMatrix_qrsol()'funkcja 'cs_lusol()' nie powiodła sięargument 'n' w funkcji 'csp_eye()' musi być dodatnidługość danych [%d] nie jest podwielokrotnością lub wielokrotnością liczby kolumn [%d]długość danych [%d] nie jest podwielokrotnością lub wielokrotnością liczby wierszy [%d]długość danych przekracza rozmiar macierzyddense_to_symmetric(): macierz nie jest kwadratowa!funkcja 'dgCMatrix_cholsol()' wymaga krótkiej lub szerokiej macierzy prostokątnej'dgCMatrix_lusol' wymaga kwadratowej, niepustej macierzy'dgCMatrix_matrix_solve(.., sparse=TRUE)' nie jest jeszcze zaimplementowanefunkcja 'dgCMatrix_qrsol(., order)' potrzebuje zmiennej 'order' ze zbioru {0,..,3}funkcja 'dgCMatrix_qrsol(macierz <%d x %d>)' wymaga długiej prostokątnej macierzydgeMatrix_Schur: argument 'x' musi być niepustą macierzą kwadratowądgeMatrix_Schur: funkcja 'dgees()' zwróciła kod %ddgeMatrix_Schur: pierwsze wywołanie funkcji 'dgees()' nie powiodło siędgeMatrix_exp: procedura LAPACK 'dgebal()' zwróciła %ddgeMatrix_exp: funkcja 'dgetrf()' zwróciła kod błędu %ddgeMatrix_exp: funkcja 'dgetrs()' zwróciła kod błędu %ddiag_tC(): niepoprawny 'resultKind'brakuje elementu diagonalnego %d czynnika Cholesky'egonie wiadomo, czy gęsty wzrór macierzy ma sensobiekt klasy "dpoMatrix" nie jest dodatnio określonyobiekt klasy "dtrMatrix" musi być kwadratowybłąd [%d] z funkcji Lapack 'dgecon()'dokładnie jeden z 'i', 'j' lub 'p' musi być wartością NULL'f->xtype' dla %d nie został rozpoznanygniazdo 'factors' musi być nazwaną listąniepowodzenie w funkcji 'as_cholmod_factor()'nie udało się otworzyć pliku '%s' do zapisupierwszy element gniazda 'p' musi być zerem'i' oraz 'j' muszą być wektorami liczb całkowitych o tej samej długości'in_place' funkcji 'cholmod_sort()' zwróciło kod błęduniepoprawne lewe cykliczne przesunięcie, j (%d) < 0niepoprawne lewe cykliczne przesunięcie, j (%d) >= k (%d)niepoprawne lewe cykliczne przesunięcie, k (%d) > ldx (%d)internal_chm_factor: faktoryzacja Cholesky'ego nie powiodła sięniepoprawny argument '%s'niepoprawna wartość 'ncol' (< 0)niepoprawna wartość 'ncol' (zbyt duża lub wartość NA)niepoprawna wartość 'nrow' (< 0)niepoprawna wartość 'nrow' (zbyt duża lub wartość NA)niepoprawna klasa "%s" przekazana do funkcji 'dup_mMatrix_as_dgeMatrix()'niepoprawna klasa "%s" przekazana do funkcji 'dup_mMatrix_as_geMatrix()'niepoprawna klasa 'value' w funkcji 'Csparse_subassign()'niepoprawna klasa 'x' w funkcji 'Csparse_subassign()'niepoprawna klasa argumentu 'x' w funkcji 'Matrix_as_cs(a, x)'niepoprawna klasa obiektu przekazanego do '%s'niepoprawna klasa obiektu przekazanego do funkcji 'as_cholmod_dense()'niepoprawna klasa obiektu przekazanego do funkcji 'as_cholmod_factor()'niepoprawna klasa obiektu przekazanego do funkcji 'as_cholmod_sparse()'niepoprawna klasa obiektu przekazanego do funkcji 'as_cholmod_triplet()'niepoprawne 'class(x)' '%s' w funkcji 'R_to_CMatrix(x)'niepoprawne 'class(x)' '%s' w funkcji 'compressed_to_TMatrix(x)'niepoprawny indeks kolumny na pozycji %dniepoprawny obiekt przekazany do funkcji 'as_cholmod_sparse()'niepoprawny indeks wiersza na pozycji %dostatni element gniazda 'p' musi zgadzać się długością z gniazdem 'j' oraz 'x'długość gniazda 'x' nie równa się 'prod(Dim)''length(beta)' musi zgadzać się z 'ncol(V)''length(p)' musi zgadzać się z 'nrow(V)''length(q)' musi wynosić zero lub 'ncol(R)'długość gniazd 'i' oraz 'x' musi się zgadzaćdługość gniazd 'j' oraz 'x' musi się zgadzaćdługość gniazd 'i' oraz 'j' musi się zgadzaćdługość gniazd 'i' oraz 'j' musi się zgadzaćmacierz nie jest kwadratowa! (część skośno-symetryczna)macierz nie jest kwadratowa! (część symetryczna)macierz nie jest symetryczna [%d,%d]brakuje przestrzeni nazw 'Matrix': nie powinno się wydarzyćujemne długości wektora nie są dozwolone: np = %d, nnz = %dnieliczbowy rozmiar macierzyto nie jest 'n.Cmatrix'np = %d, musi wynosić zero gdy 'p' ma wartość NULLliczba wierszy w 'y' (%d) nie zgadza się z liczbą wierszy w 'X' (%d)nz2Csparse(): niepoprawny/niezaimplementowany 'r_kind = %d'obiekt musi być nazwanym wektorem liczbowym'p' musi być niemalejące'p[0] = %d', powinno być zerobłąd programowy w funkcji 'Csparse_subassign()' nie powinien się wydarzyćfunkcja 'rcond()' wymaga kwadratowej, niepustej macierzy'right = TRUE' nie jest jeszcze zaimplementowane __ NAPRAW_MNIEgniazdo 'dim' musi mieć długość 2gniazdo 'j' nie jest *ściśle* rosnące wewnątrz kolumnygniazdo 'j' nie jest rosnące wewnątrz kolumnygniazdo 'p' musi być niemalejącegniazdo 'p' musi mieć długość = nrow(.) + 1sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)długość argumentu 'cls = %d', powinna wynosić 8indeks 'i' poza zakresem w 'M[ij]'indeks 'j' poza zakresem w 'M[ij]'argument systemowy nie jest poprawnywiodący minor rzędu %d nie jest dodatnio określonyargument 'tol', podany jako %g, musi być mniejszy lub równy 1argument 'tol', podany jako %g, musi być nieujemnyokreślono zbyt dużo elementównieoczekiwany 'ctype = %d' w funkcji 'dup_mMatrix_as_geMatrix()'nieznany 'Rkind'nieznany 'xtype'nieznany 'xtype' w obiekcie klasy "cholmod_sparse"nieznany 'xtype' w obiekcie klasy "cholmod_triplet"uplo='L' nie może mieć rzadkich wpisów powyżej diagonaliuplo='U' nie może mieć rzadkich wpisów poniżej diagonaligniazdo 'x' musi być liczbą typu "double"x[] <- val: 'val' została przekształcone w wartość logiczną dla "%s" 'x'x[] <- val: 'val' powinno być liczbą całkowitą lub wartością logiczną, została przekształcona na liczbę całkowitą, dla "%s" 'x''y' musi być macierzą liczbową (o podwójnej precyzji)Matrix/inst/po/pl/LC_MESSAGES/R-Matrix.mo0000644000176200001440000006703413047321304017320 0ustar liggesusersL 63 T9p619/k,-*#!E,Y;#6D1,vK1"#Tx4$9W'(V0$L0q:Ix'8&' HhJ:("/K5{,#88;7t,.&$9Q^D4(*$S%xM=&*&Q<x=7 5 -!61!:h!C!7!("*H"s"T" "*#91#k#e#/#"!$"D$1g$($$$I$8H%"%%@%@&5E&6{&& &&'' "'C'^'$p''2'''"(1'(3Y(((%(:(-)@E)?)=)8*=*HT*2*9*, +07+Eh+H+=+55,1k,',,,,-?"-b-z-&--$-- .-5.&c./.h.n#/.//B/(0DE0A0&0G0e;1v1?2%X2+~2)2@2"3*83c3;3%33)4!/49Q4>44A4!53>5r55B555'60C6t6`656,)77V77O7>7I98<8:8H8,D9q9";+;?;?<#W<?{<$<"<$=9(=7b=8=6=? >;J>1>>8>U?1]??G?K?-9@g@@"A;&A4bA+ALA4BGEBzB/Cy8C"C:C1D:BD@}DSDE*ECE+ F8LF$F%F"FLFE@G*G3GhG4NH+HUHSIQYI>I&I<JNJ/aJ\JWJ@FK(K$K2KTLO]L<LGL[2MHMMFNQN8DOG}OGO^ P?lP6P-P&QW8Q(Q8QDQ)7RaR?R0$S0US>S1SS,T?TRT%U>URZUSUHVHJV%V$VVVW'W!BWdW1zWWAW.X'4XC\XCX2X)YGAY7YXYWZGrZCZZy[;[5[8\D?\E\H\=]7Q]A]]]]'^;^LZ^ ^$^5^#_7?_(w_(_3_._?,`l``6vaa]a%bZEbTb3bc)cvcdBd5d9 e9FeVe*e9f&j1k8Gk"kYkQklOl_l]mkzm5mMQr!3 TD.YJu/$O)2KiNycW1nF&_-A<58b=* lU k(a"B\HjLmVotp~d 4 7qw;>Gv]^`e09Is#X'h}6@+? ZCEfPgz{S|:[R%,x%s %s is undefined%s kind not yet implemented'%s()' is not yet implemented for representation '%s''%s()' is not yet implemented for element type '%s''A' must be a square matrix'NA' indices are not (yet?) supported for sparse Matrices'V' is not a *square* matrix'V' is not a square matrix'by' argument is much too small'diagonals' matrix must have %d columns (= length(k) )'diagonals' must have the same length (%d) as 'k''file' must be a character string or connection'force' must be (coercable to) TRUE or FALSE'lag' and 'differences' must be integers >= 1'lwd' must be NULL or non-negative numeric'ncol' is not a factor of length(x)'ncol' must be >= 0'nearPD()' did not converge in %d iterations'nrow' and 'ncol' must be the same when 'symmetric' is true'nrow' is not a factor of length(x)'nrow' must be >= 0'nrow', 'ncol', etc, are disregarded for matrix 'data''nrow', 'ncol', etc, are disregarded when 'data' is "Matrix" already'p' must be a non-decreasing vector (0, ...)'times >= 0' is required'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a "CHMfactor"'x' has invalid data type'x' is not positive definite -- chol() undefined.'x' is not symmetric nor triangular'x' must be "sparseMatrix"'x' must have length nrow^2 when 'symmetric' is true'x' must inherit from "sparseVector"(un)packing only applies to dense matrices, class(x)='%s'.M.repl.i.2col(): 'i' has no integer column number; should never happen; please report.M.repl.i.2col(): drop 'matrix' case ....M.sub.i.2col(): 'i' has no integer column number; should never happen; please report %s %s is undefined --> is not yet implemented[i] is not yet implemented --> is not yet implemented[ ] : .M.sub.i.logical() maybe inefficientCholesky() -> *symbolic* factorization -- not yet implementedCholesky(A) called for 'A' of class "%s"; it is currently defined for sparseMatrix only; consider using chol() insteadClass %s is not yet implementedCmp.Mat.atomic() should not be called for diagonalMatrixFIXME: NOT YET FINISHED IMPLEMENTATIONInternal bug: nargs()=%d; please reportInvalid assembled indicator: %sInvalid storage format: %sInvalid storage type: %sLU computationally singular: ratio of extreme entries in |diag(U)| = %9.4gLogic.Mat.atomic() should not be called for diagonalMatrixMatrices must have same dimensions in %sMatrices must have same number of columns in %sMatrices must have same number of rows for arithmeticMatrices must have same number of rows in %sMatrix seems negative semi-definiteMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMust specify 'nrow' when 'symmetric' is trueNA's in (i,j) are not allowedNAs are not allowed in subscripted assignmentsNot a valid formatOnly numeric sparse matrices allowedQuadratic matrix '%s' (=: A) is not formally symmetric. Will be treated as A A'RHS 'value' (class %s) matches 'ANY', but must match matrix class %s[ ] indexing not allowed: forgot a "," ?[[ suppressing %d column names %s ... ]][[ suppressing %d column names %s ]]all() is not yet implementedas(.,"dsCMatrix") is deprecated (since 2008); do use as(., "symmetricMatrix")c(,..) of different kinds, coercing all to 'rleDiff'cannot coerce 'NA's to "nsparseMatrix"cannot coerce 'NA's to "nsparseVector"cannot coerce non-symmetric "dgTMatrix" to "dsCMatrix" classchol() is undefined for diagonal matrix with negative entriescoercion from list(i1,...,ik, d) to "indMatrix" failed. All entries must be integer valued and the number of columns, d, not smaller than the maximal index i*.coercion to "indMatrix" only works from integer numericcoercion to "pMatrix" only works from integer numericcolumn indices must be <= ncol(.) which is %dcomplex matrices not yet implemented in Matrix packagediag(.) had 0 or NA entries; non-finite result is doubtfuldiagonalMatrix in .dense2C() -- should never happen, please report!dim [product %d] do not match the length of object [%d]dim(.) value must be numeric of length 2dimensions don't match the number of cellsdimnames [%d] mismatch in %sdimnames(.) <- NULL: translated to dimnames(.) <- list(NULL,NULL) <==> unname(.)element type '%s' not recognizedelement type 'complex' not yet implementedexactly one of 'i', 'j', or 'p' must be missing from callfile is not a MatrixMarket filefor symmetric band matrix, only specify upper or lower triangle hence, all k must have the same signgeneral Matrix class not yet implemented for %shit a cycle (1) -- stop iterationshit a cycle (2) -- stop iterationsi1[1] == 0 ==> C-level verbosity will not happen!in Summary(, .): %s(<%s>, <%s>,...)incompatible matrix dimensionsindex larger than maximal %dindex must be numeric, logical or sparseVector for indexing sparseVectorsinefficient coercion (lost triangularity); please reportinefficient method used for "- e1"intermediate 'r' is of type %sinternal bug in "Compare" method (Cmp.Mat.atomic); please reportinternal bug in "Logic" method (Logic.Mat.atomic); please reportinternal bug: matrix 'i' in replTmat(): please reportinternal bug: missing 'i' in replTmat(): please reportinvalid 'col.names' string: %sinvalid 'contrasts.arg' argumentinvalid 'data'invalid 'mod': %sinvalid 'type'invalid (to - from)/by in seq(.)invalid character indexinginvalid class: %sinvalid dimnames given for %s objectinvalid nargs()= %dinvalid or not-yet-implemented 'Matrix' subsettingkronecker method must use default 'FUN'length must be non-negative numberlength of 1st arg does not match dimension of 2ndlength of 2nd arg does not match dimension of firstlength(i) is not a multiple of length(x)length(x) must be either 1 or #{cols}logic programming error in printSpMatrix2(), please reportlogical subscript too long (%d, should be %d)longer object length is not a multiple of shorter object lengthlonger object length is not a multiple of shorter object lengthm[ ] <- v: inefficiently treating single elementsm[ ]: inefficiently indexing single elementsmatrix is not diagonalmatrix with non-zero off-diagonals cannot be coerced to "diagonalMatrix"model frame and formula mismatch in model.matrix()must either specify 'A' or the functions 'A.x' and 'At.x'must have exactly one non-zero entry per rownargs() = %d should never happen; please report.nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?negative values are not allowed in a matrix subscriptno 'dimnames[[.]]': cannot use character indexingnon-conformable matrix dimensions in %snon-matching dimensionsnon-square matrixnot a positive definite matrixnot a square matrixnot a symmetric matrix; consider forceSymmetric() or symmpart()not a triangular matrixnot converged in %d iterationsnot enough new vecs -- stop iterationsnot yet implementednot yet implemented .. please reportnot yet implemented for %snot yet implemented for class %snot yet implemented for matrix with typeof %snot-yet-implemented 'Matrix[<-' methodnot-yet-implemented coercion to "TsparseMatrix"not-yet-implemented method for %s(<%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for %s(<%s>, <%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for <%s> %%*%% <%s>nothing to replace withnumber of items to replace is not a multiple of replacement lengthnumber of rows are not compatible for %sonly 2-dimensional tables can be directly coerced to sparse matricesonly square matrices can be used as incidence matrices for graphsprod() is not yet implementedprogramming error: min() should have dispatched w/ 1st arg much earlierqr.R() may differ from qr.R() because of permutations. Possibly use our qrR() insteadrankMatrix(, method = '%s') coerces to dense matrix. Probably should rather use method = 'qr' !?rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)rcond(.) via sparse -> dense coercionreadMM(): column values 'j' are not in 1:ncreadMM(): row values 'i' are not in 1:nrreplacing "indMatrix" entries is not allowed, as rarely sensiblerepresentation '%s' not recognizedrow indices must be <= nrow(.) which is %dsome arguments are not matricessuch indexing must be by logical or 2-column numeric matrixsum() is not yet implementedsymmetric matrix must be squaresymmetry form '%s' is not yet implementedsymmetry form '%s' not recognizedsymmetry form 'hermitian' not yet implemented for readingsymmetry form 'skew-symmetric' not yet implemented for readingtemporarily disabledthe %d-th (sub)-diagonal (k = %d) is too short; filling with NA'sthe matrix is not triangularthe number of non-zero entries differs from nrow(.)too many argumentstoo many replacement valuestrimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)type '%s' not recognizedundefined method for class %supdate must be TRUE/FALSE or '+' or '-'using "old code" part in Csparse subassignmentusing slow kronecker() methodusing"old code" part in Csparse subassignment >>> please report to Matrix-authors@r-project.orgvariable '%s' is absent, its contrast will be ignoredvector too long in Matrix - vector operationwhen 'A' is specified, 'A.x' and 'At.x' are disregardedwrong sign in 'by' argumentx / 0 for an x with sign-change no longer representable as 'rleDiff'x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrixx[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE.you cannot mix negative and positive indicesProject-Id-Version: Matrix 1.1-2-2 Report-Msgid-Bugs-To: bugs.r-project.org POT-Creation-Date: 2017-02-10 12:21 PO-Revision-Date: 2014-03-27 14:47+0100 Last-Translator: Łukasz Daniel Language-Team: Łukasz Daniel Language: pl_PL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); X-Poedit-SourceCharset: iso-8859-1 X-Generator: Poedit 1.5.4 %s %s nie jest określonerodzaj %s nie jest jeszcze zaimplementowany'%s()' nie jest jeszcze zaimplementowane dla reprezentacji '%s''%s()' nie jest jeszcze zaimplementowany dla typu '%s' elementu'A' musi być macierzą kwadratowąindeksy 'NA' nie są (jeszcze?) wspierane dla rzadkich macierzy'V' nie jest macierzą *kwadratową*'V' nie jest macierzą kwadratowąargument 'by' jest znacznie za małymacierz 'diagonals' musi mieć %d kolumnę (= length(k) )'diagonals' musi mieć tę samą długość (%d) co 'k''file' musi być łańcuchem tekstowym lub połączeniem'force' musi być (przekształcalne do) TRUE lub FALSE'lag' oraz 'differences' muszą być liczbami całkowitymi >= 1'lwd' musi mieć wartość NULL lub być nieujemną liczbą'ncol' nie jest czynnikiem długości 'length(x)''ncol' musi być >= 0funkcja 'nearPD()' nie uzbieżniła się w %d iteracjach'nrow' oraz 'ncol' muszą mieć tę samą wartość gdy 'symmetric' ma wartość TRUE'nrow' nie jest czynnikiem długości 'length(x)''nrow' musi być >= 0'nrow', 'ncol', itd., są nieuwzględniane dla 'data' typu macierzowego'nrow', 'ncol', itd., nie są uwzględniane gdy 'data' ma już typ 'Matrix''p' musi być niemalejącym wektorem (0, ...)wymagane jest 'times >= 0''update' musi być wartością logiczną lub '+' lub '-'; 'C' musi być macierzą, oraz 'L' musi być obiektem klasy 'CHMfactor''x' posiada niepoprawny typ danych'x' nie jest dodatnio określone -- nieokreślony 'chol()'.'x' nie jest macierzą symetryczną ani trójkątną'x' musi być obiektem klasy "sparseMatrix"'x' musi mieć długość równą 'nrow'^2 gdy 'symmetric' ma wartość TRUEargument 'x' musi być obiektem klasy "sparseVector"(roz)pakowanie stosuje się jedynie do gęstych macierzy, class(x)='%s'.M.repl.i.2col(): 'i' posiada niecałkowitą liczbę kolumn; to nie powinno się nigdy wydarzyć; proszę zgłosić raport.M.repl.i.2col(): zrzuć przypadek 'matrix' ....M.sub.i.2col(): 'i' posiada niecałkowitą liczbę kolumn; to nie powinno się nigdy wydarzyć; proszę zgłosić raport %s %s nie jest określone --> nie jest jeszcze zaimplementowane'[i]' nie jest jeszcze zaimplementowane --> nie jest jeszcze zaimplementowane[ ] : '.M.sub.i.logical()' może być niewydajneCholesky() -> *symboliczna* faktoryzacja -- jeszcze niezaimplementowanametoda 'Cholesky(A)' poprosiła o 'A' klasy '%s'; aktualnie jest ona zdefiniowana jedynie dla klasy 'sparseMatrix'; rozważ w zamian użycie 'metodychol()'Klasa %s nie jest jeszcze zaimplementowana'Cmp.Mat.atomic()' nie powinien być wywołany dla 'diagonalMatrix'FIXME: JESZCZE NIEZAKOŃCZONA IMPLEMENTACJABłąd wewnętrzny: nargs()=%d; proszę zgłosić raportNiepoprawnie złożony wskaźnik: %sNiepoprawny format przechowywania: %sNiepoprawny typ przechowywania: %sLU obliczeniowo osobliwa: stosunek ekstremalnych wpisów w |diag(U)| = %9.4g'Logic.Mat.atomic()' nie powinien być wywołany dla 'diagonalMatrix'Macierze muszą mieć te same wymiary w %sMacierze muszą mieć tę samą liczbę kolumn w %sMacierze muszą mieć tę samą liczbę wierszy jeśli mają być przeprowadzane działania arytmetyczneMacierze muszą mieć tę samą liczbę wierszy w %sMacierz wydaje się być ujemnie określonabłąd wewnętrzny w pakiecie 'Matrix' w '[i,,d]'; proszę zgłosić raportbłąd wewnętrzny pakiecie 'Matrix' w '[i,,d]'; proszę zgłosić raportbłąd wewnętrzny pakietu 'Matrix' w '[i,,d]'; proszę zgłosić raport'nrow' musi być określone, gdy 'symmetric' ma wartość TRUEwartości NA w (i,j) nie są dozwolonewartości NA nie są dozwolone w indeksowanych przypisaniachNiepoprawny formatDozwolone są jedynie liczbowe rzadkie macierzeMacierz kwadratowa '%s' (=: A) nie jest formalnie symetryczna. Będzie traktowana jako A A'prawa strona 'value' (klasa %s) pasuje do 'ANY', a musi pasować do klasy macierzy '%s'indeksowanie [ ] nie jest dozwolone: zapomniałeś ',' ?[[ zmniejszanie %d nazw kolumn %s ... ]][[ zmniejszanie %d nazw kolumn %s ]]'all()' nie jest jeszcze zaimplementowane'as(.,"dsCMatrix")' jest przestarzałe (0d 2008); używaj 'as(., "symmetricMatrix")''c(,..)' różnych rodzajów, przekształcanie wszystkich do 'rleDiff'nie można przekształcić wartości 'NA' na 'nsparseMatrix'nie można przekształcić wartości NA na obiekt klasy "nsparseVector"nie można przekształcić niesymetrycznej macierzy klasy "dgTMatrix" na klasę "dsCMatrix"'chol()' jest nieokreślona dla macierzy diagonalnych z ujemnymi wpisamiprzekształcenie z 'list(i1,...,ik, d)' na obiekt klasy "indMatrix" nie powiodło się. Wszystkie wpisy muszą być wartościami całkowitymi a liczba kolumn d nie może być mniejsza niż maksymalny indeks i*.przekształcenie na "indMatrix" działa jedynie dla liczb całkowitychprzekształcenie na obiekt klasy "pMatrix" działa jedynie dla liczb całkowitychindeksy kolumn muszą być <= 'ncol(.)' który wynosi %dmacierze zespolone nie są jeszcze zaimplementowane w pakiecie 'Matrix''diag(.)' posiadało wpisy 0 lub NA; nieskończony wynik jest wątpliwy'diagonalMatrix' w '.dense2C()' -- nie powinno nigdy się wydarzyć, proszę zgłosić raport!wymiar [produkt %d] nie zgadza się z długością obiektu [%d]wartości 'dim(.)' muszą być liczbami o długości 2wymiary nie zgadzają się z liczbą komórekniezgodność nazw wymiarów [%d] w %sdimnames(.) <- NULL: przetłumaczono na dimnames(.) <- list(NULL,NULL) <==> unname(.)element typu '%s' nie został rozpoznanytyp elementu 'complex' nie jest jeszcze zaimplementowanydokłanie jeden z 'i', 'j', lub 'p' musi być nieobecny w wywołaniuplik nie jest plikiem typu 'MatrixMarket'dla symetrycznej macierzy wstęgowej, określ jedynie górny oraz dolny trójkąt tak więc, wszystkie k muszą mieć ten sam znakogólna klasa 'Matrix' jeszcze nie jest zaimplementowana dla %snatrafiona na cykl (1) -- zatrzymywanie iteracjinatrafiona na cykl (2) -- zatrzymywanie iteracjii1[1] == 0 ==> tryb 'verbose' poziomu C nie zostanie wykonany!w funkcji 'Summary(, .): %s(<%s>, <%s>,...)'niezgodne wymiary macierzyindeks dłuższy niż maksymalny możliwy %dindeks musi być typem liczbowym, logicznym lub obiektem klasy 'sparseVector' na potrzeby indeksowania obiektów klasy 'sparseVector'nieefektywne przekształcenie (utracono trójkątność); proszę zgłosić raportnieefektywna metoda użyta dla '- e1'pośrednie 'r' jest typu %sbłąd wewnętrzny w metodzie 'Compare' (Cmp.Mat.atomic); proszę zgłosić raportbłąd wewnętrzny w metodzie 'Logic' (.Logic.Mat.atomic); proszę zgłosić raportwewnętrzny błąd: macierz 'i' w 'replTmat()': proszę zgłosić raportbłąd wewnętrzny: brakuje 'i' w 'replTmat()': proszę zgłosić raportniepoprawny łańcuch 'col.names': %sniepoprawny argument 'contrasts.arg'niepoprawne 'data'niepoprawne 'mod': %sniepoprawny 'type'niepoprawne '(to - from)/by' w 'seq(.)'niepoprawne tekstowe indeksowanieniepoprawna klasa: %spodano niepoprawne nazwy wymiarów dla obiektu %sniepoprawne nargs()=%dniepoprawne lub jeszcze niezaimplementowane podstawienie 'Matrix'metoda kroneckera musi użyć domyślnej 'FUN'długość musi być nieujemną liczbądługość pierwszego argumentu nie zgadza się z wymiarem drugiegodługość drugiego argumentu nie zgadza się z wymiarem pierwszego'length(i)' nie jest wielokrotnością 'length(x)''length(x)' musi wynosić 1 lub #{kolumn}błąd logiczny programu w 'printSpMatrix2()', proszę zgłosić raportindeks logiczny jest zbyt długi (%d, powinien być %d)długość dłuższego obiektu nie jest wielokrotnością długości krótszego obiektudługość dłuższego obiektu nie jest wielokrotnością długości krótszego obiektum[ ] <- v: nieefektywne traktowanie pojedynczych elementówm[ ]: nieefektywne indeksowanie pojedynczych elementówmacierz nie jest diagonalnamacierz z niezerowaymi wartościami pozadiagonalnymi nie może zostać przekształcona w na obiekt klasy "diagonalMatrix"niezgodność ramki modelu oraz formuły w 'model.matrix()'potrzeba określić 'A' lub funkcje 'A.x' oraz 'At.x'potrzeba mieć dokładnie jeden niezerowy wpis na wiersz'nargs() = %d' nie powinno się wydarzyć; proszę zgłosić raport.nargs() = %d. Obce nielegalne argumenty wewnątrz '[ .. ]' (i.2col)?nargs() = %d. Obce nielegalne argumenty wewnątrz '[ .. ]' (i.logical)?nargs() = %d. Obce nielegalne argumenty wewnątrz '[ .. ]' ?ujemne wartości nie są dozwolone w indeksach macierzybrak 'dimnames[[.]]': nie można używać indeksowania tekstowegoniezgodne wymiary macierzy w %sniezgodne wymiaryniekwadratowa macierzto nie jest dodatnio określona macierzto nie jest macierz kwadratowato nie jest macierz symetryczna; rozważ 'forceSymmetric()' lub 'symmpart()'to nie jest macierz trójkątnąnie uzbieżnił się w %d iteracjachzbyt mało nowych wektorów -- zatrzymywanie iteracjijeszcze niezaimplementowanejeszcze niezaimplementowane .. proszę zgłosić raportjeszcze nie jest zaimplementowana dla %sjeszcze niezaimplementowane dla klasy %sjeszcze niezaimplementowana dla macierzy z typem %sjeszcze niezaimplementowana metoda 'Matrix[<-'jeszcze niezaimplementowane przekształcenie na 'TsparseMatrix'metoda jeszcze niezaimplementowana dla %s(<%s>). ->> Poproś autorów pakietu o zaimplementowanie brakującej funkcjonalności.metoda jeszcze niezaimplementowana dla %s(<%s>, <%s>). ->> Poproś autorów pakietu o zaimplementowanie brakującej funkcjonalności.jeszcze niezaimplementowana metoda dla <%s> %%*%% <%s>nic do zastąpienialiczba pozycji do zastąpienia nie jest wielokrotnością długości elementu zastępującegoliczba wierszy nie jest zgodna dla %sjedynie 2-wymiarowe tablice mogą zostać bezpośrednio przekształcone w rzadkie macierzejedynie kwadratowe macierze mogą zostać użyte jako macierz incydencji dla grafów'prod()' nie jest jeszcze zaimplementowanebłąd programistyczny: 'min()' powinno zostać wysłane z pierwszym argumentem znacznie wcześniej'qr.R()' może różnić się od 'qr.R()' z powodu permutacji. Być może użyj metody qrR() w zamianrankMatrix(, method = '%s') przekształca macierz do gęstej macierzy. Prawdopodobnie należy użyć 'method = "qr"' !?rankMatrix(x, method='qr'): obliczanie t(x) jako nrow(x) < ncol(x)'rcond(.)' poprzez przekształcenie rzadkie -> gęstereadMM(): wartości kolumny 'j' nie są w przedziale 1:ncreadMM(): wartości wiersza 'i' nie są w przedziale 1:nrzastępowanie wpisów "indMatrix" jest niedozwolone, ponieważ jest to rzadko sensownereprezentacja '%s' nie została rozpoznanaindeksy wiersza muszą być <= 'nrow(.)' który wynosi %dniektóre argumenty nie są macierzamitakie indeksowanie musi być wykonane poprzez macierz logiczną lub 2-kolumnową macierz liczbową'sum()' nie jest jeszcze zaimplementowanemacierz symetryczna musi być kwadratowaforma symetryczna '%s' nie jest jeszcze zaimplementowanaforma symetryczna '%s' nie została rozpoznanaforma symetryczna 'hermitian' nie jest jeszcze zaimplementowana na potrzeby odczytuforma symetryczna 'skew-symmetric' nie jest jeszcze zaimplementowana na potrzeby odczytufunkcja jest tymczasowo niedostępna(pod)-diagonala %d (k = %d) jest zbyt krótkal wypełnianie wartościami NAmacierz nie jest trójkątnaliczba niezerowych wpisów różni się od 'nrow(.)'zbyt wiele argumentówzbyt dużo wartości zamieniającychprzycięta średnia 'sparseVector' -- optymalnie używając 'as.numeric(.)'typ '%s' nie został rozpoznanyniezdefiniowana metoda dla klasy %s'update' musi wynosić TRUE/FALSE lub '+' lub '-'używanie części 'old code' w przypisaniu w 'Csparse'używanie powolnej metody 'kronecker()'używanie części 'old code' w przypisaniu w 'Csparse' >>> proszę zgłosić raport na adres 'Matrix-authors@r-project.org'zmienna '%s' jest nieobecna, jej kontrast zostanie zignorowanywektor jest zbyt długi w operacji macierz-wektorgdy 'A' jest określone, 'A.x' oraz 'At.x' są odrzucaneniepoprawny znak w argumencie 'by'x / 0 dla ' x' ze zmianą znaku nie jest dłużej reprezentowalne jako 'rleDiff'x[.,.] <- wartość : 'x' zostaje przekształcone z 'Tsparse*' na 'CsparseMatrix'x[.,.] <- wartość: 'x' to %s, wartość nie w zakresie {TRUE, FALSE} zostaje przekształcona NA |--> TRUE.x[.,.] <- wartość: 'x' to %s, wartość nie w zakresie {TRUE, FALSE} zostaje przekształcona.x[.] <- wartość: 'x' to %s, wartość nie w zakresie {TRUE, FALSE} zostaje przekształcona.x[.] <- wartość: 'x' to %s, wartość nie w zakresie {TRUE, FALSE} zostaje przekształcona; NA |--> TRUE.nie można mieszać ujemnych oraz dodatnich indeksówMatrix/inst/po/en@quot/0000755000176200001440000000000013203323315014517 5ustar liggesusersMatrix/inst/po/en@quot/LC_MESSAGES/0000755000176200001440000000000013203323315016304 5ustar liggesusersMatrix/inst/po/en@quot/LC_MESSAGES/Matrix.mo0000644000176200001440000006205613047321304020120 0ustar liggesusers\7xBy)<#8W#t#) !;#]++#.&,6S(-I&+(R4{5D:+$f42/',W&=9+?3k<<,Fc0R('1P1+,, %:%`/,35)J#t,53;/*k:,) +G 8s ! +  -!!C!Me!/!J!;."4j"?"A")!#)K#Au#2#0#2$?N$H$$+$ %:6%:q%%%B%#'&K&(h&$&*&1&*'*>'(i'3'' '*' (#(P@(M("(,)=/)3m);)1)F*5V*5*<*'*+'+0S+,+,++1+%0,0V,",,!,),---M-%j-$-2-,-'.-=..k.2...&.%/&@/.g/-///+/* 0K0+i0,0,0-0(11F1#x1*1 191"25@2v22!2'2'2#%3#I3+m3&33/364G4a4$s4@414& 525K5<e5)5%5*56396(m66%6.6( 7$27$W7|76797 8&)8P8g8088 8&8'88!98Z999909O:-k:X:F;-9<<g<<"< <'=#-='Q=1y===!=#>+*>+V>#>.>&>6>(3?-\?I?*?,?4,@5a@D@>@$A@AXA4tA2A/A, B9B&UB=|B9B+B3 C@TC@C,C D$DDD0dDRD(D1E1CE+uE,E,E%E%!FGF/eF,F3FF) G'5G,]G5G3G;G.0H:_H,HH)H+I8\/n\#\#\+\&]9]3Y]6]]]$]@^1Z^&^^^<^)#_%M_*s__3_(_`%5`.[`(`(`(`a6"a9Yaa&aaa0 b=b Qb&_b'b<b<b(c?c_c0cOc-d|)9?A'F{@Oi"5# g/:z0c]sp,`R _n P[EVCM6(4 eZo1SdjTH;*~%\+q x3<7Uu-lrKk}28XBJY!.&L^ hbmIvDa>WtNQfy=w$G"dtrMatrix" objects in '%*%' must have matching (square) dimension%s = '%s' (back-permuted) is experimental%s(): structurally rank deficient case: possibly WRONG zeros'%s' must be in '%s''%s' must have string length 1'%s' slot must have length 1'Dim' slot has length less than two'data' must be of a vector type'factors' slot must be a named list's1' and 's2' must be "character" vectors'uplo' must be UPP or LOWA must be a logical matrixA must have #{rows} >= #{columns}Argument b must be a numeric matrixArgument ij must be 2-column integer matrixArgument must be numeric-like atomic vectorArgument rho must be an environmentArgument y must be numeric, integer or logicalCHOLMOD factorization was unsuccessfulCannot coerce to too large *geMatrix with %.0f entriesCannot factor a matrix with zero extentsCannot solve() for matrices with zero extentsCholesky factorization failed; unusually, please report to Matrix-authorsCholmod error '%s' at file %s, line %dCholmod warning '%s' at file %s, line %dCsparse_crossprod(): error return from cholmod_aat()Csparse_general_to_symmetric(): matrix is not square!Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrixCsparse_to_nz_pattern(x, tri = NA): 'tri' is taken as TRUEDeterminant requires a square matrixDim slot is not integerDim slot must have length 2Dimensions of a (%d,%d) and b (%d,%d) do not conformDimensions of system to be solved are inconsistentDimensions of x and y are not compatible for %sDimnames slot is a list, but not of length 2Dimnames slot is not a listDimnames[%d] is not a character vectorExact singularity detected during LU decomposition: %s, i=%d.First call to Lapack routine dgels returned error code %dFirst call to dgeqrf returned error code %dImpossible Rk_x/Rk_y in Csparse_%s(), please reportInappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)Inconsistent dimensions: np = 0 and nnz = %dIncorrect length of 'x' slotIndex i must be NULL or integerIndex j must be NULL or integerLU decomposition applies only to square matricesLapack dgecon(): system computationally singular, reciprocal condition number = %gLapack routine %s returned error code %dLapack routine dgetri: system is exactly singularLapack routine dgetrs: system is exactly singularLapack routine dposv returned error code %dLapack routine dsytrf returned error code %dLapack routine dtrcon returned error code %dLengths of super and pi must be equalLengths of super and px must be equalLower band %d > upper band %dMatrices are not conformable for multiplicationMatrix dimension %d x %d (= %g) is too largeMatrix exponential requires square, non-null matrixMatrix is not squareMatrix namespace not determined correctlyMatrix object has no 'factors' slotNegative value in DimNegative values in DimNon-symmetric matrix passed to dsCMatrix_to_dgTMatrixNonsymmetric matrix in Csparse_symmetric_to_generalNumber of supernodes must be positive when is_super is TRUEOnly 'g'eneral sparse matrix types allowedSecond call to Lapack routine dgels returned error code %dSecond call to dgeqrf returned error code %dSolve requires a square matrixSuiteSparseQR_C_QR returned an error codeSupernodal LDL' decomposition not availableSupernodal/simplicial class inconsistent with type flagsSymmetric and triangular both setUnable to initialize cholmod: error code %dUnknown error in getGivensX must be a numeric (double precision) matrixX must be a real (numeric) matrixall column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrixall column indices must be between 0 and ncol-1all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrixargument type[1]='%s' must be a one-letter character stringargument type[1]='%s' must be one of '1','O', or 'I'argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'as_cholmod_triplet(): could not reallocate for internal diagU2N()cannot add diag() as long as 'diag = "U"'cannot set diag() as long as 'diag = "U"'chm_MOD_xtype() was not successful in Csparse_%s(), please reportchm_diagN2U(): nrow=%d, ncol=%dchm_diagN2U(x, uploT = %d): uploT should be +- 1chm_factor_name(): did not get string of length 11chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)chm_transpose_dense(ans, x) not yet implemented for %s different from %scholmod_change_factor failedcholmod_change_factor failed with status %dcholmod_drop() failedcholmod_factorize failed: status %d, minor %d from ncol %dcholmod_factorize_p failed: status %d, minor %d of ncol %dcholmod_sdmult error (resid)cholmod_sdmult error (rhs)cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %dcholmod_sort returned an error codecholmod_updown() returned %dcholmod_write_sparse returned error codecls = "%s" does not end in "CMatrix"cls = "%s" must begin with 'd', 'l' or 'n'code for cholmod_dense with holes not yet writtencode not yet written for cls = "lgCMatrix"complex sparse matrix code not yet writtencs matrix not compatible with class '%s'cs_lu(A) failed: near-singular A (or out of memory)cs_lusol failedcs_qr failedcs_qrsol() failed inside dgCMatrix_qrsol()cs_sqr failedcsp_eye argument n must be positivedata length [%d] is not a sub-multiple or multiple of the number of columns [%d]data length [%d] is not a sub-multiple or multiple of the number of rows [%d]data length exceeds size of matrixddense_to_symmetric(): matrix is not square!dgCMatrix_cholsol requires a 'short, wide' rectangular matrixdgCMatrix_lusol requires a square, non-empty matrixdgCMatrix_matrix_solve(.., sparse=TRUE) not yet implementeddgCMatrix_qrsol(., order) needs order in {0,..,3}dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrixdgcMatrix_LU(*, keep_dimnames = NA): NA taken as TRUEdgcMatrix_QR(*, keep_dimnames = NA): NA taken as TRUEdgeMatrix_Schur: argument x must be a non-null square matrixdgeMatrix_Schur: dgees returned code %ddgeMatrix_Schur: first call to dgees faileddgeMatrix_exp: LAPACK routine dgebal returned %ddgeMatrix_exp: dgetrf returned error code %ddgeMatrix_exp: dgetrs returned error code %ddiag_tC(): invalid 'resultKind'diagonal element %d of Cholesky factor is missingdiagonal to be added has wrong lengthdon't know if a dense pattern matrix makes sensedpoMatrix is not positive definitedtrMatrix must be squareerror [%d] from Lapack 'dgecon()'exactly 1 of 'i', 'j' or 'p' must be NULLf->xtype of %d not recognizedfactors slot must be named listfailure in as_cholmod_factorfailure to open file "%s" for writingfirst element of slot p must be zeroi and j must be integer vectors of the same lengthin_place cholmod_sort returned an error codeincorrect left cyclic shift, j (%d) < 0incorrect left cyclic shift, j (%d) >= k (%d)incorrect left cyclic shift, k (%d) > ldx (%d)internal_chm_factor: Cholesky factorization failedinvalid '%s' argumentinvalid 'ncol' value (< 0)invalid 'ncol' value (too large or NA)invalid 'nrow' value (< 0)invalid 'nrow' value (too large or NA)invalid class '%s' to dup_mMatrix_as_dgeMatrixinvalid class '%s' to dup_mMatrix_as_geMatrixinvalid class of 'value' in Csparse_subassign()invalid class of 'x' in Csparse_subassign()invalid class of 'x' in Matrix_as_cs(a, x)invalid class of object to %sinvalid class of object to as_cholmod_denseinvalid class of object to as_cholmod_factorinvalid class of object to as_cholmod_sparseinvalid class of object to as_cholmod_tripletinvalid class(x) '%s' in R_to_CMatrix(x)invalid class(x) '%s' in compressed_to_TMatrix(x)invalid column index at position %dinvalid object passed to as_cholmod_sparseinvalid row index at position %dlast element of slot p must match length of slots j and xlength of x slot != prod(Dim)length(Dimnames[%d]) differs from Dim[%d] which is %dlength(beta) must match ncol(V)length(p) must match nrow(V)length(q) must be zero or ncol(R)lengths of slots 'i' and 'x' must matchlengths of slots 'j' and 'x' must matchlengths of slots i and j must matchlengths of slots i and x must matchmatrix is not square! (skew-symmetric part)matrix is not square! (symmetric part)matrix is not symmetric [%d,%d]missing 'Matrix' namespace: should never happennegative vector lengths not allowed: np = %d, nnz = %dnon-numeric matrix extentnot a 'n.CMatrix'np = %d, must be zero when p is NULLnumber of rows in y (%d) does not match number of rows in X (%d)nz2Csparse(): invalid/non-implemented r_kind = %dobject must be a named, numeric vectorp must be non-decreasingp[0] = %d, should be zeroprogramming error in Csparse_subassign() should never happenrcond requires a square, non-empty matrixreplacement diagonal has wrong lengthright=TRUE is not yet implemented __ FIXMEslot Dim must have length 2slot j is not *strictly* increasing inside a columnslot j is not increasing inside a columnslot p must be non-decreasingslot p must have length = nrow(.) + 1sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)strlen of cls argument = %d, should be 8subscript 'i' out of bounds in M[ij]subscript 'j' out of bounds in M[ij]system argument is not validthe leading minor of order %d is not positive definitethe number of columns differ in R_rbind2_vector: %d != %dtol, given as %g, must be <= 1tol, given as %g, must be non-negativetoo large matrix: %.0ftoo many elements specifiedunexpected ctype = %d in dup_mMatrix_as_geMatrixunknown 'Rkind'unknown xtypeunknown xtype in cholmod_sparse objectunknown xtype in cholmod_triplet objectuplo='L' must not have sparse entries above the diagonaluplo='U' must not have sparse entries below the diagonalx slot is not "double"x slot is not of correct lengthx slot must be numeric "double"x[] <- val: val is coerced to logical for "%s" xx[] <- val: val should be integer or logical, is coerced to integer, for "%s" xy must be a numeric (double precision) matrixProject-Id-Version: Matrix 1.2-9 Report-Msgid-Bugs-To: POT-Creation-Date: 2017-02-10 12:21+0100 PO-Revision-Date: 2017-02-10 12:21+0100 Last-Translator: Automatically generated Language-Team: none Language: en MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); "dtrMatrix" objects in ‘%*%’ must have matching (square) dimension%s = ‘%s’ (back-permuted) is experimental%s(): structurally rank deficient case: possibly WRONG zeros‘%s’ must be in ‘%s’‘%s’ must have string length 1‘%s’ slot must have length 1‘Dim’ slot has length less than two‘data’ must be of a vector type‘factors’ slot must be a named list‘s1’ and ‘s2’ must be "character" vectors‘uplo’ must be UPP or LOWA must be a logical matrixA must have #{rows} >= #{columns}Argument b must be a numeric matrixArgument ij must be 2-column integer matrixArgument must be numeric-like atomic vectorArgument rho must be an environmentArgument y must be numeric, integer or logicalCHOLMOD factorization was unsuccessfulCannot coerce to too large *geMatrix with %.0f entriesCannot factor a matrix with zero extentsCannot solve() for matrices with zero extentsCholesky factorization failed; unusually, please report to Matrix-authorsCholmod error ‘%s’ at file %s, line %dCholmod warning ‘%s’ at file %s, line %dCsparse_crossprod(): error return from cholmod_aat()Csparse_general_to_symmetric(): matrix is not square!Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrixCsparse_to_nz_pattern(x, tri = NA): ‘tri’ is taken as TRUEDeterminant requires a square matrixDim slot is not integerDim slot must have length 2Dimensions of a (%d,%d) and b (%d,%d) do not conformDimensions of system to be solved are inconsistentDimensions of x and y are not compatible for %sDimnames slot is a list, but not of length 2Dimnames slot is not a listDimnames[%d] is not a character vectorExact singularity detected during LU decomposition: %s, i=%d.First call to Lapack routine dgels returned error code %dFirst call to dgeqrf returned error code %dImpossible Rk_x/Rk_y in Csparse_%s(), please reportInappropriate class cl=‘%s’ in Matrix_csn_to_SEXP(S, cl, ..)Inappropriate class cl=‘%s’ in Matrix_css_to_SEXP(S, cl, ..)Inconsistent dimensions: np = 0 and nnz = %dIncorrect length of ‘x’ slotIndex i must be NULL or integerIndex j must be NULL or integerLU decomposition applies only to square matricesLapack dgecon(): system computationally singular, reciprocal condition number = %gLapack routine %s returned error code %dLapack routine dgetri: system is exactly singularLapack routine dgetrs: system is exactly singularLapack routine dposv returned error code %dLapack routine dsytrf returned error code %dLapack routine dtrcon returned error code %dLengths of super and pi must be equalLengths of super and px must be equalLower band %d > upper band %dMatrices are not conformable for multiplicationMatrix dimension %d x %d (= %g) is too largeMatrix exponential requires square, non-null matrixMatrix is not squareMatrix namespace not determined correctlyMatrix object has no ‘factors’ slotNegative value in DimNegative values in DimNon-symmetric matrix passed to dsCMatrix_to_dgTMatrixNonsymmetric matrix in Csparse_symmetric_to_generalNumber of supernodes must be positive when is_super is TRUEOnly ‘g’eneral sparse matrix types allowedSecond call to Lapack routine dgels returned error code %dSecond call to dgeqrf returned error code %dSolve requires a square matrixSuiteSparseQR_C_QR returned an error codeSupernodal LDL' decomposition not availableSupernodal/simplicial class inconsistent with type flagsSymmetric and triangular both setUnable to initialize cholmod: error code %dUnknown error in getGivensX must be a numeric (double precision) matrixX must be a real (numeric) matrixall column indices (slot ‘j’) must be between 0 and ncol-1 in a TsparseMatrixall column indices must be between 0 and ncol-1all row indices (slot ‘i’) must be between 0 and nrow-1 in a TsparseMatrixargument type[1]=‘%s’ must be a one-letter character stringargument type[1]=‘%s’ must be one of ‘1’,‘O’, or ‘I’argument type[1]=‘%s’ must be one of ‘M’,‘1’,‘O’,‘I’,‘F’ or ‘E’as_cholmod_triplet(): could not reallocate for internal diagU2N()cannot add diag() as long as ‘diag = "U"’cannot set diag() as long as ‘diag = "U"’chm_MOD_xtype() was not successful in Csparse_%s(), please reportchm_diagN2U(): nrow=%d, ncol=%dchm_diagN2U(x, uploT = %d): uploT should be +- 1chm_factor_name(): did not get string of length 11chm_sparse_to_SEXP(, *): invalid ‘Rkind’ (real kind code)chm_transpose_dense(ans, x) not yet implemented for %s different from %scholmod_change_factor failedcholmod_change_factor failed with status %dcholmod_drop() failedcholmod_factorize failed: status %d, minor %d from ncol %dcholmod_factorize_p failed: status %d, minor %d of ncol %dcholmod_sdmult error (resid)cholmod_sdmult error (rhs)cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %dcholmod_sort returned an error codecholmod_updown() returned %dcholmod_write_sparse returned error codecls = "%s" does not end in "CMatrix"cls = "%s" must begin with ‘d’, ‘l’ or ‘n’code for cholmod_dense with holes not yet writtencode not yet written for cls = "lgCMatrix"complex sparse matrix code not yet writtencs matrix not compatible with class ‘%s’cs_lu(A) failed: near-singular A (or out of memory)cs_lusol failedcs_qr failedcs_qrsol() failed inside dgCMatrix_qrsol()cs_sqr failedcsp_eye argument n must be positivedata length [%d] is not a sub-multiple or multiple of the number of columns [%d]data length [%d] is not a sub-multiple or multiple of the number of rows [%d]data length exceeds size of matrixddense_to_symmetric(): matrix is not square!dgCMatrix_cholsol requires a ‘short, wide’ rectangular matrixdgCMatrix_lusol requires a square, non-empty matrixdgCMatrix_matrix_solve(.., sparse=TRUE) not yet implementeddgCMatrix_qrsol(., order) needs order in {0,..,3}dgCMatrix_qrsol(<%d x %d>-matrix) requires a ‘tall’ rectangular matrixdgcMatrix_LU(*, keep_dimnames = NA): NA taken as TRUEdgcMatrix_QR(*, keep_dimnames = NA): NA taken as TRUEdgeMatrix_Schur: argument x must be a non-null square matrixdgeMatrix_Schur: dgees returned code %ddgeMatrix_Schur: first call to dgees faileddgeMatrix_exp: LAPACK routine dgebal returned %ddgeMatrix_exp: dgetrf returned error code %ddgeMatrix_exp: dgetrs returned error code %ddiag_tC(): invalid ‘resultKind’diagonal element %d of Cholesky factor is missingdiagonal to be added has wrong lengthdon't know if a dense pattern matrix makes sensedpoMatrix is not positive definitedtrMatrix must be squareerror [%d] from Lapack ‘dgecon()’exactly 1 of ‘i’, ‘j’ or ‘p’ must be NULLf->xtype of %d not recognizedfactors slot must be named listfailure in as_cholmod_factorfailure to open file "%s" for writingfirst element of slot p must be zeroi and j must be integer vectors of the same lengthin_place cholmod_sort returned an error codeincorrect left cyclic shift, j (%d) < 0incorrect left cyclic shift, j (%d) >= k (%d)incorrect left cyclic shift, k (%d) > ldx (%d)internal_chm_factor: Cholesky factorization failedinvalid ‘%s’ argumentinvalid ‘ncol’ value (< 0)invalid ‘ncol’ value (too large or NA)invalid ‘nrow’ value (< 0)invalid ‘nrow’ value (too large or NA)invalid class ‘%s’ to dup_mMatrix_as_dgeMatrixinvalid class ‘%s’ to dup_mMatrix_as_geMatrixinvalid class of ‘value’ in Csparse_subassign()invalid class of ‘x’ in Csparse_subassign()invalid class of ‘x’ in Matrix_as_cs(a, x)invalid class of object to %sinvalid class of object to as_cholmod_denseinvalid class of object to as_cholmod_factorinvalid class of object to as_cholmod_sparseinvalid class of object to as_cholmod_tripletinvalid class(x) ‘%s’ in R_to_CMatrix(x)invalid class(x) ‘%s’ in compressed_to_TMatrix(x)invalid column index at position %dinvalid object passed to as_cholmod_sparseinvalid row index at position %dlast element of slot p must match length of slots j and xlength of x slot != prod(Dim)length(Dimnames[%d]) differs from Dim[%d] which is %dlength(beta) must match ncol(V)length(p) must match nrow(V)length(q) must be zero or ncol(R)lengths of slots ‘i’ and ‘x’ must matchlengths of slots ‘j’ and ‘x’ must matchlengths of slots i and j must matchlengths of slots i and x must matchmatrix is not square! (skew-symmetric part)matrix is not square! (symmetric part)matrix is not symmetric [%d,%d]missing ‘Matrix’ namespace: should never happennegative vector lengths not allowed: np = %d, nnz = %dnon-numeric matrix extentnot a ‘n.CMatrix’np = %d, must be zero when p is NULLnumber of rows in y (%d) does not match number of rows in X (%d)nz2Csparse(): invalid/non-implemented r_kind = %dobject must be a named, numeric vectorp must be non-decreasingp[0] = %d, should be zeroprogramming error in Csparse_subassign() should never happenrcond requires a square, non-empty matrixreplacement diagonal has wrong lengthright=TRUE is not yet implemented __ FIXMEslot Dim must have length 2slot j is not *strictly* increasing inside a columnslot j is not increasing inside a columnslot p must be non-decreasingslot p must have length = nrow(.) + 1sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)strlen of cls argument = %d, should be 8subscript ‘i’ out of bounds in M[ij]subscript ‘j’ out of bounds in M[ij]system argument is not validthe leading minor of order %d is not positive definitethe number of columns differ in R_rbind2_vector: %d != %dtol, given as %g, must be <= 1tol, given as %g, must be non-negativetoo large matrix: %.0ftoo many elements specifiedunexpected ctype = %d in dup_mMatrix_as_geMatrixunknown ‘Rkind’unknown xtypeunknown xtype in cholmod_sparse objectunknown xtype in cholmod_triplet objectuplo=‘L’ must not have sparse entries above the diagonaluplo=‘U’ must not have sparse entries below the diagonalx slot is not "double"x slot is not of correct lengthx slot must be numeric "double"x[] <- val: val is coerced to logical for "%s" xx[] <- val: val should be integer or logical, is coerced to integer, for "%s" xy must be a numeric (double precision) matrixMatrix/inst/po/en@quot/LC_MESSAGES/R-Matrix.mo0000644000176200001440000006623313047321304020320 0ustar liggesusersL3|HIe639B_$z61/(,X-*#,;C#6D,3`Ky1#54P$9W(<Ve0$ 0.:_]IxB8&';cJ:(=/f5,#88V7,.A$TQy!D 4K ( $ % M =B!&!&!<!= "I"7"5##-Y#6#:#C#7=$(u$*$$T$ ;%*\%9%Z%&e<&/&"&"&1'$J'(o':'''I(8Y("((@(@)5V)6)) )**$* 3*T*o*$**2*'*"+18+3j+(+%+:+-(,@V,?,=,8-2N--H-2-9.,N.7{.0.E.H*/=s/5/1/0'30[0s000?001&/1V1$j11 1-1&1/ 2hP2n2.(3W3Bo3F3(3D"4Ag4&4G4e5v~5?5%56+[6)6@6"637*I7t7;7%77 8'888)X8!898>89A29t93999 90:BF:::0:4:'&;0N;;`;5;,4<7a<<O<>=ID=<=:=H>,O>7|>??>?;+@g@=@ @@(A#.A:RA9A3A0A5,B.bB'BB0BGC'JCrCBCPC0DOD_lDD5D' EHE<gE(E=E[ F,gFZFF0 G$UVUuUIU8U"V"8V@[V@V9V:W"RW$uWWWW WWX$$XIX6]X+X"X1X3Y(IY%rY:Y-Y@Z?BZ=Z8Z2Z,[HC[2[E[,\72\0j\I\L\A2]5t]5]]']"^:^L^k^?^^^&^_$1_V_ q_-_*_/_h`n`.`"aB:aJ}a(aDaA6b&xbGbeb~McCc%d/6d-fd@d&d3d*0e[e;{e%eeeff-?f%mf=fBfgA)gkg3ggg g0 hF=hhh0h4h/%i0Uii`i9j,?jCljjSj>$kIck<k:kH%l,nl1.}YymdB2M^_TcaJb`ZO~eR(%rH?x8)#NsC3Q$u9- @{|i;t0[ K:>Fhf&n6'Xj*lWk,SA\!G= U" q ]oz V+w/DLEP75<p4vIg%s %s is undefined%s kind not yet implemented'%s()' is not yet implemented for representation '%s''%s()' is not yet implemented for element type '%s''A' must be a square matrix'NA' indices are not (yet?) supported for sparse Matrices'V' is not a *square* matrix'V' is not a square matrix'boolArith = %d' not yet implemented'by' argument is much too small'diagonals' matrix must have %d columns (= length(k) )'diagonals' must have the same length (%d) as 'k''file' must be a character string or connection'force' must be (coercable to) TRUE or FALSE'lag' and 'differences' must be integers >= 1'lwd' must be NULL or non-negative numeric'ncol' is not a factor of length(x)'ncol' must be >= 0'nearPD()' did not converge in %d iterations'nrow' and 'ncol' must be the same when 'symmetric' is true'nrow' is not a factor of length(x)'nrow' must be >= 0'nrow', 'ncol', etc, are disregarded for matrix 'data''nrow', 'ncol', etc, are disregarded when 'data' is "Matrix" already'p' must be a non-decreasing vector (0, ...)'times >= 0' is required'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a "CHMfactor"'x' has invalid data type'x' is not positive definite -- chol() undefined.'x' is not symmetric nor triangular'x' must be "sparseMatrix"'x' must have length nrow^2 when 'symmetric' is true'x' must inherit from "sparseVector"(un)packing only applies to dense matrices, class(x)='%s'.M.repl.i.2col(): 'i' has no integer column number; should never happen; please report.M.repl.i.2col(): drop 'matrix' case ....M.sub.i.2col(): 'i' has no integer column number; should never happen; please report %s %s is undefined --> is not yet implemented[i] is not yet implemented --> is not yet implemented[ ] : .M.sub.i.logical() maybe inefficientBoth 'symmetric' and 'triangular', i.e. asking for diagonal matrix. Use 'Diagonal()' insteadCholesky() -> *symbolic* factorization -- not yet implementedCholesky(A) called for 'A' of class "%s"; it is currently defined for sparseMatrix only; consider using chol() insteadClass %s is not yet implementedCmp.Mat.atomic() should not be called for diagonalMatrixFIXME: NOT YET FINISHED IMPLEMENTATIONInternal bug: nargs()=%d; please reportInvalid assembled indicator: %sInvalid storage format: %sInvalid storage type: %sLU computationally singular: ratio of extreme entries in |diag(U)| = %9.4gLogic.Mat.atomic() should not be called for diagonalMatrixMatrices must have same dimensions in %sMatrices must have same number of columns in %sMatrices must have same number of rows for arithmeticMatrices must have same number of rows in %sMatrix seems negative semi-definiteMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMust specify 'nrow' when 'symmetric' is trueNA's in (i,j) are not allowedNAs are not allowed in subscripted assignmentsNot a valid formatOnly numeric sparse matrices allowedQuadratic matrix '%s' (=: A) is not formally symmetric. Will be treated as A A'RHS 'b' has wrong lengthRHS 'b' has wrong number of rows:RHS 'value' (class %s) matches 'ANY', but must match matrix class %s[ ] indexing not allowed: forgot a "," ?[[ suppressing %d column names %s ... ]][[ suppressing %d column names %s ]]all() is not yet implementedas(.,"dsCMatrix") is deprecated (since 2008); do use as(., "symmetricMatrix")c(,..) of different kinds, coercing all to 'rleDiff'cannot coerce 'NA's to "nsparseMatrix"cannot coerce 'NA's to "nsparseVector"cannot coerce non-symmetric "dgTMatrix" to "dsCMatrix" classchol() is undefined for diagonal matrix with negative entriescoercion from list(i1,...,ik, d) to "indMatrix" failed. All entries must be integer valued and the number of columns, d, not smaller than the maximal index i*.coercion to "indMatrix" only works from integer numericcoercion to "pMatrix" only works from integer numericcolumn indices must be <= ncol(.) which is %dcomplex matrices not yet implemented in Matrix packagediag(.) had 0 or NA entries; non-finite result is doubtfuldiagonalMatrix in .dense2C() -- should never happen, please report!dim [product %d] do not match the length of object [%d]dim(.) value must be numeric of length 2dimensions don't match the number of cellsdimnames [%d] mismatch in %sdimnames(.) <- NULL: translated to dimnames(.) <- list(NULL,NULL) <==> unname(.)element type '%s' not recognizedelement type 'complex' not yet implementedexactly one of 'i', 'j', or 'p' must be missing from callextra argument %s will be disregarded in %sextra arguments %s will be disregarded in %sfile is not a MatrixMarket filefor symmetric band matrix, only specify upper or lower triangle hence, all k must have the same signgeneral Matrix class not yet implemented for %shit a cycle (1) -- stop iterationshit a cycle (2) -- stop iterationsi1[1] == 0 ==> C-level verbosity will not happen!in Summary(, .): %s(<%s>, <%s>)in Summary(, .): %s(<%s>, <%s>,...)in show(); maybe adjust 'options(max.print= *, width = *)'incompatible matrix dimensionsindex larger than maximal %dindex must be numeric, logical or sparseVector for indexing sparseVectorsinefficient coercion (lost triangularity); please reportinefficient method used for "- e1"intermediate 'r' is of type %sinternal bug in "Compare" method (Cmp.Mat.atomic); please reportinternal bug in "Logic" method (Logic.Mat.atomic); please reportinternal bug: matrix 'i' in replTmat(): please reportinternal bug: missing 'i' in replTmat(): please reportinvalid 'col.names' string: %sinvalid 'contrasts.arg' argumentinvalid 'data'invalid 'mod': %sinvalid 'type'invalid (to - from)/by in seq(.)invalid character indexinginvalid class: %sinvalid dimnames given for %s objectinvalid nargs()= %dinvalid or not-yet-implemented 'Matrix' subsettingkronecker method must use default 'FUN'length must be non-negative numberlength of 1st arg does not match dimension of 2ndlength of 2nd arg does not match dimension of firstlength(i) is not a multiple of length(x)length(x) must be either 1 or #{cols}logic programming error in printSpMatrix2(), please reportlogical subscript too long (%d, should be %d)longer object length is not a multiple of shorter object lengthlonger object length is not a multiple of shorter object lengthm[ ] <- v: inefficiently treating single elementsm[ ]: inefficiently indexing single elementsmatrix can only be symmetric if square, but n != mmatrix is not diagonalmatrix with non-zero off-diagonals cannot be coerced to "diagonalMatrix"model frame and formula mismatch in model.matrix()must either specify 'A' or the functions 'A.x' and 'At.x'must have exactly one non-zero entry per rownames(dimnames()) must be NULL or of length twonargs() = %d should never happen; please report.nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?negative values are not allowed in a matrix subscriptno 'dimnames[[.]]': cannot use character indexingnon-conformable argumentsnon-conformable matrix dimensions in %snon-matching dimensionsnon-square matrixnot a positive definite matrixnot a square matrixnot a symmetric matrix; consider forceSymmetric() or symmpart()not a triangular matrixnot converged in %d iterationsnot enough new vecs -- stop iterationsnot yet implementednot yet implemented .. please reportnot yet implemented for %snot yet implemented for class %snot yet implemented for matrix with typeof %snot-yet-implemented 'Matrix[<-' methodnot-yet-implemented coercion to "TsparseMatrix"not-yet-implemented method for %s(<%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for %s(<%s>, <%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for <%s> %%*%% <%s>nothing to replace withnumber of items to replace is not a multiple of replacement lengthnumber of non zeros is smaller than 'nnz' because of duplicated (i,j)snumber of rows are not compatible for %sonly 2-dimensional tables can be directly coerced to sparse matricesonly square matrices can be used as incidence matrices for graphsprod() is not yet implementedprogramming error: min() should have dispatched w/ 1st arg much earlierqr.R() may differ from qr.R() because of permutations. Possibly use our qrR() insteadrankMatrix(, method = '%s') coerces to dense matrix. Probably should rather use method = 'qr' !?rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)rcond(.) via sparse -> dense coercionreadMM(): column values 'j' are not in 1:ncreadMM(): row values 'i' are not in 1:nrreplacing "indMatrix" entries is not allowed, as rarely sensiblerepresentation '%s' not recognizedresulting x-slot has different type than x's or y'srow indices must be <= nrow(.) which is %dsome arguments are not matricessuch indexing must be by logical or 2-column numeric matrixsum() is not yet implementedsuppressing columnssuppressing columns and rowssuppressing rowssymmetric matrix must be squaresymmetry form '%s' is not yet implementedsymmetry form '%s' not recognizedsymmetry form 'hermitian' not yet implemented for readingsymmetry form 'skew-symmetric' not yet implemented for readingtemporarily disabledthe %d-th (sub)-diagonal (k = %d) is too short; filling with NA'sthe matrix is not triangularthe number of non-zero entries differs from nrow(.)too many argumentstoo many replacement valuestriangular matrix must be squaretriangular matrix must have all i >= j or i <= jtrimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)type '%s' not recognizedundefined method for class %suniDiag=TRUE, but not all diagonal entries are 1uniDiag=TRUE, not all entries in diagonal coded as 1update must be TRUE/FALSE or '+' or '-'using "old code" part in Csparse subassignmentusing slow kronecker() methodusing"old code" part in Csparse subassignment >>> please report to Matrix-authors@r-project.orgvariable '%s' is absent, its contrast will be ignoredvector too long in Matrix - vector operationwhen 'A' is specified, 'A.x' and 'At.x' are disregardedwrong sign in 'by' argumentx / 0 for an x with sign-change no longer representable as 'rleDiff'x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrixx[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE.you cannot mix negative and positive indicesProject-Id-Version: Matrix 1.2-9 POT-Creation-Date: 2017-02-10 12:21 PO-Revision-Date: 2017-02-10 12:21 Last-Translator: Automatically generated Language-Team: none MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Language: en Plural-Forms: nplurals=2; plural=(n != 1); %s %s is undefined%s kind not yet implemented‘%s()’ is not yet implemented for representation ‘%s’‘%s()’ is not yet implemented for element type ‘%s’‘A’ must be a square matrix‘NA’ indices are not (yet?) supported for sparse Matrices‘V’ is not a *square* matrix‘V’ is not a square matrix‘boolArith = %d’ not yet implemented‘by’ argument is much too small‘diagonals’ matrix must have %d columns (= length(k) )‘diagonals’ must have the same length (%d) as ‘k’‘file’ must be a character string or connection‘force’ must be (coercable to) TRUE or FALSE‘lag’ and ‘differences’ must be integers >= 1‘lwd’ must be NULL or non-negative numeric‘ncol’ is not a factor of length(x)‘ncol’ must be >= 0‘nearPD()’ did not converge in %d iterations‘nrow’ and ‘ncol’ must be the same when ‘symmetric’ is true‘nrow’ is not a factor of length(x)‘nrow’ must be >= 0‘nrow’, ‘ncol’, etc, are disregarded for matrix ‘data’‘nrow’, ‘ncol’, etc, are disregarded when ‘data’ is "Matrix" already‘p’ must be a non-decreasing vector (0, ...)‘times >= 0’ is required‘update’ must be logical or ‘+’ or ‘-’; ‘C’ a matrix, and ‘L’ a "CHMfactor"‘x’ has invalid data type‘x’ is not positive definite -- chol() undefined.‘x’ is not symmetric nor triangular‘x’ must be "sparseMatrix"‘x’ must have length nrow^2 when ‘symmetric’ is true‘x’ must inherit from "sparseVector"(un)packing only applies to dense matrices, class(x)=‘%s’.M.repl.i.2col(): ‘i’ has no integer column number; should never happen; please report.M.repl.i.2col(): drop ‘matrix’ case ....M.sub.i.2col(): ‘i’ has no integer column number; should never happen; please report %s %s is undefined --> is not yet implemented[i] is not yet implemented --> is not yet implemented[ ] : .M.sub.i.logical() maybe inefficientBoth ‘symmetric’ and ‘triangular’, i.e. asking for diagonal matrix. Use ‘Diagonal()’ insteadCholesky() -> *symbolic* factorization -- not yet implementedCholesky(A) called for ‘A’ of class "%s"; it is currently defined for sparseMatrix only; consider using chol() insteadClass %s is not yet implementedCmp.Mat.atomic() should not be called for diagonalMatrixFIXME: NOT YET FINISHED IMPLEMENTATIONInternal bug: nargs()=%d; please reportInvalid assembled indicator: %sInvalid storage format: %sInvalid storage type: %sLU computationally singular: ratio of extreme entries in |diag(U)| = %9.4gLogic.Mat.atomic() should not be called for diagonalMatrixMatrices must have same dimensions in %sMatrices must have same number of columns in %sMatrices must have same number of rows for arithmeticMatrices must have same number of rows in %sMatrix seems negative semi-definiteMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMust specify ‘nrow’ when ‘symmetric’ is trueNA's in (i,j) are not allowedNAs are not allowed in subscripted assignmentsNot a valid formatOnly numeric sparse matrices allowedQuadratic matrix ‘%s’ (=: A) is not formally symmetric. Will be treated as A A'RHS ‘b’ has wrong lengthRHS ‘b’ has wrong number of rows:RHS ‘value’ (class %s) matches ‘ANY’, but must match matrix class %s[ ] indexing not allowed: forgot a "," ?[[ suppressing %d column names %s ... ]][[ suppressing %d column names %s ]]all() is not yet implementedas(.,"dsCMatrix") is deprecated (since 2008); do use as(., "symmetricMatrix")c(,..) of different kinds, coercing all to ‘rleDiff’cannot coerce ‘NA’s to "nsparseMatrix"cannot coerce ‘NA’s to "nsparseVector"cannot coerce non-symmetric "dgTMatrix" to "dsCMatrix" classchol() is undefined for diagonal matrix with negative entriescoercion from list(i1,...,ik, d) to "indMatrix" failed. All entries must be integer valued and the number of columns, d, not smaller than the maximal index i*.coercion to "indMatrix" only works from integer numericcoercion to "pMatrix" only works from integer numericcolumn indices must be <= ncol(.) which is %dcomplex matrices not yet implemented in Matrix packagediag(.) had 0 or NA entries; non-finite result is doubtfuldiagonalMatrix in .dense2C() -- should never happen, please report!dim [product %d] do not match the length of object [%d]dim(.) value must be numeric of length 2dimensions don't match the number of cellsdimnames [%d] mismatch in %sdimnames(.) <- NULL: translated to dimnames(.) <- list(NULL,NULL) <==> unname(.)element type ‘%s’ not recognizedelement type ‘complex’ not yet implementedexactly one of ‘i’, ‘j’, or ‘p’ must be missing from callextra argument %s will be disregarded in %sextra arguments %s will be disregarded in %sfile is not a MatrixMarket filefor symmetric band matrix, only specify upper or lower triangle hence, all k must have the same signgeneral Matrix class not yet implemented for %shit a cycle (1) -- stop iterationshit a cycle (2) -- stop iterationsi1[1] == 0 ==> C-level verbosity will not happen!in Summary(, .): %s(<%s>, <%s>)in Summary(, .): %s(<%s>, <%s>,...)in show(); maybe adjust ‘options(max.print= *, width = *)’incompatible matrix dimensionsindex larger than maximal %dindex must be numeric, logical or sparseVector for indexing sparseVectorsinefficient coercion (lost triangularity); please reportinefficient method used for "- e1"intermediate ‘r’ is of type %sinternal bug in "Compare" method (Cmp.Mat.atomic); please reportinternal bug in "Logic" method (Logic.Mat.atomic); please reportinternal bug: matrix ‘i’ in replTmat(): please reportinternal bug: missing ‘i’ in replTmat(): please reportinvalid ‘col.names’ string: %sinvalid ‘contrasts.arg’ argumentinvalid ‘data’invalid ‘mod’: %sinvalid ‘type’invalid (to - from)/by in seq(.)invalid character indexinginvalid class: %sinvalid dimnames given for %s objectinvalid nargs()= %dinvalid or not-yet-implemented ‘Matrix’ subsettingkronecker method must use default ‘FUN’length must be non-negative numberlength of 1st arg does not match dimension of 2ndlength of 2nd arg does not match dimension of firstlength(i) is not a multiple of length(x)length(x) must be either 1 or #{cols}logic programming error in printSpMatrix2(), please reportlogical subscript too long (%d, should be %d)longer object length is not a multiple of shorter object lengthlonger object length is not a multiple of shorter object lengthm[ ] <- v: inefficiently treating single elementsm[ ]: inefficiently indexing single elementsmatrix can only be symmetric if square, but n != mmatrix is not diagonalmatrix with non-zero off-diagonals cannot be coerced to "diagonalMatrix"model frame and formula mismatch in model.matrix()must either specify ‘A’ or the functions ‘A.x’ and ‘At.x’must have exactly one non-zero entry per rownames(dimnames()) must be NULL or of length twonargs() = %d should never happen; please report.nargs() = %d. Extraneous illegal arguments inside ‘[ .. ]’ (i.2col)?nargs() = %d. Extraneous illegal arguments inside ‘[ .. ]’ (i.logical)?nargs() = %d. Extraneous illegal arguments inside ‘[ .. ]’ ?negative values are not allowed in a matrix subscriptno ‘dimnames[[.]]’: cannot use character indexingnon-conformable argumentsnon-conformable matrix dimensions in %snon-matching dimensionsnon-square matrixnot a positive definite matrixnot a square matrixnot a symmetric matrix; consider forceSymmetric() or symmpart()not a triangular matrixnot converged in %d iterationsnot enough new vecs -- stop iterationsnot yet implementednot yet implemented .. please reportnot yet implemented for %snot yet implemented for class %snot yet implemented for matrix with typeof %snot-yet-implemented ‘Matrix[<-’ methodnot-yet-implemented coercion to "TsparseMatrix"not-yet-implemented method for %s(<%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for %s(<%s>, <%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for <%s> %%*%% <%s>nothing to replace withnumber of items to replace is not a multiple of replacement lengthnumber of non zeros is smaller than ‘nnz’ because of duplicated (i,j)snumber of rows are not compatible for %sonly 2-dimensional tables can be directly coerced to sparse matricesonly square matrices can be used as incidence matrices for graphsprod() is not yet implementedprogramming error: min() should have dispatched w/ 1st arg much earlierqr.R() may differ from qr.R() because of permutations. Possibly use our qrR() insteadrankMatrix(, method = ‘%s’) coerces to dense matrix. Probably should rather use method = ‘qr’ !?rankMatrix(x, method=‘qr’): computing t(x) as nrow(x) < ncol(x)rcond(.) via sparse -> dense coercionreadMM(): column values ‘j’ are not in 1:ncreadMM(): row values ‘i’ are not in 1:nrreplacing "indMatrix" entries is not allowed, as rarely sensiblerepresentation ‘%s’ not recognizedresulting x-slot has different type than x's or y'srow indices must be <= nrow(.) which is %dsome arguments are not matricessuch indexing must be by logical or 2-column numeric matrixsum() is not yet implementedsuppressing columnssuppressing columns and rowssuppressing rowssymmetric matrix must be squaresymmetry form ‘%s’ is not yet implementedsymmetry form ‘%s’ not recognizedsymmetry form ‘hermitian’ not yet implemented for readingsymmetry form ‘skew-symmetric’ not yet implemented for readingtemporarily disabledthe %d-th (sub)-diagonal (k = %d) is too short; filling with NA'sthe matrix is not triangularthe number of non-zero entries differs from nrow(.)too many argumentstoo many replacement valuestriangular matrix must be squaretriangular matrix must have all i >= j or i <= jtrimmed mean of ‘sparseVector’ -- suboptimally using as.numeric(.)type ‘%s’ not recognizedundefined method for class %suniDiag=TRUE, but not all diagonal entries are 1uniDiag=TRUE, not all entries in diagonal coded as 1update must be TRUE/FALSE or ‘+’ or ‘-’using "old code" part in Csparse subassignmentusing slow kronecker() methodusing"old code" part in Csparse subassignment >>> please report to Matrix-authors@r-project.orgvariable ‘%s’ is absent, its contrast will be ignoredvector too long in Matrix - vector operationwhen ‘A’ is specified, ‘A.x’ and ‘At.x’ are disregardedwrong sign in ‘by’ argumentx / 0 for an x with sign-change no longer representable as ‘rleDiff’x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrixx[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE.you cannot mix negative and positive indicesMatrix/inst/po/ko/0000755000176200001440000000000013203323315013515 5ustar liggesusersMatrix/inst/po/ko/LC_MESSAGES/0000755000176200001440000000000013203323315015302 5ustar liggesusersMatrix/inst/po/ko/LC_MESSAGES/R-Matrix.mo0000644000176200001440000010121313047321304017302 0ustar liggesusers% @A]6y39:Wr61/,+-X*#,;#Rv6D,3KL1#4#$X9}W(V80$0:2Imx08P&'J,:w(/5 ,A#n887,<i.$Q@!YD{4($%CMi=&& <C = 7`!5!-!6!:3"Cn"7"("*#>#T[# #*#9#Z6$$e$/%"G%"j%1%$%(% &,&II&8&"&&@'@O'5'6'' (=(L(^( m((($((2('')"O)1r)3)()%*:'*-b*@*?*=+8O++H+2+9,,U,7,0,E,H1-=z-5-1- .':.b.z...?../&6/]/$q// /-/&0/'0hW0n0./1^1Bv1F1(2D)2An2&2G2e3?3%3+3)4@A4"4*44;4%,5R5)r5!595>576AL663666B7Q7j7'7077`75`8,8788O9>g9I9<9:-:Hh:,:a:/@<.p<[<_<@[=O=3=3 >4T>[>?>`%?X?W?E7@@}@.@E@_3A@A-AUBdXBXB&C=CBCeDI{D3D\DEVE9EE(FF3G@G4H@RHeHZHTI4JJ;JBJCJ KH-KAvKJKCLbGLTLLTM=MNsNOUO1OM P)nPSPPNpQ\QRbR2S.:S6iS~SMTGmTETlTVhUUV?WJW|X|Xk YNwYNY;Z?QZpZC[\F[U[R[FL\\Ui]<]<]X9^$^(^7^!_:_|_E:```|&aoawb5b4b.b/%c$UcGzc0c7c=+d0id]d]dAVefefe1ff=ffbsggg[>h=h8hiq/ipi?jbRjJjkkTlkWkOlUilElmKm7km&m4m,m,n0n3n&o$AoCfo7o>o`!pBpWpqqYr;re'sjs8sl1t|t7uGSuuO4v%vCv@vW/w?wSw(xDx6xN,yX{yDy_zdyz+zG {R{=p{2{?{B!|5d|4|H|0}EI}~}]~el~R~C%OiU+IA8e`t}f~AWTw|$/RN2i(?McB@: .xqo zZV',v;%&dnblSO#\Yu] + _I0G)9DrC-PgF"EhpsU! a[^<Hj63y5mL{kXQ4=*1>J7K%s %s is undefined%s kind not yet implemented'%s()' is not yet implemented for representation '%s''%s()' is not yet implemented for element type '%s''A' must be a square matrix'NA' indices are not (yet?) supported for sparse Matrices'V' is not a *square* matrix'V' is not a square matrix'by' argument is much too small'diagonals' matrix must have %d columns (= length(k) )'diagonals' must have the same length (%d) as 'k''file' must be a character string or connection'force' must be (coercable to) TRUE or FALSE'lag' and 'differences' must be integers >= 1'lwd' must be NULL or non-negative numeric'ncol' is not a factor of length(x)'ncol' must be >= 0'nearPD()' did not converge in %d iterations'nrow' and 'ncol' must be the same when 'symmetric' is true'nrow' is not a factor of length(x)'nrow' must be >= 0'nrow', 'ncol', etc, are disregarded for matrix 'data''nrow', 'ncol', etc, are disregarded when 'data' is "Matrix" already'p' must be a non-decreasing vector (0, ...)'times >= 0' is required'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a "CHMfactor"'x' has invalid data type'x' is not positive definite -- chol() undefined.'x' is not symmetric nor triangular'x' must be "sparseMatrix"'x' must have length nrow^2 when 'symmetric' is true'x' must inherit from "sparseVector"(un)packing only applies to dense matrices, class(x)='%s'.M.repl.i.2col(): 'i' has no integer column number; should never happen; please report.M.repl.i.2col(): drop 'matrix' case ....M.sub.i.2col(): 'i' has no integer column number; should never happen; please report %s %s is undefined --> is not yet implemented[i] is not yet implemented --> is not yet implemented[ ] : .M.sub.i.logical() maybe inefficientCholesky() -> *symbolic* factorization -- not yet implementedCholesky(A) called for 'A' of class "%s"; it is currently defined for sparseMatrix only; consider using chol() insteadClass %s is not yet implementedCmp.Mat.atomic() should not be called for diagonalMatrixFIXME: NOT YET FINISHED IMPLEMENTATIONInternal bug: nargs()=%d; please reportInvalid assembled indicator: %sInvalid storage format: %sInvalid storage type: %sLU computationally singular: ratio of extreme entries in |diag(U)| = %9.4gLogic.Mat.atomic() should not be called for diagonalMatrixMatrices must have same dimensions in %sMatrices must have same number of columns in %sMatrices must have same number of rows for arithmeticMatrices must have same number of rows in %sMatrix seems negative semi-definiteMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMust specify 'nrow' when 'symmetric' is trueNA's in (i,j) are not allowedNAs are not allowed in subscripted assignmentsNot a valid formatOnly numeric sparse matrices allowedQuadratic matrix '%s' (=: A) is not formally symmetric. Will be treated as A A'RHS 'b' has wrong lengthRHS 'b' has wrong number of rows:RHS 'value' (class %s) matches 'ANY', but must match matrix class %s[ ] indexing not allowed: forgot a "," ?[[ suppressing %d column names %s ... ]][[ suppressing %d column names %s ]]all() is not yet implementedas(.,"dsCMatrix") is deprecated (since 2008); do use as(., "symmetricMatrix")c(,..) of different kinds, coercing all to 'rleDiff'cannot coerce 'NA's to "nsparseMatrix"cannot coerce 'NA's to "nsparseVector"cannot coerce non-symmetric "dgTMatrix" to "dsCMatrix" classchol() is undefined for diagonal matrix with negative entriescoercion from list(i1,...,ik, d) to "indMatrix" failed. All entries must be integer valued and the number of columns, d, not smaller than the maximal index i*.coercion to "indMatrix" only works from integer numericcoercion to "pMatrix" only works from integer numericcolumn indices must be <= ncol(.) which is %dcomplex matrices not yet implemented in Matrix packagediag(.) had 0 or NA entries; non-finite result is doubtfuldiagonalMatrix in .dense2C() -- should never happen, please report!dim [product %d] do not match the length of object [%d]dim(.) value must be numeric of length 2dimensions don't match the number of cellsdimnames [%d] mismatch in %sdimnames(.) <- NULL: translated to dimnames(.) <- list(NULL,NULL) <==> unname(.)element type '%s' not recognizedelement type 'complex' not yet implementedexactly one of 'i', 'j', or 'p' must be missing from callextra argument %s will be disregarded in %sextra arguments %s will be disregarded in %sfile is not a MatrixMarket filefor symmetric band matrix, only specify upper or lower triangle hence, all k must have the same signgeneral Matrix class not yet implemented for %shit a cycle (1) -- stop iterationshit a cycle (2) -- stop iterationsi1[1] == 0 ==> C-level verbosity will not happen!in Summary(, .): %s(<%s>, <%s>)in Summary(, .): %s(<%s>, <%s>,...)incompatible matrix dimensionsindex larger than maximal %dindex must be numeric, logical or sparseVector for indexing sparseVectorsinefficient coercion (lost triangularity); please reportinefficient method used for "- e1"intermediate 'r' is of type %sinternal bug in "Compare" method (Cmp.Mat.atomic); please reportinternal bug in "Logic" method (Logic.Mat.atomic); please reportinternal bug: matrix 'i' in replTmat(): please reportinternal bug: missing 'i' in replTmat(): please reportinvalid 'col.names' string: %sinvalid 'contrasts.arg' argumentinvalid 'data'invalid 'mod': %sinvalid 'type'invalid (to - from)/by in seq(.)invalid character indexinginvalid class: %sinvalid dimnames given for %s objectinvalid nargs()= %dinvalid or not-yet-implemented 'Matrix' subsettingkronecker method must use default 'FUN'length must be non-negative numberlength of 1st arg does not match dimension of 2ndlength of 2nd arg does not match dimension of firstlength(i) is not a multiple of length(x)length(x) must be either 1 or #{cols}logic programming error in printSpMatrix2(), please reportlogical subscript too long (%d, should be %d)longer object length is not a multiple of shorter object lengthlonger object length is not a multiple of shorter object lengthm[ ] <- v: inefficiently treating single elementsm[ ]: inefficiently indexing single elementsmatrix is not diagonalmatrix with non-zero off-diagonals cannot be coerced to "diagonalMatrix"model frame and formula mismatch in model.matrix()must either specify 'A' or the functions 'A.x' and 'At.x'must have exactly one non-zero entry per rownames(dimnames()) must be NULL or of length twonargs() = %d should never happen; please report.nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?negative values are not allowed in a matrix subscriptno 'dimnames[[.]]': cannot use character indexingnon-conformable argumentsnon-conformable matrix dimensions in %snon-matching dimensionsnon-square matrixnot a positive definite matrixnot a square matrixnot a symmetric matrix; consider forceSymmetric() or symmpart()not a triangular matrixnot converged in %d iterationsnot enough new vecs -- stop iterationsnot yet implementednot yet implemented .. please reportnot yet implemented for %snot yet implemented for class %snot yet implemented for matrix with typeof %snot-yet-implemented 'Matrix[<-' methodnot-yet-implemented coercion to "TsparseMatrix"not-yet-implemented method for %s(<%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for %s(<%s>, <%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for <%s> %%*%% <%s>nothing to replace withnumber of items to replace is not a multiple of replacement lengthnumber of non zeros is smaller than 'nnz' because of duplicated (i,j)snumber of rows are not compatible for %sonly 2-dimensional tables can be directly coerced to sparse matricesonly square matrices can be used as incidence matrices for graphsprod() is not yet implementedprogramming error: min() should have dispatched w/ 1st arg much earlierqr.R() may differ from qr.R() because of permutations. Possibly use our qrR() insteadrankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)rcond(.) via sparse -> dense coercionreadMM(): column values 'j' are not in 1:ncreadMM(): row values 'i' are not in 1:nrreplacing "indMatrix" entries is not allowed, as rarely sensiblerepresentation '%s' not recognizedrow indices must be <= nrow(.) which is %dsome arguments are not matricessuch indexing must be by logical or 2-column numeric matrixsum() is not yet implementedsymmetric matrix must be squaresymmetry form '%s' is not yet implementedsymmetry form '%s' not recognizedsymmetry form 'hermitian' not yet implemented for readingsymmetry form 'skew-symmetric' not yet implemented for readingtemporarily disabledthe %d-th (sub)-diagonal (k = %d) is too short; filling with NA'sthe matrix is not triangularthe number of non-zero entries differs from nrow(.)too many argumentstoo many replacement valuestrimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)type '%s' not recognizedundefined method for class %supdate must be TRUE/FALSE or '+' or '-'using "old code" part in Csparse subassignmentusing slow kronecker() methodusing"old code" part in Csparse subassignment >>> please report to Matrix-authors@r-project.orgvariable '%s' is absent, its contrast will be ignoredvector too long in Matrix - vector operationwhen 'A' is specified, 'A.x' and 'At.x' are disregardedwrong sign in 'by' argumentx / 0 for an x with sign-change no longer representable as 'rleDiff'x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrixx[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE.you cannot mix negative and positive indicesProject-Id-Version: Matrix 1.1-3 POT-Creation-Date: 2017-02-10 12:21 PO-Revision-Date: 2015-07-15 17:14-0600 Last-Translator:Chel Hee Lee Language-Team: Chel Hee Lee Language: ko MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; %s %s 은 정의되지 않았습니다.아직 구현되지 않은 종류 %s입니다.표현(representation)이 '%2$s'의 경우에 아직 구현되지 않은 '%1$s()'입니다.원소유형(element type)이 '%2$s'의 경우에 아직 구현되지 않은 '%1$s()'입니다.'A'는 반드시 정방행렬(square matrix)이어야 합니다.'NA'는 sparse Matrices에 (아직은?) 사용할 수 없는 인덱스입니다'V'는 정방행렬(square matrix)이 아닙니다.'V'는 정방행렬(square matrix)이 아닙니다.'by' 인자에 사용된 값이 너무 작습니다.'diagonals' 행렬은 반드시 %d (=length(k))개의 열을 가지고 있어야 합니다.'diagnoals'의 길이는 반드시 'k'(=%d)이어야 합니다.'file'은 반드시 문자열(character string) 또는 커넥션(connection)이어야 합니다.'force'는 반드시 (강제변환될 수 있는) TRUE 또는 FALSE 이어야 합니다.'lag'과 'differences'는 반드시 1보다 크거나 같은 정수이어야 합니다.'lwd'는 반드시 NULL 또는 음이 아닌 수 이어야 합니다.'ncol'는 길이가 length(x)인 요인(factor)가 아닙니다.'ncol'은 반드시 >= 0 이어야 합니다. 'nearPD()'는 %d 번째 반복에서도 수렴하지 않았습니다.'symmetric'이 참인 경우에는 반드시 'nrow'와 'ncol'을 지정해 주어야 합니다.'nrow'는 길이가 length(x)인 요인(factor)가 아닙니다.'nrow'는 반드시 >= 0 이어야 합니다.행렬 'data'인 경우에 입력된 'nrow', 'ncol' 등은 사용되지 않습니다.'data'가 이미 "Matrix"인 경우에는 입력된 'nrow', 'ncol' 등은 사용되지 않습니다.'p'는 반드시 감소하지 않는(non-decreasing) 벡터 (0, ...)이어야 합니다.'times >= 0'이 요구되어집니다.'update'는 반드시 논리형(logical) 또는 '+' 또는 '-'이어야 하며, 'C'는 행렬이어야 하고 'L'은 "CHMfactor"이어야 합니다.'x'의 데이터형(data type)은 사용가능하지 않습니다.'x'는 양정치(positive definite) 행렬이 아니므로 chol()가 정의되어지지 않습니다.'x'는 대칭(symmetric)도 아니고 삼각(triangular)도 아닙니다.'x'는 반드시 "sparseMatrix"이어야 합니다.'symmetric'이 참인 경우에는 'x'의 길이는 반드시 nrow^2와 같아야 합니다.'x'는 "sparseVector"로부터의 상속(inherit)이어야 합니다.(un)packing only applies to dense matrices, class(x)='%s'.M.repl.i.2col(): 'i'는 정수형 행번호(integer column number)을 가지고 있지 않습니다. 이런 경우는 존재할 수 없으므로 패키지 관리자에게 보고해 주시길 부탁드립니다..M.repl.i.2col(): drop 'matrix' case ....M.sub.i.2col(): 'i'는 정수형 행번호(integer column number)를 가지고 있지 않습니다. 이런 경우는 존재할 수 없으므로 패키지 관리자에게 보고해 주시길 부탁드립니다. %1$s %2$s는 정의되지 않았습니다. --> 은 아직 구현되지 않았습니다.[i]는 아직 구현되지 않았습니다. --> 은 아직 구현되지 않았습니다.[ ] : .M.sub.i.logical()의 사용은 비효율적(inefficient) 일 수 있습니다.Cholesky() -> *symbolic* factorization -- 아직 구현되지 않았습니다.Cholesky(A)는 클래스 "%s"를 가지는 'A'를 호출합니다. 이것은 현재 sparseMatrix 만을 위하여 정의되었으므로 chol()을 사용하시길 바랍니다.클래스 %s는 아직 구현되지 않았습니다.Cmp.Mat.atomic()은 digonalMatrix에 의하여 호출될 수 없습니다.FIXME: 완전한 구현이 아직 이루어지지 않았습니다.내부버그 발견: nargs()=%d. 꼭 보고를 부탁드립니다.Invalid assembled indicator: %s%s는 사용할 수 있는 저장형식(storage format)이 아닙니다.%s는 사용할 수 없는 저장형식(storage format)입니다.LU computationally singular: ratio of extreme entries in |diag(U)| = %9.4gLogic.Mat.atomic()은 diagonalMatrix에 호출될 수 없습니다.%s에 입력된 행렬들은 반드시 같은 차원(dimensions)을 가지고 있어야 합니다.%s에 사용된 각 행렬이 가지는 열의 개수는 서로 같아야 합니다.원소단위의 연산을 수행하기 위해서는 입력된 각 행렬이 가지는 열의 개수가 서로 같아야 합니다.%s에 사용된 각 행렬이 가지는 행의 개수는 서로 같아야 합니다.음의 반정치(negative semi-definite) 행렬 같습니다.[i,,d]에서 Matrix-내부오류(internal error)가 발생한 경우입니다. 이를 보고해 주시길 부탁드립니다.[i,,d] 내에서 행렬과 관련한 내부에러가 발생했습니다; 꼭 보고를 부탁드립니다[i,,d]를 사용중 행렬-내부 오류(matrix-internal error)가 발생했습니다. 이를 꼭 보고 부탁드립니다.'symmetric'이 참인 경우에는 반드시 'nrow'를 지정해 주어야 합니다.(i,j) 위치에 NA는 사용될 수 없습니다.NA는 행렬의 첨자(subscripted assignment)로 사용할 수 없습니다.올바른 형식(format)이 아닙니다.오로지 수치형 희소행렬(sparse matrices)만을 사용할 수 있습니다.이차행렬(quadratic matrix) '%s' (=: A)는 형식적으로 대칭(symmetric)이 아닙니다. A A'와 같이 다루겠나요?우변의 'b'가 올바르지 않은 길이(length)를 가지고 있습니다.우변의 'b'는 다음과 같은 올바르지 않은 행의 수를 가지고 있습니다: 클래스 %s를 가지는 우변의 'value'는 'ANY'에 매치되지만, 반드시 행렬의 클래스 %s에 매치되어야 합니다.[ ]와 같은 인덱싱은 사용할 수 없습니다. ","의 사용을 잊었나요?[[ %d개의 열이름 %s ...를 제거합니다 ]][[ %d개의 열이름 %s를 제거합니다 ]]all()는 아직 구현되지 않았습니다.as(.,"dsCMatrix")은 2008년 이후로 지원되지 않으므로 as(., "symmetricMatrix")를 이용해 주시길 바랍니다.c(,..) of different kinds, 모두 'rleDiff'로 강제변환합니다'NA'를 "nsparseMatrix"으로 강제변환(coerce)할 수 없습니다.'NA'를 "nsparseVector"로 강제변환(coerce) 할 수 없습니다.비대칭(non-symmetric) "dgTMatrix"는 "dsCMatrix" 클래스로 강제변환(coerce) 할 수 없습니다. chol()은 음의 값을 가진 대각행렬에 대하여 정의되지 않았습니다.list(i1,...,ik, d)으로부터 "indMatrix"로의 강제변환(coercion)은 이루어지지 않았습니다. 모든 원소들은 반드시 정수이어야 하며 행의 개수 d는 인덱스 i* 중 가장 큰 수보다 보다 작지 않아야 합니다."indMatrix"로의 강제변환(coercion)은 오로지 정수를 가지는 숫자(integer numeric)인 경우만 가능합니다."pMatrix"로의 강제변환(coercion)은 오로지 정수값을 가진 숫자(integer numeric)인 경우로부터만 가능합니다.열에 사용되는 인덱스는 %d 보다 같거나 작아야 합니다. 복소수형(complex) 행렬을 다루는 경우는 아직 Matrix 패키지내에서는 아직 구현되지 않았습니다.diag(.)에 0 또는 NA가 존재하므로 유한하지 않은 결과(non-finite result)를 얻을 것으로 생각됩니다.diagonalMatrix in .dense2C() -- 발생해서는 안되는 경우이므로 꼭 보고를 부탁드립니다!dim [product %d]의 값이 객체 [%d]의 길이와 일치하지 않습니다.dim(.)의 값은 반드시 길이가 2인 수치형 벡터이어야 합니다.차원정보가 cell의 개수와 일치하지 않습니다%2$s에 입력된 dimnames [%1$d]가 일치하지 않습니다.dimnames(.) <- NULL:은 다음과 같이 변경되었습니다. dimnames(.) <- list(NULL,NULL) <==> unname(.)'%s'는 사용가능한 원소유형(element type)이 아닙니다.원소유형(element type)이 'complex'인 경우에는 아직 구현되지 않았습니다.'i', 'j', 또는 'p' 중 하나가 호출(call)로부터 누락된 것 같습니다. 추가 인자들(extra arguments) %s는 %s에서 사용되지 않을 것입니다.file에 MatrixMarket 형식의 파일이 입력되지 않았습니다.대칭 띠 행렬(symmetric band matrix)의 경우, 오로지 상삼각(upper triangle) 또는 하삼각(lower)만을 지정합니다. 따라서, 모든 k는 반드시 같은 부호(sign)를 가져야 합니다.%s의 경우에는 아직 구현되지 않은 일반적인 Matrix 클래스입니다.cycle (1)에 도달했습니다 -- 반복을 중지합니다cycle (2)에 도달했습니다 -- 반복을 중지합니다i1[1] == 0 ==> C-레벨에서의 진행과정표시는 나타나지 않을 것입니다!in Summary(, .): %s(<%s>, <%s>)in Summary(, .): %s(<%s>, <%s>,...)차원(dimensions) 정보가 일치하지 않습니다.인덱스가 %d 보다 큽니다.sparseVectors를 인덱싱하기 위해서는 인덱스는 반드시 수치형, 논리형 또는 sparseVectors이어야 합니다.비효율적인 강제변환입니다 (triangularity를 소실하였기 때문입니다). 꼭 보고를 부탁드립니다."- e1"를 사용하는데 비효율적인 메소드(method)입니다.intermediate 'r' is of type %s메소드 "Compare" (Cmp.Mat.atomic)내에서 버그(internal bug)가 발생했습니다. 이를 꼭 보고해 주셨으면 합니다.메소드 "Logic" (Logic.Mat.atomic)내에서 버그가 발생되었습니다. 이를 꼭 보고해 주셨으면 합니다.내부버그 발견: replTmat()내에서 'i'는 행렬입니다. 이를 보고해 주시길 부탁드립니다.내부버그 발견: replTmat()내에서 'i'를 찾을 수 없습니다. 이를 보고해 주시길 부탁드립니다.%s은 올바른 'col.names' 문자열이 아닙니다'contrasts.arg' 인자가 올바르지 않습니다.입력된 'data'는 올바르지 않습니다.사용할 수 있는 'mod'(%s)가 아닙니다.올바르지 않은 'type'입니다.seq(.)의 사용시 (to - from)/by의 값이 올바르지 않습니다.유효하지 않은 문자형 인덱싱입니다%s는 사용가능한 클래스(class)가 아닙니다.객체 %s에 주어진 dimnames가 올바르지 않습니다.nargs()= %d의 값이 올바르지 않습니다.올바르지 않거나 아직 구현되지 않은 'Matrix' 부분추출(subsetting)입니다.크로넥커 메소드(kronecker method)는 반드시 기본 'FUN'을 사용해야 합니다.길이(length)는 반드시 음이 아닌 수이어야 합니다.첫번째 인자(arg)의 길이는 두번째 인자의 차원(dimension)과 일치하지 않습니다.두번째 인자(arg)의 길이가 첫번째 인자의 차원(dimension)과 일치하지 않습니다.length(i)는 length(x)의 배수가 아닙니다.length(x)는 반드시 1 또는 #{cols} 이어야 합니다. printSpMatrix2()를 이용 도중 논리적 프로그래밍 에러(logic programming error)가 발생했습니다. 이를 꼭 보고를 부탁드립니다.길이가 너무 긴 논리형 첨자(subscript)입니다 (%2$d이어야 하는데 %1$d입니다).객체의 길이(긴 것)가 다른 객체가 가지는 길이(짧은 것)의 배수가 아닙니다.객체의 길이(긴 것)이 다른 객체의 길이(짧은 것)의 배수가 아닙니다.m[ ] <- v: inefficiently treating single elementsm[ ]: inefficiently indexing single elements대각행렬이 아닙니다.비대각원소의 값이 영이 아닌 행렬은 "diagonalMatrix"로 강제변환(coerced) 할 수 없습니다.model.matrix()를 사용할 때 모델프레임(model frame)과 모델식(formula)가 일치하지 않습니다.'A' 또는 'A.x'와 'At.x'는 반드시 주어져야 합니다.각 행마다 반드시 정확히 하나의 영이 아닌 항목을 가지고 있어야 합니다.names(dimnames())의 길이는 2이거나 NULL이어야 합니다.nargs() = %d 와 같은 경우는 발생할 수 없으므로 꼭 보고해 주시기를 부탁드립니다.nargs() = %d. 필요이상의 인자들이 '[ .. ]' (i.2col)에 이용되었나요?nargs() = %d. 필요이상의 인자들이 '[ .. ]' (i.logical)에 이용되었나요?nargs() = %d. 필요이상의 인자들이 '[ .. ]' 내에 이용되었나요?음수(negative values)는 행렬의 첨자(subscript)로 사용할 수 없습니다.no 'dimnames[[.]]': 문자형 인덱싱을 사용할 수 없습니다non-conformable arguments%s에 입력된 행렬의 차원이 정합(conformable)하지 않습니다.차원(dimensions) 정보가 일치하지 않습니다.비정방(non-square) 행렬입니다.양정치(positive definite) 행렬이 아닙니다.정방행렬(square matrix)이 아닙니다.대칭행렬(symmetric matrix)가 아닙니다. forceSymmtric() 또는 symmpart() 함수의 사용을 고려해 보시길 바랍니다.삼각행렬(triangular matrix)가 아닙니다.%d번째 반복에서도 수렴하지 않습니다.not enough new vecs -- stop iterations아직 구현되지 않았습니다.아직 구현되지 않았습니다. 보고를 부탁드립니다.%s의 경우에는 아직 구현되지 않았습니다.클래스 %s의 경우에 아직 구현되지 않았습니다.저장방식(typeof) %s를 가지는 행렬의 경우에는 아직 구현되지 않았습니다.아직 구현되지 않은 'Matrix[<-' 메소드입(method)니다."TsparseMatrix"으로의 강제변환(coercion)은 아직 구현되지 않았습니다.%s(<%s>)의 경우에 대하여 아직 구현되지 않은 메소드(method)입니다. ->> 이 기능에 대한 구현을 패키지 관리자에게 문의해 주셨으면 합니다.%s(<%s>, <%s>)의 경우에 대하여 아직 구현되지 않은 메소드(method)입니다. ->> 이 기능에 대한 구현을 패키지 관리자에게 문의해 주시길 바랍니다.<%s> %%*%% <%s>에 사용할 수 있는 메소드가 아직 구현되지 않았습니다.교체(replace)해야 할 것이 아무것도 없습니다.교체(replace)할 항목의 개수가 입력된 value가 가지는 길이의 배수가 아닙니다.중복된 (i,j)에 위치한 값들 때문에 영이 아닌 요소의 개수가 'nnz' 보다 작습니다.%s의 경우 행의 개수가 올바르지 않습니다.오로지 2차원 테이블만이 희소행렬(sparse matrice)로 강제변환(coerced)될 수 있습니다.오로지 정방(square) 행렬만이 그래프를 위한 접속행렬(incidence matrices)로서 사용할 수 있습니다.prod()는 아직 구현되지 않았습니다.programming error: min() should have dispatched w/ 1st arg much earlierqr.R()은 아마도 순열(permutations) 때문에 qr.R()와 다를 수 있습니다. 따라서, qrR()을 사용하시길 바랍니다.rankMatrix(x, method='qr'): nrow(x) < ncol(x)이므로 t(x)를 계산합니다.rcond(.) via sparse -> dense coercionreadMM(): 열(column) 'j'는 1:nc 내에 존재하지 않습니다.readMM(): 행(row) 'i'는 1:nr 내에 존재하지 않습니다."indMatrix" 요소를 변경하는 것은 허용되지 않습니다, as rarely sensible'%s'는 사용가능한 표현(representation)이 아닙니다.행에 사용되는 인덱스는 반드시 %d 보다 같거나 작아야 합니다.일부 인자가 행렬이 아닙니다.이와 같은 유형의 인덱싱(indexing)은 반드시 논리형(logical) 또는 2개의 열로 구성된 수치형(numeric) 행렬에 의해서만 이루어져야 합니다.sum()는 아직 구현되지 않았습니다.대칭행렬(symmetric matrix)는 반드시 정방(square)이어야 합니다.대칭형식(symmetry form)이 '%s'인 경우에는 아직 구현되지 않았습니다.'%s'는 사용가능한 대칭형식(symmetry form)이 아닙니다.대칭형식(symmetry form)이 'hermitian'의 경우에는 아직 구현되지 않았습니다.대칭형식(symmetry form)이 'skew-symmetric'인 경우에는 아직 구현되지 않았습니다.일시적으로 사용할 수 없습니다.%d-번째 (부분)-대각 (k = %d)이 너무 짧아 NA로 채웁니다.삼각행렬이 아닙니다.영이 아닌 항목들의 개수가 nrow(.)와 다릅니다.입력된 인자의 개수가 너무 많습니다.교체에 이용될 값이 너무 많이 입력되었습니다.trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)'%s'는 사용가능한 유형(type)이 아닙니다.클래스 %s에 정의된 메소드가 아닙니다.update는 반드시 TRUE/FALSE 또는 '+' 또는 '-'이어야 합니다.using "old code" part in Csparse subassignment느린 크로넥커 방법(slow kronecker method)를 사용합니다.using"old code" part in Csparse subassignment >>> Matrix-authors@r-project.org으로 이를 보고해 주시길 바랍니다.변수 '%s'를 찾을 수 없어 관련 대비(contrast)는 계산되지 않을 것입니다.행렬과 벡터 연산(Matrix - vector operation)에 사용될 벡터의 길이가 너무 깁니다.'A'가 주어진 경우에 입력된 'A.x'와 'At.x'는 사용되지 않습니다.'by' 인자에 사용된 부호(sign)가 올바르지 않습니다.x / 0 for an x with sign-change no longer representable as 'rleDiff'x[.,.] <- val : Tsparse* 에서 CsparseMatrix로 강제변환(coerced)된 x입니다.x[.,.] <- val: x의 클래스는 %s입니다. {TRUE, FALSE}에 해당하지 않는 val의 값은 TRUE로 강제변환(coerced) 되었습니다. x[.,.] <- val: x의 클래스는 %s입니다. {TRUE, FALSE}에 해당하지 않는 val의 값은 강제변환(coerced) 되었습니다. x[.] <- val: x의 클래스는 %s입니다. {TRUE, FALSE}에 해당하지 않는 val의 값은 강제변환(coerced) 되었습니다.x[.] <- val: x의 클래스는 %s입니다. {TRUE, FALSE}에 해당하지 않는 val의 값은 TRUE로 강제변환(coerced) 되었습니다.인덱스에 음수와 양수를 혼용하여 사용할 수 없습니다.Matrix/inst/po/fr/0000755000176200001440000000000013203323314013512 5ustar liggesusersMatrix/inst/po/fr/LC_MESSAGES/0000755000176200001440000000000013203323315015300 5ustar liggesusersMatrix/inst/po/fr/LC_MESSAGES/Matrix.mo0000644000176200001440000006126613047321304017116 0ustar liggesusersL )<-L#i#)!0#R+v+#&6(P-yI&(4A5vD$422g/=9+B<n<,2R0rR(11Q+,,% %/U/s3),5C3y;*:,O|)+8!*+Lx-!M/1Ja;4?A]))20& 2W ?  + !:)!:d!!!B!#">"(["$"*"1"*#*1#(\#3## #*# $#$P3$M$"$,$="%3`%;%1%F&<I&'&+&0&, ',8'e'1'0'"' (!$()F(p(((%($(2),I)'v)-).)2).*D*&_**&*.*-*/%++U+*++++,+,#,-P,(~,1,#,*, (-9I----!-'.'(.#P.#t.+.&../ /6;/r//$/@/10&60]0v0<0)0*0"13>1(r11%1.1(2$72$\22622&23073h3 x3&3'38384G40g4O4-45+6P6!7;;7)w707$7.7;&8b8,8%8.8<9V>9*9#9X99=:Kw:o:03;7d;7;?;U<*j<(<=<:<87=Gp=J=9>?=>?}>->>' ?'3?D[?S?3??(@?h@6@7@7A2OA2A%A8ADBYB9rB5B8B9CDUC@CIC8%D$^D.D7DAD5,E3bEE7E/EfFDFdFP.G1G=GaG0QH1H4H1HNIBjI I2IJ@J@\JJ4JHJ(9KbK0K(K.KH L6SLDL+LHLDMXM:iMM*MbM`DN8N6NBO7XO?ODOUPGkP6P6P6!Q5XQ5Q"QHQ50R*fRR$R;RS,*SWS7uS2S=S1T2PT8T9T:T1UIU+hUU+U4U3V5HV1~V0V"V/W/4W0dW2W-W6W.-X+\X,XMX"Y)&Y&PY&wY7Y7Y/Z3>Z7rZ3Z(ZD[PL["[[8[M\9e\/\\*\R]-j]*](]T]FA^4^0^.^2_ P_ q__7_%_- `":`1]`` `(`)`FaGGa'aLayb7~bg Ap$klMS>T-8+7B":~m?YDo[=cU*GF#6(^9\3RQ|iz Z O}])LK%jf;JsHP </reCn2W E5!4I,xt0ah@dV1uwXv&N`_q. {yb'%s = '%s' (back-permuted) is experimental%s(): structurally rank deficient case: possibly WRONG zeros'%s' must be in '%s''%s' must have string length 1'%s' slot must have length 1'Dim' slot has length less than two'data' must be of a vector type'factors' slot must be a named list's1' and 's2' must be "character" vectors'uplo' must be UPP or LOWA must be a logical matrixA must have #{rows} >= #{columns}Argument b must be a numeric matrixArgument ij must be 2-column integer matrixArgument must be numeric-like atomic vectorArgument rho must be an environmentCHOLMOD factorization was unsuccessfulCannot coerce to too large *geMatrix with %.0f entriesCannot factor a matrix with zero extentsCannot solve() for matrices with zero extentsCholesky factorization failed; unusually, please report to Matrix-authorsCholmod error '%s' at file %s, line %dCholmod warning '%s' at file %s, line %dCsparse_crossprod(): error return from cholmod_aat()Csparse_general_to_symmetric(): matrix is not square!Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrixDeterminant requires a square matrixDim slot must have length 2Dimensions of a (%d,%d) and b (%d,%d) do not conformDimensions of system to be solved are inconsistentDimensions of x and y are not compatible for %sExact singularity detected during LU decomposition: %s, i=%d.First call to Lapack routine dgels returned error code %dFirst call to dgeqrf returned error code %dInappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)Inconsistent dimensions: np = 0 and nnz = %dIncorrect length of 'x' slotIndex i must be NULL or integerIndex j must be NULL or integerLU decomposition applies only to square matricesLapack dgecon(): system computationally singular, reciprocal condition number = %gLapack routine %s returned error code %dLapack routine dgetri: system is exactly singularLapack routine dgetrs: system is exactly singularLapack routine dposv returned error code %dLapack routine dsytrf returned error code %dLapack routine dtrcon returned error code %dLengths of super and pi must be equalLengths of super and px must be equalLower band %d > upper band %dMatrices are not conformable for multiplicationMatrix exponential requires square, non-null matrixMatrix is not squareMatrix namespace not determined correctlyNegative value in DimNegative values in DimNon-symmetric matrix passed to dsCMatrix_to_dgTMatrixNonsymmetric matrix in Csparse_symmetric_to_generalNumber of supernodes must be positive when is_super is TRUEOnly 'g'eneral sparse matrix types allowedSecond call to Lapack routine dgels returned error code %dSecond call to dgeqrf returned error code %dSolve requires a square matrixSuiteSparseQR_C_QR returned an error codeSupernodal LDL' decomposition not availableSupernodal/simplicial class inconsistent with type flagsSymmetric and triangular both setUnable to initialize cholmod: error code %dUnknown error in getGivensX must be a numeric (double precision) matrixX must be a real (numeric) matrixall column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrixall column indices must be between 0 and ncol-1all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrixargument type[1]='%s' must be a one-letter character stringargument type[1]='%s' must be one of '1','O', or 'I'argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'as_cholmod_triplet(): could not reallocate for internal diagU2N()cannot add diag() as long as 'diag = "U"'cannot set diag() as long as 'diag = "U"'chm_diagN2U(): nrow=%d, ncol=%dchm_diagN2U(x, uploT = %d): uploT should be +- 1chm_factor_name(): did not get string of length 11chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)cholmod_change_factor failedcholmod_change_factor failed with status %dcholmod_drop() failedcholmod_factorize failed: status %d, minor %d from ncol %dcholmod_factorize_p failed: status %d, minor %d of ncol %dcholmod_sdmult error (resid)cholmod_sdmult error (rhs)cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %dcholmod_sort returned an error codecholmod_updown() returned %dcholmod_write_sparse returned error codecls = "%s" does not end in "CMatrix"cls = "%s" must begin with 'd', 'l' or 'n'code for cholmod_dense with holes not yet writtencode not yet written for cls = "lgCMatrix"complex sparse matrix code not yet writtencs matrix not compatible with class '%s'cs_lu(A) failed: near-singular A (or out of memory)cs_lusol failedcs_qr failedcs_qrsol() failed inside dgCMatrix_qrsol()cs_sqr failedcsp_eye argument n must be positivedata length [%d] is not a sub-multiple or multiple of the number of columns [%d]data length [%d] is not a sub-multiple or multiple of the number of rows [%d]data length exceeds size of matrixddense_to_symmetric(): matrix is not square!dgCMatrix_cholsol requires a 'short, wide' rectangular matrixdgCMatrix_lusol requires a square, non-empty matrixdgCMatrix_matrix_solve(.., sparse=TRUE) not yet implementeddgCMatrix_qrsol(., order) needs order in {0,..,3}dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrixdgeMatrix_Schur: argument x must be a non-null square matrixdgeMatrix_Schur: dgees returned code %ddgeMatrix_Schur: first call to dgees faileddgeMatrix_exp: LAPACK routine dgebal returned %ddgeMatrix_exp: dgetrf returned error code %ddgeMatrix_exp: dgetrs returned error code %ddiag_tC(): invalid 'resultKind'diagonal element %d of Cholesky factor is missingdon't know if a dense pattern matrix makes sensedpoMatrix is not positive definitedtrMatrix must be squareerror [%d] from Lapack 'dgecon()'exactly 1 of 'i', 'j' or 'p' must be NULLf->xtype of %d not recognizedfactors slot must be named listfailure in as_cholmod_factorfailure to open file "%s" for writingfirst element of slot p must be zeroi and j must be integer vectors of the same lengthin_place cholmod_sort returned an error codeincorrect left cyclic shift, j (%d) < 0incorrect left cyclic shift, j (%d) >= k (%d)incorrect left cyclic shift, k (%d) > ldx (%d)internal_chm_factor: Cholesky factorization failedinvalid '%s' argumentinvalid 'ncol' value (< 0)invalid 'ncol' value (too large or NA)invalid 'nrow' value (< 0)invalid 'nrow' value (too large or NA)invalid class '%s' to dup_mMatrix_as_dgeMatrixinvalid class '%s' to dup_mMatrix_as_geMatrixinvalid class of 'value' in Csparse_subassign()invalid class of 'x' in Csparse_subassign()invalid class of 'x' in Matrix_as_cs(a, x)invalid class of object to %sinvalid class of object to as_cholmod_denseinvalid class of object to as_cholmod_factorinvalid class of object to as_cholmod_sparseinvalid class of object to as_cholmod_tripletinvalid class(x) '%s' in R_to_CMatrix(x)invalid class(x) '%s' in compressed_to_TMatrix(x)invalid column index at position %dinvalid object passed to as_cholmod_sparseinvalid row index at position %dlast element of slot p must match length of slots j and xlength of x slot != prod(Dim)length(beta) must match ncol(V)length(p) must match nrow(V)length(q) must be zero or ncol(R)lengths of slots 'i' and 'x' must matchlengths of slots 'j' and 'x' must matchlengths of slots i and j must matchlengths of slots i and x must matchmatrix is not square! (skew-symmetric part)matrix is not square! (symmetric part)matrix is not symmetric [%d,%d]missing 'Matrix' namespace: should never happennegative vector lengths not allowed: np = %d, nnz = %dnon-numeric matrix extentnot a 'n.CMatrix'np = %d, must be zero when p is NULLnumber of rows in y (%d) does not match number of rows in X (%d)nz2Csparse(): invalid/non-implemented r_kind = %dobject must be a named, numeric vectorp must be non-decreasingp[0] = %d, should be zeroprogramming error in Csparse_subassign() should never happenrcond requires a square, non-empty matrixright=TRUE is not yet implemented __ FIXMEslot Dim must have length 2slot j is not *strictly* increasing inside a columnslot j is not increasing inside a columnslot p must be non-decreasingslot p must have length = nrow(.) + 1sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)strlen of cls argument = %d, should be 8subscript 'i' out of bounds in M[ij]subscript 'j' out of bounds in M[ij]system argument is not validthe leading minor of order %d is not positive definitetol, given as %g, must be <= 1tol, given as %g, must be non-negativetoo many elements specifiedunexpected ctype = %d in dup_mMatrix_as_geMatrixunknown 'Rkind'unknown xtypeunknown xtype in cholmod_sparse objectunknown xtype in cholmod_triplet objectuplo='L' must not have sparse entries above the diagonaluplo='U' must not have sparse entries below the diagonalx slot must be numeric "double"x[] <- val: val is coerced to logical for "%s" xx[] <- val: val should be integer or logical, is coerced to integer, for "%s" xy must be a numeric (double precision) matrixProject-Id-Version: Matrix 1.1-1 Report-Msgid-Bugs-To: POT-Creation-Date: 2017-02-10 12:21+0100 PO-Revision-Date: 2014-03-30 09:05+0100 Last-Translator: Philippe Grosjean Language-Team: none Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); X-Generator: Poedit 1.6.4 %s = '%s' (back-permuted) est expérimental%s() : cas structurellement déficient de rang : probablement des zéros ERRONES'%s' doit être compris dans '%s''%s' doit avoir une longueur de chaîne de caractères de 1le slot '%s' doit avoir une longueur de 1le slot 'Dim' a une longueur inférieure à deux'data' doit être un vecteur de typele slot 'factors' doit être une liste nommée's1' et 's2' doivent être des vecteurs de type "character"'uplo' doit être UPP ou LOWA doit être une matrice de valeurs logiquesA doit avoir #{lignes} >= #{colonnes}L'argument b doit être une matrice numériqueL'argument ij doit être une matrice d'entiers à 2 colonnesL'argument doit être un vecteur atomique de type numérique ou convertible en nombresL'argument rho doit être un environnementla factorisation CHOLMOD a échouéImpossible de convertir automatiquement vers une *geMatrix trop large avec %.0f entréesImpossible de factoriser une matrice de dimensions nullesImpossible de résoudre avec solve() pour des matrices de dimensions nullesla factorisation Cholesky a échoué ; inhabituel, veuillez reporter le problème aux auteurs du package MatrixErreur Cholmod '%s' dans le fichier %s, ligne %dAvertissement Cholmod '%s' dans le fichier %s, ligne %dCsparse_crossprod() :erreur renvoyée par cholmod_aat()Csparse_general_to_symmetric() : la matrice n'est pas carrée !Csparse_sort(x) : x est une CsparseMatrix incorrecte (au delà d'un problème de tri)Determinant nécessite une matrice carréeLe slot Dim doit avoir une longueur de 2Les dimensions de a (%d,%d) et b(%d,%d) ne sont pas conformesLes dimensions du système à résoudre sont incohérentesLes dimensions de x et y ne sont pas compatibles pour %sSingularité exacte détectée lors d'une décomposition LU : %s, i=%d.Le premier appel à la routine Lapack dgels a renvoyé le code d'erreur %dLe premier appel à dgeqrf a renvoyé le code d'erreur %dClasse inappropriée cl='%s' dans Matrix_csn_to_SEXP(S, cl, ..)Classe inappropriée cl='%s' dans Matrix_css_to_SEXP(S, cl, ..)dimensions incohérentes : np = 0 et nnz = %dLongueur incorrecte du slot 'x'l'indice i doit être un entier ou NULLl'indice j doit être un entier ou NULLla décomposition LU n'est utilisable que pour des matrices carréesLapack dgecon() : système calculé singulier, nombre de condition réciproque = %gla routine Lapack %s a renvoyé le code d'erreur %dla routine Lapack dgetri : le système est exactement singulierla routine Lapack dgetrs : le système est exactement singulierLa routine Lapack dposv a renvoyé le code d'erreur %dla routine Lapack dsytrf a renvoyé le code d'erreur %dLa routine Lapack dtrcon a renvoyé le code d'erreur %dLes longueurs de super et pi doivent être égalesLes longueurs de super et px doivent être égalesLa bande basse %d > la bande haute %dLes matrices sont incohérentes pour leur multiplicationL'exponentiation de matrice nécessite une matrice carrée non nulleMatrix n'est pas carréel'espace de nom Matrix n'est pas correctement déterminéValeur négative dans DimValeurs négatives dans DimMatrice non symétrique passé à dsCMatrix_to_dgTMatrixMatrice non symétrique dans Csparse_symmetric_to_generalLe nombre de supernoeuds doit être positif losque is_super est TRUESeuls des types de matrices éparses 'g'énéraux sont acceptésLe second appel à la routine Lapack dgels a renvoyé le code d'erreur %dLe second appel à dgeqrf a renvoyé le code d'erreur %dSolve nécessite une matrice carréeSuiteSparseQR_C_QR a renvoyé un code d'erreurLa décomposition 'supernodal LDL' n'est pas disponibleClasse supernodal/simplicial incohérente avec le drapeau de typeSymmetric et triangular sont tous deux sélectionnésImpossible d'initialiser cholmod : code d'erreur %dErreur inconnue dans getGivensX doit être une matrice numérique (double précision)X doit être une matrice (numérique) de réelstous les indices de colonnes (slot 'j') doivent être compris entre 0 et ncol-1 dans une TsparseMatrixtous les indices de colonnes doivent être compris entre 0 et ncol-1tous les indices de lignes (slot 'i') doivent être compris entre 0 et nrow-1 dans une TsparseMatrixl'argument type[1]='%s' doit être une chaîne de caractère à une seule lettrel'argument type[1]='%s' doit être '1','O' ou 'I'l'argument type[1]='%s' doit être 'M','1','O','I','F' ou 'E'as_cholmod_triplet() : impossible de réallouer de la mémoire pour la fonction interne diagU2N()impossible d'ajouter diag() puisque 'diag = "U"'impossible d'utiliser diag() puisque 'diag = "U"'chm_diagN2U(): nrow=%d, ncol=%dchm_diagN2U(x, uploT = %d): uploT doit être +- 1chm_factor_name() : une chaîne de caractère de langueur 11 n'est pas obtenuechm_sparse_to_SEXP(, *) : 'Rkind' incorrect (real kind code)cholmod_change_factor a échouécholmod_change_factor a échoué avec le statut %dcholmod_drop() a échouécholmod_factorize a échoué : statut %d, mineur %d pour ncol %dcholmod_factorize_p a échoué : statut %d, mineur %d de ncol %derreur cholmod_sdmult (resid)erreur cholmod_sdmult (partie droite de l'équation)cholmod_solve (CHOLMOD_A) a échoué : statut %d, mineur %d pour ncol %dcholmod_sort a renvoyé le code d'erreurcholmod_updown() a renvoyé %dcholmod_write_sparse a renvoyé le code d'erreurcls = "%s" ne se fini pas dans "CMatrix"cls = "%s" doit commencer par 'd', 'l', ou 'n'le code pour cholmod_dense en présence de trous n'est pas encore écritle code pour cls = "lgCMatrix" n'est pas encore écritle code n'est pas encore écrit pour les matrices éparses complexesmatrice cs incompatible avec la classe '%s'cs_lu(A) a échoué : A pratiquement singulière (ou manque de mémoire)cs_lusol a échouécs_qr a échouécs_qrsol() a échoué à l'intérieur de dgCMatrix_qrsol()cs_sqr a échouél'argument n de csp_eye doit être positifla longueur des données [%d] n'est pas un sous-multiple ou un multiple du nombre de colonnes [%d]la longueur des données [%d] n'est pas un sous-multiple ou un multiple du nombre de lignes [%d]la longueur des données excède la taille de la matriceddense_to_symmetric() : la matrice n'est pas carrée !dgCMatrix_cholsol nécessite une matrice rectangulaire en longueurdgCMatrix_lusol nécessite une matrice carrée non videdgCMatrix_matrix_solve(.., sparse=TRUE) pas encore implémentédgCMatrix_qrsol(., order) nécessite un ordre compris entre {0,..,3}dgCMatrix_qrsol(<%d x %d>-matrix) nécessite une matrice rectangulaire haute ('tall')dgeMatrix_Schur : l'argument x doit être une matrice carrée non nulledgeMatrix_Schur : dgees a renvoyé le code d'erreur %ddgeMatrix_Schur : le premier appel à dgees a échouédgeMatrix_exp : la routine LAPACK dgebal a renvoyé %ddgeMatrix_exp : dgetrf a renvoyé le code d'erreur %ddgeMatrix_exp : dgetrs a renvoyé le code d'erreur %ddiag_tC() : 'resultKind' incorrectl'élément de diagonale %d de la factorisation de Cholesky est manquantje ne sais pas si une matrice pattern dense a un sensdpoMatrix n'est pas un entier positif finidtrMatrix doit être carréeerreur [%d] depuis Lapack 'dgecon()'exactement un des arguments 'i', 'j' ou 'p' doit être NULLf->xtype de %d non reconnule slot factors doit être une liste nomméeerreur dans as_cholmod_factorerreur lors de l'ouverture en écriture du fichier "%s"le premier élément du slot p doit être à zéroi et j doivent être des vecteurs d'entiers de même longueurin_place cholmod_sort a renvoyé le code d'erreurdécalage cyclique à gauche incorrect, j (%d) < 0décalage cyclique à gauche incorrect, j (%d) >= k (%d)décalage cyclique à gauche incorrect, k (%d) > ldx (%d)internal_chm_factor : la factorisation Cholesky a échouéargument '%s' incorrectvaleur 'ncol' incorrecte (< 0)valeur 'ncol' incorrecte (trop large ou NA)valeur 'nrow' incorrecte (< 0)valeur 'nrow' incorrecte (trop large ou NA)classe '%s' incorrecte pour dup_mMatrix_as_dgeMatrixclasse '%s' incorrecte pour dup_mMatrix_as_geMatrixclasse de 'value' incorrecte dans Csparse_subassign()classe de 'x' incorrecte dans Csparse_subassign()classe incorrecte de 'x' dans Matrix_as_cs(a, x)classe incorrecte de l'objet à %sclasse d'objet incorrecte pour as_cholmod_denseclass d'objet incorrecte pour as_cholmod_factorclasse d'objet incorrecte pour as_cholmod_sparseobjet de classe incorrecte pour as_cholmod_tripletclass(x) incorrecte '%s' dans R_to_CMatrix(x)class(x) incorrecte '%s' dans compressed_to_TMatrix(x)indices de colonnes erronés à la position %dobjet incorrect passé à as_cholmod_sparseindices de lignes erronés à la position %dle dernier élément du slot p doit avoir même longueur que les slots j et xla longueur du slot x != prod(Dim)length(beta) doit correspondre à ncol(V)length(p) doit correspondre à nrow(V)length(q) doit valoir zéro ou ncol(R)les longueurs des slots 'i' et 'x' doivent correspondreles longueurs des slots 'j' et 'x' doivent correspondrela longueur des slots i et j doit correspondreles longueurs des slots i et x doivent correspondrela matrice n'est pas carrée ! (partie 'skew-symetric')la matrice n'est pas carrée ! (partie symétrique)la matrice n'est pas symétrique [%d,%d]espace de nom 'Matrix' manquant : ceci ne devrait jamais se produireles longueurs de vecteurs négatives ne sont pas autorisées : np = %d, nnz = %détendue de matrice non numériquececi n'est pas un 'n.CMatrix'np = %d, il doit être égal à zéro lorsque p est NULLle nombre de lignes de y (%d) ne correspond pas au nombre de lignes de X (%d)nz2Csparse() : r_kind = %d est incorrect/non implémentél'objet doit être un vecteur numérique nommép ne peut être décroissantp[0] = %d, il devrait être égal à zéroerreur de programmation dans Csparse_subassign() qui ne devrait jamais se produirercond nécessite une matrice carrée non videright=TRUE n'est pas implémenté __ FIXMEle slot Dim doit avoir une longueur de 2le slot j ne contient pas de valeurs *strictement* croissantes au sein d'une colonnele slot j ne contient pas de valeurs croissantes au sein d'une colonnele slot p ne peut contenir de valeurs décroissantesle slot p doit avoir une longueur = nrow(.) = 1 sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)strlen de l'argument cls = %d, il devrait valoir 8indice 'i' hors plage dans M[ij]indice 'j' hors plage dans M[ij]argument système incorrectle 'leading minor of order' %d n'est pas un entier finitol, donné comme %g, doit être <= 1tol, donné comme %g, doit être non négatiftrop d'éléments sont spécifiésctype = %d inattendu dans dup_mMatrix_as_geMatrix'Rkind' inconnuxtype inconnuxtype inconnu dans cholmod_sparse objectxtype inconnu pour cholmod_triplet objectuplo='L' ne peut avoir des entrées éparses au dessus de la diagonaleuplo='U' ne peut avoir des entrées éparses en dessous de la diagonalele slot x doit être un nombre "double"x[] <- val: val est converti automatiquement en valeurs logiques pour "%s" xx[] <- val: val devrait être des entiers ou des valeurs logiques, il est converti automatiquement en entiers pour "%s" xy doit être une matrice numérique (double précision)Matrix/inst/po/fr/LC_MESSAGES/R-Matrix.mo0000644000176200001440000006656413047321304017323 0ustar liggesusersL 63 T9p619/k,-*#!E,Y;#6D1,vK1"#Tx4$9W'(V0$L0q:Ix'8&' HhJ:("/K5{,#88;7t,.&$9Q^D4(*$S%xM=&*&Q<x=7 5 -!61!:h!C!7!("*H"s"T" "*#91#k#e#/#"!$"D$1g$($$$I$8H%"%%@%@&5E&6{&& &&'' "'C'^'$p''2'''"(1'(3Y(((%(:(-)@E)?)=)8*=*HT*2*9*, +07+Eh+H+=+55,1k,',,,,-?"-b-z-&--$-- .-5.&c./.h.n#/.//B/(0DE0A0&0G0e;1v1?2%X2+~2)2@2"3*83c3;3%33)4!/49Q4>44A4!53>5r55B555'60C6t6`656,)77V77O7>7I98<8:8H8,D9iq9:(:8!;;Z;";M;#<!+<'M<=u<5<=<1'=5Y=/='==-=E,>'r>>A>b>3V??h?# @0/@(`@@?@#@I AUA9ABB6B*B6C=MCPCC$kDAD*D1D&/E!VExENECE6+F>bFXF<F,7GQdGHG<G6KDK@K]LLqLLSMNM;9NHuNBNYOA[O7O9O#PR3P!P5PEP,$QQQ9Q2R2NRNR)R$R+S^KSRS)S$'TPLTPTBTC1U1uU!UUUU$U.$VSV+jVVGV6V-+WBYWEW,W&XM6X/XbXaYByY;YYsZJZ7Z5[DD[I[M[C!\He\U\,]1]J](^] ]Q]%]$ ^4E^z^1^^*^7_-G_Bu_~_7`6``S a&^aaada-LbYzbbZcCc3;d?od>dSd Be9ce+ehe,2f)_f3f)fJfO2ggTg!g2hGhXhNxhh(h*iK1i,}ii<Gj6jFj$k`'kLk^kQ4lOl^l>5mMQr!3 TD.YJu/$O)2KiNycW1nF&_-A<58b=* lU k(a"B\HjLmVotp~d 4 7qw;>Gv]^`e09Is#X'h}6@+? ZCEfPgz{S|:[R%,x%s %s is undefined%s kind not yet implemented'%s()' is not yet implemented for representation '%s''%s()' is not yet implemented for element type '%s''A' must be a square matrix'NA' indices are not (yet?) supported for sparse Matrices'V' is not a *square* matrix'V' is not a square matrix'by' argument is much too small'diagonals' matrix must have %d columns (= length(k) )'diagonals' must have the same length (%d) as 'k''file' must be a character string or connection'force' must be (coercable to) TRUE or FALSE'lag' and 'differences' must be integers >= 1'lwd' must be NULL or non-negative numeric'ncol' is not a factor of length(x)'ncol' must be >= 0'nearPD()' did not converge in %d iterations'nrow' and 'ncol' must be the same when 'symmetric' is true'nrow' is not a factor of length(x)'nrow' must be >= 0'nrow', 'ncol', etc, are disregarded for matrix 'data''nrow', 'ncol', etc, are disregarded when 'data' is "Matrix" already'p' must be a non-decreasing vector (0, ...)'times >= 0' is required'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a "CHMfactor"'x' has invalid data type'x' is not positive definite -- chol() undefined.'x' is not symmetric nor triangular'x' must be "sparseMatrix"'x' must have length nrow^2 when 'symmetric' is true'x' must inherit from "sparseVector"(un)packing only applies to dense matrices, class(x)='%s'.M.repl.i.2col(): 'i' has no integer column number; should never happen; please report.M.repl.i.2col(): drop 'matrix' case ....M.sub.i.2col(): 'i' has no integer column number; should never happen; please report %s %s is undefined --> is not yet implemented[i] is not yet implemented --> is not yet implemented[ ] : .M.sub.i.logical() maybe inefficientCholesky() -> *symbolic* factorization -- not yet implementedCholesky(A) called for 'A' of class "%s"; it is currently defined for sparseMatrix only; consider using chol() insteadClass %s is not yet implementedCmp.Mat.atomic() should not be called for diagonalMatrixFIXME: NOT YET FINISHED IMPLEMENTATIONInternal bug: nargs()=%d; please reportInvalid assembled indicator: %sInvalid storage format: %sInvalid storage type: %sLU computationally singular: ratio of extreme entries in |diag(U)| = %9.4gLogic.Mat.atomic() should not be called for diagonalMatrixMatrices must have same dimensions in %sMatrices must have same number of columns in %sMatrices must have same number of rows for arithmeticMatrices must have same number of rows in %sMatrix seems negative semi-definiteMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMust specify 'nrow' when 'symmetric' is trueNA's in (i,j) are not allowedNAs are not allowed in subscripted assignmentsNot a valid formatOnly numeric sparse matrices allowedQuadratic matrix '%s' (=: A) is not formally symmetric. Will be treated as A A'RHS 'value' (class %s) matches 'ANY', but must match matrix class %s[ ] indexing not allowed: forgot a "," ?[[ suppressing %d column names %s ... ]][[ suppressing %d column names %s ]]all() is not yet implementedas(.,"dsCMatrix") is deprecated (since 2008); do use as(., "symmetricMatrix")c(,..) of different kinds, coercing all to 'rleDiff'cannot coerce 'NA's to "nsparseMatrix"cannot coerce 'NA's to "nsparseVector"cannot coerce non-symmetric "dgTMatrix" to "dsCMatrix" classchol() is undefined for diagonal matrix with negative entriescoercion from list(i1,...,ik, d) to "indMatrix" failed. All entries must be integer valued and the number of columns, d, not smaller than the maximal index i*.coercion to "indMatrix" only works from integer numericcoercion to "pMatrix" only works from integer numericcolumn indices must be <= ncol(.) which is %dcomplex matrices not yet implemented in Matrix packagediag(.) had 0 or NA entries; non-finite result is doubtfuldiagonalMatrix in .dense2C() -- should never happen, please report!dim [product %d] do not match the length of object [%d]dim(.) value must be numeric of length 2dimensions don't match the number of cellsdimnames [%d] mismatch in %sdimnames(.) <- NULL: translated to dimnames(.) <- list(NULL,NULL) <==> unname(.)element type '%s' not recognizedelement type 'complex' not yet implementedexactly one of 'i', 'j', or 'p' must be missing from callfile is not a MatrixMarket filefor symmetric band matrix, only specify upper or lower triangle hence, all k must have the same signgeneral Matrix class not yet implemented for %shit a cycle (1) -- stop iterationshit a cycle (2) -- stop iterationsi1[1] == 0 ==> C-level verbosity will not happen!in Summary(, .): %s(<%s>, <%s>,...)incompatible matrix dimensionsindex larger than maximal %dindex must be numeric, logical or sparseVector for indexing sparseVectorsinefficient coercion (lost triangularity); please reportinefficient method used for "- e1"intermediate 'r' is of type %sinternal bug in "Compare" method (Cmp.Mat.atomic); please reportinternal bug in "Logic" method (Logic.Mat.atomic); please reportinternal bug: matrix 'i' in replTmat(): please reportinternal bug: missing 'i' in replTmat(): please reportinvalid 'col.names' string: %sinvalid 'contrasts.arg' argumentinvalid 'data'invalid 'mod': %sinvalid 'type'invalid (to - from)/by in seq(.)invalid character indexinginvalid class: %sinvalid dimnames given for %s objectinvalid nargs()= %dinvalid or not-yet-implemented 'Matrix' subsettingkronecker method must use default 'FUN'length must be non-negative numberlength of 1st arg does not match dimension of 2ndlength of 2nd arg does not match dimension of firstlength(i) is not a multiple of length(x)length(x) must be either 1 or #{cols}logic programming error in printSpMatrix2(), please reportlogical subscript too long (%d, should be %d)longer object length is not a multiple of shorter object lengthlonger object length is not a multiple of shorter object lengthm[ ] <- v: inefficiently treating single elementsm[ ]: inefficiently indexing single elementsmatrix is not diagonalmatrix with non-zero off-diagonals cannot be coerced to "diagonalMatrix"model frame and formula mismatch in model.matrix()must either specify 'A' or the functions 'A.x' and 'At.x'must have exactly one non-zero entry per rownargs() = %d should never happen; please report.nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?negative values are not allowed in a matrix subscriptno 'dimnames[[.]]': cannot use character indexingnon-conformable matrix dimensions in %snon-matching dimensionsnon-square matrixnot a positive definite matrixnot a square matrixnot a symmetric matrix; consider forceSymmetric() or symmpart()not a triangular matrixnot converged in %d iterationsnot enough new vecs -- stop iterationsnot yet implementednot yet implemented .. please reportnot yet implemented for %snot yet implemented for class %snot yet implemented for matrix with typeof %snot-yet-implemented 'Matrix[<-' methodnot-yet-implemented coercion to "TsparseMatrix"not-yet-implemented method for %s(<%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for %s(<%s>, <%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for <%s> %%*%% <%s>nothing to replace withnumber of items to replace is not a multiple of replacement lengthnumber of rows are not compatible for %sonly 2-dimensional tables can be directly coerced to sparse matricesonly square matrices can be used as incidence matrices for graphsprod() is not yet implementedprogramming error: min() should have dispatched w/ 1st arg much earlierqr.R() may differ from qr.R() because of permutations. Possibly use our qrR() insteadrankMatrix(, method = '%s') coerces to dense matrix. Probably should rather use method = 'qr' !?rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)rcond(.) via sparse -> dense coercionreadMM(): column values 'j' are not in 1:ncreadMM(): row values 'i' are not in 1:nrreplacing "indMatrix" entries is not allowed, as rarely sensiblerepresentation '%s' not recognizedrow indices must be <= nrow(.) which is %dsome arguments are not matricessuch indexing must be by logical or 2-column numeric matrixsum() is not yet implementedsymmetric matrix must be squaresymmetry form '%s' is not yet implementedsymmetry form '%s' not recognizedsymmetry form 'hermitian' not yet implemented for readingsymmetry form 'skew-symmetric' not yet implemented for readingtemporarily disabledthe %d-th (sub)-diagonal (k = %d) is too short; filling with NA'sthe matrix is not triangularthe number of non-zero entries differs from nrow(.)too many argumentstoo many replacement valuestrimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)type '%s' not recognizedundefined method for class %supdate must be TRUE/FALSE or '+' or '-'using "old code" part in Csparse subassignmentusing slow kronecker() methodusing"old code" part in Csparse subassignment >>> please report to Matrix-authors@r-project.orgvariable '%s' is absent, its contrast will be ignoredvector too long in Matrix - vector operationwhen 'A' is specified, 'A.x' and 'At.x' are disregardedwrong sign in 'by' argumentx / 0 for an x with sign-change no longer representable as 'rleDiff'x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrixx[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE.you cannot mix negative and positive indicesProject-Id-Version: Matrix 1.1-1 POT-Creation-Date: 2017-02-10 12:21 PO-Revision-Date: 2014-03-30 09:07+0100 Last-Translator: Philippe Grosjean Language-Team: none Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 1.6.4 Plural-Forms: nplurals=2; plural=(n > 1); %s %s est indéfinile type %s n'est pas encore implémenté'%s' n'est pas implémenté pour la représentation '%s''%s()' n'est pas implémenté pour le type d'élément '%s''A' doit être une matrice carréeles indices 'NA' ne sont pas (encore?) supportés pour les Matrices éparses'V' n'est pas une matrice *carrée*'V' n'est pas une matrice carréel'argument 'by' est beaucoup trop petitune matrice 'diagonals' doit avoir %d colonnes (= length(k) )'diagonals' doit avoir la même longueur (%d) que 'k''file' doit être une chaîne de caractères ou une connexion'force' doit être (convertible en) TRUE ou FALSE'lag' et 'differences' doivent être des entiers >= 1'lwd' doit être un nombre non négatif ou NULL'ncol' n'est pas un factor de length(x)'ncol' doit être >= 0'nearPD()' n'a pas converti en %d itérations'now' et 'ncol' doivent être les mêmes lorsque 'symmetric' est vrai'nrow' n'est pas un factor de length(x)'nrow' doit être >= 0'nrow', 'ncol', etc, ne sont pas utilisés pour la matrice 'data''nrow', 'ncol', etc, ne devrazient pas être utilisés lorsque 'data' est déjà un objet "Matrix"'p' doit être un vecteur non décroissant (0, …)'times >= 0' est requis'update' doit être une valeur logique ou '+' ou '-' ; 'C' doit être une matrice, et 'L' un "CHMfactor"'x' a un type de données incorrect'x' n'est pas positif fini --chol() non défini.'x' n'est ni symétrique ni triangulaire'x' doit être "sparseMatrix"'x' doit avoir une longueur nrow^2 lorsque 'symmetric' est vrai'x' doit hériter de "sparseVector"la (dé)compaction ne s'applique qu'à des matrices denses, class(x)='%s'.M.repl.i.2col() : 'i' n'a pas un nombre entier de colonnes ; ceci ne devrait pas se produite. Veuillez envoyer un rapport de bug.M.repl.i.2col() : le cas 'matrix' est laissé tombé ....M.sub.i.2col() : 'i' n'a pas un nombre de colonnes entier ; ceci ne devrait jamais se produire. Veuillez envoyer un rapport de bug %s %s est indéfini --> n'est pas encore implémenté[i] n'est pas encore implémenté --> n'est pas encore implémenté[ ] : .M.sub.i.logical() peu être inefficaceCholesky() -> factorisation *symbolique* -- pas encore implémentéeCholesky(A) appelé pour 'A' de classe "%s" : est actuellement défini pour sparseMatrix seulement ; considérez utiliser chol() à la placeLa classe %s n'est pas implémentéeCmp.Mat.atomic() ne devrait pas être appelé pour diagonalMatrixFIXME : IMPLEMENTATION PAS ENCORE TERMINEEbug interne : nargs()=%d ; veuillez reporter ceciIndicateur d'assemblage incorrect : %sformat de stockage incorrect : %stype de stockage incorrect : %sLU calculée singulière : rapport d'entrées extrêmes dans |diag(U)| = %9.4gLogic.Mat.atomic() ne devrait pas être appelé pour diagonalMatrixLes matrices doivent avoir les mêmes dimensions en %sLes matrices doivent avoir le même nombre de colonnes dans %sLes matrices doivent avoir le même nombre de lignes pour des opérations arithmétiquesLes matrices doivent avoir le même nombre de lignes dans %sLa matrice semble négative et semi-définieErreur interne d'objet Matrix dans [i,,d] ; veuillez envoyer un rapportErreur interne de matrice dans [i,,d] ; veuillez reporter cecierreur interne dans [i,,d] ; veuillez reporter ceciIl faut spécifier 'nrow' lorsque 'symmetric' est vraiNAs dans (i,j) ne sont pas permisles NAs ne sont pas autorisés dans les assignations avec indicesPas un format acceptableSeules les matrices éparses numériques sont autoriséesLa matrice quadratique '%s' (=: A) n'est pas formellement symétrique. Elle sera traitée comme A A'la 'value' du membre de gauche de l'équation (classe %s) correspond à 'ANY', mais doit correspondre à la classe de matrice %sindiçage [ ] non permis : n'avez-vous pas oublié une "," ?[[ suppression de %d noms de colonnes %s … ]][[ suppression de %d noms de colonnes %s ]]all() n'est pas encore implémentéas(.,"dsCMatrix") est déprécié (depuis 2008) ; n'utilisez pas as(., "symmetricMatrix")c(,..) de différentes sortes, convertis automatiquement en 'rleDiff"impossible de convertir automatiquement des 'NA's en "nsparseMatrix"impossible de convertir automatiquement 'NA's en "nsparseVector"impossible de convertir automatiquement des "dgMAtrix" non symétriques en classe "dsCMatrix"chol() est indéfini pour une matrice diagonale avec des entrées négativesla conversion automatique depuis list(i1,...,ik, d) en "indMatrix" a échoué. toutes les entrées doivent être des valeurs entières et le nombre de colonnes, d, ne peut être plus petit que l'indice maximal i*.la conversion automatique ne "indMatrix" ne fonctionne que pour des nombres entiersconversion automatique en "pMatrix" ne fonctionne que pour des nombres entiersles indices de colonnes doivent être <= ncol(.) qui est %dles matrices complexes ne sont pas implémentées dans le package Matrixdiag(.) avait 0 ou NA données ; un résultat non fini est douteuxdiagonalMatrix dans .dense2C() -- ne devrait jamais se produire, veuillez reporter ceci !dim [product %d] ne correspond pas à la longueur de l'objet [%d]la valeur de dim(.) doit être numérique de longueur 2les dimensions ne correspondent pas au nombre de cellulesdimnames [%d] incohérentes dans %sdimnames(.) <- NULL : traduit en dimnames(.) <- list(NULL,NULL) <==> unname(.)type d'élément '%s' non reconnule type d'élément 'complex' pas encore implémentéexactement l'un parmi 'i', 'j' o 'p' doit être manquant dans l'appelle fichier n'est pas un fichier MatrixMarketpour une matrice de bande symétrique, spécifiez seulement le triangle supérieur ou inférieur donc, tous les k doivent avoir le même signeclasse Matrix générale pas encore implémentée pour %sun cycle est atteint (1) -- arrêt des itérationsun cycle est atteint (2) -- arrêt des itérationsi1[1] == 0 ==> au niveau C, aucune information détaillée ne sera affichée !dans Summary() : %s(<%s>, <%s>, …)dimensions de matrices incompatiblesindice plus grand que la valeur maximale %dles indices doivent être numériques, logiques ou sparseVector pour l'indiçage sparseVectorsconversion automatique inefficace (triangularité perdue) ; veuillez reporter ceciméthode inefficace utilisée pour "- e1"le 'r' intermédiaire est de type %sbug interne dans la méthode "Compare" (Cmp.Mat.atomic) ; veuillez reporter cecibug interne dans la méthode "Logic" (Logic.Mat.atomic) ; veuillez reporter cecibug interne : matrice 'i' dans replTmat() : veuillez reporter cecibug interne : 'i' manquant dans replTmat() : veuillez reporter cecichaîne de caractères 'col.names' incorrect : %sargument 'contrast.arg' incorrect'data' incorrect'mod' incorrect : %s'type' invalide(to - from)/by incorrect dans seq(.)indiçage de chaînes de caractères incorrectclasse incorrecte : %sdimnames incorrects fournis pour l'objet %snargs()= %d incorrectextraction d'un sous-ensemble de 'Matrix' incorrect ou non implémentéméthode kronecker doit utiliser une 'FUN' par défautla longueur doit être un nombre non négatifla longueur du 1er arg ne correspond pas à la dimension du secondla longueur du 2ème arg ne correspond pas à la dimension du premierlength(i) n'est pas un multiple de length(x)length(x) doit être soit 1 ou #{cols}erreur logique de programmation dans printSpMAtrix2(), veuillez reporter ceciindice logique trop long (%d, devrait être %d)la longueur de l'objet le plus long n'est pas un multiple de la longueur de l'objet le plus courtla longueur de l'objet le plus long n'est pas un multiple de la longueur de l'objet le plus courtm[ ] <- v : traitement inefficace d'éléments uniquesm[ ] : indice sur un seul élément inefficace la matrice n'est pas diagonaleune matrice avec des cellules non nulles hors diagonale ne peut être convertie automatiquement en "diagonalMatrix"le cadre du modèle et la formule ne correspondent pas dans model.matrix()il faut spécifier 'A' ou les fonctions 'A.x' et 'At.x'doit avoir exactement une entrée non zéro par lignenargs() = %d ne devrait jamais se produire ; veuillez reporter ceci.nargs() = %d. Arguments additionnels dans '[ .. ]' incorrects (i.2col) ?nargs() = %d. Arguments additionnels dans '[…]' inacceptables (i.logical) ?nargs() = %d. Arguments supplémentaires dans '[ .. ]' illégaux ?les valeurs négatives ne sont pas permises dans les indices de matricespas de 'dimnames[[.]]' : impossible d'utiliser un indiçage de chaîne de caractèresmatrices de dimensions incompatibles dans %sdimensions incohérentesmatrice non carréematrice qui n'est pas un positif définice n'est pas une matrice carréece n'est pas une matrice symétrique ; considérez forceSymmetric() ou symmpart()ce n'est pas une matrice triangulairepas de convergence en %d itérationspas assez de nouveaux vecs -- arrêt des itérationspas encore implémentépas encore implémenté .. veuillez reporter cecipas encore implémenté pour %spas encore implémenté pour une classe %spas encore implémenté pour une matrice avec typeof %sméthode 'Matrix[<-' non encore implémentéeconversion automatique en "TsparseMatrix" pas encore implémentéeméthode non encore implémentée pour %s(<%s>). ->> Demandez à l'auteur du package d'implémenter cette fonction manquante.méthode non encore implémentée pour %s(<%s>, <%s>). ->> Demandez à l'auteur du package d'implémenter cette fonction manquante.méthode pas encore implémentée pour <%s> %%*%% <%s>rien à remplacer avecle nombre d'items à remplacer n'est pas un multiple de la longueur de remplacementnombre de lignes incompatibles pour %sseules des tables bidimensionnelles peuvent être automatiquement converties en matrices éparsesseules des matrices carrées peuvent être utilisées comme matrices d'incidence pour les graphiquesprod() n'est pas encore implémentéerreur de programmation : min() aurait du être dispatché avec le 1er arg bien plus tôtqr.R() ne diffère peut-être pas de qr.R() en raison de permutations.Utilisez éventuellement notre qrR() à la placerankMatrix(, method = '%s') converti automatiquement en matrice dense. Il faudrait probablement plutôt utiliser une méthode = 'qr' ?rankMatrix(x, method='qr') : calcul de t(x) comme nrow(x) < ncol(x)conversion automatique rcond(.) via sparse -> densereadMM() : colonne valeurs 'j' ne sont pas comprises entre 1:ncreadMM() : ligne valeurs 'i' ne sont pas comprises entre 1:nrle replacement d'entrées "indMatrix" n'est pas autorisé, c'est rarement judicieuxreprésentation '%s' non reconnules indices de lignes doivent être <= nrow(.) qui est %dquelques arguments ne sont pas des matricesun tel indiçage doit être réalisé avec un vecteur logique ou une matrice numérique à deux colonnessum() n'est pas encore implémentéla matrice symétrique doit être carréela forme de symétrie '%s' pas encore implémentéela symétrie n'est pas reconnue pour '%s'la forme de symétrie 'hermitian' pas encore implémentée pour la lecturela forme de symétrie 'skew-symmetric' pas encore implémentée pour la lecturetemporairement désactivéla %d-ième (sous)-diagonale (k = %d) est trop courte ; elle est replie avec des NAsla matrice n'est pas triangulairele nombre d'entrées non zéro diffère de nrow(.)trop d'argumentstrop de valeurs de remplacementmoyenne élaguée du 'sparseVector' -- utilisation suboptimale de as.numeric()type '%s' non reconnuméthode non définie pour la classe %supdate doit être TRUE/FALSE ou '+' ou '-'utilisation d'une partie d'"ancien code" dans une sous-assignation Csparseutilisation d'une méthode lente kronecker()utilisation d'une partie d'"ancien code" dans une sous-assignation Csparse >>> veuillez envoyer un rapport à Matrix-authors@r-project.org, s'il-vous-plaitla variable '%s' est absente, ses contrastes seront ignorésvecteur trop long dans une opération Matrix - vecteurlorsque 'A' est spécifié, 'A.x' et 'At.x' ne sont pas pris en comptesigne incorrect dans l'argument 'by'x / 0 pour un x avec changement de signe il n'est plus représentable comme 'rleDiff'x[.,.] <- val: x est converti automatiquement de Tsparse* vers CsparseMatrixx[.,.] <- val: x vaut %s, val qui ne sont pas dans {TRUE, FALSE} sont convertis NA |--> TRUE.x[.,.] <- val: x vaut %s, val qui ne sont pas dans {TRUE, FALSE} sont convertis.x[.] <- val: x vaut %s, val qui ne sont pas dans {TRUE, FALSE} sont convertis.x[.] <- val: x vaut %s, val qui ne sont pas dans {TRUE, FALSE} sont convertis ; NA |--> TRUE.vous ne pouvez pas mélanger les indices négatifs et positifsMatrix/inst/po/de/0000755000176200001440000000000013203323315013474 5ustar liggesusersMatrix/inst/po/de/LC_MESSAGES/0000755000176200001440000000000013203323315015261 5ustar liggesusersMatrix/inst/po/de/LC_MESSAGES/Matrix.mo0000644000176200001440000006230412532077045017101 0ustar liggesusers3 )< 5T#q#)!8#Z+~+#.&)6P(-I&((O4x5D:($c42/ =<9z+3<<Q,0RI(11+),U,%%/3I})#,5 3C;w*:,F)e+8!+B-]!M/J+ ;v 4 ? A'!)i!)!A!2!02"2c"?"H"#+<#h#:~#:##$B,$#o$$($$$*$1)%*[%*%(%3%& &*+& V&#d&P&M&"'',J'=w'3';'1%(FW(<('(+)0/),`),))1)% *02*"c**!*)** +)+%F+$l+2+,+'+-,.G,2v,,,&,-&-.C--r-/-+-*-'.+E.,q.,.-.(.1"/#T/*x/ /9//0<0!Y0'{0'0#0#0+1&?1f1/161122$-2@R212&223<3)\3%3*3333('4P4%n4.4(4$4$5656S5955&5 60&6W6 g6&u6'68686670V7O7-78.9=9 :)!:!K:'m::,:/:; /;"P;+s;:;';$<7'<-_<A<=<4 =VB=*=+=<==->Mk>=>/> '?:H?C?5?>?@<@2}@C@=@=2A.pAA+A+A9BLMB1B1B2B.1C/`C/C,C,C D/;DEkDD(D'D+E>KE4E@E2FA3F3uF,F/F+G=2G,pG6GG9G*.HTYH8HSHF;I5IIIGJ2JJ-}JNJ9J24KAgKCKOK$=L2bLLALCL9MWMIsM)M*M+N#>N.bN;N2NAO*BOKmOOO5OP$2PRWPQP-P4*QA_Q?Q@Q="RK`RLR0R7*S3bS/S/S!S,T.ETCtT#TT!T,UKU+iUU3U(U=V2PV0V6V7V;#W_W$yW1W$W1W4'X3\X4X0X/X$&Y2KY3~Y3Y4Y+Z4GZ'|Z9Z&ZO[U[#t[ [%[5[5\(K\1t\9\2\$]78]:p]"]]](]G^;e^1^^^7 _5C_.y_0_ _:_15` g`&`.`,`. a.:a ia<aEa# b,1b^b2zbbb*b+bK(cKtc.c:c_*d9duhDn`&3" t9Om>y K@~k74GAH=*LpY8#f:U,'xNTq%VlBQiS/cd5wo 2]JC^ +Ze1sbj{$[Fz)I-}X R_E<.!v(|P rMag0?;6\W%s = '%s' (back-permuted) is experimental%s(): structurally rank deficient case: possibly WRONG zeros'%s' must be in '%s''%s' must have string length 1'%s' slot must have length 1'Dim' slot has length less than two'data' must be of a vector type'factors' slot must be a named list's1' and 's2' must be "character" vectors'uplo' must be UPP or LOWA must be a logical matrixA must have #{rows} >= #{columns}Argument b must be a numeric matrixArgument ij must be 2-column integer matrixArgument must be numeric-like atomic vectorArgument rho must be an environmentArgument y must be numeric, integer or logicalCHOLMOD factorization was unsuccessfulCannot coerce to too large *geMatrix with %.0f entriesCannot factor a matrix with zero extentsCannot solve() for matrices with zero extentsCholesky factorization failed; unusually, please report to Matrix-authorsCholmod error '%s' at file %s, line %dCholmod warning '%s' at file %s, line %dCsparse_crossprod(): error return from cholmod_aat()Csparse_general_to_symmetric(): matrix is not square!Csparse_sort(x): x is not a valid (apart from sorting) CsparseMatrixCsparse_to_nz_pattern(x, tri = NA): 'tri' is taken as TRUEDeterminant requires a square matrixDim slot must have length 2Dimensions of a (%d,%d) and b (%d,%d) do not conformDimensions of system to be solved are inconsistentDimensions of x and y are not compatible for %sExact singularity detected during LU decomposition: %s, i=%d.First call to Lapack routine dgels returned error code %dFirst call to dgeqrf returned error code %dImpossible Rk_x/Rk_y in Csparse_%s(), please reportInappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)Inconsistent dimensions: np = 0 and nnz = %dIncorrect length of 'x' slotIndex i must be NULL or integerIndex j must be NULL or integerLU decomposition applies only to square matricesLapack dgecon(): system computationally singular, reciprocal condition number = %gLapack routine %s returned error code %dLapack routine dgetri: system is exactly singularLapack routine dgetrs: system is exactly singularLapack routine dposv returned error code %dLapack routine dsytrf returned error code %dLapack routine dtrcon returned error code %dLengths of super and pi must be equalLengths of super and px must be equalLower band %d > upper band %dMatrices are not conformable for multiplicationMatrix exponential requires square, non-null matrixMatrix is not squareMatrix namespace not determined correctlyMatrix object has no 'factors' slotNegative value in DimNegative values in DimNon-symmetric matrix passed to dsCMatrix_to_dgTMatrixNonsymmetric matrix in Csparse_symmetric_to_generalNumber of supernodes must be positive when is_super is TRUEOnly 'g'eneral sparse matrix types allowedSecond call to Lapack routine dgels returned error code %dSecond call to dgeqrf returned error code %dSolve requires a square matrixSuiteSparseQR_C_QR returned an error codeSupernodal LDL' decomposition not availableSupernodal/simplicial class inconsistent with type flagsSymmetric and triangular both setUnable to initialize cholmod: error code %dUnknown error in getGivensX must be a numeric (double precision) matrixX must be a real (numeric) matrixall column indices (slot 'j') must be between 0 and ncol-1 in a TsparseMatrixall column indices must be between 0 and ncol-1all row indices (slot 'i') must be between 0 and nrow-1 in a TsparseMatrixargument type[1]='%s' must be a one-letter character stringargument type[1]='%s' must be one of '1','O', or 'I'argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'as_cholmod_triplet(): could not reallocate for internal diagU2N()cannot add diag() as long as 'diag = "U"'cannot set diag() as long as 'diag = "U"'chm_MOD_xtype() was not successful in Csparse_%s(), please reportchm_diagN2U(): nrow=%d, ncol=%dchm_diagN2U(x, uploT = %d): uploT should be +- 1chm_factor_name(): did not get string of length 11chm_sparse_to_SEXP(, *): invalid 'Rkind' (real kind code)chm_transpose_dense(ans, x) not yet implemented for %s different from %scholmod_change_factor failedcholmod_change_factor failed with status %dcholmod_drop() failedcholmod_factorize failed: status %d, minor %d from ncol %dcholmod_factorize_p failed: status %d, minor %d of ncol %dcholmod_sdmult error (resid)cholmod_sdmult error (rhs)cholmod_solve (CHOLMOD_A) failed: status %d, minor %d from ncol %dcholmod_sort returned an error codecholmod_updown() returned %dcholmod_write_sparse returned error codecls = "%s" does not end in "CMatrix"cls = "%s" must begin with 'd', 'l' or 'n'code for cholmod_dense with holes not yet writtencode not yet written for cls = "lgCMatrix"complex sparse matrix code not yet writtencs matrix not compatible with class '%s'cs_lu(A) failed: near-singular A (or out of memory)cs_lusol failedcs_qr failedcs_qrsol() failed inside dgCMatrix_qrsol()cs_sqr failedcsp_eye argument n must be positivedata length [%d] is not a sub-multiple or multiple of the number of columns [%d]data length [%d] is not a sub-multiple or multiple of the number of rows [%d]data length exceeds size of matrixddense_to_symmetric(): matrix is not square!dgCMatrix_cholsol requires a 'short, wide' rectangular matrixdgCMatrix_lusol requires a square, non-empty matrixdgCMatrix_matrix_solve(.., sparse=TRUE) not yet implementeddgCMatrix_qrsol(., order) needs order in {0,..,3}dgCMatrix_qrsol(<%d x %d>-matrix) requires a 'tall' rectangular matrixdgeMatrix_Schur: argument x must be a non-null square matrixdgeMatrix_Schur: dgees returned code %ddgeMatrix_Schur: first call to dgees faileddgeMatrix_exp: LAPACK routine dgebal returned %ddgeMatrix_exp: dgetrf returned error code %ddgeMatrix_exp: dgetrs returned error code %ddiag_tC(): invalid 'resultKind'diagonal element %d of Cholesky factor is missingdiagonal to be added has wrong lengthdon't know if a dense pattern matrix makes sensedpoMatrix is not positive definitedtrMatrix must be squareerror [%d] from Lapack 'dgecon()'exactly 1 of 'i', 'j' or 'p' must be NULLf->xtype of %d not recognizedfactors slot must be named listfailure in as_cholmod_factorfailure to open file "%s" for writingfirst element of slot p must be zeroi and j must be integer vectors of the same lengthin_place cholmod_sort returned an error codeincorrect left cyclic shift, j (%d) < 0incorrect left cyclic shift, j (%d) >= k (%d)incorrect left cyclic shift, k (%d) > ldx (%d)internal_chm_factor: Cholesky factorization failedinvalid '%s' argumentinvalid 'ncol' value (< 0)invalid 'ncol' value (too large or NA)invalid 'nrow' value (< 0)invalid 'nrow' value (too large or NA)invalid class '%s' to dup_mMatrix_as_dgeMatrixinvalid class '%s' to dup_mMatrix_as_geMatrixinvalid class of 'value' in Csparse_subassign()invalid class of 'x' in Csparse_subassign()invalid class of 'x' in Matrix_as_cs(a, x)invalid class of object to %sinvalid class of object to as_cholmod_denseinvalid class of object to as_cholmod_factorinvalid class of object to as_cholmod_sparseinvalid class of object to as_cholmod_tripletinvalid class(x) '%s' in R_to_CMatrix(x)invalid class(x) '%s' in compressed_to_TMatrix(x)invalid column index at position %dinvalid object passed to as_cholmod_sparseinvalid row index at position %dlast element of slot p must match length of slots j and xlength of x slot != prod(Dim)length(beta) must match ncol(V)length(p) must match nrow(V)length(q) must be zero or ncol(R)lengths of slots 'i' and 'x' must matchlengths of slots 'j' and 'x' must matchlengths of slots i and j must matchlengths of slots i and x must matchmatrix is not square! (skew-symmetric part)matrix is not square! (symmetric part)matrix is not symmetric [%d,%d]missing 'Matrix' namespace: should never happennegative vector lengths not allowed: np = %d, nnz = %dnon-numeric matrix extentnot a 'n.CMatrix'not a CsparseMatrixnp = %d, must be zero when p is NULLnumber of rows in y (%d) does not match number of rows in X (%d)nz2Csparse(): invalid/non-implemented r_kind = %dobject must be a named, numeric vectorp must be non-decreasingp[0] = %d, should be zeroprogramming error in Csparse_subassign() should never happenrcond requires a square, non-empty matrixreplacement diagonal has wrong lengthright=TRUE is not yet implemented __ FIXMEslot Dim must have length 2slot j is not *strictly* increasing inside a columnslot j is not increasing inside a columnslot p must be non-decreasingslot p must have length = nrow(.) + 1sparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)strlen of cls argument = %d, should be 8subscript 'i' out of bounds in M[ij]subscript 'j' out of bounds in M[ij]system argument is not validthe leading minor of order %d is not positive definitethe number of columns differ in R_rbind2_vector: %d != %dtol, given as %g, must be <= 1tol, given as %g, must be non-negativetoo many elements specifiedunexpected ctype = %d in dup_mMatrix_as_geMatrixunknown 'Rkind'unknown xtypeunknown xtype in cholmod_sparse objectunknown xtype in cholmod_triplet objectuplo='L' must not have sparse entries above the diagonaluplo='U' must not have sparse entries below the diagonalx slot must be numeric "double"x[] <- val: val is coerced to logical for "%s" xx[] <- val: val should be integer or logical, is coerced to integer, for "%s" xy must be a numeric (double precision) matrixProject-Id-Version: R 3.2.0 / Matrix 1.1-2 Report-Msgid-Bugs-To: POT-Creation-Date: 2015-05-29 16:55+0200 PO-Revision-Date: 2015-03-27 09:48+0100 Last-Translator: Detlef Steuer Language-Team: German Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); %s = '%s' (zurückgetauscht) ist experimentell%s(): Fall mit strukturellem Rangdefizit: evtl FALSCHE Nullen'%s' muss in '%s' sein'%s' muss die Zeichenkettenlänge 1 habenSlot '%s' muss die Länge 1 haben'Dim'-Slot hat eine Länge kleiner zwei'data' muss ein Vektortyp sein'factors'-Slot muss eine benannte Liste sein's1' und 's2' müssen 'character'-Vektoren sein'uplo' muss UPP oder LOW seinA muss eine logische Matrix seinA muss #{rows} >= #{columns} habenArgument b muss eine numerische Matrix seinArgument ij muss eine zweispaltige ganzzahlige Matrix seinArgument muss zahl-ähnlich atomar seinArgument rho muss eine Umgebung seinArgument y muss numerisch, ganzzahlig oder logisch seinCHOLMOD-Faktorzerlegung war nicht erfolgreichKann nicht in eine große *geMatrix mit %.0f Einträgen umwandelnEine Matrix mit Umfang Null kann nicht berücksichtigt werdensolve() für Matrizen mit Umfang Null nicht möglichCholesky-Faktorisierung fehlgeschlagen; ungewöhnlich, bitte an Matrix-authors melden!Cholmod-Fehler '%s' bei Datei %s, Zeile %dCholmod-Warnung '%s' bei Datei %s, Zeile %dCsparse_crossprod(): Fehler von cholmod_aat() zurückgegebenCsparse_general_to_symmetric(): Matrix ist nicht quadratisch.Csparse_sort(x): x ist keine gültige (abgesehen vom Sortieren) CsparseMatrixCsparse_to_nz_pattern(x, tri = NA): 'tri' als TRUE angenommenDeterminante benötigt eine quadratische MatrixDim-Slot muss die Länge 2 habenDimensionen von a (%d,%d) und b (%d,%d) sind nicht konformDimensionen des Systems, das gelöst werden soll, sind inkonsistentDimensionen von x und y sind nicht kompatibel für %sExakte Singularität während LU-Zerlegung entdeckt: %s, i=%d.Erster Aufruf der Lapack-Routine dgels gab Fehlerkode %d zurückErster Aufruf von dgeqrf gab Fehlerkode %d zurückUnmögliche Rk_x/Rk_y in Csparse_%s(). Bitte dem Entwickler melden!Unangemessene Klasse cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)Unangemessene Klasse cl='%s' in Matrix_css_to_SEXP(S, cl, ..)Inkonsistente Dimensionen: np = 0 und nnz = %dFalsche Länge von 'x'-SlotIndex i muss NULL oder eine ganze Zahl seinIndex j muss NULL oder eine ganze Zahl seinLU-Zerlegung ist nur bei quadratischen Matrizen anwendbarLapack-dgecon(): System rechnerisch singulär, reziproke Konditionszahl = %gLapack-Routine %s gab einen Fehlerkode %d zurückLapack-Routine dgetri: System ist exakt singulärLapack-Routine dgetrs:: System ist exakt singulärLapack-Routine dposv gab Fehlerkode %d zurückLapack-Routine dsytrf gab Fehlerkode %d zurückLapack-Routine dtrcon gab Fehlerkode %d zurückLängen von super und pi müssen gleich seinLängen von super und px müssen gleich seinUnteres Band %d > oberes Band %dMatrizen sind nicht für Multiplikation konformExponentielle Matrix benötigt eine quadratische Matrix ungleich NullMatrix ist nicht quadratischMatrix-Namensraum nicht korrekt bestimmtMatrix Objekt hat keinen 'factors'-SlotNegativer Wert in DimNegative Werte in DimNicht symmetrische Matrix an dsCMatrix_to_dgTMatrix übergebenAsymmetrische Matrix in Csparse_symmetric_to_generalAnzahl der Superknoten muss positiv sein, wenn is_super TRUE istNur 'g'enerelle dünn besetzte Matrixtypen erlaubtZweiter Aufruf der Lapack-Routine dgels gab Fehlerkode %d zurückZweiter Aufruf von dgeqrf gab Fehlerkode %d zurückAuflösen benötigt eine quadratische MatrixSuiteSparseQR_C_QR gab einen Fehlerkode zurückSuperknoten-LDL'-Zerlegung nicht verfügbarSuperknoten-/simpliziale Klasse inkonstent mit TypkennzeichenSymmetrisch und dreieckig sind beide gesetztcholmod kann nicht initialisiert werden: Fehlerkode %dUnbekannter Fehler in getGivensX muss eine numerische (doppelte Genauigkeit) Matrix seinX muss eine echte (numerische) Matrix seinAlle Spaltenindizes (slot 'j') müssen in TsparseMatrix zwischen 0 und ncol-1 liegenAlle Spaltenindizes müssen zwischen 0 und ncol-1 liegenalle Zeilenindizes (slot 'i') müssen in TsparseMatrix zwischen 0 und nrow-1 liegenArgument type[1]='%s' muss eine Zeichenkette aus einem Buchstaben seinArgument type[1]='%s' eins aus '1', 'O' oder 'I' seinArgument type[1]='%s' muss eins aus 'M', '1', 'O', 'I', 'F' oder 'E' seinas_cholmod_triplet(): konnte für internes diagU2N() nicht reallozierenkann diag() nicht hinzufügen solange 'diag = "U"'kann diag() nicht setzen solange 'diag = "U"'chm_MOD_xtype() nicht erfolgreich in Cspare_%s(). Bitte dem Entwickler melden!chm_diagN2U(, *): ungültiges 'Rkind' (echter Artkode)chm_transpose_dense(ans, x) noch nicht implementiert für %s verschieden von %scholmod_change_factor fehlgeschlagencholmod_change_factor mit Status %d fehlgeschlagencholmod_drop() fehlgeschlagencholmod_factorize fehlgeschlagen: Status %d, Minor %d von ncol %dcholmod_factorize_p fehlgeschlagen: Status %d, Minor %d von ncol %dcholmod_sdmult-Fehler (resid)cholmod_sdmult-Fehler (rhs)cholmod_solve (CHOLMOD_A) fehlgeschlagen: Status %d, Minor %d von ncol %dcholmod_sort gab einen Fehlerkode zurückcholmod_updown() gab Fehlerkode %d zurückcholmod_write_sparse gab Fehlerkode zurückcls = '%s' endet nicht in 'CMatrix'cls = '%s' muss mit 'd', 'l' oder 'n' beginnenKode für cholmod_dense mit Löchern noch nicht geschriebenKode noch nicht für cls = 'lgCMatrix' geschriebenKode für komplexe dünn besetzte Matrizen noch nicht geschriebencs-Matrix nicht kompatibel mit Klasse '%s'cs_lu(A) fehlgeschlagen: near-Singuläres A (oder außerhalb des Speichers)cs_lusol fehlgeschlagencs_qr fehlgeschlagencs_qrsol() innerhalb dgCMatrix_qrsol() fehlgeschlagencs_sqr fehlgeschlagencsp_eye-Argument n muss positiv seinDatenlänge [%d] ist kein Teilvielfaches oder Vielfaches der Zahl der Spalten [%d]Datenlänge [%d] ist kein Teilvielfaches oder Vielfaches der Zahl der Zeilen [%d]Datenlänge überschreitet Größe der Matrixddense_to_symmetric(): Matrix ist nicht quadratisch.dgCMatrix_cholsol benötigt eine 'short, wide'-rechteckige MatrixdgCMatrix_lusol benötigt eine quadratische, nicht leere MatrixdgCMatrix_matrix_solve(.., sparse=TRUE) noch nicht implementiertdgCMatrix_qrsol(., Anordnung) benötigt Anordnung in {0,..,3}dgCMatrix_qrsol(<%d x %d>-Matrix) benötigt eine 'lange' rechteckige MatrixdgeMatrix_Schur: Argument x muss eine quadratische Matrix ungleich Null seindgeMatrix_Schur: dgees gab Fehlerkode %d zurückdgeMatrix_Schur: Erster Aufruf von dgees fehlgeschlagendgeMatrix_exp: LAPACK-Routine dgebal gab %d zurückdgeMatrix_exp: dgetrf gab Fehlerkode %d zurückdgeMatrix_exp: dgetrs gab Fehlerkode %d zurückdiag_tC(): 'resultKind' ungültigDiagonalelement %d des Choleskyfaktors fehltzu addierende Diagonale hat die falsche Längees ist nicht klar, ob eine dicht besetzte Mustermatrix sinnvoll istdpoMatrix ist nicht positiv definitdtrMatrix muss quadratisch seinFehler [%d] von Lapack-'dgecon()'exakt 1 von 'i', 'j' oder 'p' muss NULL seinf->xtype von %d nicht erkanntFaktoren-Slot muss eine benannte Liste seinMisserfolg in as_cholmod_factorÖffnen von Datei '%s' zum Schreiben fehlgeschlagenerstes Element von Slot p muss Null seini und j müssen Ganzzahlvektoren mit der gleichen Länge seinin_place cholmod_sort gab einen Fehlerkode zurückfalsches zyklisches Linksverschieben, j (%d) < 0falsches zyklisches Linksverschieben, j (%d) >= k (%d)falsches zyklisches Linksverschieben, k (%d) > ldx (%d)internal_chm_factor: Cholesky-Faktorisierung fehlgeschlagenungültiges '%s' Argumentunzulässiger Wert für 'ncol' (< 0)unzulässiger Wert für 'ncol' (zu groß oder NA)unzulässiger Wert für 'nrow' (< 0)unzulässiger Wert für 'nrow' (zu groß oder NA)ungültige Klasse '%s' für dup_mMatrix_as_dgeMatrixungültige Klasse '%s' für dup_mMatrix_as_geMatrixungültige Klasse von 'value' in Csparse_subassign()ungültige Klasse von 'x' in Csparse_subassign()ungültige Klasse von 'x' in Matrix_as_cs(a, x)ungültige Klasse des Objektes zu %sungültige Klasse des Objektes zu as_cholmod_denseungültige Klasse des Objektes zu as_cholmod_factorungültige Klasse des Objektes zu as_cholmod_sparseungültige Klasse des Objektes zu as_cholmod_tripletungültige class(x) '%s' in R_to_CMatrix(x)ungültige class(x) '%s' in compressed_to_TMatrix(x)ungültiger Spaltenindex an Position %dungültiges Objekt an Klasse as_cholmod_sparse übergebenungültiger Zeilenindex an Position %dletztes Element von Slot p muss eine zu den Slots j und x passende Länge habenLänge von x-Slot != prod(Dim)length(beta) muss zu ncol(V) passenlength(p) muss zu nrow(V) passenlength(q) muss null oder ncol(R) seinLängen der Slots 'i' und 'x' müssen übereinstimmenLängen der Slots 'j' und 'x' müssen übereinstimmenLängen der Slots i und j müssen passenLängen der Slots i und x müssen zusammen passenMatrix ist nicht quadratisch. (schief-symmetrischer Teil)Matrix ist nicht quadratisch. (symmetrischer Teil)Matrix ist nicht symmetrisch [%d,%d]fehlender 'Matrix'-Namensraum: Sollte niemals vorkommennegative Vektorlänge ist nicht erlaubt: np = %d, nnz = %dnicht-numerische Matrix-Ausdehnungkeine 'n.CMatrix'keine CsparseMatrixnp = %d, muss Null sein, wenn p NULL istAnzahl der Zeilen in y (%d) passt nicht zur Anzahl der Zeilen in X (%d)nz2Csparse(): ungültiges/nicht implementiertes r_kind = %dObjekt muss ein benannter numerischer Vektor seinp darf nicht abnehmend seinp[0] = %d, sollte Null seinFehler in Csparse_subassign(); sollte niemals vorkommenrcond benötigt eine quadratische, nicht leere MatrixDiagonale zur Ersetzung hat die falsche Längeright=TRUE ist noch nicht implementiert __ FIXMESlot Dim muss die Länge 2 habenSlot j ist nicht *strikt* zunehmend innerhalb einer SpalteSlot j ist nicht zunehmend innerhalb einer SpalteSlot p darf nicht abnehmend seinSlot p muss Länge = nrow(.) + 1 habensparseQR_Qmult(): nrow(y) = %d != %d = nrow(V)strlen des cls-Arguments = %d, sollte 8 seinSubskript 'i' außerhalb des Bereichs in M[ij]Subskript 'j' außerhalb des Bereichs in M[ij]Systemargument ist nicht gültigder führende Minor der Ordnung %d ist nicht positiv definitdie Anzahl der Spalten untescheidet sich in R_rbind2_vector: %d != %dtol, als %g gegeben, muss <= 1 seintol, als %g gegeben, darf nicht negativ seinzu viele Elemente angegebenunerwartetes ctype = %d in dup_mMatrix_as_geMatrix'Rkind' unbekanntunbekannter xtypeunbekannter xtype in Objekt cholmod_sparseunbekannter xtype in Objekt cholmod_tripletuplo='L' darf keine dünn besetzten Einträge unterhalb der Diagonale habenuplo='U' darf keine dünn besetzten Einträge unterhalb der Diagonale habenx-Slot muss ein numerischer 'double' Wert seinx[] <- val: val in booleschen Wert umgewandelt für "%s" xx[] <- val: val sollte ganzzahlig oder logisch sein, wird in ganze Zahl umgewandelt für "%s" xy muss eine numerische (doppelte Genauigkeit) Matrix seinMatrix/inst/po/de/LC_MESSAGES/R-Matrix.mo0000644000176200001440000006641413047321304017276 0ustar liggesusers% pq6390j$61/P,-*#*,>;k#6D,[K1#9]4x$9W (dV0$10V:Ix 8&'-MhJ:(/05`,#88 7Y,. $QC!D4(J$s%M= &J &q < = !7!5!-#"6Q":"C"7#(?#*h##T# $*&$9Q$Z$$e%/l%"%"%1%$&(9&b&&I&8&"!'D'@c'@'5'6(R( q(((( ((($)5)2I)'|)")1)3)(-*%V*:|*-*@*?&+=f+8++H+2=,9p,,,7,0-E@-H-=-5 .1C.u.'..../?/T/l/&//$// 0-'0&U0/|0h0n1.11B1F2(U2D~2A2&3G,3et3v3?Q4%4+4)4@ 5"N53q5*55;5%,6R6)r6!696>677AL773777B8Q8j8'8088`85`9,9799O:>g:I:<::-;Hh;,;;p==9=8=&">KI>#>!>)>?7 ?6X?2?4?5?1-@$_@@0@L@$A=ACSASA3AB[;BB4B.BCA5C'wCIC^C-HD]vDD3D)'E3QEAESEF"FCF7G)?G)iGGGbGE1H5wH7H@H6&I*]I:I;I:IC:J~J1JJ#Jc KnK KLK;K)3L%]L+LQLRM9TM+MRME NSNNNLLO2O:OKPJSP8P6P.Q =QR^QQ-Q6Qh4R"RR8@S6yS6S3S$T)@TjTTSTCT(AU#jUJUKU:%V=`V'V&VVWW&)WPWnW*WW=W.X)3X;]XAX+X"Y@*Y0kYEYDY>'Z=fZZaZ> [>_[3[C[7\KN\N\B\;,]Ch]]&]]^!^?^HY^^+^5^_)2_ \_'}_2_-_:`A``6OaaJaDa.-bZ\bRb, cQ7cic}c@qd8d.d-eIHe"e8e1e$ fLEf+f)f+f g<5gArggMgh99hshhYhh#i23i9fi)imi18j/jjGj$j[k@ckRkDkD+2?K8L%s %s is undefined%s kind not yet implemented'%s()' is not yet implemented for representation '%s''%s()' is not yet implemented for element type '%s''A' must be a square matrix'NA' indices are not (yet?) supported for sparse Matrices'V' is not a *square* matrix'V' is not a square matrix'boolArith = %d' not yet implemented'by' argument is much too small'diagonals' matrix must have %d columns (= length(k) )'diagonals' must have the same length (%d) as 'k''file' must be a character string or connection'force' must be (coercable to) TRUE or FALSE'lag' and 'differences' must be integers >= 1'lwd' must be NULL or non-negative numeric'ncol' is not a factor of length(x)'ncol' must be >= 0'nearPD()' did not converge in %d iterations'nrow' and 'ncol' must be the same when 'symmetric' is true'nrow' is not a factor of length(x)'nrow' must be >= 0'nrow', 'ncol', etc, are disregarded for matrix 'data''nrow', 'ncol', etc, are disregarded when 'data' is "Matrix" already'p' must be a non-decreasing vector (0, ...)'times >= 0' is required'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a "CHMfactor"'x' has invalid data type'x' is not positive definite -- chol() undefined.'x' is not symmetric nor triangular'x' must be "sparseMatrix"'x' must have length nrow^2 when 'symmetric' is true'x' must inherit from "sparseVector"(un)packing only applies to dense matrices, class(x)='%s'.M.repl.i.2col(): 'i' has no integer column number; should never happen; please report.M.repl.i.2col(): drop 'matrix' case ....M.sub.i.2col(): 'i' has no integer column number; should never happen; please report %s %s is undefined --> is not yet implemented[i] is not yet implemented --> is not yet implemented[ ] : .M.sub.i.logical() maybe inefficientCholesky() -> *symbolic* factorization -- not yet implementedCholesky(A) called for 'A' of class "%s"; it is currently defined for sparseMatrix only; consider using chol() insteadClass %s is not yet implementedCmp.Mat.atomic() should not be called for diagonalMatrixFIXME: NOT YET FINISHED IMPLEMENTATIONInternal bug: nargs()=%d; please reportInvalid assembled indicator: %sInvalid storage format: %sInvalid storage type: %sLU computationally singular: ratio of extreme entries in |diag(U)| = %9.4gLogic.Mat.atomic() should not be called for diagonalMatrixMatrices must have same dimensions in %sMatrices must have same number of columns in %sMatrices must have same number of rows for arithmeticMatrices must have same number of rows in %sMatrix seems negative semi-definiteMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMatrix-internal error in [i,,d]; please reportMust specify 'nrow' when 'symmetric' is trueNA's in (i,j) are not allowedNAs are not allowed in subscripted assignmentsNot a valid formatOnly numeric sparse matrices allowedQuadratic matrix '%s' (=: A) is not formally symmetric. Will be treated as A A'RHS 'b' has wrong lengthRHS 'b' has wrong number of rows:RHS 'value' (class %s) matches 'ANY', but must match matrix class %s[ ] indexing not allowed: forgot a "," ?[[ suppressing %d column names %s ... ]][[ suppressing %d column names %s ]]all() is not yet implementedas(.,"dsCMatrix") is deprecated (since 2008); do use as(., "symmetricMatrix")c(,..) of different kinds, coercing all to 'rleDiff'cannot coerce 'NA's to "nsparseMatrix"cannot coerce 'NA's to "nsparseVector"cannot coerce non-symmetric "dgTMatrix" to "dsCMatrix" classchol() is undefined for diagonal matrix with negative entriescoercion from list(i1,...,ik, d) to "indMatrix" failed. All entries must be integer valued and the number of columns, d, not smaller than the maximal index i*.coercion to "indMatrix" only works from integer numericcoercion to "pMatrix" only works from integer numericcolumn indices must be <= ncol(.) which is %dcomplex matrices not yet implemented in Matrix packagediag(.) had 0 or NA entries; non-finite result is doubtfuldiagonalMatrix in .dense2C() -- should never happen, please report!dim [product %d] do not match the length of object [%d]dim(.) value must be numeric of length 2dimensions don't match the number of cellsdimnames [%d] mismatch in %sdimnames(.) <- NULL: translated to dimnames(.) <- list(NULL,NULL) <==> unname(.)element type '%s' not recognizedelement type 'complex' not yet implementedexactly one of 'i', 'j', or 'p' must be missing from callextra argument %s will be disregarded in %sextra arguments %s will be disregarded in %sfile is not a MatrixMarket filefor symmetric band matrix, only specify upper or lower triangle hence, all k must have the same signgeneral Matrix class not yet implemented for %shit a cycle (1) -- stop iterationshit a cycle (2) -- stop iterationsi1[1] == 0 ==> C-level verbosity will not happen!in Summary(, .): %s(<%s>, <%s>)in Summary(, .): %s(<%s>, <%s>,...)incompatible matrix dimensionsindex larger than maximal %dindex must be numeric, logical or sparseVector for indexing sparseVectorsinefficient coercion (lost triangularity); please reportinefficient method used for "- e1"intermediate 'r' is of type %sinternal bug in "Compare" method (Cmp.Mat.atomic); please reportinternal bug in "Logic" method (Logic.Mat.atomic); please reportinternal bug: matrix 'i' in replTmat(): please reportinternal bug: missing 'i' in replTmat(): please reportinvalid 'col.names' string: %sinvalid 'contrasts.arg' argumentinvalid 'data'invalid 'mod': %sinvalid 'type'invalid (to - from)/by in seq(.)invalid character indexinginvalid class: %sinvalid dimnames given for %s objectinvalid nargs()= %dinvalid or not-yet-implemented 'Matrix' subsettingkronecker method must use default 'FUN'length must be non-negative numberlength of 1st arg does not match dimension of 2ndlength of 2nd arg does not match dimension of firstlength(i) is not a multiple of length(x)length(x) must be either 1 or #{cols}logic programming error in printSpMatrix2(), please reportlogical subscript too long (%d, should be %d)longer object length is not a multiple of shorter object lengthlonger object length is not a multiple of shorter object lengthm[ ] <- v: inefficiently treating single elementsm[ ]: inefficiently indexing single elementsmatrix is not diagonalmatrix with non-zero off-diagonals cannot be coerced to "diagonalMatrix"model frame and formula mismatch in model.matrix()must either specify 'A' or the functions 'A.x' and 'At.x'must have exactly one non-zero entry per rownames(dimnames()) must be NULL or of length twonargs() = %d should never happen; please report.nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?negative values are not allowed in a matrix subscriptno 'dimnames[[.]]': cannot use character indexingnon-conformable argumentsnon-conformable matrix dimensions in %snon-matching dimensionsnon-square matrixnot a positive definite matrixnot a square matrixnot a symmetric matrix; consider forceSymmetric() or symmpart()not a triangular matrixnot converged in %d iterationsnot enough new vecs -- stop iterationsnot yet implementednot yet implemented .. please reportnot yet implemented for %snot yet implemented for class %snot yet implemented for matrix with typeof %snot-yet-implemented 'Matrix[<-' methodnot-yet-implemented coercion to "TsparseMatrix"not-yet-implemented method for %s(<%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for %s(<%s>, <%s>). ->> Ask the package authors to implement the missing feature.not-yet-implemented method for <%s> %%*%% <%s>nothing to replace withnumber of items to replace is not a multiple of replacement lengthnumber of non zeros is smaller than 'nnz' because of duplicated (i,j)snumber of rows are not compatible for %sonly 2-dimensional tables can be directly coerced to sparse matricesonly square matrices can be used as incidence matrices for graphsprod() is not yet implementedprogramming error: min() should have dispatched w/ 1st arg much earlierqr.R() may differ from qr.R() because of permutations. Possibly use our qrR() insteadrankMatrix(, method = '%s') coerces to dense matrix. Probably should rather use method = 'qr' !?rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)rcond(.) via sparse -> dense coercionreadMM(): column values 'j' are not in 1:ncreadMM(): row values 'i' are not in 1:nrreplacing "indMatrix" entries is not allowed, as rarely sensiblerepresentation '%s' not recognizedresulting x-slot has different type than x's or y'srow indices must be <= nrow(.) which is %dsome arguments are not matricessuch indexing must be by logical or 2-column numeric matrixsum() is not yet implementedsymmetric matrix must be squaresymmetry form '%s' is not yet implementedsymmetry form '%s' not recognizedsymmetry form 'hermitian' not yet implemented for readingsymmetry form 'skew-symmetric' not yet implemented for readingtemporarily disabledthe %d-th (sub)-diagonal (k = %d) is too short; filling with NA'sthe matrix is not triangularthe number of non-zero entries differs from nrow(.)too many argumentstoo many replacement valuestrimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)type '%s' not recognizedundefined method for class %supdate must be TRUE/FALSE or '+' or '-'using "old code" part in Csparse subassignmentusing slow kronecker() methodusing"old code" part in Csparse subassignment >>> please report to Matrix-authors@r-project.orgvariable '%s' is absent, its contrast will be ignoredvector too long in Matrix - vector operationwhen 'A' is specified, 'A.x' and 'At.x' are disregardedwrong sign in 'by' argumentx / 0 for an x with sign-change no longer representable as 'rleDiff'x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrixx[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE.you cannot mix negative and positive indicesProject-Id-Version: R 3.3.0 / matrix 1.2-4 Report-Msgid-Bugs-To: bugs.r-project.org POT-Creation-Date: 2017-02-10 12:21 PO-Revision-Date: 2016-04-14 12:55+0200 Last-Translator: Detlef Steuer Language-Team: R-Core Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); %s %s ist undefiniert%s-Art noch nicht implementiert'%s()' ist noch nicht implementiert für Darstellung '%s''%s()' ist noch nicht für Elementtyp '%s' implementiert'A' muss eine quadratische Matrix sein'NA'-Indizes werden (noch?) nicht für dünn besetzte Matrizen unterstützt'V' ist keine *quadratische* Matrix'V' ist keine quadratische Matrix'boolArith = %d' noch nicht implementiertArgument 'by' ist zu klein'diagonals'-Matrix muss %d Spalten haben (= length(k) )'diagonals' muss die gleiche Länge (%d) wie 'k' haben'file' muss eine Zeichenkette oder Verbindung sein'force' muss (umwandelbar nach) TRUE oder FALSE sein'lag' und 'differences' müssen ganze Zahlen >=1 sein'lwd' muss NULL oder nicht negativ numerisch sein'ncol' ist kein Faktor von length(x)'ncol' muss >= 0 seinnearPD() ist nicht in %d Iterationen konvergiert'nrow' und 'ncol' müssen gleich sein, wenn 'symmetric' auf true gesetzt ist'nrow' ist kein Faktor von length(x)'nrow' muss >= 0 sein'nrow', 'ncol', etc werden nicht für Matrix 'data' berücksichtigt'nrow', 'ncol', etc. werden nicht berücksichtigt, wenn 'data' bereits 'Matrix' ist'p' muss ein nicht abnehmender Vektor (0, ...) sein'times >= 0' wird benötigt'update' muss entweder boolesch, '+' oder '-' sein; 'C' eine Matrix und 'L' ein "CHMfactor"'x' hat ungültigen Datentyp'x' ist nicht positiv definit -- chol() undefiniert.'x' ist weder symmetrisch noch in Dreiecksform'x' muss "sparseMatrix" sein'x' muss die Länge nrow^2, wenn 'symmetric' auf true gesetzt ist'x' muss von "sparseVector" geerbt sein(ent)packen ist nur für dicht besetzte Matrizen anwendbar, class(x)='%s'.M.repl.i.2col(): 'i' hat keine ganzzahlige Spaltennummer. Sollte nie passieren. Bitte melden..M.repl.i.2col(): 'matrix'-Fall weglassen ....M.sub.i.2col(): 'i' hat keine ganzzahlige Spaltennummer. Sollte nie passieren. Bitte melden! %s %s ist undefiniert --> ist noch nicht implementiert[i] ist noch nicht implementiert --> ist noch nicht implementiert[ ] : .M.sub.i.logical() könnte ineffizient seinCholesky() -> *symbolische* Faktorisierung – noch nicht implementiertCholesky(A) für 'A' der Klasse "%s" aufgerufen; es ist derzeit nur für sparseMatrix definiert; erwägen Sie, chol() zu benutzen Klasse %s noch nicht implementiertCmp.Mat.atomic() sollte nicht für diagonalMatrix aufgerufen werdenZU ERLEDIGEN: NOCH NICHT ABGESCHLOSSENE IMPLEMENTIERUNGInterner Fehler: nargs()=%d; bitte meldenUngültig zusammengesetzter Indikator: %sUngültiges Speicherformat: %sUngültiger Speichertyp: %sDie LU Zerlegung ist computational singulär; Quotient der extremen Elemente von |diag(U)| = %9.4gLogic.mat.atomic() sollte für diagonalMatrix nicht aufgerufen werdenMatrizen müssen in %s die gleichen Dimensionen habenMatrizen müssen die gleiche Anzahl Spalten in %s habenMatrizen müssen für Arithmetik die gleiche Anzahl Zeilen habenMatrizen müssen die gleiche Anzahl Zeilen in %s habenMatrix scheint negativ semidefinit zu seinMatrixinterner Fehler in [i,,d]. Bitte berichtenMatrix-interner Fehler in [i,,d]; Bitte berichtenMatrix-interner Fehler in [i,,d]. Bitte berichten'nrow' muss angegeben werden, wenn 'symmetric' auf true gesetzt istNAs sind in (i,j) nicht erlaubtNAs sind in indexierten Anweisungen nicht erlaubtKein gültiges FormatNur dünn besetzte Matrizen erlaubtDie quadratische Matrix '%s' (=: A) ist formal nicht symmetrisch. Wird behandelt wie A A'RHS 'b' hat falsche LängeRHS 'b' hat falsche Zahl Zeilen:RHS 'value' (Klasse %s) passt zu 'ANY', muss aber zur Matrixklasse %s passen[ ] Indexierung nicht erlaubt: Ein ',' vergessen?[[ unterdrücke %d Spaltennamen %s ...]][[ unterdrücke %d Spaltennamen %s ]]all() ist noch nicht implementiertas(.,"dsCMatrix") ist veraltet (seit 2008). Benutzen Sie as(., "symmetricMatrix")c(,..) von unterschiedlichen Arten, alle werden in 'rleDiff' umgewandelt'NA's können nicht in "nsparseMatrix" umgewandelt werdenKann NAs nicht in 'nsparseVector' umwandelnnicht symmetrische "dgTMatrix" kann nicht in "dsCMatrix" Klasse umgewandelt werdenchol() ist undefiniert für diagonale Matrix mit negativen EinträgenUmwandlung von list(i1,...,ik, d) zu "indMatrix" gescheitert. Alle Elemente müssen ganzzahlig sein und die Anzahl Spalten, d, nicht kleiner als der maximale Index i*.Umwandlung zu "indMatrix" funktioniert nur von ganzzahligen numerischen WertenUmwandlung zu "pMatrix" funktioniert nur von ganzzahligen numerischen WertenSpaltenindizes müssen <= ncol(.) sein, das ist %dkomplexe Matrizen noch nicht im Matrix-Paket implementiertdiag(.) hatte 0 oder NA Einträge. Nicht-endliches Ergebnis ist zweifelhaftdiagonalMatrix in .dense2C() -- sollte niemals vorkommen. Bitte berichten.dim [produkt %d] passt nicht zur Länge des Objekts [%d]dim(.)-Wert muss numerisch sein und die Länge 2 habenDimensionen passen nicht zur Anzahl der Zellendimnames [%d] passen nicht in %sdimnames(.) <- NULL: übersetzt in dimnames(.) <- list(NULL,NULL) <==> unname(.)Elementtyp '%s' nicht erkanntElementtyp 'complex' noch nicht implementiertexakt eins von 'i', 'j' oder 'p' muss im Aufruf fehlenextra Argument %s wird nicht berücksichtigt in %sextra Argumente %s werden nicht berücksichtigt in %sDatei ist keine MatrixMarket-Dateigeben Sie für symmetrische Bandmatrizen nur oberes oder unteres Dreieck an. deshalb müssen alle k dasselbe Vorzeichen haben.allgemeine Matrixklasse noch nicht implementiert für %sauf einen Zyklus getroffen (1) – Iterationen stoppenauf einen Zyklus getroffen (2) – Iterationen stoppeni1[1] == 0 ==> C-Ebene wird nicht detailliert sein!in Summary(, .): %s(<%s>, <%s>)in Summary(, .): %s(<%s>, <%s>, ...)inkompatible MatrixdimensionenIndex größer als maximales %dIndex muss numerisch, logisch oder sparseVector sein, um sparseVector zu indizierenineffiziente Umwandlung (Dreiecksgestalt verloren). Bitte berichtenineffiziente Methode für '- e1' benutztZwischenergebnis 'r' ist vom Typ %sinterner Fehler in der "Compare"-Methode (Cmp.Mat.atomic). Bitte berichteninterner Fehler in der "Logic"-Methode (.Logic.Mat.atomic). Bitte berichteninterner Fehler: Matrix 'i' in replTmat(): Bitte berichteninterner Fehler: Fehlendes 'i' in replTmat(): Bitte berichtenungültige 'col.names'-Zeichenkette: %sunzulässiges 'contrasts.arg' Argumentungültiges 'data'ungültiges 'mod': %sungültiger 'type'unzulässiges (to - from)/by in seq(.)ungültige Zeichenindexierungungültige Klasse: %sungültige dimnames für %s Objekt gegebenungültige nargs()= %dungültige oder noch nicht implementierte 'Matrix'-Untermengekronecker-Methode muss Standard 'FUN' benutzenLänge muss eine nicht negative Zahl seinLänge des ersten arg passt nicht zur Dimension des zweitenLänge des zweiten Arguments passt nicht zur Dimension des erstenlength(i) ist kein Vielfaches von length(x)length(x) muss 1 oder #{cols} seinlogischer Programmierfehler in printSpMatrix2(), bitte berichtenlogisches Subskript zu lang (%d, sollte %d sein)längere Objektlänge ist kein Vielfaches der kürzeren Objektlängelängere Objektlänge ist kein Vielfaches der kürzeren Objektlängem[ ] <- v: Einzelne Elemente ineffizient behandeltm[ ]: ineffiziente Indexierung einzelner ElementeMatrix ist nicht diagonalMatrix mit Nichtdiagonalelementen ungleich Null kann nicht in "diagonalMatrix" umgewandelt werdenModel-Frame und Formel passen nicht zusammen in model.matrix()muss entweder 'A' angeben oder die Funktionen 'A.x' und 'At.x'muss genau einen Nicht-Null-Eintrag pro Zeile habennames(dimnames()) muss entweder NULL oder von Länge 2 seinnargs() = %d sollte niemals vorkommen. Bitte berichten.nargs() = %d. Irrelevante ungültige Argumente innerhalb '[ .. ]' (i.2col)?nargs() = %d. Irrelevante ungültige Argumente innerhalb '[ .. ]' (i.logical)?nargs() = %d. Irrelevante ungültige Argumente innerhalb '[ .. ]'?negative Werte sind in einer Matrix-Subskript nicht erlaubtkeine 'dimnames[[.]]': Zeichenindexierung kann nicht benutzt werdennicht passende Argumentenicht konforme Matrixdimensionen in %snicht passende Dimensionennicht quadratische Matrixkeine positiv definite Matrixkeine quadratische Matrixkeine symmetrische Matrix. Erwägen Sie forceSymmetric() oder symmpart()keine Dreiecksmatrixnicht konvergiert in %d Iterationsschrittennicht genügend neue Vektoren – Iterationen stoppennoch nicht implementiertnoch nicht implementiert ... bitte meldennoch nicht implementiert für %snoch nicht implementiert für Klasse %snoch nicht implementiert für Matrix mit typeof %snoch nicht implementierte 'Matrix[<-'-Methodenoch nicht implementierte Typumwandlung zu 'TsparseMatrix'noch nicht implementierte Methode für %s(<%s>). ->> Bitten Sie die Autoren des Pakets, diese fehlende Funktion zu implementieren.noch nicht implementierte Methode für %s(<%s>, <%s>). ->> Bitten Sie die Autoren des Pakets, diese fehlende Funktion zu implementieren.noch nicht implementierte Methode für <%s> %%*%% <%s>nichts zu ersetzen mitAnzahl der zu ersetzenden Elemente ist kein Vielfaches der AustauschlängeAnzahl von Nicht-Nullen ist kleiner als 'nnz' wegen doppelter (i,j)sAnzahl der Zeilen ist nicht kompatibel für %snur 2-dimensionale Tabellen könne direkt in eine dünn besetzte Matrix umgewandelt werdennur quadratische Matrizen können als Inzidenzmatrizen für Graphen benutzt werdenprod() ist noch nicht implementiertProgrammierfehler: min() ohne erstes Argument hätte eher abgefangen sein müssenqr.R() könnte von qr.R() aufgrund von Permutationen abweichen. Evtl. besser qrR() nutzen.rankMatrix(, method = '%s') wird in dicht besetzte Matrix umgewandelt. Evtl. eher method = 'qr' nutzen? rankMatrix(x, method='qr'): t(x) berechnet, da nrow(x) < ncol(x)rcond(.) über Umwandlung dünn besetzt -> dicht besetztreadMM(): Spalte Werte 'j' sind nicht in 1:ncreadMM(): Zeile Werte 'i' sind nicht in 1:nrErsetzen von "indMatrix"-Einträgen ist nicht erlaubt, da selten sinnvollRepräsentation '%s' nicht erkanntresultierender x-slot hat einen anderen Typ als x oder yZeilenindizes müssen <= nrow(.) sein, das ist %deinige Argumente sind keine Matrizensolche Indexierung muss von logischer oder 2-spaltig numerischer Matrix seinsum() ist noch nicht implementiertsymmetrische Matrix muss quadratisch seinSymmetrieform '%s' noch nicht implementiertSymmetrieform '%s' nicht erkanntSymmetrieform 'hermitian' noch nicht zum Lesen implementiertSymmetrieform 'skew-symmetric' noch nicht zum Lesen implementiertzeitweise ausgeschaltetdie %d-te (Unter)-Diagonale (k = %d) ist zu kurz und wird mit NA aufgefülltdie Matrix ist nicht dreieckigdie Anzahl der Nicht-Null-Einträge weicht von nrow(.) abzu viele Argumentezu viele Austauschwertegetrimmter Mittelwert von 'sparseVector' – suboptimalerweise wird as.numeric(.) benutztTyp '%s' nicht erkanntundefinierte Methode für Klasse %supdate muss entweder TRUE/FALSE, '+' oder '-' seinbenutzt wird 'alter Kode'-Teil in Csparse-Unterzuweisunglangsame kronecker()-Methode wird benutztbenutzt wird 'alter Kode'-Teil in Csparse-Unterzuweisung >>> bitte an Matrix-authors@r-project.org berichtenVariable '%s' fehlt, ihr Kontrast wird irgnoriertVektor zu lang in der Matrix - Vektor Operationwenn 'A' angegeben wurde, werden 'A.x' und 'At.x' nicht berücksichtigtfalsches Vorzeichen im Argument 'by'x / 0 für einen x mit Vorzeichenwechsel nicht länger als 'rleDiff' darstellbarx[.,.] <- val : x wird von Tsparse* in CsparseMatrix umgewandeltx[.,.] <- val: x ist %s, val nicht in {TRUE, FALSE} wird umgewandelt NA |--> TRUE.x[.,.] <- val: x ist %s, val nicht in {TRUE, FALSE} wird umgewandeltx[.] <- val: x ist %s, val nicht in {TRUE, FALSE}, wird umgewandelt.x[.] <- val: x ist %s, val nicht in {TRUE, FALSE}, wird umgewandelt; NA |--> TRUE.Sie können positive und negative Indizes nicht mischenMatrix/inst/NEWS.Rd0000644000176200001440000006434013201345103013535 0ustar liggesusers% Check from R: % news(db = tools:::.build_news_db_from_package_NEWS_Rd("~/R/Pkgs/Matrix/inst/NEWS.Rd")) \name{NEWS} \title{News for \R Package \pkg{Matrix}}% MM: look into ../svn-log-from.all \encoding{UTF-8} %% as long as not R >= 3.2.0, ~/R/D/r-devel/R/share/Rd/macros/system.Rd : \newcommand{\CRANpkg}{\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}} \newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }} %% NB: The date (yyyy-mm-dd) is the "Packaged:" date in ../DESCRIPTION %%_NOT YET__FIXME_ needs cholmod_l_dense_to_sparse() in our dense_to_Csparse() %% \item \code{as(, "sparseMatrix")} no longer fails %% when \code{prod(dim(.))} is larger than \eqn{2^{31} - 1}. \section{Changes in version 1.2-12 (2017-11-10, svn r3239)}{ \subsection{New Features}{ \itemize{ \item \code{crossprod(x,y)} and \code{kronecker(x,y)} have become considerably more efficient for large \code{"indMatrix"} objects \code{x, y}, thanks to private nudging by Boris Vaillant. } } \subsection{Bug Fixes}{ \itemize{ \item (R-forge Matrix bug #6185): \code{c < 0} now also works for derived sparse Matrices (which only \emph{contain} Matrix classes); via improving hidden \code{MatrixClass()}. Part of such derived matrices only work in R >= 3.5.0. \item using \code{Authors@R} in \file{../DESCRIPTION} to list all contributors. \item \code{solve(-m)} no longer should use a cached Cholesky factorization (of \code{m}). } } } \section{Changes in version 1.2-11 (2017-08-10, svn r3225)}{ \subsection{New Features}{ \itemize{ \item S4 method dispatch no longer emits ambiguity notes (by default) for everybody, apart from the package maintainer. You can reactivate them by \code{options(Matrix.ambiguityNotes = TRUE)} } } \subsection{Bug Fixes}{ \itemize{ \item \code{rankMatrix()} now gives zero for all methods, as it should be. \item no longer calling \code{length(NULL) <- } which has been deprecated in R-devel since July. \item \code{qr.coef(, y)} now finally has correct (row) names (from pivot back permutation). \item \code{.trDiagonal()} utility is now exported. } } } \section{Changes in version 1.2-10 (2017-04-19, svn r3216)}{ \subsection{Bug Fixes}{ \itemize{ \item quite a collection of new \code{PROTECT(.)}'s thanks to Tomas Kalibera's \sQuote{rprotect} analysis. } } } \section{Changes in version 1.2-9 (2017-03-08, svn r3211)}{ \subsection{New Features}{ \itemize{ \item \code{"Ops"} between "table", "xtabs", and our matrices now work. \item \code{as(matrix(diag(3), 3, dimnames=rep(list(c("A","b","c")),2)), "diagonalMatrix")@x} is no longer named. \item \code{norm(x, "2")} now works as well (and equivalently to \code{base::norm}). \item \code{sparseVector()} now also works without \code{x} argument. \item \code{c.sparseVector()} method for \code{c()} of sparseVectors (and available as regular function on purpose). } } \subsection{Bug Fixes}{ \itemize{ \item \code{as(Diagonal(3), "denseMatrix")} no longer returns a non-dense \code{"ddiMatrix"}. \item \code{S[sel,] <- value} and similar no longer segfault, but give a \code{"not (yet?) supported"} error for sparse matrices \code{S} and logical \code{sel} when \code{sel} contains \code{NA}s. The same error (instead of a low-level one) is signalled for \emph{indexing} (with NA-containing logical \code{sel}), i.e., \code{S[sel,]}. %% from in ../TODO : %% \item \code{S[sel,]}, \code{S[,sel] <- value} and similar now also work for %% sparse matrices \code{S} and logical \code{sel} when \code{sel} contains \code{NA}s. \item \code{which(x, arr.ind=TRUE, *)} (when \code{x} is a \code{"lMatrix"} or \code{"nMatrix"}) now works the same as \code{base::which}, obeying an optional \code{useNames} argument which defaults to \code{TRUE}. Previously, the resulting two-column matrix typically had empty \code{dimnames}. } } } \section{Changes in version 1.2-8 (2017-01-16, svn r3201)}{ \subsection{New Features}{ \itemize{ \item 0-length matrix \code{"Ops"} (binary operations) are now compatible to R-devel (to be \R 3.4.0). \item C-API: \code{SuiteSparse_long} is now defined as \code{int64_t} on all platforms, and we now include (C99) \file{inttypes.h} } } \subsection{Bug Fixes}{ \itemize{ \item \code{x[.] <- value} now also works for \code{"sparseVector"}'s, both as \code{x} and as \code{value}. \item \code{x[FALSE] <- value} now also works for \code{"sparseVector"}'s. \item \code{rep(x, *)} now works for \code{"sparseVector"}s and sparse and dense \code{"Matrix"}-classed matrices \code{x}. \item \code{solve()} no gives an error in some cases of singular matrices, where before the C code accessed illegal memory locations. } } } \section{Changes in version 1.2-7.1 (2016-08-29, svn r3187)}{ \itemize{ \item in C code, protect _POSIX_C_SOURCE by #ifdef __GLIBC__ } } \section{Changes in version 1.2-7 (2016-08-27, svn r3185)}{ \subsection{New Features}{ \itemize{ \item \code{cBind()} and \code{rBind()} have been almost silently deprecated in \R \code{>= 3.2.0} and now give a warning, \dQuote{once per session} only. \item \code{bandSparse(*, k=k, *)} now returns matrices inheriting from \code{"triangularMatrix"} when obvious from the diagonal indices \code{k}. } } \subsection{Bug Fixes}{ \itemize{ \item \code{KhatriRao(X,Y)} now also works when \code{X} or \code{Y} is completely zero. } } } \section{Changes in version 1.2-6 (2016-04-27, svn r3175)}{ \subsection{Bug Fixes}{ \itemize{ \item The 0-dim. Matrix multiplication fix in 1.2-5 did trigger wrong warnings in other diagonal matrix multiplications. } } } \section{Changes in version 1.2-5 (2016-04-14, svn r3170)}{ \subsection{New Features}{ \itemize{ \item \code{isSymmetric(m)} now also works for \code{"indMatrix"} \code{m}. \item \code{isSymmetric(m)} is faster for large dense asymmetric matrices. } } \subsection{Bug Fixes}{ \itemize{ \item Matrix multiplications (\code{A \%*\% B}) now work correctly when one of the matrices is diagonal and the other has a zero dimension. } } } \section{Changes in version 1.2-4 (2016-02-29, svn r3162)}{ \subsection{New Features}{ \itemize{ \item \code{sparseMatrix()} gets new argument \code{triangular} and a smarter default for \code{dims} when \code{symmetric} or \code{triangular} is true. \item \code{as(, "denseMatrix")} now works in more cases when \code{prod(dim(.))} is larger than \eqn{2^{31} - 1}. Hence, e.g., \code{!S} now works for much larger sparse matrices \code{S}. } } \subsection{Bug Fixes}{ \itemize{ \item creating very large dense matrices, e.g., by \code{as(, "matrix")} would segfault (in case it could allocate enough storage). } } } \section{Changes in version 1.2-3 (2015-11-19, svn r3155)}{ \subsection{New Features}{ \itemize{ \item \code{MatrixClass()} is exported now. \item More exports of semi-internal functions (for speed, named \code{"."}, i.e., inofficial API), such as \code{.solve.dgC.lu()}. \item more Korean translations } } \subsection{Bug Fixes}{ \itemize{ \item Packages \emph{linking} to \pkg{Matrix} (\code{LinkingTo:} in \file{DESCRIPTION}) now find \samp{alloca} properly defined in \file{Matrix.h} even for non-GNU compilation environments such as on Solaris or AIX. \item extended "n?CMatrix" classes (e.g., from \code{setClass(., contains="ngCMatrix")}) now can be coerced via \code{as(.)} to \code{"d.CMatrix"}. \item The printing of largish sparse matrices is improved, notably in the case where columns are suppressed, via new \code{fitWidth = TRUE} option in \code{printSpMatrix2()}. %%% FIXME __ EXAMPLES __ \item \code{cbind2()} and \code{rbind2()} no longer fail to determine \code{sparse} when it is unspecified and hence \code{NA}, fixing R-forge bug #6259. } } } \section{Changes in version 1.2-2 (2015-07-03, svn r3131)}{ \subsection{New Features}{ \itemize{ \item Explicitly import from \dQuote{base} packages such as \code{"stats"}. } } \subsection{Bug Fixes}{ \itemize{ \item Our \code{colSums(x)}, \code{rowMeans(y)}, \dots, methods now \dQuote{keep names}, i.e., if the result is a numeric vector, and the matrix \code{x} has column or row names, these become the \code{names(.)} of the result, fixing R-forge bug #6018. } } } \section{Changes in version 1.2-1 (2015-05-30, svn r3127)}{ \subsection{New Features}{ \itemize{ \item \code{"Matrix"} now has an \code{initialization()} method coercing 0-length dimnames components to \code{NULL} and other non-\code{NULL} dimnames to \code{character}. Before, e.g., numeric dimnames components partially worked, even though it has always been documented that non-\code{NULL} dimnames should be \code{character}. \item For \code{symmetricMatrix} objects which have symmetrical dimnames by definition, it is allowed to only set one half of the \code{dimnames} to save storage, e.g., \code{list(NULL, nms)} is \emph{semantically} equivalent to \code{list(nms, nms)}. \item \code{as.vector()} etc, now work, too. \item \code{lu(\emph{})} now keeps \code{dimnames}. \item better \file{NEWS.Rd} (which pleases Kurt and \command{tidy} ;-) } } \subsection{Bug Fixes}{ \itemize{ \item \code{S[] <- T} and \code{S[] <- spV} now work (in more cases) for sparse matrices S, T and sparseVector \code{spV}. \item Huge dense matrix multiplication did lead to segfaults, see R-help, \dQuote{does segfault mean (always) a bug?}, May 5, 2015. Fixed by using C's Alloca() only in smallish cases. \item Optional arguments in \code{image()}, e.g., \code{main= <..>)} now also work for \code{lgCMatrix}, \code{nMatrix} etc; thanks to a 4.5 years old report by Mstislav Elagin. \item \code{dimnames(A) <- val} now resets the \code{factors} slot to empty, as the factorizations now keep dimnames more often. \item \code{crossprod(, Diagonal())} works again (and these are tested more systematically). \item Matrix products (\code{\%*\%}, \code{crossprod}, and \code{tcrossprod}) for \code{"dtrMatrix"} are correct in all cases, including keeping dimnames. \item \code{Matrix(d)} (and other coercions to \code{"Matrix"}) now correctly keeps \code{dimnames} also when \code{d} is a traditional \emph{diagonal} \code{"matrix"}. } } } \section{Changes in version 1.2-0 (2015-04-03, svn r3096)}{ \subsection{New Features}{ \itemize{ \item New \code{\%&\%} for \dQuote{boolean arithmetic} matrix product. \item New argument \code{boolArith = NA} in \code{crossprod()} and \code{tcrossprod()}. \code{boolArith = TRUE} now forces boolean arithmetic, where \code{boolArith = FALSE} forces numeric one. Several of these products are more efficient thanks to new C functionality based on our new \code{chm_transpose_dense()}, and others based on \code{geMatrix_crossprod}, \code{geMatrix_matrix_mm}, etc. \item Most dense matrix products, also for non-\code{dgeMatrix}, including \code{"l..Matrix"} and \code{"n..Matrix"} ones are now directly handled by new \code{.Call()}s. \item \code{"dMatrix"} (numeric) and \code{"lMatrix"} (logical) matrices can now be coerced to \code{"nMatrix"} (non-zero pattern or \dQuote{boolean}) even when they contain \code{NA}s, which then become \code{TRUE}s. \item More thorough checking of \code{cbind2()} and \code{rbind2()} methods, notably as they are called from \code{cbind()} and \code{rbind()} from \R version 3.2.0 on. \code{rbind2(, )} is faster, being based on new C code. \item symmetric Matrices (i.e., inheriting from \code{"symmetricMatrix"}) are allowed to have \code{dimnames} of the form \code{list(NULL, )} \emph{and} now print correctly and get correctly coerced to general matrices. \item \code{indMatrix} object (\dQuote{index matrices}) no longer need to be \dQuote{skinny}. \item \code{rsparseMatrix()} now accepts \code{rand.x = NULL} and then creates a random \emph{patter\bold{n}} matrix (\code{"nsparseMatrix"}). \item \code{anyDuplicatedT()} and \code{uniqTsparse()} low level utilities are exported now. \item Partial Korean translations of messages. } } \subsection{Deprecation}{ \itemize{ \item For \eqn{R \ge 3.2.0}, \code{cBind()} and \code{rBind()} are deprecated, as they are no longer needed since \code{cbind()} and \code{rbind()} do work automatically. } } \subsection{Bug Fixes}{ \itemize{ \item Fix some \code{rbind2()} methods. \item \code{t()} now transposes the dimnames even for symmetric matrices. \item \code{diag(M) <- val} did not always recycle \code{val} to full length, e.g., when \code{M} was a \code{"dtrMatrix"}. \item \code{crossprod()} was wrong in cases where the matrix had all-zero columns. \item Matrix products (\code{\%*\%}, \code{crossprod}, and \code{tcrossprod}) with one sparse and one dense argument now return \emph{numeric} (a \code{"dMatrix"}) when they should, i.e., unless the new setting \code{boolArith = TRUE} is applied. } } } \section{Changes in version 1.1-5 (2015-01-18, svn r3037)}{ \subsection{New Features}{ \itemize{ \item More use of \code{anyNA()} (for speedup). \item Matrix products (\code{\%*\%}, \code{crossprod}, \code{tcrossprod}) now behave compatibly to \R 3.2.0, i.e., more lenient in matching dimensions for matrix - vector products. \item \code{isTriangular()} gets new optional argument \code{upper = NA}. } } \subsection{Bug Fixes}{ \itemize{ \item \code{crossprod()} and \code{tcrossprod()} fixes for several o combinations. \item \code{rowMeans(, na.rm=TRUE)} was wrong sometimes. \item fix and speedup of coercions (\code{as(., .)}) from and to symmetric or triangular matrices. \item \code{invPerm()} coercion to integer \item \code{dimnames( solve(.,.) )} fix [r3036] \item \code{tril()} and \code{triu()} now return correct \code{uplo}. \item \code{names(dimnames(.))} now preserved, e.g. in \code{symmpart()} or subsetting (\code{A[i,j]}). } } } \section{Changes in version 1.1-4 (2014-06-14, svn r2994)}{ \subsection{New Features}{ \itemize{ \item new \code{rsparsematrix()} for random sparse Matrices. \item improved warnings, notably for unused arguments previously swallowed into \code{...}. } } \subsection{Bug Fixes}{ \itemize{ \item \code{crossprod(, )} fixed. \item \code{crossprod()} and \code{kronecker()} fixes for some cases. } } } \section{Changes in version 1.1-3 (2014-03-30, svn r2982)}{ \subsection{New Features}{ \itemize{ \item \code{\%*\%} and \code{crossprod()} now also work with \code{sparseVector}s. \item speedup of \code{crossprod(v, )}, thanks to nudge by Niels Richard Hansen. \item new help page for all such matrix products (\file{../man/matrix-products.Rd}). } } \subsection{Bug Fixes}{ \itemize{ \item \code{image()} now gets correct \code{ylim} again. \item More consistent matrix products. } } } \section{Changes in version 1.1-2-2 (2014-03-04, svn r2966)}{ \subsection{Bug Fixes}{ \itemize{ \item correct adaption to \R 3.1.0 \item using \code{tolerance} (and not \sQuote{tol}) in \code{all.equal()} } } } \section{Changes in version 1.1-2 (2014-01-28, svn r2962)}{ \subsection{New Features}{ \itemize{ \item export fast power-user coercion utilities \code{.dsy2mat()}, \code{.dxC2mat()}, \code{.T2Cmat()}, \code{..2dge()}. } } \subsection{Bug Fixes}{ \itemize{ \item matrix products now (mostly) work with \code{sparseVector}s; and correctly in some more cases. } } } \section{Changes in version 1.1-1.1 (2013-12-30, svn r2957)}{ \itemize{ \item Testing code's \code{assertWarning()} adapted for \eqn{R \le 3.0.1}. \item \code{Depends: R >= 2.15.2} eases checking. } } \section{Changes in version 1.1-1 (2013-12-28)}{ \subsection{New Features}{ \itemize{ \item \code{image(.., xlim, ylim)}: nicer defaults %% ../R/dgTMatrix.R for the axis limits, and \code{ylim} is sorted decreasingly; not strictly back-compatible but should never harm. \item \code{rankMatrix(*, method="qr")} now using \code{tol} \item \code{T2graph()} and \code{graph2T()} export old functionality explicitly. Tweaks in conversions between \code{"graph"} and \code{"sparseMatrix"} objects. Notably, \code{as(, )} now more often returns a (0/1 pattern) "n..Matrix". \item \code{sparseMatrix()}: new \code{use.last.ij} argument. } } \subsection{Bug Fixes}{ \itemize{ \item \code{KhatriRao()}: fix rownames (X <-> Y) \item \code{qr.coef()}, \code{qr.fitted}, and \code{qr.resid} now also work with \emph{sparse} RHS \code{y}. \item sparse matrix \dQuote{sub assignments}, e.g., \code{M[ii] <- v}, speedup and fixes. \item bug fixes also in \code{M[negative indices] <- value} and \code{[cbind(i,j)]}. } } } \section{Changes in version 1.1-0 (2013-10-21, svn r2930)}{ \subsection{New Features}{ \itemize{ \item \code{fac2sparse} and \code{fac2Sparse} now exported, with a new \code{giveCsparse} option. \item Update to latest \command{SuiteSparse} C library by Tim Davis, U. Florida. \item ensuing \dQuote{C API changes} \item new \code{.SuiteSparse_version()} function \item Many \sQuote{Imports:} instead of \sQuote{Depends:}. } } \subsection{Bug Fixes}{ \itemize{ \item fixed long lasting undetected \code{solve(, *)} bug. \item Our \code{all.equal()} methods no longer sometimes return \code{c("TRUE", "....difference..")}. \item \code{rankMatrix()}: fix the internal \code{x.dense} definition. } } } \section{Changes in version 1.0-14 (2013-09-12, svn r2907)}{ \subsection{Bug Fixes}{ \itemize{ \item Revert some wrong changes to \code{solve(, *)} from 1.0-13 (\dQuote{stop gap fix} for \R 3.0.2). } } } \section{Changes in version 1.0-13 (2013-09-10, svn r2904)}{ \subsection{New Features}{ \itemize{ \item New (efficient) \code{KhatriRao()} function by Michael Cysouw \item New \code{"indMatrix"} class of \dQuote{index matrices}, a generalization of \code{"pMatrix"}, the permutation matrices, many methods generalized from pMatrix to indMatrix. All (initial) functionality contributed by Fabian Scheibl, Univ.\sspace{} Munich. \item Export and document \code{isDiagonal()} and \code{isTriangular()} as they are useful outside of \pkg{Matrix}. \item \code{rankMatrix(M, method="qr")} no longer needs \code{sval} which makes it considerably more useful for large sparse \code{M}. \item Start providing \code{anyNA} methods for \eqn{R >= 3.1.0}. \item \code{solve( a, b)}: if \code{a} is symmetric, now compute \emph{sparse} result. \item \code{nearPD()} gets new option \code{conv.norm.type = "I"}. \item \code{determinant()} now uses \code{chol()}, and hence also an existing (\sQuote{cached}) Cholesky factor. \item 3 new \code{C -> R} utilities (including hidden \R function \code{.set.factors()} for caching also from \R, not just in C). } } \subsection{Bug Fixes}{ \itemize{ \item \code{M[] <- v} for unitriangular \code{M} now correct. \item \code{lu(.)} no longer sometimes returns unsorted columns. } } } \section{Changes in version 1.0-12 (2013-03-26, svn r2872)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 1.0-11 (2013-02-02)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item \code{as(, "dgCMatrix")} (from package \CRANpkg{SparseM}) now works again. \item . } } } \section{Changes in version 1.0-10 (2012-10-22)}{ \subsection{New Features}{ \itemize{ \item \code{.sparseDiagonal()}: new \code{unitri} argument, and more flexibility; \item new \code{solve(, )} via efficient C code. } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 1.0-9 (2012-09-05)}{ \subsection{New Features}{ \itemize{ \item new \code{sparseVector()} constructor function. \item \code{is.finite()} \code{is.infinite()} now work for our matrices and "*sparseVector" objects. \item \code{diag(.) <- V} now preserves symmetricity, triangularity and even uni-triangularity sometimes. } } \subsection{Bug Fixes}{ \itemize{ \item Quite a few fixes for \code{Ops} (arithmetic, logic, etc) group methods. \item Ditto for \code{diagonalMatrix} methods. } } } \section{Changes in version 1.0-6 (2012-03-16, publ. 2012-06-18)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 1.0-5 (2012-03-15)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 1.0-4 (2012-02-21)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 1.0-3 (2012-01-13)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 1.0-2 (2011-11-19)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 1.0-1 (2011-10-18)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 1.0-0 (2011-10-04)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 0.9996875-3 (2011-08-13)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 0.9996875-2 (2011-08-09)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 0.9996875-1 (2011-08-08)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } \section{Changes in version 0.999375-50 (2011-04-08)}{ \subsection{New Features}{ \itemize{ \item . } } \subsection{Bug Fixes}{ \itemize{ \item . } } } % How can I add vertical space ? % \preformatted{} is not allowed, nor is \cr %--------------- start of DB+MM history: ------------------------ \section{Changes in version 0.95-1 (2005-02-18, svn r561)}{ \subsection{Authorship}{ \itemize{ \item During Doug Bates' sabbatical in Zurich, Martin Maechler becomes co-author of the \pkg{Matrix} package. } } \subsection{New Features}{ \itemize{ \item Beginning of class reorganization with a more systematic naming scheme. } } \subsection{Bug Fixes}{ \itemize{ \item More (correct) coercions \code{as(, )}. } } } \section{Changes in version 0.9-1 (2005-01-24, svn r451)}{ \subsection{New Features}{ \itemize{ \item lme4 / lmer specific R code moved out to \CRANpkg{lme4} package. } } \subsection{Bug Fixes}{ \itemize{ \item . } } } % How can I add vertical space ? ( \preformatted{} is not allowed, nor is \cr ) %--------------- pre-pre-history: ------------------------ \section{Changes in version 0.8-2 (2004-04-06, svn r51)}{ \subsection{Authorship}{ \itemize{ \item Doug Bates (only) } } \subsection{New Features}{ \itemize{ \item Sparse matrices, classes and methods, partly via \item Interface to LDL, TAUCS, Metis and UMFPACK C libraries } } } % How can I add vertical space ? ................................. \section{Version 0.2-4}{ \subsection{..., 0.3-1, 0.3-n (n=3,5,...,26): 22 more CRAN releases}{ \itemize{ \item ............................................. } }} % How can I add vertical space ? % \preformatted{} is not allowed, nor is \cr \section{Version 0.2-1 (2000-07-15)}{ The first CRAN release of the \pkg{Matrix} package, titled \dQuote{A Matrix library for R} authored by Douglas Bates (maintainer, principal author) and Saikat DebRoy. \subsection{Features}{ \itemize{ \item \code{Matrix()} constructor for \R objects of class \code{Matrix}. \item \code{Matrix.class()} returning informal subclasses such as \code{"Hermitian"}, \code{"LowerTriangular"} \item \code{is.Orthonormal()}, \code{is.Hermitian()} , \code{is.UpperTriangular()} functions. \item \code{SVD()}, \code{lu()}, and \code{schur()} decomposition generics with \code{"Matrix"} methods. \item \code{rcond()}, \code{norm()}, \code{det()}; \code{expand()} and \code{facmul()}. \item C++ interface to LAPACK } } } Matrix/inst/test-tools.R0000644000176200001440000000111712021103253014720 0ustar liggesusers#### Will be sourced by several R scripts in ../tests/ ### ------- Part I & -- unrelated to "Matrix" classes --------------- ### ------- Part II -- related to matrices, but *not* "Matrix" ----------- source(system.file("test-tools-1.R", package = "Matrix"), keep.source = FALSE) ### ------- Part III -- "Matrix" (classes) specific ---------------------- source(system.file("test-tools-Matrix.R", package = "Matrix"), keep.source = FALSE) doExtras <- interactive() || nzchar(Sys.getenv("R_MATRIX_CHECK_EXTRA")) || identical("true", unname(Sys.getenv("R_PKG_CHECKING_doExtras"))) Matrix/inst/test-tools-1.R0000644000176200001440000003404212746417036015106 0ustar liggesusers#### Tools for Package Testing --- in Matrix, sourced by ./test-tools.R #### ------------------------- ## to be used as, e.g., ## source(system.file("test-tools-1.R", package="Matrix"), keep.source=FALSE) ### ------- Part I -- unrelated to "Matrix" classes --------------- if(!exists("paste0", .BaseNamespaceEnv)) # have in R >= 2.15.0 paste0 <- function(...) paste(..., sep = '') identical3 <- function(x,y,z) identical(x,y) && identical (y,z) identical4 <- function(a,b,c,d) identical(a,b) && identical3(b,c,d) identical5 <- function(a,b,c,d,e) identical(a,b) && identical4(b,c,d,e) identical6 <- function(a,b,c,d,e,f) identical(a,b) && identical5(b,c,d,e,f) identical7 <- function(a,b,c,d,e,f,g)identical(a,b) && identical6(b,c,d,e,f,g) if( exists("assertCondition", asNamespace("tools")) ) { ## R > 3.0.1 if(FALSE) { assertError <- function(expr, verbose=getOption("verbose")) tools::assertCondition(expr, "error", verbose=verbose) assertWarning <- function(expr, verbose=getOption("verbose")) tools::assertCondition(expr, "warning", verbose=verbose) assertWarningAtLeast <- function(expr, verbose=getOption("verbose")) tools::assertCondition(expr, "error", "warning", verbose=verbose) } else { require(tools)#-> assertError() and assertWarning() assertWarningAtLeast <- function(expr, verbose=getOption("verbose")) tools::assertCondition(expr, "error", "warning", verbose=verbose) } } else { ## in R <= 3.0.1 : ##' @title Ensure evaluating 'expr' signals an error ##' @param expr ##' @return the caught error, invisibly ##' @author Martin Maechler assertError <- function(expr, verbose=getOption("verbose")) { d.expr <- deparse(substitute(expr)) t.res <- tryCatch(expr, error = function(e) e) if(!inherits(t.res, "error")) stop(d.expr, "\n\t did not give an error", call. = FALSE) if(verbose) cat("Asserted Error:", conditionMessage(t.res),"\n") invisible(t.res) } ## Note that our previous version of assertWarning() did *not* work correctly: ## x <- 1:3; assertWarning({warning("bla:",x[1]); x[2] <- 99}); x ## had 'x' not changed! ## From ~/R/D/r-devel/R/src/library/tools/R/assertCondition.R : assertCondition <- function(expr, ..., .exprString = .deparseTrim(substitute(expr), cutoff = 30L), verbose = FALSE) { fe <- function(e)e getConds <- function(expr) { conds <- list() tryCatch(withCallingHandlers(expr, warning = function(w) { conds <<- c(conds, list(w)) invokeRestart("muffleWarning") }, condition = function(cond) conds <<- c(conds, list(cond))), error = function(e) conds <<- c(conds, list(e))) conds } conds <- if(nargs() > 1) c(...) # else NULL .Wanted <- if(nargs() > 1) paste(c(...), collapse = " or ") else "any condition" res <- getConds(expr) if(length(res)) { if(is.null(conds)) { if(verbose) message("assertConditon: Successfully caught a condition\n") invisible(res) } else { ii <- sapply(res, function(cond) any(class(cond) %in% conds)) if(any(ii)) { if(verbose) { found <- unique(sapply(res, function(cond) class(cond)[class(cond) %in% conds])) message(sprintf("assertCondition: caught %s", paste(dQuote(found), collapse =", "))) } invisible(res) } else { .got <- paste(unique((sapply(res, function(obj)class(obj)[[1]]))), collapse = ", ") stop(gettextf("Got %s in evaluating %s; wanted %s", .got, .exprString, .Wanted)) } } } else stop(gettextf("Failed to get %s in evaluating %s", .Wanted, .exprString)) } assertWarning <- function(expr, verbose=getOption("verbose")) assertCondition(expr, "warning", verbose=verbose) assertWarningAtLeast <- function(expr, verbose=getOption("verbose")) assertCondition(expr, "error", "warning", verbose=verbose) }# [else: no assertCondition ] ##' [ from R's demo(error.catching) ] ##' We want to catch *and* save both errors and warnings, and in the case of ##' a warning, also keep the computed result. ##' ##' @title tryCatch both warnings and errors ##' @param expr ##' @return a list with 'value' and 'warning', where ##' 'value' may be an error caught. ##' @author Martin Maechler tryCatch.W.E <- function(expr) { W <- NULL w.handler <- function(w){ # warning handler W <<- w invokeRestart("muffleWarning") } list(value = withCallingHandlers(tryCatch(expr, error = function(e) e), warning = w.handler), warning = W) } ##' Is 'x' a valid object of class 'class' ? isValid <- function(x, class) isTRUE(validObject(x, test=TRUE)) && is(x, class) ##' Signal an error (\code{\link{stop}}), if \code{x} is not a valid object ##' of class \code{class}. ##' ##' @title Stop if Not a Valid Object of Given Class ##' @param x any \R object ##' @param class character string specifying a class name ##' @return \emph{invisibly}, the value of \code{\link{validObject}(x)}, i.e., ##' \code{TRUE}; otherwise an error will have been signalled ##' @author Martin Maechler, March 2015 stopifnotValid <- function(x, class) { if(!is(x, class)) stop(sprintf("%s is not of class \"%s\"", deparse(substitute(x)), class), call. = FALSE) invisible(validObject(x)) } ## Some (sparse) Lin.Alg. algorithms return 0 instead of NA, e.g. ## qr.coef(, y). ## For those cases, need to compare with a version where NA's are replaced by 0 mkNA.0 <- function(x) { x[is.na(x)] <- 0 ; x } ##' ... : further arguments passed to all.equal() such as 'check.attributes' is.all.equal <- function(x,y, tol = .Machine$double.eps^0.5, ...) identical(TRUE, all.equal(x,y, tolerance=tol, ...)) is.all.equal3 <- function(x,y,z, tol = .Machine$double.eps^0.5, ...) is.all.equal(x,y, tol=tol, ...) && is.all.equal(y,z, tol=tol, ...) is.all.equal4 <- function(x,y,z,u, tol = .Machine$double.eps^0.5, ...) is.all.equal3(x,y,z, tol=tol, ...) && isTRUE(all.equal(z,u, tolerance=tol, ...)) ## A version of all.equal() for the slots all.slot.equal <- function(x,y, ...) { slts <- slotNames(x) for(sl in slts) { aeq <- all.equal(slot(x,sl), slot(y,sl), ...) if(!identical(TRUE, aeq)) return(paste("slot '",sl,"': ", aeq, sep='')) } TRUE } ## all.equal() for list-coercible objects -- apart from *some* components all.equal.X <- function(x,y, except, tol = .Machine$double.eps^0.5, ...) { .trunc <- function(x) { ll <- as.list(x) ll[ - match(except, names(ll), nomatch = 0L)] } all.equal(.trunc(x), .trunc(y), tolerance = tol, ...) } ## e.g. in lme4: ## all.equal.X(env(m1), env(m2), except = c("call", "frame")) ## The relative error typically returned by all.equal: relErr <- function(target, current) { ## make this work for 'Matrix' ## ==> no mean() .. n <- length(current) if(length(target) < n) target <- rep(target, length.out = n) sum(abs(target - current)) / sum(abs(target)) } ##' Compute the signed relative error between target and current vector -- vectorized ##' @title Relative Error (:= 0 when absolute error == 0) ##' @param target numeric, possibly scalar ##' @param current numeric of length() a multiple of length(target) ##' @return *vector* of the same length as current ##' @author Martin Maechler relErrV <- function(target, current) { n <- length(target <- as.vector(target)) ## assert( is multiple of ) : if(length(current) %% n) stop("length(current) must be a multiple of length(target)") RE <- current RE[] <- 0 fr <- current/target neq <- is.na(current) | (current != target) RE[neq] <- 1 - fr[neq] RE } ##' @title Number of correct digits: Based on relErrV(), recoding "Inf" to 'zeroDigs' ##' @param target numeric vector of "true" values ##' @param current numeric vector of "approximate" values ##' @param zeroDigs how many correct digits should zero error give ##' @return basically -log10 (| relErrV(target, current) | ) ##' @author Martin Maechler, Summer 2011 (for 'copula') nCorrDigits <- function(target, current, zeroDigs = 16) { stopifnot(zeroDigs >= -log10(.Machine$double.eps))# = 15.65 RE <- relErrV(target, current) r <- -log10(abs(RE)) r[RE == 0] <- zeroDigs r[is.na(RE) | r < 0] <- 0 # no correct digit, when relErr is NA r } ## is.R22 <- (paste(R.version$major, R.version$minor, sep=".") >= "2.2") pkgRversion <- function(pkgname) sub("^R ([0-9.]+).*", "\\1", packageDescription(pkgname)[["Built"]]) showSys.time <- function(expr, ...) { ## prepend 'Time' for R CMD Rdiff st <- system.time(expr, ...) writeLines(paste("Time", capture.output(print(st)))) invisible(st) } showProc.time <- local({ ## function + 'pct' variable pct <- proc.time() function(final="\n") { ## CPU elapsed __since last called__ ot <- pct ; pct <<- proc.time() ## 'Time ..' *not* to be translated: tools::Rdiff() skips its lines! cat('Time elapsed: ', (pct - ot)[1:3], final) } }) ##' A version of sfsmisc::Sys.memGB() which should never give an error ##' ( ~/R/Pkgs/sfsmisc/R/unix/Sys.ps.R ) ##' TODO: A version that also works on Windows, using memory.size(max=TRUE) ##' Windows help on memory.limit(): size in Mb (1048576 bytes), rounded down. Sys.memGB <- function(kind = "MemTotal") {## "MemFree" is typically more relevant if(!file.exists(pf <- "/proc/meminfo")) return(if(.Platform$OS.type == "windows") memory.limit() / 1000 else NA) mm <- tryCatch(drop(read.dcf(pf, fields=kind)), error = function(e) NULL) if(is.null(mm) || any(is.na(mm)) || !all(grepl(" kB$", mm))) return(NA) ## return memory in giga bytes as.numeric(sub(" kB$", "", mm)) / (1000 * 1024) } ##' @title turn an S4 object (with slots) into a list with corresponding components ##' @param obj an R object with a formal class (aka "S4") ##' @return a list with named components where \code{obj} had slots ##' @author Martin Maechler S4_2list <- function(obj) { sn <- slotNames(obj) structure(lapply(sn, slot, object = obj), .Names = sn) } assert.EQ <- function(target, current, tol = if(showOnly) 0 else 1e-15, giveRE = FALSE, showOnly = FALSE, ...) { ## Purpose: check equality *and* show non-equality ## ---------------------------------------------------------------------- ## showOnly: if TRUE, return (and hence typically print) all.equal(...) T <- isTRUE(ae <- all.equal(target, current, tolerance = tol, ...)) if(showOnly) return(ae) else if(giveRE && T) { ## don't show if stop() later: ae0 <- if(tol == 0) ae else all.equal(target, current, tolerance = 0, ...) if(!isTRUE(ae0)) writeLines(ae0) } if(!T) stop("all.equal() |-> ", paste(ae, collapse=sprintf("%-19s","\n"))) else if(giveRE) invisible(ae0) } ##' a version with other "useful" defaults (tol, giveRE, check.attr..) assert.EQ. <- function(target, current, tol = if(showOnly) 0 else .Machine$double.eps^0.5, giveRE = TRUE, showOnly = FALSE, ...) { assert.EQ(target, current, tol=tol, giveRE=giveRE, showOnly=showOnly, check.attributes=FALSE, ...) } ### ------- Part II -- related to matrices, but *not* "Matrix" ----------- add.simpleDimnames <- function(m, named=FALSE) { stopifnot(length(d <- dim(m)) == 2) dimnames(m) <- setNames(list(if(d[1]) paste0("r", seq_len(d[1])), if(d[2]) paste0("c", seq_len(d[2]))), if(named) c("Row", "Col")) m } as.mat <- function(m) { ## as(., "matrix") but with no extraneous empty dimnames m <- as(m, "matrix") if(identical(dimnames(m), list(NULL,NULL))) dimnames(m) <- NULL m } assert.EQ.mat <- function(M, m, tol = if(showOnly) 0 else 1e-15, showOnly=FALSE, giveRE = FALSE, ...) { ## Purpose: check equality of 'Matrix' M with 'matrix' m ## ---------------------------------------------------------------------- ## Arguments: M: is(., "Matrix") typically {but just needs working as(., "matrix")} ## m: is(., "matrix") ## showOnly: if TRUE, return (and hence typically print) all.equal(...) validObject(M) MM <- as.mat(M) # as(M, "matrix") if(is.logical(MM) && is.numeric(m)) storage.mode(MM) <- "integer" attr(MM, "dimnames") <- attr(m, "dimnames") <- NULL assert.EQ(MM, m, tol=tol, showOnly=showOnly, giveRE=giveRE) } ## a short cut assert.EQ.Mat <- function(M, M2, tol = if(showOnly) 0 else 1e-15, showOnly=FALSE, giveRE = FALSE, ...) assert.EQ.mat(M, as.mat(M2), tol=tol, showOnly=showOnly, giveRE=giveRE) chk.matrix <- function(M) { ## check object; including coercion to "matrix" : cl <- class(M) cat("class ", dQuote(cl), " [",nrow(M)," x ",ncol(M),"]; slots (", paste(slotNames(M), collapse=","), ")\n", sep='') stopifnot(validObject(M), dim(M) == c(nrow(M), ncol(M)), identical(dim(m <- as(M, "matrix")), dim(M)) ) } isOrthogonal <- function(x, tol = 1e-15) { all.equal(diag(as(zapsmall(crossprod(x)), "diagonalMatrix")), rep(1, ncol(x)), tolerance = tol) } .M.DN <- Matrix:::.M.DN ## from ../R/Auxiliaries.R : dnIdentical <- function(x,y) identical(.M.DN(x), .M.DN(y)) dnIdentical3 <- function(x,y,z) identical3(.M.DN(x), .M.DN(y), .M.DN(z)) ##' @title Are two matrices practically equal - including dimnames ##' @param M1, M2: two matrices to be compared, maybe of _differing_ class ##' @param tol ##' @param dimnames logical indicating if dimnames must be equal ##' @param ... passed to all.equal(M1, M2) ##' @return TRUE or FALSE is.EQ.mat <- function(M1, M2, tol = 1e-15, dimnames = TRUE, ...) { (if(dimnames) dnIdentical(M1,M2) else TRUE) && is.all.equal(unname(as(M1, "matrix")), unname(as(M2, "matrix")), tol=tol, ...) } ##' see is.EQ.mat() is.EQ.mat3 <- function(M1, M2, M3, tol = 1e-15, dimnames = TRUE, ...) { (if(dimnames) dnIdentical3(M1,M2,M3) else TRUE) && is.all.equal3(unname(as(M1, "matrix")), unname(as(M2, "matrix")), unname(as(M3, "matrix")), tol=tol, ...) } Matrix/inst/test-tools-Matrix.R0000644000176200001440000006067713141330160016205 0ustar liggesusers#### Tools for Package Testing --- in Matrix, sourced by ./test-tools.R #### ------------------------- ### ------- Part III -- "Matrix" (classes) specific ---------------------- ## lower.tri() and upper.tri() -- masking base definitions ## R/src/library/base/R/lower.tri.R ## R/src/library/base/R/upper.tri.R ## but we do __not__ want to coerce to "base R" 'matrix' via as.matrix(): ## lower.tri <- function(x, diag = FALSE) if(diag) row(x) >= col(x) else row(x) > col(x) upper.tri <- function(x, diag = FALSE) if(diag) row(x) <= col(x) else row(x) < col(x) lsM <- function(...) { for(n in ls(..., envir=parent.frame())) if(is((. <- get(n)),"Matrix")) cat(sprintf("%5s: '%s' [%d x %d]\n",n,class(.), nrow(.),ncol(.))) } asD <- function(m) { ## as "Dense" if(canCoerce(m, "denseMatrix")) as(m, "denseMatrix") else if(canCoerce(m, (cl <- paste(.M.kind(m), "denseMatrix", sep='')))) as(m, cl) else if(canCoerce(m, "dgeMatrix")) as(m, "dgeMatrix") else stop("cannot coerce to a typical dense Matrix") } ## "normal" sparse Matrix: Csparse, no diag="U" asCsp <- function(x) diagU2N(as(x, "CsparseMatrix")) ##' @title quasi-identical dimnames Qidentical.DN <- function(dx, dy) { stopifnot(is.list(dx) || is.null(dx), is.list(dy) || is.null(dy)) ## "empty" (is.null.DN(dx) && is.null.DN(dy)) || identical(dx, dy) } ##' quasi-identical() for 'Matrix' matrices Qidentical <- function(x,y, strictClass = TRUE) { if(class(x) != class(y)) { if(strictClass || !is(x, class(y))) return(FALSE) ## else try further } slts <- slotNames(x) if("Dimnames" %in% slts) { ## always (or we have no 'Matrix') slts <- slts[slts != "Dimnames"] if(!Qidentical.DN(x@Dimnames, y@Dimnames) && ## allow for "completion" of (NULL, ) dimnames of symmetricMatrix: !Qidentical.DN(dimnames(x), dimnames(y))) return(FALSE) } if("factors" %in% slts) { ## allow one empty and one non-empty 'factors' slts <- slts[slts != "factors"] ## if both are not empty, they must be the same: if(length(xf <- x@factors) && length(yf <- y@factors)) if(!identical(xf, yf)) return(FALSE) } for(sl in slts) if(!identical(slot(x,sl), slot(y,sl))) return(FALSE) TRUE } ##' quasi-identical() for traditional ('matrix') matrices mQidentical <- function(x,y, strictClass = TRUE) { if(class(x) != class(y)) { if(strictClass || !is(x, class(y))) return(FALSE) ## else try further } if(!Qidentical.DN(dimnames(x), dimnames(y))) return(FALSE) identical(unname(x), unname(y)) } Q.C.identical <- function(x,y, sparse = is(x,"sparseMatrix"), checkClass = TRUE, strictClass = TRUE) { if(checkClass && class(x) != class(y)) { if(strictClass || !is(x, class(y))) return(FALSE) ## else try further } if(sparse) Qidentical(as(x,"CsparseMatrix"), as(y,"CsparseMatrix"), strictClass=strictClass) else Qidentical(x,y, strictClass=strictClass) } ##' ##' ##'
##' @title Quasi-equal for 'Matrix' matrices ##' @param x Matrix ##' @param y Matrix ##' @param superclasses x and y must coincide in (not) extending these; set to empty, ##' if no class/inheritance checks should happen. ##' @param dimnames.check logical indicating if dimnames(.) much match ##' @param tol NA (--> use "==") or numerical tolerance for all.equal() ##' @return logical: Are x and y (quasi) equal ? Q.eq <- function(x, y, superclasses = c("sparseMatrix", "denseMatrix", "dMatrix", "lMatrix", "nMatrix"), dimnames.check = TRUE, tol = NA) { ## quasi-equal - for 'Matrix' matrices if(any(dim(x) != dim(y))) return(FALSE) if(dimnames.check && !identical(dimnames(x), dimnames(y))) return(FALSE) xcl <- getClassDef(class(x)) ycl <- getClassDef(class(y)) for(SC in superclasses) { if( extends(xcl, SC) && !extends(ycl, SC)) return(FALSE) } asC <- ## asCommon if((isDense <- extends(xcl,"denseMatrix"))) function(m) as(m, "matrix") else function(m) as(as(as(m,"CsparseMatrix"), "dMatrix"), "dgCMatrix") if(is.na(tol)) { if(isDense) all(x == y | (is.na(x) & is.na(y))) else ## 'x == y' blows up for large sparse matrices: isTRUE(all.equal(asC(x), asC(y), tolerance = 0., check.attributes = dimnames.check)) } else if(is.numeric(tol) && tol >= 0) { isTRUE(all.equal(asC(x), asC(y), tolerance = tol, check.attributes = dimnames.check)) } else stop("'tol' must be NA or non-negative number") } Q.eq2 <- function(x, y, superclasses = c("sparseMatrix", "denseMatrix"), dimnames.check = FALSE, tol = NA) Q.eq(x,y, superclasses=superclasses, dimnames.check=dimnames.check, tol=tol) ##' ##' ##'
##' @title Quasi-equality of symmpart(m) + skewpart(m) with m ##' @param m Matrix ##' @param tol numerical tolerance for all.equal() ##' @return logical ##' @author Martin Maechler Q.eq.symmpart <- function(m, tol = 8 * .Machine$double.eps) { ss <- symmpart(m) + skewpart(m) if(hasNA <- any(iNA <- is.na(ss))) { ## ss has the NA's symmetrically, but typically m has *not* iiNA <- which(iNA) # <- useful! -- this tests which() methods! ## assign NA's too -- using correct kind of NA: m[iiNA] <- as(NA, Matrix:::.type.kind[Matrix:::.M.kind(m)]) } Q.eq2(m, ss, tol = tol) } ##' sample.int(n, size, replace=FALSE) for really large n: sampleL <- function(n, size) { if(n < .Machine$integer.max) sample.int(n, size) else { i <- unique(round(n * runif(1.8 * size))) while(length(i) < size) { i <- unique(c(i, round(n * runif(size)))) } i[seq_len(size)] } } ## Useful Matrix constructors for testing: ##' @title Random Sparse Matrix ##' @param n ##' @param m number of columns; default (=n) ==> square matrix ##' @param density the desired sparseness density: ##' @param nnz number of non-zero entries; default from \code{density} ##' @param giveCsparse logical specifying if result should be CsparseMatrix ##' @return a [TC]sparseMatrix, n x m ##' @author Martin Maechler, Mar 2008 rspMat <- function(n, m = n, density = 1/4, nnz = round(density * n*m), giveCsparse = TRUE) { stopifnot(length(n) == 1, n == as.integer(n), length(m) == 1, m == as.integer(m), 0 <= density, density <= 1, 0 <= nnz, nnz <= (N <- n*m)) in0 <- sampleL(N, nnz) x <- sparseVector(i = in0, x = as.numeric(1L + seq_along(in0)), length = N) dim(x) <- c(n,m)#-> sparseMatrix if (giveCsparse) as(x, "CsparseMatrix") else x } ## __DEPRECATED__ !! rSparseMatrix <- function(nrow, ncol, nnz, rand.x = function(n) round(rnorm(nnz), 2), ...) { stopifnot((nnz <- as.integer(nnz)) >= 0, nrow >= 0, ncol >= 0, nnz <= nrow * ncol) .Deprecated("rsparsematrix") ##========= sparseMatrix(i = sample(nrow, nnz, replace = TRUE), j = sample(ncol, nnz, replace = TRUE), x = rand.x(nnz), dims = c(nrow, ncol), ...) } rUnitTri <- function(n, upper = TRUE, ...) { ## Purpose: random unit-triangular sparse Matrix .. built from rspMat() ## ---------------------------------------------------------------------- ## Arguments: n: matrix dimension ## upper: logical indicating if upper or lower triangular ## ... : further arguments passed to rspMat(), eg. 'density' ## ---------------------------------------------------------------------- ## Author: Martin Maechler, Date: 5 Mar 2008, 11:35 r <- (if(upper) triu else tril)(rspMat(n, ...)) ## make sure the diagonal is empty diag(r) <- 0 r <- drop0(r) r@diag <- "U" r } ##' Construct a nice (with exact numbers) random artificial \eqn{A = L D L'} ##' decomposition with a sparse \eqn{n \times n}{n x n} matrix \code{A} of ##' density \code{density} and square root \eqn{D} determined by \code{d0}. ##' ##' If one of \code{rcond} or \code{condest} is true, \code{A} must be ##' non-singular, both use an \eqn{LU} decomposition requiring ##' non-singularity. ##' @title Make Nice Artificial A = L D L' (With Exact Numbers) Decomposition ##' @param n matrix dimension \eqn{n \times n}{n x n} ##' @param density ratio of number of non-zero entries to total number ##' @param d0 The sqrt of the diagonal entries of D default \code{10}, to be ##' \dQuote{different} from \code{L} entries. ##' @param rcond logical indicating if \code{\link{rcond}(A, useInv=TRUE)} ##' should be returned which requires non-singular A and D. ##' @param condest logical indicating if \code{\link{condest}(A)$est} ##' should be returned which requires non-singular A and D. ##' @return list with entries A, L, d.half, D, ..., where A inherits from ##' class \code{"\linkS4class{symmetricMatrix}"} and should be equal to ##' \code{as(L \%*\% D \%*\% t(L), "symmetricMatrix")}. ##' @author Martin Maechler, Date: 15 Mar 2008 mkLDL <- function(n, density = 1/3, d0 = 10, d.half = d0 * sample.int(n), # random permutation rcond = (n < 99), condest = (n >= 100)) { stopifnot(n == round(n), density <= 1) n <- as.integer(n) stopifnot(n >= 1, is.numeric(d.half), length(d.half) == n, d.half >= 0) L <- Matrix(0, n,n) nnz <- round(density * n*n) L[sample(n*n, nnz)] <- seq_len(nnz) L <- tril(L, -1L) diag(L) <- 1 dh2 <- d.half^2 non.sing <- sum(dh2 > 0) == n D <- Diagonal(x = dh2) A <- tcrossprod(L * rep(d.half, each=n)) ## = as(L %*% D %*% t(L), "symmetricMatrix") list(A = A, L = L, d.half = d.half, D = D, rcond.A = if (rcond && non.sing) rcond(A, useInv=TRUE), cond.A = if(condest && non.sing) condest(A)$est) } eqDeterminant <- function(m1, m2, NA.Inf.ok=FALSE, tol=.Machine$double.eps^0.5, ...) { d1 <- determinant(m1) ## logarithm = TRUE d2 <- determinant(m2) d1m <- as.vector(d1$modulus)# dropping attribute d2m <- as.vector(d2$modulus) if((identical(d1m, -Inf) && identical(d2m, -Inf)) || ## <==> det(m1) == det(m2) == 0, then 'sign' may even differ ! (is.na(d1m) && is.na(d2m))) ## if both are NaN or NA, we "declare" that's fine here return(TRUE) else if(NA.Inf.ok && ## first can be NA, second infinite: ## wanted: base::determinant.matrix() sometimes gives -Inf instead ## of NA,e.g. for matrix(c(0,NA,0,0,NA,NA,0,NA,0,0,1,0,0,NA,0,1), 4,4)) is.na(d1m) && is.infinite(d2m)) return(TRUE) ## else if(is.infinite(d1m)) d1$modulus <- sign(d1m)* .Machine$double.xmax if(is.infinite(d2m)) d2$modulus <- sign(d2m)* .Machine$double.xmax ## now they are finite or *one* of them is NA/NaN, and all.equal() will tell so: all.equal(d1, d2, tolerance=tol, ...) } ##' @param A a non-negative definite sparseMatrix, typically "dsCMatrix" ##' ##' @return a list with components resulting from calling ##' Cholesky(., perm = .P., LDL = .L., super = .S.) ##' ##' for all 2*2*3 combinations of (.P., .L., .S.) allCholesky <- function(A, verbose = FALSE, silentTry = FALSE) { ## Author: Martin Maechler, Date: 16 Jul 2009 ##' @param r list of CHMfactor objects, typically with names() as '. | .' ##' ##' @return an is(perm,LDL,super) matrix with interesting and *named* rownames CHM_to_pLs <- function(r) { is.perm <- function(.) if(inherits(., "try-error")) NA else !all(.@perm == 0:(.@Dim[1]-1)) is.LDL <- function(.)if(inherits(., "try-error")) NA else isLDL(.) r.st <- cbind(perm = sapply(r, is.perm), LDL = sapply(r, is.LDL), super = sapply(r, class) == "dCHMsuper") names(dimnames(r.st)) <- list(" p L s", "") r.st } my.Cholesky <- { if(verbose) function (A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, ...) { cat(sprintf("Chol..(*, perm= %1d, LDL= %1d, super=%1d):", perm, LDL, super)) r <- Cholesky(A, perm=perm, LDL=LDL, super=super, Imult=Imult, ...) cat(" [Ok]\n") r } else Cholesky } logi <- c(FALSE, TRUE) d12 <- expand.grid(perm = logi, LDL = logi, super = c(logi,NA), KEEP.OUT.ATTRS = FALSE) r1 <- lapply(seq_len(nrow(d12)), function(i) try(do.call(my.Cholesky, c(list(A = A), as.list(d12[i,]))), silent=silentTry)) names(r1) <- apply(d12, 1, function(.) paste(symnum(.), collapse=" ")) dup.r1 <- duplicated(r1) r.all <- CHM_to_pLs(r1) if(!identical(dup.r1, duplicated(r.all))) warning("duplicated( ) differs from duplicated( )", immediate. = TRUE) list(Chol.A = r1, dup.r.all = dup.r1, r.all = r.all, r.uniq = CHM_to_pLs(r1[ ! dup.r1])) } ##' Cheap Boolean Arithmetic Matrix product ##' Should be equivalent to %&% which is faster [not for large dense!]. ##' Consequently mainly used in checkMatrix() boolProd <- function(x,y) as((abs(x) %*% abs(y)) > 0, "nMatrix") ###----- Checking a "Matrix" ----------------------------------------- ##' Check the compatibility of \pkg{Matrix} package Matrix with a ##' \dQuote{traditional} \R matrix and perform a host of internal consistency ##' checks. ##' ##' @title Check Compatibility of Matrix Package Matrix with Traditional R Matrices ##' ##' @param m a "Matrix" ##' @param m.m as(m, "matrix") {if 'do.matrix' } ##' @param do.matrix logical indicating if as(m, "matrix") should be applied; ##' typically false for large sparse matrices ##' @param do.t logical: is t(m) "feasible" ? ##' @param doNorm ##' @param doOps ##' @param doSummary ##' @param doCoerce ##' @param doCoerce2 ##' @param do.prod ##' @param verbose logical indicating if "progress output" is produced. ##' @param catFUN (when 'verbose' is TRUE): function to be used as generalized cat() ##' @return TRUE (invisibly), unless an error is signalled ##' @author Martin Maechler, since 11 Apr 2008 checkMatrix <- function(m, m.m = if(do.matrix) as(m, "matrix"), do.matrix = !isSparse || prod(dim(m)) < 1e6, do.t = TRUE, doNorm = TRUE, doOps = TRUE, doSummary = TRUE, doCoerce = TRUE, doCoerce2 = doCoerce && !isRsp, doDet = do.matrix, do.prod = do.t && do.matrix && !isRsp, verbose = TRUE, catFUN = cat) { ## is also called from dotestMat() in ../tests/Class+Meth.R stopifnot(is(m, "Matrix")) validObject(m) # or error(....) clNam <- class(m) cld <- getClassDef(clNam) ## extends(cld, FOO) is faster than is(m, FOO) isCor <- extends(cld, "corMatrix") isSym <- extends(cld, "symmetricMatrix") if(isSparse <- extends(cld, "sparseMatrix")) { # also true for these isRsp <- extends(cld, "RsparseMatrix") isDiag <- extends(cld, "diagonalMatrix") isInd <- extends(cld, "indMatrix") isPerm <- extends(cld, "pMatrix") } else isRsp <- isDiag <- isInd <- isPerm <- FALSE isTri <- !isSym && !isDiag && !isInd && extends(cld, "triangularMatrix") is.n <- extends(cld, "nMatrix") nonMatr <- clNam != (Mcl <- MatrixClass(clNam, cld)) Cat <- function(...) if(verbose) cat(...) CatF <- function(...) if(verbose) catFUN(...) ## warnNow <- function(...) warning(..., call. = FALSE, immediate. = TRUE) DO.m <- function(expr) if(do.matrix) eval(expr) else TRUE vec <- function(x) { dim(x) <- c(length(x), 1L) dimnames(x) <- list(NULL,NULL) x } eps16 <- 16 * .Machine$double.eps ina <- is.na(m) if(do.matrix) { stopifnot(all(ina == is.na(m.m)), all(is.finite(m) == is.finite(m.m)), all(is.infinite(m) == is.infinite(m.m)), all(m == m | ina), ## check all() , "==" [Compare], "|" [Logic] if(ncol(m) > 0) identical3(unname(m[,1]), unname(m.m[,1]), as(m[,1,drop=FALSE], "vector")) else identical(as(m, "vector"), as.vector(m.m))) if(any(m != m & !ina)) stop(" any (m != m) should not be true") } else { if(any(m != m)) stop(" any (m != m) should not be true") if(ncol(m) > 0) stopifnot(identical(unname(m[,1]), as(m[,1,drop=FALSE], "vector"))) else stopifnot(identical(as(m, "vector"), as.vector(as(m, "matrix")))) } if(do.t) { tm <- t(m) if(isSym) ## check that t() swaps 'uplo' L <--> U : stopifnot(c("L","U") == sort(c(m@uplo, tm@uplo))) ttm <- t(tm) ## notInd: "pMatrix" ok, but others inheriting from "indMatrix" are not notInd <- (!isInd || isPerm) if(notInd && (extends(cld, "CsparseMatrix") || extends(cld, "generalMatrix") || isDiag)) stopifnot(Qidentical(m, ttm, strictClass = !nonMatr)) else if(do.matrix) { if(notInd) stopifnot(nonMatr || class(ttm) == clNam) stopifnot(all(m == ttm | ina)) ## else : not testing } ## crossprod() %*% etc if(do.prod) { c.m <- crossprod(m) tcm <- tcrossprod(m) tolQ <- if(isSparse) NA else eps16 stopifnot(dim(c.m) == rep.int(ncol(m), 2), dim(tcm) == rep.int(nrow(m), 2), ## FIXME: %*% drops dimnames Q.eq2(c.m, tm %*% m, tol = tolQ), Q.eq2(tcm, m %*% tm, tol = tolQ), ## should work with dimnames: Q.eq(m %&% tm, boolProd(m, tm), superclasses=NULL, tol = 0) , Q.eq(tm %&% m, boolProd(tm, m), superclasses=NULL, tol = 0) ) } } if(!do.matrix) { CatF(" will *not* coerce to 'matrix' since do.matrix is FALSE\n") } else if(doNorm) { CatF(sprintf(" norm(m [%d x %d]) :", nrow(m), ncol(m))) for(typ in c("1","I","F","M")) { Cat('', typ, '') stopifnot(all.equal(norm(m,typ), norm(m.m,typ))) } Cat(" ok\n") } if(do.matrix && doSummary) { summList <- lapply(getGroupMembers("Summary"), get, envir = asNamespace("Matrix")) CatF(" Summary: ") for(f in summList) { ## suppressWarnings(): e.g. any() would warn here: r <- suppressWarnings(if(isCor) all.equal(f(m), f(m.m)) else identical(f(m), f(m.m))) if(!isTRUE(r)) { f.nam <- sub("..$", '', sub("^\\.Primitive..", '', format(f))) ## prod() is delicate: NA or NaN can both happen (if(f.nam == "prod") message else stop)( sprintf("%s(m) [= %g] differs from %s(m.m) [= %g]", f.nam, f(m), f.nam, f(m.m))) } } if(verbose) cat(" ok\n") } ## and test 'dim()' as well: d <- dim(m) isSqr <- d[1] == d[2] if(do.t) stopifnot(identical(diag(m), diag(t(m)))) ## TODO: also === diag(band(m,0,0)) if(prod(d) < .Machine$integer.max && !extends(cld, "modelMatrix")) { vm <- vec(m) stopifnot(is(vm, "Matrix"), validObject(vm), dim(vm) == c(d[1]*d[2], 1)) } if(!isInd) m.d <- local({ m. <- m; diag(m.) <- diag(m); m. }) if(do.matrix) stopifnot(identical(dim(m.m), dim(m)), ## base::diag() keeps names [Matrix FIXME] ## now that "pMatrix" subsetting gives *LOGICAL* ## if(isPerm) { ## identical(as.integer(unname(diag(m))), unname(diag(m.m))) ## } else identical(unname(diag(m)), unname(diag(m.m))),## not for NA: diag(m) == diag(m.m), identical(nnzero(m), sum(m.m != 0)), identical(nnzero(m, na.= FALSE), sum(m.m != 0, na.rm = TRUE)), identical(nnzero(m, na.= TRUE), sum(m.m != 0 | is.na(m.m))) ) if(isSparse) { n0m <- drop0(m) #==> n0m is Csparse has0 <- !Qidentical(n0m, as(m,"CsparseMatrix")) if(!isInd && !isRsp && !(extends(cld, "TsparseMatrix") && anyDuplicatedT(m, di = d))) # 'diag<-' is does not change attrib: stopifnot(Qidentical(m, m.d))# e.g., @factors may differ } else if(!identical(m, m.d)) { # dense : 'diag<-' is does not change attrib if(isTri && m@diag == "U" && m.d@diag == "N" && all(m == m.d)) message("unitriangular m: diag(m) <- diag(m) lost \"U\" .. is ok") else stop("diag(m) <- diag(m) has changed 'm' too much") } ## use non-square matrix when "allowed": ## m12: sparse and may have 0s even if this is not: if(isSparse && has0) m12 <- as(as( m, "lMatrix"),"CsparseMatrix") m12 <- drop0(m12) if(do.matrix) { ## "!" should work (via as(*, "l...")) : m11 <- as(as(!!m,"CsparseMatrix"), "lMatrix") if(!Qidentical(m11, m12)) stopifnot(Qidentical(as(m11, "generalMatrix"), as(m12, "generalMatrix"))) } if(isSparse && !is.n) { ## ensure that as(., "nMatrix") gives nz-pattern CatF("as(., \"nMatrix\") giving full nonzero-pattern: ") n1 <- as(m, "nMatrix") ns <- as(m, "nsparseMatrix") stopifnot(identical(n1,ns), isDiag || ((if(isSym) Matrix:::nnzSparse else sum)(n1) == length(if(isInd) m@perm else diagU2N(m)@x))) Cat("ok\n") } if(doOps) { ## makes sense with non-trivial m (!) CatF("2*m =?= m+m: ") if(identical(2*m, m+m)) Cat("identical\n") else if(do.matrix) { eq <- as(2*m,"matrix") == as(m+m, "matrix") # but work for NA's: stopifnot(all(eq | (is.na(m) & is.na(eq)))) Cat("ok\n") } else {# !do.matrix stopifnot(identical(as(2*m, "CsparseMatrix"), as(m+m, "CsparseMatrix"))) Cat("ok\n") } if(do.matrix) { ## m == m etc, now for all, see above CatF("m >= m for all: "); stopifnot(all(m >= m | ina)); Cat("ok\n") } if(prod(d) > 0) { CatF("m < m for none: ") mlm <- m < m if(!any(ina)) stopifnot(!any(mlm)) else if(do.matrix) stopifnot(!any(mlm & !ina)) else { ## !do.matrix & any(ina) : !ina can *not* be used mlm[ina] <- FALSE stopifnot(!any(mlm)) } Cat("ok\n") } if(isSqr) { if(do.matrix) { ## determinant() "fails" for triangular with NA such as ## (m <- matrix(c(1:0,NA,1), 2)) CatF("symmpart(m) + skewpart(m) == m: ") Q.eq.symmpart(m) CatF("ok; determinant(): ") if(!doDet) Cat(" skipped (!doDet): ") else if(any(is.na(m.m)) && extends(cld, "triangularMatrix")) Cat(" skipped: is triang. and has NA: ") else stopifnot(eqDeterminant(m, m.m, NA.Inf.ok=TRUE)) Cat("ok\n") } } else assertError(determinant(m)) }# end{doOps} if(doCoerce && do.matrix && canCoerce("matrix", clNam)) { CatF("as(, ",clNam,"): ", sep='') m3 <- as(m.m, clNam) Cat("valid:", validObject(m3), "\n") ## m3 should ``ideally'' be identical to 'm' } if(doCoerce2 && do.matrix) { ## not for large m: !m will be dense if(is.n) { mM <- if(nonMatr) as(m, Mcl) else m stopifnot(identical(mM, as(as(m, "dMatrix"),"nMatrix")), identical(mM, as(as(m, "lMatrix"),"nMatrix")), identical(which(m), which(m.m))) } else if(extends(cld, "lMatrix")) { ## should fulfill even with NA: stopifnot(all(m | !m | ina), !any(!m & m & !ina)) if(extends(cld, "TsparseMatrix")) # allow modify, since at end here m <- uniqTsparse(m, clNam) stopifnot(identical(m, m & TRUE), identical(m, FALSE | m)) ## also check the coercions to [dln]Matrix m. <- if(isSparse && has0) n0m else m m1. <- m. # replace NA by 1 in m1. , carefully not changing class: if(any(ina)) m1.@x[is.na(m1.@x)] <- TRUE stopifnot(identical(m. , as(as(m. , "dMatrix"),"lMatrix")), clNam == "ldiMatrix" || # <- there's no "ndiMatrix" ## coercion to n* and back: only identical when no extra 0s: identical(m1., as(as(m1., "nMatrix"),"lMatrix")), identical(which(m), which(m.m))) } else if(extends(cld, "dMatrix")) { m. <- if(isSparse && has0) n0m else m m1 <- (m. != 0)*1 if(!isSparse && substr(clNam,1,3) == "dpp") ## no "nppMatrix" possible m1 <- unpack(m1) m1. <- m1 # replace NA by 1 in m1. , carefully not changing class: if(any(ina)) m1.@x[is.na(m1.@x)] <- 1 ## coercion to n* (nz-pattern!) and back: only identical when no extra 0s and no NAs: stopifnot(Q.C.identical(m1., as(as(m., "nMatrix"),"dMatrix"), isSparse, checkClass = FALSE), Q.C.identical(m1 , as(as(m., "lMatrix"),"dMatrix"), isSparse, checkClass = FALSE)) } if(extends(cld, "triangularMatrix")) { mm. <- m i0 <- if(m@uplo == "L") upper.tri(mm.) else lower.tri(mm.) n.catchWarn <- if(is.n) suppressWarnings else identity n.catchWarn( mm.[i0] <- 0 ) # ideally, mm. remained triangular, but can be dge* CatF("as(, ",clNam,"): ", sep='') tm <- as(as(mm., "triangularMatrix"), clNam) Cat("valid:", validObject(tm), "\n") if(m@uplo == tm@uplo) ## otherwise, the matrix effectively was *diagonal* ## note that diagU2N() |-> dtC : stopifnot(Qidentical(tm, as(diagU2N(m), clNam))) } else if(isDiag) { ## TODO } else { ## TODO } }# end {doCoerce2 && ..} if(doCoerce && isSparse) { ## coerce to sparseVector and back : v <- as(m, "sparseVector") stopifnot(length(v) == prod(d)) dim(v) <- d stopifnot(Q.eq2(m, v)) } invisible(TRUE) } Matrix/inst/Copyrights0000644000176200001440000000460110500266672014556 0ustar liggesusersThe files src/iohb.[ch] are available at http://math.nist.gov/~KRemington/harwell_io/ and carry the following copyright Fri Aug 15 16:29:47 EDT 1997 Harwell-Boeing File I/O in C V. 1.0 National Institute of Standards and Technology, MD. K.A. Remington ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ NOTICE Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice appear in supporting documentation. Neither the Author nor the Institution (National Institute of Standards and Technology) make any representations about the suitability of this software for any purpose. This software is provided "as is" without expressed or implied warranty. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The files src/mmio.[ch] are available through http://math.nist.gov/MatrixMarket/mmio-c.html and carry the following copyright Fri Aug 15 16:29:47 EDT 1997 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Matrix Market I/O library for ANSI C Roldan Pozo, NIST (pozo@nist.gov) See http://math.nist.gov/MatrixMarket for details and sample calling programs. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ NOTICE Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice appear in supporting documentation. Neither the Author nor the Institution (National Institute of Standards and Technology) make any representations about the suitability of this software for any purpose. This software is provided "as is" without expressed or implied warranty. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The function mm_read_banner in mmio.c has been edited to conform with the definitions of constants in mmio.h. (String constants in mmio.h are in lower case and variables containing strings were being converted to upper case before being compared to the constants.) Matrix/inst/doc/0000755000176200001440000000000013203323431013232 5ustar liggesusersMatrix/inst/doc/Design-issues.Rnw0000644000176200001440000001273212070262574016464 0ustar liggesusers\documentclass{article} % \usepackage{myVignette} \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} \newcommand{\noFootnote}[1]{{\small (\textit{#1})}} \newcommand{\myOp}[1]{{$\left\langle\ensuremath{#1}\right\rangle$}} %% vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv %%\VignetteIndexEntry{Design Issues in Matrix package Development} %%\VignetteDepends{Matrix} \SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=true,keep.source=TRUE} % ^^^^^^^^^^^^^^^^ \title{Design Issues in Matrix package Development} \author{Martin Maechler and Douglas Bates\\R Core Development Team \\\email{maechler@stat.math.ethz.ch}, \email{bates@r-project.org}} \date{Spring 2008 ({\tiny typeset on \tiny\today})} % \begin{document} \maketitle \begin{abstract} This is a (\textbf{currently very incomplete}) write-up of the many smaller and larger design decisions we have made in organizing functionalities in the Matrix package. Classes: There's a rich hierarchy of matrix classes, which you can visualize as a set of trees whose inner (and ``upper'') nodes are \emph{virtual} classes and only the leaves are non-virtual ``actual'' classes. Functions and Methods: - setAs() - others \end{abstract} %% Note: These are explained in '?RweaveLatex' : <>= options(width=75) @ \section{The Matrix class structures} \label{sec:classes} Take Martin's DSC 2007 talk to depict class hierarchy. \\ --- --- --- %% \hrule[1pt]{\textwidth} \subsection{Diagonal Matrices} \label{ssec:diagMat} The class of diagonal matrices is worth mentioning for several reasons. First, we have wanted such a class, because \emph{multiplication} methods are particularly simple with diagonal matrices. The typical constructor is \Rfun{Diagonal} whereas the accessor (as for traditional matrices), \Rfun{diag} simply returns the \emph{vector} of diagonal entries: <>= library(Matrix) (D4 <- Diagonal(4, 10*(1:4))) str(D4) diag(D4) @ We can \emph{modify} the diagonal in the traditional way (via method definition for \Rfun{diag<-}): <>= diag(D4) <- diag(D4) + 1:4 D4 @ Note that \textbf{unit-diagonal} matrices (the identity matrices of linear algebra) with slot \code{diag = "U"} can have an empty \code{x} slot, very analogously to the unit-diagonal triangular matrices: <>= str(I3 <- Diagonal(3)) ## empty 'x' slot getClass("diagonalMatrix") ## extending "denseMatrix" @ We have implemented diagonal matrices as \emph{dense} rather than sparse matrices, for the following reasons: \begin{enumerate} \item The \code{diag()}onal (vector) is the basic part of such a matrix, and this is simply the \code{x} slot unless the \code{diag} slot is \code{"U"}, the unit-diagonal case, which is the identity matrix. \item given '1)', it does not make much sense to store \emph{where} the matrix is non-zero. This contrasts with all sparse matrix implementations, and hence we did not want to call a diagonal matrix ``sparse''. \end{enumerate} \section{Matrix Transformations} \label{sec:trafos} \subsection{Coercions between Matrix classes} \label{ssec:coerce} You may need to transform Matrix objects into specific shape (triangular, symmetric), content type (double, logical, \dots) or storage structure (dense or sparse). Every useR should use \code{as(x, )} to this end, where \code{} is a \emph{virtual} Matrix super class, such as \code{"triangularMatrix"} \code{"dMatrix"}, or \code{"sparseMatrix"}. In other words, the user should \emph{not} coerce directly to a specific desired class such as \code{"dtCMatrix"}, even though that may occasionally work as well. Here is a set of rules to which the Matrix developers and the users should typically adhere: \begin{description} \item[Rule~1]: \code{as(M, "matrix")} should work for \textbf{all} Matrix objects \code{M}. \item[Rule~2]: \code{Matrix(x)} should also work for matrix like objects \code{x} and always return a ``classed'' Matrix. Applied to a \code{"matrix"} object \code{m}, \code{M. <- Matrix(m)} can be considered a kind of inverse of \code{m <- as(M, "matrix")}. For sparse matrices however, \code{M.} well be a \code{CsparseMatrix}, and it is often ``more structured'' than \code{M}, e.g., <>= (M <- spMatrix(4,4, i=1:4, j=c(3:1,4), x=c(4,1,4,8))) # dgTMatrix m <- as(M, "matrix") (M. <- Matrix(m)) # dsCMatrix (i.e. *symmetric*) @ \item[Rule~3]: All the following coercions to \emph{virtual} matrix classes should work:\\ \begin{enumerate} \item \code{as(m, "dMatrix")} \item \code{as(m, "lMatrix")} \item \code{as(m, "nMatrix")} \item \code{as(m, "denseMatrix")} \item \code{as(m, "sparseMatrix")} \item \code{as(m, "generalMatrix")} \end{enumerate} whereas the next ones should work under some assumptions: \begin{enumerate} \item \code{as(m1, "triangularMatrix")} \\ should work when \code{m1} is a triangular matrix, i.e. the upper or lower triangle of \code{m1} contains only zeros. \item \code{as(m2, "symmetricMatrix")} should work when \code{m2} is a symmetric matrix in the sense of \code{isSymmetric(m2)} returning \code{TRUE}. Note that this is typically equivalent to something like \code{isTRUE(all.equal(m2, t(m2)))}, i.e., the lower and upper triangle of the matrix have to be equal \emph{up to small numeric fuzz}. \end{enumerate} \end{description} \section{Session Info} <>= toLatex(sessionInfo()) @ %not yet %\bibliography{Matrix} \end{document} Matrix/inst/doc/Design-issues.R0000644000176200001440000000241113203323417016101 0ustar liggesusers### R code from vignette source 'Design-issues.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: preliminaries ################################################### options(width=75) ################################################### ### code chunk number 2: diag-class ################################################### library(Matrix) (D4 <- Diagonal(4, 10*(1:4))) str(D4) diag(D4) ################################################### ### code chunk number 3: diag-2 ################################################### diag(D4) <- diag(D4) + 1:4 D4 ################################################### ### code chunk number 4: unit-diag ################################################### str(I3 <- Diagonal(3)) ## empty 'x' slot getClass("diagonalMatrix") ## extending "denseMatrix" ################################################### ### code chunk number 5: Matrix-ex ################################################### (M <- spMatrix(4,4, i=1:4, j=c(3:1,4), x=c(4,1,4,8))) # dgTMatrix m <- as(M, "matrix") (M. <- Matrix(m)) # dsCMatrix (i.e. *symmetric*) ################################################### ### code chunk number 6: sessionInfo ################################################### toLatex(sessionInfo()) Matrix/inst/doc/Intro2Matrix.Rnw0000644000176200001440000004453212070262574016307 0ustar liggesusers\documentclass{article} % \usepackage{myVignette} \usepackage{fullpage}% save trees ;-) \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} \newcommand{\noFootnote}[1]{{\small (\textit{#1})}} \newcommand{\myOp}[1]{{$\left\langle\ensuremath{#1}\right\rangle$}} % %%\VignetteIndexEntry{2nd Introduction to the Matrix Package} %%\VignetteDepends{Matrix} \SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=7,height=4,strip.white=true,keep.source=TRUE} % ^^^^^^^^^^^^^^^^ \title{2nd Introduction to the Matrix package} \author{Martin Maechler and Douglas Bates\\ R Core Development Team \\\email{maechler@stat.math.ethz.ch}, \email{bates@r-project.org}} \date{September 2006 ({\tiny typeset on \tiny\today})} % \begin{document} \maketitle \begin{abstract} % \emph{\Large Why should you want to work with this package and what % does it do for you?} Linear algebra is at the core of many areas of statistical computing and from its inception the \Slang{} has supported numerical linear algebra via a matrix data type and several functions and operators, such as \code{\%*\%}, \code{qr}, \code{chol}, and \code{solve}. However, these data types and functions do not provide direct access to all of the facilities for efficient manipulation of dense matrices, as provided by the Lapack subroutines, and they do not provide for manipulation of sparse matrices. The \pkg{Matrix} package provides a set of S4 classes for dense and sparse matrices that extend the basic matrix data type. Methods for a wide variety of functions and operators applied to objects from these classes provide efficient access to BLAS (Basic Linear Algebra Subroutines), Lapack (dense matrix), CHOLMOD including AMD and COLAMD and \code{Csparse} (sparse matrix) routines. One notable characteristic of the package is that whenever a matrix is factored, the factorization is stored as part of the original matrix so that further operations on the matrix can reuse this factorization. \end{abstract} %% Note: These are explained in '?RweaveLatex' : <>= options(width=75) @ \section{Introduction} \label{sec:Intro} The most automatic way to use the \pkg{Matrix} package is via the \Rfun{Matrix} function which is very similar to the standard \RR\ function \Rfun{matrix}, @ <>= library(Matrix) M <- Matrix(10 + 1:28, 4, 7) M tM <- t(M) @ %def Such a matrix can be appended to (using \Rfun{cBind} or \Rfun{rBind} with capital ``B'') or indexed, <>= (M2 <- cBind(-1, M)) M[2, 1] M[4, ] @ where the last two statements show customary matrix indexing, returning a simple numeric vector each\footnote{because there's an additional default argument to indexing, \code{drop = TRUE}. If you add \hbox{``\code{\ ,\ drop = FALSE}\ ''} you will get submatrices instead of simple vectors.}. We assign 0 to some columns and rows to ``sparsify'' it, and some \code{NA}s (typically ``missing values'' in data analysis) in order to demonstrate how they are dealt with; note how we can \emph{``subassign''} as usual, for classical \RR{} matrices (i.e., single entries or whole slices at once), @ <>= M2[, c(2,4:6)] <- 0 M2[2, ] <- 0 M2 <- rBind(0, M2, 0) M2[1:2,2] <- M2[3,4:5] <- NA @ and then coerce it to a sparse matrix, @ <>= sM <- as(M2, "sparseMatrix") 10 * sM identical(sM * 2, sM + sM) is(sM / 10 + M2 %/% 2, "sparseMatrix") @ %def where the last three calls show that multiplication by a scalar keeps sparcity, as does other arithmetic, but addition to a ``dense'' object does not, as you might have expected after some thought about ``sensible'' behavior: @ <>= sM + 10 @ %def Operations on our classed matrices include (componentwise) arithmetic ($+$, $-$, $*$, $/$, etc) as partly seen above, comparison ($>$, $\le$, etc), e.g., <>= Mg2 <- (sM > 2) Mg2 @ returning a logical sparse matrix. When interested in the internal \textbf{str}ucture, \Rfun{str} comes handy, and we have been using it ourselves more regulary than \Rfun{print}ing (or \Rfun{show}ing as it happens) our matrices; alternatively, \Rfun{summary} gives output similar to Matlab's printing of sparse matrices. @ <>= str(Mg2) summary(Mg2) @ As you see from both of these, \code{Mg2} contains ``extra zero'' (here \code{FALSE}) entries; such sparse matrices may be created for different reasons, and you can use \Rfun{drop0} to remove (``drop'') these extra zeros. This should \emph{never} matter for functionality, and does not even show differently for logical sparse matrices, but the internal structure is more compact: <>= Mg2 <- drop0(Mg2) str(Mg2@x) # length 13, was 16 @ For large sparse matrices, visualization (of the sparsity pattern) is important, and we provide \Rfun{image} methods for that, e.g., <>= data(CAex) print(image(CAex, main = "image(CAex)")) # print(.) needed for Sweave @ \smallskip Further, i.e., in addition to the above implicitly mentioned \code{"Ops"} operators (\code{+}, \code{*},\dots, \code{<=},\code{>},\dots, \code{\&} which all work with our matrices, notably in conjunction with scalars and traditional matrices), the \code{"Math"}-operations (such as \Rfun{exp}, \Rfun{sin} or \Rfun{gamma}) and \code{"Math2"} (\Rfun{round} etc) and the \code{"Summary"} group of functions, \Rfun{min}, \Rfun{range}, \Rfun{sum}, all work on our matrices as they should. Note that all these are implemented via so called \emph{group methods}, see e.g., \code{?Arith} in \RR. The intention is that sparse matrices remain sparse whenever sensible, given the matrix \emph{classes} and operators involved, but not content specifically. E.g., + gives even for the rare cases where it would be advantageous to get a result. These classed matrices can be ``indexed'' (more technically ``subset'') as traditional \Slang{} (and hence \RR) matrices, as partly seen above. This also includes the idiom \code{M [ M \myOp{\mathit{op}} \myOp{\mathrm{num}}~]} which returns simple vectors, @ <>= sM[sM > 2] sml <- sM[sM <= 2] sml @ %def and \emph{``subassign''}ment similarly works in the same generality as for traditional \Slang{} matrices. %% We have seen that already above! %% This was the 2005 - Introduction vignette's first section: \subsection{\pkg{Matrix} package for numerical linear algebra} \label{ssec:intro-linalg} Linear algebra is at the core of many statistical computing techniques and, from its inception, the \Slang{} has supported numerical linear algebra via a matrix data type and several functions and operators, such as \code{\%*\%}, \code{qr}, \code{chol}, and \code{solve}. %% Initially the numerical linear algebra functions in \RR{} called underlying Fortran routines from the Linpack~\citep{Linpack} and Eispack~\citep{Eispack} libraries but over the years most of these functions have been switched to use routines from the Lapack~\citep{Lapack} library which is the state-of-the-art implementation of numerical dense linear algebra. %% Furthermore, \RR{} can be configured to use accelerated BLAS (Basic Linear Algebra Subroutines), such as those from the Atlas~\citep{Atlas} project or other ones, see the \RR~manual ``Installation and Administration''. Lapack provides routines for operating on several special forms of matrices, such as triangular matrices and symmetric matrices. Furthermore, matrix decompositions like the QR decompositions produce multiple output components that should be regarded as parts of a single object. There is some support in \RR{} for operations on special forms of matrices (e.g. the \code{backsolve}, \code{forwardsolve} and \code{chol2inv} functions) and for special structures (e.g. a QR structure is implicitly defined as a list by the \code{qr}, \code{qr.qy}, \code{qr.qty}, and related functions) but it is not as fully developed as it could be. Also there is no direct support for sparse matrices in \RR{} although \citet{koen:ng:2003} have developed the \pkg{SparseM} package for sparse matrices based on SparseKit. The \pkg{Matrix} package provides S4 classes and methods for dense and sparse matrices. The methods for dense matrices use Lapack and BLAS. The sparse matrix methods use CHOLMOD~\citep{Cholmod}, CSparse~\citep{Csparse} and other parts (AMD, COLAMD) of Tim Davis' ``SuiteSparse'' collection of sparse matrix libraries, many of which also use BLAS. \TODO{\Rfun{triu}, \Rfun{tril}, \Rfun{diag}, ... and \command{as(.,.)} , but of course only when they've seen a few different ones.} \TODO{matrix operators include \code{\%*\%}, \Rfun{crossprod}, \Rfun{tcrossprod}, \Rfun{solve}} \TODO{\Rfun{expm} is the matrix exponential ... ...} \TODO{\Rfun{symmpart} and \Rfun{skewpart} compute the symmetric part, \code{(x + t(x))/2} and the skew-symmetric part, \code{(x - t(x))/2} of a matrix \code{x}.} \TODO{factorizations include \Rfun{Cholesky} (or \Rfun{chol}), \Rfun{lu}, \Rfun{qr} (not yet for dense)} \TODO{Although generally the result of an operation on dense matrices is a dgeMatrix, certain operations return matrices of special types.} \TODO{E.g. show the distinction between \code{t(mm) \%*\% mm} and \code{crossprod(mm)}.} % \bigskip % ... ... ... The following is the old \file{Introduction.Rnw} ... FIXME ... ... \bigskip \section{Matrix Classes} The \pkg{Matrix} package provides classes for real (stored as double precision), logical and so-called ``pattern'' (binary) dense and sparse matrices. There are provisions to also provide integer and complex (stored as double precision complex) matrices. Note that in \RR, \code{logical} means entries \code{TRUE}, \code{FALSE}, or \code{NA}. To store just the non-zero pattern for typical sparse matrix algorithms, the pattern matrices are \emph{binary}, i.e., conceptually just \code{TRUE} or \code{FALSE}. In \pkg{Matrix}, the pattern matrices all have class names starting with \code{"n"} (patter\textbf{n}). \subsection{Classes for dense matrices} \label{ssec:DenseClasses} For the sake of brevity, we restrict ourselves to the \emph{real} (\textbf{d}ouble) classes, but they are paralleled by \textbf{l}ogical and patter\textbf{n} matrices for all but the positive definite ones. \begin{description} \item[dgeMatrix] Real matrices in general storage mode \item[dsyMatrix] Symmetric real matrices in non-packed storage \item[dspMatrix] Symmetric real matrices in packed storage (one triangle only) \item[dtrMatrix] Triangular real matrices in non-packed storage \item[dtpMatrix] Triangular real matrices in packed storage (triangle only) \item[dpoMatrix] Positive semi-definite symmetric real matrices in non-packed storage \item[dppMatrix] \ \ ditto \ \ in packed storage \end{description} Methods for these classes include coercion between these classes, when appropriate, and coercion to the \code{matrix} class; methods for matrix multiplication (\code{\%*\%}); cross products (\code{crossprod}), matrix norm (\code{norm}); reciprocal condition number (\code{rcond}); LU factorization (\code{lu}) or, for the \code{poMatrix} class, the Cholesky decomposition (\code{chol}); and solutions of linear systems of equations (\code{solve}). %-- mentioned above already: % Further, group methods have been defined for the \code{Arith} (basic % arithmetic, including with scalar numbers) and the \code{Math} (basic % mathematical functions) group.. Whenever a factorization or a decomposition is calculated it is preserved as a (list) element in the \code{factors} slot of the original object. In this way a sequence of operations, such as determining the condition number of a matrix then solving a linear system based on the matrix, do not require multiple factorizations of the same matrix nor do they require the user to store the intermediate results. \subsection{Classes for sparse matrices} \label{sec:SparseClasses} Used for large matrices in which most of the elements are known to be zero (or \code{FALSE} for logical and binary (``pattern'') matrices). Sparse matrices are automatically built from \Rfun{Matrix} whenever the majority of entries is zero (or \code{FALSE} respectively). Alternatively, \Rfun{sparseMatrix} builds sparse matrices from their non-zero entries and is typically recommended to construct large sparse matrices, rather than direct calls of \Rfun{new}. \TODO{E.g. model matrices created from factors with a large number of levels} \TODO{ or from spline basis functions (e.g. COBS, package \pkg{cobs}), etc.} \TODO{Other uses include representations of graphs. indeed; good you mentioned it! particularly since we still have the interface to the \pkg{graph} package. I think I'd like to draw one graph in that article --- maybe the undirected graph corresponding to a crossprod() result of dimension ca. $50^2$} \TODO{Specialized algorithms can give substantial savings in amount of storage used and execution time of operations.} \TODO{Our implementation is based on the CHOLMOD and CSparse libraries by Tim Davis.} \subsection{Representations of sparse matrices} \label{ssec:SparseReps} \subsubsection{Triplet representation (\class{TsparseMatrix})} Conceptually, the simplest representation of a sparse matrix is as a triplet of an integer vector \code{i} giving the row numbers, an integer vector \code{j} giving the column numbers, and a numeric vector \code{x} giving the non-zero values in the matrix.\footnote{For efficiency reasons, we use ``zero-based'' indexing in the \pkg{Matrix} package, i.e., the row indices \code{i} are in \code{0:(nrow(.)-1)} and the column indices \code{j} accordingly.} In \pkg{Matrix}, the \class{TsparseMatrix} class is the virtual class of all sparse matrices in triplet representation. Its main use is for easy input or transfer to other classes. As for the dense matrices, the class of the \code{x} slot may vary, and the subclasses may be triangular, symmetric or unspecified (``general''), such that the \class{TsparseMatrix} class has several\footnote{the $3 \times 3$ actual subclasses of \class{TsparseMatrix} are the three structural kinds, namely \textbf{t}riangular, \textbf{s}ymmetric and \textbf{g}eneral, times three entry classes, \textbf{d}ouble, \textbf{l}ogical, and patter\textbf{n}.} `actual'' subclasses, the most typical (numeric, general) is \class{dgTMatrix}: <>= getClass("TsparseMatrix") # (i,j, Dim, Dimnames) slots are common to all getClass("dgTMatrix") @ Note that the \emph{order} of the entries in the \code{(i,j,x)} vectors does not matter; consequently, such matrices are not unique in their representation. \footnote{ Furthermore, there can be \emph{repeated} \code{(i,j)} entries with the customary convention that the corresponding \code{x} entries are \emph{added} to form the matrix element $m_{ij}$. } %% The triplet representation is row-oriented if elements in the same row %% were adjacent and column-oriented if elements in the same column were %% adjacent. \subsubsection{Compressed representations: \class{CsparseMatrix} and \class{RsparseMatrix}} For most sparse operations we use the compressed column-oriented representation (virtual class \class{CsparseMatrix}) (also known as ``csc'', ``compressed sparse column''). Here, instead of storing all column indices \code{j}, only the \emph{start} index of every column is stored. Analogously, there is also a compressed sparse row (csr) representation, which e.g. is used in in the \pkg{SparseM} package, and we provide the \class{RsparseMatrix} for compatibility and completeness purposes, in addition to basic coercion (\code({as(., \textit{})} between the classes. %% (column-oriented triplet) except that \code{i} (\code{j}) just stores %% the index of the first element in the row (column). (There are a %% couple of other details but that is the gist of it.) These compressed representations remove the redundant row (column) indices and provide faster access to a given location in the matrix because you only need to check one row (column). There are certain advantages \footnote{routines can make use of high-level (``level-3'') BLAS in certain sparse matrix computations} to csc in systems like \RR{}, Octave and Matlab where dense matrices are stored in column-major order, therefore it is used in sparse matrix libraries such as CHOLMOD or CSparse of which we make use. For this reason, the \class{CsparseMatrix} class and subclasses are the principal classes for sparse matrices in the \pkg{Matrix} package. The Matrix package provides the following classes for sparse matrices \FIXME{many more --- maybe explain naming scheme?} \begin{description} \item[dgTMatrix] general, numeric, sparse matrices in (a possibly redundant) triplet form. This can be a convenient form in which to construct sparse matrices. \item[dgCMatrix] general, numeric, sparse matrices in the (sorted) compressed sparse column format. \item[dsCMatrix] symmetric, real, sparse matrices in the (sorted) compressed sparse column format. Only the upper or the lower triangle is stored. Although there is provision for both forms, the lower triangle form works best with TAUCS. \item[dtCMatrix] triangular, real, sparse matrices in the (sorted) compressed sparse column format. \end{description} \TODO{Can also read and write the Matrix Market and read the Harwell-Boeing representations.} \TODO{Can convert from a dense matrix to a sparse matrix (or use the Matrix function) but going through an intermediate dense matrix may cause problems with the amount of memory required.} \TODO{similar range of operations as for the dense matrix classes.} \section{More detailed examples of ``Matrix'' operations} Have seen \texttt{drop0()} above, %(p.3); only with logical showe a nice double example (where you see ``.'' and ``0''). Show the use of \code{dim<-} for \emph{resizing} a (sparse) matrix. Maybe mention \Rfun{nearPD}. \TODO{Solve a sparse least squares problem and demonstrate memory / speed gain} \TODO{mention \code{lme4} and \Rfun{lmer}, maybe use one example to show the matrix sizes.} \section{Notes about S4 classes and methods implementation} Maybe we could % even here (for R News, not only for JSS) give some glimpses of implementations at least on the \RR{} level ones? \TODO{The class hierarchy: a non-trivial tree where only the leaves are ``actual'' classes.} \TODO{The main advantage of the multi-level hierarchy is that methods can often be defined on a higher (virtual class) level which ensures consistency [and saves from ``cut \& paste'' and forgetting things]} \TODO{Using Group Methods} \section{Session Info} <>= toLatex(sessionInfo()) @ \bibliography{Matrix} \end{document} Matrix/inst/doc/sparseModels.Rnw0000644000176200001440000002520212221066570016373 0ustar liggesusers\documentclass{article} % \usepackage{fullpage} \usepackage{myVignette} \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} \newcommand{\noFootnote}[1]{{\small (\textit{#1})}} \newcommand{\myOp}[1]{{$\left\langle\ensuremath{#1}\right\rangle$}} %%\VignetteIndexEntry{Sparse Model Matrices} %%\VignetteDepends{Matrix,MASS} \title{Sparse Model Matrices} \author{Martin Maechler\\ R Core Development Team \\\email{maechler@R-project.org}} \date{July 2007, 2008 ({\tiny typeset on \tiny\today})} % \begin{document} \maketitle \SweaveOpts{engine=R, keep.source=TRUE} \SweaveOpts{eps=FALSE, pdf=TRUE, width=8, height=5.5, strip.white=true} \setkeys{Gin}{width=\textwidth} % \begin{abstract} % ............................ FIXME % \end{abstract} %% Note: These are explained in '?RweaveLatex' : <>= options(width=75) @ \section*{Introduction} Model matrices in the very widely used (generalized) linear models of statistics, (typically fit via \Rfun{lm} or \Rfun{glm} in \RR) are often practically sparse --- whenever categorical predictors, \code{factor}s in \RR, are used. %% FIXME: Introduce lm.fit.sparse() or not ? We show for a few classes of such linear models how to construct sparse model matrices using sparse matrix (S4) objects from the \pkg{Matrix} package, and typically \emph{without} using dense matrices in intermediate steps. %% only the latter is really novel, since "SparseM" (and others) %% have used the equivalent of %% as( model.matrix(.....), "sparseMatrix") \section{One factor: \texttt{y $\sim$ f1}} Let's start with an artifical small example: <>= (ff <- factor(strsplit("statistics_is_a_task", "")[[1]], levels=c("_",letters))) factor(ff) # drops the levels that do not occur f1 <- ff[, drop=TRUE] # the same, more transparently @ and now assume a model $$y_i = \mu + \alpha_{j(i)} + E_i,$$ for $i=1,\dots,n =$~\code{length(f1)}$= 20$, and $\alpha_{j(i)}$ with a constraint such as $\sum_j \alpha_j = 0$ (``sum'') or $\alpha_1 = 0$ (``treatment'') and $j(i) =$\code{as.numeric(f1[i])} being the level number of the $i$-th observation. For such a ``design'', the model is only estimable if the levels \code{c} and \code{k} are merged, and <>= levels(f1)[match(c("c","k"), levels(f1))] <- "ck" library(Matrix) Matrix(contrasts(f1)) # "treatment" contrasts by default -- level "_" = baseline Matrix(contrasts(C(f1, sum))) Matrix(contrasts(C(f1, helmert)), sparse=TRUE) # S-plus default; much less sparse @ where \Rfun{contrasts} is (conceptually) just one major ingredient in the well-known \Rfun{model.matrix} function to build the linear model matrix $\mathbf{X}$ of so-called ``dummy variables''. %% Since 2007, the \pkg{Matrix} package has been providing coercion from a \code{factor} object to a \code{sparseMatrix} one to produce the transpose of the model matrix corresponding to a model with that factor as predictor (and no intercept): <>= as(f1, "sparseMatrix") @ which is really almost the transpose of using the above sparsification of \Rfun{contrasts} (and arranging for nice printing), <>= printSpMatrix( t( Matrix(contrasts(f1))[as.character(f1) ,] ), col.names=TRUE) @ and that is the same as the ``sparsification'' of \Rfun{model.matrix}, apart from the column names (here transposed), <>= t( Matrix(model.matrix(~ 0+ f1))) # model with*OUT* intercept @ A more realistic small example is the \code{chickwts} data set, <>= str(chickwts)# a standard R data set, 71 x 2 x.feed <- as(chickwts$feed, "sparseMatrix") x.feed[ , (1:72)[c(TRUE,FALSE,FALSE)]] ## every 3rd column: @ % FIXME: Move this to ../../../MatrixModels/inst/doc/ ??? % ## Provisional (hence unexported) sparse lm.fit(): % Matrix:::lm.fit.sparse(x = t(x.feed), y = chickwts[,1]) %- for emacs: $ \section{One factor, one continuous: \texttt{y $\sim$ f1 + x}} To create the model matrix for the case of one factor and one continuous predictor---called ``analysis of covariance'' in the historical literature--- we can adopt the following simple scheme. %% Possible examples: %% - Puromycin %% - ToothGrowth %--- FIXME --- The final model matrix is the concatenation of: 1) create the sparse 0-1 matrix \code{m1} from the f1 main-effect 2) the single row/column 'x' == 'x' main-effect 3) replacing the values 1 in \code{m1@x} (the x-slot of the factor model matrix), by the values of \code{x} (our continuous predictor). \section{Two (or more) factors, main effects only: \texttt{y $\sim$ f1 + f2}} %% FIXME: 'warpbreaks' is smaller and more natural as fixed effect model! Let us consider the \code{warpbreaks} data set of 54 observations, <>= data(warpbreaks)# a standard R data set str(warpbreaks) # 2 x 3 (x 9) balanced two-way with 9 replicates: xtabs(~ wool + tension, data = warpbreaks) @ %It is \emph{not} statistically sensible to assume that \code{Run} is a %fixed effect, however the example is handy to depict how a model matrix This example depicts how a model matrix would be built for the model \code{breaks ~ wool + tension}. Since this is a main effects model (no interactions), the desired model matrix is simply the concatenation of the model matrices of the main effects. There are two here, but the principle applies to general main effects of factors. The most sparse matrix is reached by \emph{not} using an intercept, (which would give an all-1-column) but rather have one factor fully coded (aka ``swallow'' the intercept), and all others being at \code{"treatment"} contrast, i.e., here, the \emph{transposed} model matrix, \code{tmm}, is <>= tmm <- with(warpbreaks, rBind(as(tension, "sparseMatrix"), as(wool, "sparseMatrix")[-1,,drop=FALSE])) print( image(tmm) ) # print(.) the lattice object @ \\ The matrices are even sparser when the factors have more than just two or three levels, e.g., for the morley data set, <>= data(morley) # a standard R data set morley$Expt <- factor(morley$Expt) morley$Run <- factor(morley$Run) str(morley) t.mm <- with(morley, rBind(as(Expt, "sparseMatrix"), as(Run, "sparseMatrix")[-1,])) print( image(t.mm) ) # print(.) the lattice object @ %% Also see Doug's E-mail to R-help % From: "Douglas Bates" % Subject: Re: [R] Large number of dummy variables % Date: Mon, 21 Jul 2008 18:07:26 -0500 \section{Interactions of two (or more) factors,.....} %% Of course, this is *the* interesting part %% To form interactions, we would have to ``outer-multiply'' %% the single-factor model-matrices (after "[, -1]") In situations with more than one factor, particularly with interactions, the model matrix is currently not directly available via \pkg{Matrix} functions --- but we still show to build them carefully. The easiest---but not at memory resources efficient---way is to go via the dense \Rfun{model.matrix} result: <>= data(npk, package="MASS") npk.mf <- model.frame(yield ~ block + N*P*K, data = npk) ## str(npk.mf) # the data frame + "terms" attribute m.npk <- model.matrix(attr(npk.mf, "terms"), data = npk) class(M.npk <- Matrix(m.npk)) dim(M.npk)# 24 x 13 sparse Matrix t(M.npk) # easier to display, column names readably displayed as row.names(t(.)) @ %% printSpMatrix(M.npk, col.names = "abb1") Another example was reported by a user on R-help (July 15, 2008, {\small \url{https://stat.ethz.ch/pipermail/r-help/2008-July/167772.html}}) about an ``aov error with large data set''. \begin{citation} % RAS: in my PDF, I don't see the first character I I'm looking to analyze a large data set: a within-Ss 2*2*1500 design with 20 Ss. However, aov() gives me an error. %, reproducible as follows: \end{citation} And gave the following code example (slightly edited): <>= id <- factor(1:20) a <- factor(1:2) b <- factor(1:2) d <- factor(1:1500) aDat <- expand.grid(id=id, a=a, b=b, d=d) aDat$y <- rnorm(length(aDat[, 1])) # generate some random DV data dim(aDat) # 120'000 x 5 (120'000 = 2*2*1500 * 20 = 6000 * 20) @ %% ^^^^^^^ MM: "fix" and generate much more interesting data and then continued with \begin{Sinput} m.aov <- aov(y ~ a*b*d + Error(id/(a*b*d)), data=aDat) \end{Sinput} \begin{citation}\sffamily which yields the following error:\\ \ttfamily Error in model.matrix.default(mt, mf, contrasts) :\\ allocMatrix: too many elements specified\\ \end{citation} to which he got the explanation by Peter Dalgaard that the formal model matrix involved was much too large in this case, and that PD assumed, \pkg{lme4} would be able to solve the problem. However, currently there would still be a big problem with using \pkg{lme4}, because of the many levels of \emph{fixed} effects: Specifically\footnote{the following is not run in \RR\ on purpose, rather just displayed here}, \begin{Sinput} dim(model.matrix( ~ a*b*d, data = aDat)) # 120'000 x 6000 \end{Sinput} where we note that $120'000 \times 6000 = 720 \textrm{mio}$, which is $720'000'000 * 8 / 2^{20} \approx 5500$ Megabytes. \emph{Unfortunately} \pkg{lme4} does \emph{not} use a sparse $X$-matrix for the fixed effects (yet), it just uses sparse matrices for the $Z$-matrix of random effects and sparse matrix operations for computations related to $Z$. Let us use a smaller factor \code{d} in order to investigate how sparse the $X$ matrix would be: <>= d2 <- factor(1:150) # 10 times smaller tmp2 <- expand.grid(id=id, a=a, b=b, d=d2) dim(tmp2) dim(mm <- model.matrix( ~ a*b*d, data=tmp2)) ## is 100 times smaller than original example class(smm <- Matrix(mm)) # automatically coerced to sparse round(object.size(mm) / object.size(smm), 1) @ shows that even for the small \code{d} here, the memory reduction would be more than an order of magnitude. \\ %% Reasons to fake here: %% 1) print() is needed for lattice -- but looks ugly, %% 2) the resulting pdf file is too large -- use png instead: <>= image(t(smm), aspect = 1/3, lwd=0, col.regions = "red") <>= png("sparseModels-X-sparse-image.png", width=6, height=3, units='in', res=150) print( <> ) dev.off() @ %%--NB: 'keep.source=FALSE' above is workaround-a-bug-in-R-devel-(2.13.x)--- \par\vspace*{-1ex} \centerline{% \includegraphics[width=1.1\textwidth]{sparseModels-X-sparse-image.png}} and working with the sparse instead of the dense model matrix is considerably faster as well, <>= x <- 1:600 system.time(y <- smm %*% x) ## sparse is much faster system.time(y. <- mm %*% x) ## than dense identical(as.matrix(y), y.) ## TRUE @ <>= toLatex(sessionInfo()) @ \end{document} Matrix/inst/doc/Announce.txt0000644000176200001440000000732311620523257015557 0ustar liggesusersBasically the text of the R-packages posting on Mar 28, 2008 : https://stat.ethz.ch/pipermail/r-packages/2008/000911.html ------------------------------------------------------------------------ This weekend, a new version of "the Matrix" (well, actually the R package named "Matrix") will become available on the CRAN mirrors. As some of you have noticed, the version numbers (current is version 0.999375-8) are converging to one, and we feel that we have solved enough of the many (mostly small) problems to announce that release 1.0-0 is imminent. In the DESCRIPTION of the package we say -------------------------------------------------------------- Title: A Matrix package for R Author: Douglas Bates <....> and Martin Maechler <....> Maintainer: Doug and Martin Description: Classes and methods for dense and sparse matrices and operations on them using Lapack, CSparse and CHOLMOD -------------------------------------------------------------- The Matrix package provides efficient methods for several formal (i.e. S4) classes of matrices where each of the actual classes are some combination of the following three categories 1) dense or sparse 2) symmmetric, triangular, diagonal or "general" (or "permutation") 3) numeric ("d"ouble), logical (TRUE/FALSE/NA) or "patter[n]" (0/1) matrices Interfaces to many efficient algorithms from Lapack (for "dense") and from CHOLMOD / Csparse (for "sparse") are all implemented via method definitions for the customary linear algebra functions %*%, t(), crossprod(), tcrossprod(), chol(), qr(), solve(), colSums(), rowSums(), kronecker(), determinant(), ... and for various formal groups of generics, such as "Math" (sin,exp,gamma,..) "Arith" (+,-,*,...), "Logic" (>, <=, ..), "Summary" (sum, max, ...) etc; is.na() Furthermore, 'indexing' : "A[...]" and "A[..] <- value" of all(!) kinds of S/R indexing and some new generic functions such as lu() {LU decomposition} Schur(), BunchKaufman(), norm(), rcond() {Matrix norms and condition numbers} expm() {Matrix exponential}, band(), triu(), tril() {extract band-diagonal or triangular sub-matrices} symmpart(), skewpart() { (x + t(x))/2 and (x - t(x)) / 2 } are provided. Further, an extension to the xtabs function xtabs(*, sparse=TRUE) for large sparse, two-way contingency tables and coercion of one *factor* (possibly crossed with one ) to the corresponding (potentially huge) sparse model matrix for sparse least squares and related computations. Further to the above, "Matrix" objects are also constructed by Matrix(), spMatrix(), bdiag() {block-diagonal}, Diagonal() and many as(., "....Matrix") possibilities. The Matrix package also provides a C level API (header files of exported C functions providing low-level functionality) to many of its internal algorithms that other packages can link to. Currently, the 'lme4' package makes heavy use of these exported C functions. --------------------------------------------------------------------------- One of the things we plan to improve considerably is the documentation for the package. Currently there are four vignettes but all but the Comparisons: Comparisons of Least Squares calculation speeds are really not complete in one way or another. --------------------------------------------------------------------------- We would appreciate current users of the Matrix package (and also generally interested useRs) exploring the package's capabilities and giving us feedback about problems that they might encounter or missing features, inefficiencies and maybe even "infelicities" (a.k.a. bugs). Fixing problems before the release of the 1.0-0 version of "The Matrix", rather than after its release, is our preferred approach Matrix/inst/doc/Comparisons.pdf0000644000176200001440000022655613203323427016247 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 4732 /Filter /FlateDecode /N 99 /First 829 >> stream x\[s8~?o;SS;5uNعNd+ȒK_H$(r\{J ._7y%"6 &QP<щ:։MLfX,q&/gq#&O”U%H<׸:2 ޳ ڲh0K3","=G"VDft8u0?= m=u$KC%ZZ)T&(aHbMjJ`V$. 1A ' "q:%4C@_)VR tc ,5:A:n4ʀF (ᐅQfBd`"jP&HMfil DP`ϔAFʢ5 7T,4wHf-1^ T 2PibԬ-B@OpXfN02[ Ga/Q X•- %@B%,j CFOH֠f`YKlD u矾f:K~9|M'{Ew> SJsGe+;Gó"1Z$7{6˿$w˯h^ή}վM9}(yv3/旳"q˅l*t,6җ#O(2LY/_LTR'd2]Pm,f,t:YyW'JS"IU9Cђ '|]jaL7^ ԙ;@ T6IPh6'Z*UQHҽ|h^|H=0r<1*mJKx+r g8oK'r6 \Pe^Yh4ZICou @0qiDF>a\L̀A54 ûf/ViW:Mw'ew.h}oƫ] }'OfSfw?](Kh@LIoX9!O*l`LHX7Pfi7?y=݀~D-󷟺Z` J-} 4t⑙hq_ i1)b+䔯 Ozvz~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05j@?+*e8:M1V1qT󵽊o؄xGX]yxjŻ{8=89n\"ZGV{mk}Oumü5s$ܮb;UZ5wmUDȈl[M]z׶Al̊u/.N?HaCa r먉պQb@&l|BCKڧ+=/ъe&`a*&* օΕǴmEf홈c,h[~m f,U^P{/_r:m$ae?iJa^ {^j`eH z5 !P:G6`% #Ot.ï6O xđB:endstream endobj 101 0 obj << /Subtype /XML /Type /Metadata /Length 1557 >> stream GPL Ghostscript 9.20 2017-11-16T15:56:23+01:00 2017-11-16T15:56:23+01:00 LaTeX with hyperref package endstream endobj 102 0 obj << /Filter /FlateDecode /Length 4015 >> stream xZ[\qNH1?`x&" A8~0Q8%Eywg9KJW]}ϜQ >S]ξߨIo}|OyJm޾zJ_7?on"ntns2sd< &m|)#U&}Bۓ$y}JvD)gnoKSlfr%IEl*56}~R/%y DrA>-<JDa4{{2Uh=e *)ٛy-N J _J匶sѡ*LC'Mto@E|vl栜c2WfyM,)ÌSvn͂_G0vIoqx_*{1;ȫYHU6=ѕ~Y|lٸXwjxlov )5˦ 69 vN$svosAG{f( mA05o~K#Wmcς{Apn; Z~󭛌ltUǝW_pG}GHv0㉝"b]g)[#(T=~c7i!u6EG|M1ҝ3]WRƘb礳"S ʃ<6SHH>?XFb%DAfw{WjSsa1BbBΑW6x\O r ּ. ')ߕϊj ΐ"ܱLvm6mO T :rQ+L9@g5be|3I%GuC.^ Qf}1Jس?˳:$o+_bMGwl&!V{Uu+Ud8&pb:3yI)RU5(u|ϻF]3cdA;JB@7$g 4s'/s:VJR󶴀.Po .H @r ].i-QqcN=5](%d%AnqZCP|0Erp|^xC|! ;(;nLN^T@w%eX xN zH;:YA)͉od4PB߯! $.$]$a[ֿJ4w&U*Z?jH5Et}VCu<閲~ cY eXw W*^,-\WRɄeS X^d*UMp|rY-5Ta!!E}$yPKh 2%XLumC_]YdnYX=vW&VS۾.:u{E9߻,B[\mu 9!"z_b&*ל<PdaԨw/4b`+҂9z]4ٔUb,S!'8xi\'֢ ɝ㔏^,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RTP 2Kf||U B%T) H|dj\95y[or>AZm}uV? ~Z܍p#WfMPNAv+(L!6C/_3<ǬmMg#)B`õ.@5ݿd[A_Tj-@]ln+6ZRgQ wgknnF[̛{NIt ʱOendstream endobj 115 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 496 >> stream xcd`ab`dddwt21H3a!;g VY~'ٔKzxyyX^(={ #c~iKs~AeQfzFFcnjQfrbobIFjnb ZRaQRR`_^^[_nPYZZTWqr-(-I-ROI-KJ-Id```a`b`bddygߵO}{)f).o߻-;wBGKvƭ߾~cwOMY>vwvwIV%'e~ 9qDt);gw^Z_]ٝS>nə 1gҽ>LaQ!žf7}7u.;eʺ9o{㫋+ gn6째NqqTp:ļ=<| f:endstream endobj 116 0 obj << /Filter /FlateDecode /Length 181 >> stream x]M #MænEPƸx|̼ ]䖂~@y` kҀGGctPzVo`_ >fTvJD3gsL6T&j 2!8?|_S)X)u oBo]\endstream endobj 117 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 630 >> stream x5P]O`~>@C3,w@B@ b$^H慘&ŭmfMڱtdQk_x? oKbq1''I9 ðz2A=< ڡm#ڸVX0e M O GQb"E(6'iGA*B& G !#aB)bTxCC`RC_D kt*+-t#SBfvUu-bqkjMf.-4>͢فreo\ nn­^)S[rnRIBIAr&ݝd B͟`OL*9\9[\jIt 3Ndw߫NV%+jR-WIV-j#t᪻ͺoF)&4vÆ *~6ѳ 8zyz@XH@p;ZAGS.}ol}<"Iendstream endobj 118 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 451 >> stream xGCMR7/,B@dd  (e`\mqCopyright (c) 1997, 2009 American Mathematical Society (), with Reserved Font Name CMR7.CMR7Computer Modern12Q͋oKL0bg͋§j~'eg #e'͋JiuP~>}L讧Ǻɋ !74/XWϡ=:4MFkgo0wCna  7 ڛ @endstream endobj 119 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 676 >> stream xe_Hq;15 Bdi ȵޭt?ssm1Km"aF=HKAwz>~>_fA0 g5 տN©,@@ ] kW OX9ILtOD.˃$0LuՔf!;+֕`UUY j-Nk4ZZzw<(6AVLk,,JJ1+IX=މ[q=v2-e.`J[LILT ݆AR \3|HlHW04 qW"6N>l%rAnlj4&2k?~d9n4GP=2H/ G]qߣ444JG#xmOmꊦWYiGu82%@R8wQ;t.۔,r} 34 3`.0 sX -47o#|>_mܡ7ηm{Fk&9>ӌۋn8ىBf.4QWgm8J^o65@lWΈɝ.5-](!+paF)؁pD\l<J.NPl7rE-<̑VdA *,endstream endobj 120 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 306 >> stream xcd`ab`ddds ~H3a!3,lޥu|=<<<,k/!={3#c^qs~AeQfzFFcnjQfrbobIFjnb ZRaQRR`_^^[_nPYZZTWvt-(-I-ROI-c``` a`0e`bdd13{7?їlӻwMrw6?f}\0gigqq<6L^Tcl.endstream endobj 121 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 281 >> stream x?O@DV'%4v5$nu#¥4 :9{MRKyۃQEB9o|S5b&>4T;>Ԝ7>(+2W*/b&UAj⢎d \ ~NG>m0K|6ƞxNİhقc.И8p N-<Ԙ+F( B!Kޑqe+W"ΰ@Ŏ\܊x1kz']`VѧR=+J BNh`endstream endobj 122 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 6133 >> stream xY\uav:-ƮAF DDz[`aKeU+&DcDM;yޝ˹|gPF(@ Zjgo?s3514cIXQ5K ]x!h 2c1D384 =(@_&ps2bO5c| kWssYx[lsp YLZo5}zHH4gi~EZx[lp tH]X Xj4ݏ~>A ;=_VX.ۺrɊAm!ΫCw؅Yun<6{m9k޷|{wNx;ߛ4}EM}DQVxj=5HMI&j2B9P[%Tj+zF-Q۩tj5ZIͤVQ6lʖCͥP(;j-eBKL)3ʜRє1ES՟@E PEj(F VQF]+h7ߟF[z(2:Ӌfc:+FYj=bt1Acy1vn5|~SF)"OF(ź]J39 B 脄Tb]RB_1̣+ oJT¿Q}~ >!-E /)U6ftСWv˙s~q8d{_v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r1̴@P:&Ͳqe#le2V1ɲy(!EϷg슟^4ƮF]3H_1dFq Lܢԧ<`8Ϫ^%`z;7'nCyzdۡTaDE9؅h~sBPnͨq戋 Aq9*㉍4w%a Sd-iS!G 屺,"ض%),= 4t bctIi9/G1M?LoٟZdm1fER-^ E (1R'v Poendstream endobj 126 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 464 >> stream x:CMSS10/u`B@d|  5kfbouCopyright (c) 1997, 2009 American Mathematical Society (), with Reserved Font Name CMSS10.CMSS10Computer ModernRS34O7ҋ#J2PG$PDDKP ue.TTB4)(`aa^}vrzj`ITI0b17|:T}ʋlu\j/Q{mo߻jluPWb  7 Ȏ ٖ hendstream endobj 127 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 335 >> stream xcd`ab`dddu 21~H3a!.,lޥI|=<<<,k*={3#cnas~AeQfzFFcnjQfrbobIFjnb ZRaQRR`_^^[_nPYZZTWrp-(-I-ROI-c```4d`b`bdd{7m}ClΕVNHa_}r?Yu*r )lov›݇(oJ`W鞱FlYN^;q&{r\,y8WO7uendstream endobj 128 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 2785 >> stream xV PWB ! &rm(XP[A)3G}XQkuKՎXU׺hk jN;ٙL&ycF2ز}ԏņXFـ'NNt_z&,`a5w{֨ D6%"#|bWeN%.."A\dH%X!K?B$$R WEH1+-JJJr;KW;8"xA\ )K[ETS_QLT" ĉ xM,&$& Gl8-tv!mv›#|N—E:}“XOl 6-V†AX3 +b.3˜H#v.g&& { IҁDt)5K7m5A7 rKfiY ]a)ofIyan#2`37-6hc+xCGn΀~H>ٳA^\,mVa1'9D`[l [=u@@Ȋ35 aigFi>޸ IpLH,(KiSv `a -ᄽubOa9b[hf^8~tw!RcöLj"7V0-afJ{' ND<(+)%lMkjU׵룵w{'r s1鞒 gƦKH"C<ɍC}:{v \E?̹Z{VK)2Ws8K< 8OLj&B!V :Q^Fsh-Fz*d!S:bH_ %P:Gs* YT*z8q" @Ŝm; 0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G f_, `5 y#XDʞL`5dVy," fEz R2D>؀H3`5Z`@,ξ D|`5`v= endstream endobj startxref 76744 %%EOF Matrix/inst/doc/Introduction.Rnw0000644000176200001440000001753412070262574016430 0ustar liggesusers\documentclass{article} \usepackage{myVignette} \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} %%\VignetteIndexEntry{Introduction to the Matrix Package} %%\VignetteDepends{Matrix} \SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=true,keep.source=TRUE} \title{Introduction to the Matrix package --- as of Feb.~2005\footnote{ There's an unfinished ``2nd Introduction to the Matrix package'' which contains partly newer information, but is not at all self-contained. Eventually that will replace this one.}} \author{Douglas Bates\\R Core Development Group\\\email{bates@r-project.org}} \date{\today} \begin{document} \maketitle \begin{abstract} Linear algebra is at the core of many areas of statistical computing and from its inception the \Slang{} has supported numerical linear algebra via a matrix data type and several functions and operators, such as \code{\%*\%}, \code{qr}, \code{chol}, and \code{solve}. However, these data types and functions do not provide direct access to all of the facilities for efficient manipulation of dense matrices, as provided by the Lapack subroutines, and they do not provide for manipulation of sparse matrices. The \code{Matrix} package provides a set of S4 classes for dense and sparse matrices that extend the basic matrix data type. Methods for a wide variety of functions and operators applied to objects from these classes provide efficient access to BLAS (Basic Linear Algebra Subroutines), Lapack (dense matrix), TAUCS (sparse matrix) and UMFPACK (sparse matrix) routines. One notable characteristic of the package is that whenever a matrix is factored, the factorization is stored as part of the original matrix so that further operations on the matrix can reuse this factorization. \end{abstract} <>= options(width=75) @ \section{Introduction} \label{sec:Intro} Linear algebra is at the core of many statistical computing techniques and, from its inception, the \Slang{} has supported numerical linear algebra via a matrix data type and several functions and operators, such as \code{\%*\%}, \code{qr}, \code{chol}, and \code{solve}. Initially the numerical linear algebra functions in \RR{} called underlying Fortran routines from the Linpack~\citep{Linpack} and Eispack~\cite{Eispack} libraries but over the years most of these functions have been switched to use routines from the Lapack~\cite{Lapack} library. Furthermore, \RR{} can be configured to use accelerated BLAS (Basic Linear Algebra Subroutines), such as those from the Atlas~\cite{Atlas} project or Goto's BLAS~\cite{GotosBLAS}. Lapack provides routines for operating on several special forms of matrices, such as triangular matrices and symmetric matrices. Furthermore,matrix decompositions like the QR decompositions produce multiple output components that should be regarded as parts of a single object. There is some support in R for operations on special forms of matrices (e.g. the \code{backsolve}, \code{forwardsolve} and \code{chol2inv} functions) and for special structures (e.g. a QR structure is implicitly defined as a list by the \code{qr}, \code{qr.qy}, \code{qr.qty}, and related functions) but it is not as fully developed as it could be. Also there is no direct support for sparse matrices in R although \citet{koen:ng:2003} have developed a contributed package for sparse matrices based on SparseKit. The \code{Matrix} package provides S4 classes and methods for dense and sparse matrices. The methods for dense matrices use Lapack and BLAS. The sparse matrix methods use TAUCS~\citep{Taucs}, UMFPACK~\citep{Umfpack}, and Metis~\citep{Metis}. \section{Classes for dense matrices} \label{sec:DenseClasses} The \code{Matrix} package will provide classes for real (stored as double precision) and complex (stored as double precision complex) dense matrices. At present only the real classes have been implemented. These classes are \begin{description} \item[dgeMatrix] Real matrices in general storage mode \item[dsyMatrix] Symmetric real matrices in non-packed storage \item[dspMatrix] Symmetric real matrices in packed storage (one triangle only) \item[dtrMatrix] Triangular real matrices in non-packed storage \item[dtpMatrix] Triangular real matrices in packed storage (triangle only) \item[dpoMatrix] Positive semi-definite symmetric real matrices in non-packed storage \item[dppMatrix] \ \ ditto \ \ in packed storage \end{description} Methods for these classes include coercion between these classes, when appropriate, and coercion to the \code{matrix} class; methods for matrix multiplication (\code{\%*\%}); cross products (\code{crossprod}), matrix norm (\code{norm}); reciprocal condition number (\code{rcond}); LU factorization (\code{lu}) or, for the \code{poMatrix} class, the Cholesky decomposition (\code{chol}); and solutions of linear systems of equations (\code{solve}). Further, group methods have been defined for the \code{Arith} (basic arithmetic, including with scalar numbers) and the \code{Math} (basic mathematical functions) group.. Whenever a factorization or a decomposition is calculated it is preserved as a (list) element in the \code{factors} slot of the original object. In this way a sequence of operations, such as determining the condition number of a matrix then solving a linear system based on the matrix, do not require multiple factorizations of the same matrix nor do they require the user to store the intermediate results. \section{Classes for sparse matrices} \label{sec:SparseClasses} \subsection{Representations of sparse matrices} \label{ssec:SparseReps} Conceptually, the simplest representation of a sparse matrix is as a triplet of an integer vector \code{i} giving the row numbers, an integer vector \code{j} giving the column numbers, and a numeric vector \code{x} giving the non-zero values in the matrix. An S4 class definition might be \begin{Schunk} \begin{Sinput} setClass("dgTMatrix", representation(i = "integer", j = "integer", x = "numeric", Dim = "integer")) \end{Sinput} \end{Schunk} The triplet representation is row-oriented if elements in the same row were adjacent and column-oriented if elements in the same column were adjacent. The compressed sparse row (csr) (or compressed sparse column - csc) representation is similar to row-oriented triplet (column-oriented triplet) except that \code{i} (\code{j}) just stores the index of the first element in the row (column). (There are a couple of other details but that is the gist of it.) These compressed representations remove the redundant row (column) indices and provide faster access to a given location in the matrix because you only need to check one row (column). The preferred representation of sparse matrices in the SparseM package is csr. Matlab uses csc. We hope that Octave will also use this representation. There are certain advantages to csc in systems like R and Matlab where dense matrices are stored in column-major order. For example, Sivan Toledo's TAUCS~\cite{Taucs} library and Tim Davis's UMFPACK~\cite{Umfpack} library are both based on csc and can both use level-3 BLAS in certain sparse matrix computations. The Matrix package provides the following classes for sparse matrices \begin{description} \item[dgTMatrix] general, numeric, sparse matrices in (a possibly redundant) triplet form. This can be a convenient form in which to construct sparse matrices. \item[dgCMatrix] general, numeric, sparse matrices in the (sorted) compressed sparse column format. \item[dsCMatrix] symmetric, real, sparse matrices in the (sorted) compressed sparse column format. Only the upper or the lower triangle is stored. Although there is provision for both forms, the lower triangle form works best with TAUCS. \item[dtCMatrix] triangular, real, sparse matrices in the (sorted) compressed sparse column format. \end{description} \bibliography{Matrix} \end{document} Matrix/inst/doc/sparseModels.R0000644000176200001440000001216413203323427016027 0ustar liggesusers### R code from vignette source 'sparseModels.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: preliminaries ################################################### options(width=75) ################################################### ### code chunk number 2: ex1 ################################################### (ff <- factor(strsplit("statistics_is_a_task", "")[[1]], levels=c("_",letters))) factor(ff) # drops the levels that do not occur f1 <- ff[, drop=TRUE] # the same, more transparently ################################################### ### code chunk number 3: ex1.2 ################################################### levels(f1)[match(c("c","k"), levels(f1))] <- "ck" library(Matrix) Matrix(contrasts(f1)) # "treatment" contrasts by default -- level "_" = baseline Matrix(contrasts(C(f1, sum))) Matrix(contrasts(C(f1, helmert)), sparse=TRUE) # S-plus default; much less sparse ################################################### ### code chunk number 4: as_factor_sparse ################################################### as(f1, "sparseMatrix") ################################################### ### code chunk number 5: contrasts_sub ################################################### printSpMatrix( t( Matrix(contrasts(f1))[as.character(f1) ,] ), col.names=TRUE) ################################################### ### code chunk number 6: ex1-model.matrix ################################################### t( Matrix(model.matrix(~ 0+ f1))) # model with*OUT* intercept ################################################### ### code chunk number 7: chickwts-ex ################################################### str(chickwts)# a standard R data set, 71 x 2 x.feed <- as(chickwts$feed, "sparseMatrix") x.feed[ , (1:72)[c(TRUE,FALSE,FALSE)]] ## every 3rd column: ################################################### ### code chunk number 8: warpbreaks-data ################################################### data(warpbreaks)# a standard R data set str(warpbreaks) # 2 x 3 (x 9) balanced two-way with 9 replicates: xtabs(~ wool + tension, data = warpbreaks) ################################################### ### code chunk number 9: modMat-warpbreaks ################################################### tmm <- with(warpbreaks, rBind(as(tension, "sparseMatrix"), as(wool, "sparseMatrix")[-1,,drop=FALSE])) print( image(tmm) ) # print(.) the lattice object ################################################### ### code chunk number 10: morley-data ################################################### data(morley) # a standard R data set morley$Expt <- factor(morley$Expt) morley$Run <- factor(morley$Run) str(morley) t.mm <- with(morley, rBind(as(Expt, "sparseMatrix"), as(Run, "sparseMatrix")[-1,])) print( image(t.mm) ) # print(.) the lattice object ################################################### ### code chunk number 11: npk_ex ################################################### data(npk, package="MASS") npk.mf <- model.frame(yield ~ block + N*P*K, data = npk) ## str(npk.mf) # the data frame + "terms" attribute m.npk <- model.matrix(attr(npk.mf, "terms"), data = npk) class(M.npk <- Matrix(m.npk)) dim(M.npk)# 24 x 13 sparse Matrix t(M.npk) # easier to display, column names readably displayed as row.names(t(.)) ################################################### ### code chunk number 12: aov-large-ex ################################################### id <- factor(1:20) a <- factor(1:2) b <- factor(1:2) d <- factor(1:1500) aDat <- expand.grid(id=id, a=a, b=b, d=d) aDat$y <- rnorm(length(aDat[, 1])) # generate some random DV data dim(aDat) # 120'000 x 5 (120'000 = 2*2*1500 * 20 = 6000 * 20) ################################################### ### code chunk number 13: aov-ex-X-sparse ################################################### d2 <- factor(1:150) # 10 times smaller tmp2 <- expand.grid(id=id, a=a, b=b, d=d2) dim(tmp2) dim(mm <- model.matrix( ~ a*b*d, data=tmp2)) ## is 100 times smaller than original example class(smm <- Matrix(mm)) # automatically coerced to sparse round(object.size(mm) / object.size(smm), 1) ################################################### ### code chunk number 14: X-sparse-image (eval = FALSE) ################################################### ## image(t(smm), aspect = 1/3, lwd=0, col.regions = "red") ################################################### ### code chunk number 15: X-sparse-image-fake ################################################### png("sparseModels-X-sparse-image.png", width=6, height=3, units='in', res=150) print( image(t(smm), aspect = 1/3, lwd=0, col.regions = "red") ) dev.off() ################################################### ### code chunk number 16: X-sparse-mult ################################################### x <- 1:600 system.time(y <- smm %*% x) ## sparse is much faster system.time(y. <- mm %*% x) ## than dense identical(as.matrix(y), y.) ## TRUE ################################################### ### code chunk number 17: sessionInfo ################################################### toLatex(sessionInfo()) Matrix/inst/doc/Comparisons.R0000644000176200001440000001204113203323416015653 0ustar liggesusers### R code from vignette source 'Comparisons.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: preliminaries ################################################### options(width=75) ################################################### ### code chunk number 2: modelMatrix ################################################### data(Formaldehyde) str(Formaldehyde) (m <- cbind(1, Formaldehyde$carb)) (yo <- Formaldehyde$optden) ################################################### ### code chunk number 3: naiveCalc ################################################### solve(t(m) %*% m) %*% t(m) %*% yo ################################################### ### code chunk number 4: timedNaive ################################################### system.time(solve(t(m) %*% m) %*% t(m) %*% yo) ################################################### ### code chunk number 5: catNaive ################################################### dput(c(solve(t(m) %*% m) %*% t(m) %*% yo)) dput(unname(lm.fit(m, yo)$coefficients)) ################################################### ### code chunk number 6: KoenNg ################################################### library(Matrix) data(KNex, package = "Matrix") y <- KNex$y mm <- as(KNex$mm, "matrix") # full traditional matrix dim(mm) system.time(naive.sol <- solve(t(mm) %*% mm) %*% t(mm) %*% y) ################################################### ### code chunk number 7: crossKoenNg ################################################### system.time(cpod.sol <- solve(crossprod(mm), crossprod(mm,y))) all.equal(naive.sol, cpod.sol) ################################################### ### code chunk number 8: xpxKoenNg ################################################### system.time(t(mm) %*% mm) ################################################### ### code chunk number 9: fullMatrix_crossprod ################################################### fm <- mm set.seed(11) fm[] <- rnorm(length(fm)) system.time(c1 <- t(fm) %*% fm) system.time(c2 <- crossprod(fm)) stopifnot(all.equal(c1, c2, tol = 1e-12)) ################################################### ### code chunk number 10: naiveChol ################################################### system.time(ch <- chol(crossprod(mm))) system.time(chol.sol <- backsolve(ch, forwardsolve(ch, crossprod(mm, y), upper = TRUE, trans = TRUE))) stopifnot(all.equal(chol.sol, naive.sol)) ################################################### ### code chunk number 11: MatrixKoenNg ################################################### mm <- as(KNex$mm, "dgeMatrix") class(crossprod(mm)) system.time(Mat.sol <- solve(crossprod(mm), crossprod(mm, y))) stopifnot(all.equal(naive.sol, unname(as(Mat.sol,"matrix")))) ################################################### ### code chunk number 12: saveFactor ################################################### xpx <- crossprod(mm) xpy <- crossprod(mm, y) system.time(solve(xpx, xpy)) system.time(solve(xpx, xpy)) # reusing factorization ################################################### ### code chunk number 13: SparseKoenNg ################################################### mm <- KNex$mm class(mm) system.time(sparse.sol <- solve(crossprod(mm), crossprod(mm, y))) stopifnot(all.equal(naive.sol, unname(as(sparse.sol, "matrix")))) ################################################### ### code chunk number 14: SparseSaveFactor ################################################### xpx <- crossprod(mm) xpy <- crossprod(mm, y) system.time(solve(xpx, xpy)) system.time(solve(xpx, xpy)) ################################################### ### code chunk number 15: sessionInfo ################################################### toLatex(sessionInfo()) ################################################### ### code chunk number 16: from_pkg_sfsmisc ################################################### if(identical(1L, grep("linux", R.version[["os"]]))) { ##----- Linux - only ---- Sys.procinfo <- function(procfile) { l2 <- strsplit(readLines(procfile),"[ \t]*:[ \t]*") r <- sapply(l2[sapply(l2, length) == 2], function(c2)structure(c2[2], names= c2[1])) attr(r,"Name") <- procfile class(r) <- "simple.list" r } Scpu <- Sys.procinfo("/proc/cpuinfo") Smem <- Sys.procinfo("/proc/meminfo") } # Linux only ################################################### ### code chunk number 17: Sys_proc_fake (eval = FALSE) ################################################### ## if(identical(1L, grep("linux", R.version[["os"]]))) { ## Linux - only --- ## Scpu <- sfsmisc::Sys.procinfo("/proc/cpuinfo") ## Smem <- sfsmisc::Sys.procinfo("/proc/meminfo") ## print(Scpu[c("model name", "cpu MHz", "cache size", "bogomips")]) ## print(Smem[c("MemTotal", "SwapTotal")]) ## } ################################################### ### code chunk number 18: Sys_proc_out ################################################### if(identical(1L, grep("linux", R.version[["os"]]))) { ## Linux - only --- print(Scpu[c("model name", "cpu MHz", "cache size", "bogomips")]) print(Smem[c("MemTotal", "SwapTotal")]) } Matrix/inst/doc/sparseModels.pdf0000644000176200001440000030454713203323430016402 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 4615 /Filter /FlateDecode /N 98 /First 824 >> stream x\Ys8~_Mj6" gW$;vE-Ntx$*߯ 5Q$^`̙&5SLLq w,\J<g!g.'$<ʇk& )8 qLR0GZK>ZQG8bMD\tD e!I-tI0,p9u( %ЮA'B@Y`)N$؍^{R'P84!D 2@aPV>ڬAY`e%8LF1W`]ʾ!O<AAFzyDp!4 pe 7@'8PF:ԄhӅDBP9 q/K!P?ɜ( !B9]%x-Alx ^&;o*[D h:gh\oUYgxLXFhs4.2)X\}"\'`fɄ}B9L2Te?Ev8~e?*(_=ʯGg'up ܮn-9[[,|ų|X~aoi@Oa 7mBXks7P|m֜?tXt{ YqenyQ4"@$Ψ˘s-X5%kգOL̹2D[oI2u:FIWbN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F>RVK&WӫsxPO .h{FSYH st9Yˬ~C4%kT6oG6ӫҷIkiFF>=/G  Ǎ-H^n|{9[|cv/8}/E] 閘t+DwL,r~KJ RDENVK!3O{5vLDz;hľVuFXmUmڷWdIdendstream endobj 100 0 obj << /Subtype /XML /Type /Metadata /Length 1557 >> stream GPL Ghostscript 9.20 2017-11-16T15:56:24+01:00 2017-11-16T15:56:24+01:00 LaTeX with hyperref package endstream endobj 101 0 obj << /Filter /FlateDecode /Length 4183 >> stream xKo\p~4E4}8*z c-u$wrWS%3yLr&O7O2:+]p+LQIkf'y)G̹0?]<n!\m>h5 ~1F|zPvt"DŽc_bĨ RE?(e "FGIiP2Z~LcV!0[1(GH-2:a +VLFE+`X ,&ȡp"tph;K8DR(a͆k:yY(g G|&I =|Ŷ ȈB|;E0 %l|D*[Ji3J0fp6.ޫ9(FyHKQF8 `[|J x޶BL49TVYzAV ~Ͼ>_MwuE89uȾkvJ zPzt`&3"lm/'ӱUBtbt Fr۞xH)Z!8HC>;<ZU33 5rY-%oڌF02PVfeWHP,HDX(Slru}*_f }uMh%CPDA(, -8-ͷefҌڸ|ZуFև9(pg@Z?d4 Wt,)eNGYX :PN9mZ,_@ "iib쿽lئ0=z'd tἈK1Ll@]4p,Ƞ堯o$0<8zԫ.vox08l!H3)V% |l)D5jf2~\U3O&FdYcPK%,ׂ]>(fK@;  s`r*7U;./.hI ?|MH)n&PzC,20F$JULQyת_c?Z3#蜸06Riɥt뾨e&!JCkɝHW ~RDiCmpj GhDe4D>7^*iB&# ;-#f6tWL#G*߄ ~xԴ@^A?iRF`k2EXW4PTbßD&ǭ iF`NIs8;5s,c0XH㘍 )3mTݷ o-JY3l>g?cKTgg% ^e];yAzu1uL*4H kq xw^y|'?P5JZ]Be7] ӈ09zCjrq%6#Ĩ{U!%DiK>F^]!Wpg{uJ{M֞G*v6?#DДeqm7ꚙ4,74{K:lvBcr8}|l=qFRwķ9qA.;էm5+ \v}ۤ4G q% jk^%v_1B {Iҩeڐ8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%`Nh+JCCTL2Ȓ=d6pd0F,xH5FV*sRi:&!ڂ,Wc6EJ\bO,h>Or)yY5 v8|Rj:ߣ`ZcI#F&%a`]7nK' Z qȇw<#t^?ژ]T{scvXVt~v+bvDzbO~v*uKCk+|{ru(E\3|n>F}uԉh82(Ke 7^W{3}z endstream endobj 116 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1886 >> stream xu[pWpDV5 %3`1I0Cc R-_bYXlf]V:bK,ɶlP L$)I;i'}hC&-Nk>iwg=wyX2-߽jt czob}{E[lw9?X*2>L^~($YO`%<]m:Ʀg[n>[UU-ݩkۛd*iL&WtE]3H7>ߦiUV Bm&]&= k_U:2\DZtU+5tr^,תd6ae 튧J ۇUcalcc'xqw+,_sdgLP-ŐB49Cn+":pAPl8 7v%8<2A*b$W+~ z.#nm_`[H :3^hU Zy:7=- 0S1JPr_#z2Оo1 paq;L3yOE N;AO,lty+w;=vp/6!8V>m,\<~ Ŷ ̋,PTp#YN}!Wfkꣵv yTȣ3Ӽa/6&[nA?AY)0?v0ەwt74 عbf1*,( =C/ ᔪ .\NQKN߄s@譜4 aƭAl@)a }( +K_sq)#حh'EAB>vt Nơ9΍wbn[.^N7}Gx>M-zےDajp^Z;=Ј?{Sd.G^574lA?' s5~NpR{_}!Z5zoO .lTO4NMϠ1L5 e$2NRxJ:x kIxtU.>8Jn# =grD#.Rf&&'ط[E=5G􁁞 ssKXF4ZUwkӅSWoqqYH 7d3G016y]2iq9l(z)Tx[4Gf#؟,|B9C⾨99RoC5s܆s}|V} f INs?I\Cұ+Ia986 >ri }#i{G~ۓ\(')WhCڝ( VIuty)<;)'q{~Gg> stream xCMMI70`K+B@b}   id`nsCopyright (c) 1997, 2009 American Mathematical Society (), with Reserved Font Name CMMI7.CMMI7Computer ModernijJK(Ҫopnqnzv`~z\e~}t;_bdw揗cT(]z~ᷯpt|rMl`zK~pnpop{uh6zFVQP~xwlqpker \OK}~ſŋzk}wCp`  7 9gendstream endobj 118 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 718 >> stream xM_HSqvF]A)h&Ȝ"*Abe]׆3u&,'R.$䃑"V&("H~wzhr89BAZoB% E@5$E9_tpHE ~?h\ˢ7nzA癤d&=;;+P*|#k6ThMZYj"Wa`z&)W59ii%UkM̺be7J3L2-SEkx̨JlBg$%+AQ( CHXQ ©kԲ`V+<κ)Id]|QN2J(gu.zӀcyq/+IG}pۮHpBAlk`mikσ&I7C rDee]y?1u;j,~6>υS9:i'- \G 0ʈJ@NIxN8\Jo{N[bi)\/|ds`3 pfhp{l?H l! (eYѫS) xja l!.d~~z2pE#*7nč HVdeP[,ʳu@GX܂jD; ÂPOT#YHendstream endobj 119 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 372 >> stream xcd`ab`dddwu041~H3a!Wu7,lRLvnne}^X1es~AeQfzFFcnjQfrbobIFjnb ZRaQRR`_^^[_nPYZZTWqr-(-I-ROI-+.TZQȒ5~nfag:%tϕy^""?6lپ8iJo_wdwWO7IP`o%lX^d+ʑ+&r>.]r\,<'1/endstream endobj 120 0 obj << /Filter /FlateDecode /Length 2448 >> stream xɎ#.#EL/ C _!c0c R/-3GVZzF"߾~g7o_Gl|=eïl9v77ŒWx[Z&x,.Δmh?M5Z/&CE\`s"此 ZB۷ߛ 2晘t )>O"A_~YV MP aueߺvwū∈Q/ Z&0ʰ0 Cu3wN+]fZTE:"IY-p#kGUZ':A%M2MH ̻(?QjjcUy];vڇ54sOX9 QS'gJFtQDd \G@٩uw(ו i&? ҐnsL 9/1xj Ow4+D^URepY92KMrs5V#Jfi!4C#fs" Js'JP2d"$9=*(aLz I! *S'104 8'UkPu>Sq뮃bGV t텰@\5Sa{>w`´ !9rm`2Г`V;37Li0i^3bc[tW_Jtzml[rɒ_5 |!A\ er%6%E+7)U7)&?dzZ `E98ρI2vӣˈm٨cvs`2FDn&wyiSXDC@(.HK:Qs9g*;a* Cd~N١`#*ҏ?u DsYd ,DŌ9XH {90#r#V91Bfx"mgD^c "wLfPPb}'Zp3L? Gy;;P(W*0)1yb œ{_uI~nNÀr{) n.2=)FC@Z5rT1y"jA:8o7xHEj~ȒN/eLmVbv:i^v!V:r70*!zEu]B@#nX-lwE* JVkZP'=,e)EeBXe &Yh+aGr-A_ehd0S.OKAVEC]2'ZO*I掗Eȝe51ڻ\@rX4.ڮ.~VWo?q L%%%xxpBEBwii1 7{PLAF7GtZ8'5PLE QP K #g (YM*Ѡ$ DPI7yuRRB-&iLW[|$Q;3y}S4+=բ>J'pX~ .<oGH9t.`C ŒM8lqdW7-FCq+n!1 W\vƫaֆio-W@*\1آuwWZr+ qŞAn<Ҵ2Ts4H"Oq`\RK Uic՟ճ\wT2@DSXU@DvTNg 6v dr );P_/8,Bq6 C-vemgk:H x+#Z ٙolT:hIb] Z$c~LM1tS]=AF^=xM[!rFlmG3 pS^,N.z@4î™?#hm0kY3svև-naHclvԈІ,OS*8 ?dnl8ң?J[?z}O^5)_5h[j~._5:Cmv|D.n$4·&bqto?endstream endobj 121 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 447 >> stream xcd`ab`dddwu041~H3a!O'VY~'٤ڙ|=<<<,~}=U19(3=DA#YS\GR17(391O7$#57QOL-Tа())///K-/JQ(,PJ-N-*KMQp+QKMUTB9)槤1000F00X2012gOv1GE6 Y'obn;S(ǰԽog#YbKN6|q6wvfwHwuwsŰmӽ h΍@+6dL0|N[Y-bضѽQ:JMvi?|[0uI컸qq<;r>ۯendstream endobj 122 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 226 >> stream xcd`ab`dd v 1400qt~H3a~',lRL#nnS~&(土[PZZZRYZ^ Aa```Tg`icsL~X}WgŅ|ICB>M{-.@ߡ z&Lܹr^I7_NS;Lc]>=^n9.i< Sendstream endobj 123 0 obj << /Filter /FlateDecode /Length 4409 >> stream x\KO1C!$IK `0ZVkά5+K䷧*r{ؔ#qRcuuu,ZߋէO]_Wb}n%ӯg瀰q[X+ګگoWο j;B Ο^_,gzd?}yBBF1BT2{YJ]=T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endobj 125 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 2267 >> stream xU{P%a""UWAnn[:*>*/^QW-@#1F -JxwPQ;>nQKu:ZZ/֙{9vnW_w$|-0ljЈ?9$؉,ڍt|ݛefTzWpإq <41U)YAjMj2NJȦJN̞' L'+e1*ih 'Ű"Q^-STE Ϛf$T'-:]S :y}m? X{10j:ȆjkS ֭NɴI:˕4jsu/^U"!pïsp'PfВ4嵛@ Qa)C;97D;LV׫M 5 ccfK @n,g="XWb[5%0ǔds_ z42NzUky' %ޙLԂX{AzI'- ħ_麼|:/RU2t7C__{R-(]SѰ^EČ7/>x.J@ UT+avlHgP(}ݷĢŻuԩ颒b`&SjNogs' j%u+FTUm%Pۧ0yDoctt:"TS;d kv8 n!7q dp ,dш g2K2̹Lq2 MP3*std>aj՝~ud<̠ =P\Z!HϦ@~Vl`$^{ ]dPie*cr^iG}T5]A+.l0񩈏8Ug(ffmm2rg UW"ƒW_UlU'/Ф)p4yy]6&ȏR{+NhPfe+H(AY,4|Ctb.I"\ N]+p-eG!t/47e ,&e*`k!s2U{cUutiASM4\ajD2 $~q2e R$}[Oͺ YBr|eejUXJp4EΨW{x6}o$qy0sGA#kE[?$-v{ ?{yEVmm!dzpAvY;@_>n9J4IjHŵkCIiY`FǐIbgcu,ɻ8Ϲ&6L@/(EqFZP>#Bh…e̖u٥9tɓgy=/xC,r gZ2CG mwAV-ڃz$5E"#Q1GCޏR<Ԑ.y\HߪuAh{u|u vꚕ /[6rd&> stream xcd`ab`dd v 1400qt~H3aUA6v_7s7IBE ``bdT6r-(-I-ROI-S,H-/$敤````Tg`igsL~X}W9_?D#:}ړۓ:9&W/[ױzey$&,w>Gy%r|~8M0wD\{帘p20kPendstream endobj 127 0 obj << /Filter /FlateDecode /Length 161 >> stream x]O ytKVU D 1@Hg|wYudA>E0um &-m1'. 9ܔWBi )(ItUwXI%0lwgBSMJM-☛&e=O)!)S#endstream endobj 128 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 310 >> stream xcd`ab`ddds 4~H3a!}ì NI3zxyyX~_/=O{6 FƼvʢdMCKKs#KԢ<Ē 'G!8?93RA&J_\/1X/(NSG<$C!(8,5E-?D/17UR=0霟[PZZZWPhb- ~g9Lı*qNj}Nuo?]u]'O5IxO%l姳ýg>20lendstream endobj 129 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 335 >> stream xcd`ab`dddu 21~H3a!.,lRLAnnw }O=^19(3=DA#YS\GR17(391O7$#57QOL-Tа())///K-/JQ(,PJ-N-*KMQp+QKMUSD8)槤1000201012{ӏg!?EWwyzvws/>}|9ǟ^:C7C{y7%tX#WS'/`8}=n9.<'ܛ'thendstream endobj 130 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 2120 >> stream x{PSop ֽU`|l`BŷED^y@HgN !yE٢VW-#;]ZnQLong;sޙs|?{ΏCxz+jaU9"n:NLz\NJI |ٳhk>jGy~(ip$d9*yfzB$X6DzpH* v"P~1LB%YBnŊP$/T&O0(DP|,EihT!)2Cݏ($G;di" RY?r`Ͽvv{/c/f9'ѠL_bcA-{ Ӹ łЪ앟  p]6.R!QG&IMR%ŪqNYAI=Emx oprpS@{oܴ{IZ%b" H߯w'ɨu#2蠝-a5 pO .{vtwZ]^ Jl)鰘 1tso{:e5fY-3OpzGQ(1L Jk4PTDkk+*4P Z$@}z K}l^ lrW,e)n5UxYGt`l6RV77ħCN~e]L p:y.u ڠ-tNAhQ7dPbڕ)!J[IZnfvrC^c5dF  r E\PAZ["kM3ԃ~B;4MR@25i[! իl gchm/HgbGImG+z x{ &X&rϏm[$2aYʰ [$fa(mK ݚ͚E!Z;uU+W{ȔpHG\'}z6Zi` >`g>wr_s],592XjBPC]mK(Lk0ZZYZu,$Z>{2hM"- idFEǀPeeoU(JG^6 \)3E#E:qfG<| <ͻhNoxuvE]\ KMj9[3 ]%l#(Պ^ﲆ\f;Gk*^/0|`e^TzX[UѨ ͒pNR:+ zX|=vpHˮOsQ{h|yy?p5kJCVvk~uƞY"v,t7;a8g668 # gk,@i3cNN"J\zPiOr>0O3*02 s_)̆Rpy_2W*1v}LT+55{ctΞC\3nlKendstream endobj 131 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 340 >> stream xcd`ab`ddds ~H3a!S,lRLynn }=I19(3=DA#YS\GR17(391O7$#57QOL-Tа())///K-/JQ(,PJ-N-*KMQp+QKMU;TL:)槤1000103012ܽγ'c|g?Bu*{_}d??DOj[oy?f}\0gigqq<6L^~|endstream endobj 132 0 obj << /Filter /FlateDecode /Length 1618 >> stream xXKo7W,b]ֆCr(!nNd;Nd˱Ρ WF y ϕjR]O^ mutyתYW?p UlӮLL| K7_MXH^p$"tFT] W𘄷@)_V4m!%F,(:+BsB©E>z%$I}-ZpTMXqujJIa.taob W}%0dQ 32з$³n)9WK jt) I[:fw}Cv8`~PT=eM=G aܷ7~Zy q* )~ 5r.G(?a8 v`7yS5V):w1wRp-4b:u1ǤP,؈pD#oU;ojQcƥVj>V *+p Tb44nZj*3%4JADV(Т5NA eOBbqC[31Zkp`s#At6)ebއ]7K:-b8oR{I(KlS ŀl\GG') QxƯYNYSGSTӃSF>ldV2gd `+W 'FR_O/hm0V, e\t)}vO[M10,9kw(iR)q+ CpF:` /KJɯwO^28 FJ,X!7x38k{Wux\&o'lh.ٺ13VM9g=u}DIÝ= =[ZK\]oPHEzԕ \d~(s& &RUن{7uz2*M_WXCcSpΥcX0}4mF!d?e[[IHK*e+ŴyHzmJ/pϘKsr֎{8 NQù/6wlIMAKnƟ[' &l/ѳmp +bd#J|#X&L[=r]/=g-yҽswegg/:>aA^f[,H]R2] =2#l{'tc9()7KA!Xvb!^c- /F|EF7JJ%d ^: .Io<ߨ*VԧRUO~qY*2I2?~̏=\z|>W?rgendstream endobj 133 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceRGB /DecodeParms << /Colors 3 /Columns 900 /Predictor 15 >> /Filter /FlateDecode /Height 450 /Subtype /Image /Width 900 /Length 18391 >> stream xy|L"bIjM!VBIBTmV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*sWY> stream xcd`ab`dd v 5400qt~H3a#UA6v_7s7˲~Bg``bdSu-(-I-ROI-SMCd`````(`we?$ ^#P4%4+!?&;CwO^on9m]m|e 83c)n\{帘[y8BIendstream endobj 136 0 obj << /Type /XRef /Length 156 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 137 /ID [<876253ef3542ae1163f05b40bc85d937><71241f24c9ec45e3169a3171cf48ac73>] >> stream xcb&F~0 $8Jjl%DHc "9TM)m"%Hu ,["A!  ش[`I 6@QR\f`qK0 LN] ֻa/̮0hT endstream endobj startxref 100280 %%EOF Matrix/inst/doc/Introduction.R0000644000176200001440000000035313203323423016040 0ustar liggesusers### R code from vignette source 'Introduction.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: preliminaries ################################################### options(width=75) Matrix/inst/doc/Introduction.pdf0000644000176200001440000021236413203323430016415 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 4206 /Filter /FlateDecode /N 87 /First 719 >> stream x[[SG~_1oT[*Z06f1Td@$g~{Fl1==Ϝ>OȌg*.ә63R*LL;  x!zl/24uf1eVf6xc{Ȝg0\fxeƠY $AC@j񜃜q pE= l@BRxeɩ%CA ^fjzWՀ$XPVIQ:$!T@(Q4E|:P9P֊@3C:0 S sFs4qg/,[xK*QX xR*lI>@-JR؛h8.fx0N7_{Eϑr2;-b0N[y}a0JU?z5_f=E&ӳY79trvsZlr2Nyr<;Gx>lwu+/JI6ɜ-If"S/%$l+z'y1!Ua^ΆУ Ⴄifz 6_Gs)a24Q1MvoQ|?_)l%"+;nB^ï'd$ZJ/rrUшXߧBW5J-+'cg#=tB1L/2݄3M3(4nɓas N8A8hkߣ۝_ǟjU>Jlu}aƉ"0Wb2>T!{9A^,-UZ=JKqɏ.%\ .KLI+yRV)K̊hXl7?<;h؋l8 < $mKt9 آb!~x6E7H@G.Y.UIWxs3?oKt\"ԯKcfٓR {sU1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%0۳'r1&{U꭛9Lv~v~qLjoguP)!,Ⱦշo&X@L)i^ֺ7(܄#G'IЏҜDG>:U{MH=.&XFl2HQRd`i)|a7ekۅ*o.endstream endobj 97 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1553 >> stream xuTmPTUjͭ&ޭ$QбTVQ$RM݅݅ݻ\.,k ¾˗$ , FRWIQ)l4sgʹL9<IPE&"qxS<74kq Jz{GLM\b 0/Y""POR1O׷۝ .K Y}XX41l0ۡ}ح}Rݗ S^;sҥn $Co_,FOݼtULEƾҝ@6~rDӸfY)Y ,50<]#$Q&HFhr;R(cк|.EBm4#4mO/^`ꡯ&4CS~@\^u rye٪52`)3U3Nc@\Յ4oZ@{A7z"{htQ_@tAO1eQE9^69I&7TQ0z^,sءBiɰ/Hh2Rm|]yMp5Io zИ!p/"ګZ%g\'=|gwh\C Eq^ы^r}NPWf5h: =E7߷wyzWE:mwU׶kS'ٖèa]PKbVe\ 6#n׶]HbD02된^z龣qDAأ} UzZֆZQVǮY g7|stV+;mmNgW.hdQH9|=986URГn̪;^8~()n4# Q xE^&Y颚: P@> stream x={LSwjWQW9o sOmRFPKhk[ZcPzJ ב2T/vLZ7 e$ >d?^wev^`x}_rc0>?N/6| d?+#9閔ao˚>j]fi4C^."$qsA( ?_-4ȏC~} ߔt=dqJatQ9?'Ήf!S?gp$~{jy{l?"yKyRVH~/06oGFi5ւB}60$p#q{׮&W咟7B=sj4<4CA 9yH M܏/&مagN,vu ɇod7J HrKAsendstream endobj 99 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 4656 >> stream xX XgɌPũm'mbUz_UQPpM ;xZmkvz~>%?ݺ?'w$!D"\,!sRt%K~hcWƻP>O1R$,Jt7u鮳=\DU*? ׍~! ?77,ffDt)]Bb.W pLgDXd2 uM@t803/^\/wU ~k ٸwS"SϘ0uxf=3yLb61^f3f0ә'3lg^c22fYd^dV1/19f-3ØHƁq`fҒ2C\T20$lȷҝCciwN6O{[1eqF$fm5rȘ88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<}(/8YFF +VJ~_ר7AU^|F4'R<4o?f6lNp[p$,$}uV> 9[LV.[Qyv+ұpSn@6Q)'#W(JPJ~yOx/^cDV_"qԣ n׸ec :ׂhc3>#ى\ߍ/]JZA7|g{J qL@ubyeeO7ڂi_ݠP0תԪVnBdWwJ r8FQ',]"ɮ2ܺh;b,hb;'VZy ł$Q ?ҦHj|}ZHRq9r{hA>*Z=DPAB+PkTHi l:t0uXs:\B33J0(#/OgBCA|* ߤmǏ3J<`5 (}|s2[fjY˾8Cݥ̛P`?|5eg1Ibr\#ya6 ^lyuH Rea[\}zrӗvendstream endobj 104 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 464 >> stream x:CMSS10/u`B@X,  5kfbouCopyright (c) 1997, 2009 American Mathematical Society (), with Reserved Font Name CMSS10.CMSS10Computer ModernRS34O7ҋ#J2PG$PDDKP ue.TTB4)(`aa^}vrzj`ITI0b17|:T}ʋlu\j/Q{mo߻jluPWb  7 Ȏ ٖ 3endstream endobj 105 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 3407 >> stream xV TS׺>!J<::ܪ8Z8T[U[E@ $$ cäE8\*WֶׁOoN]JV}!ľ~s8^p/;q3;tmWl .Bpqnzywdnh8B((_EN) UyMEޜ5oΜE^>R,(0/P*T FELyM_RE-=[xFx+!eF *c{V)"U^#^UDDURbTIdHET2FjwHCBea951XO|Hl 6&b3J,'vbM$Vw5Z=}XG&<CW΄CPp)Q!T t^|G$=&o'&z4:xtc:˥х4 ɮ'>rKpk]jnC.L]:$H)kЃ Ҍii{!r1YQ Mak~ddQP>&롩$}R./M.d_RejG[h17n f9Ճ=WumVB<Vo:sά=} }FK m=zvʴZϝfCl.BF ;cgx<<Ӄ_;_?W[!҆fՁŨxϟrʷC?GSZB_ r|S'_f3Z7m#vTޟ+Z qR&qwSfb kꉶ ÷!2EAcU/Z?]>fJPUGBH-^xo|Y4|uP~3ܸyhOXB2cL {U@gؾr_B-P ADȾ>32s'/ՈaHо&, j(!/iDXu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zV' ;#BQy1ߡH3Sڻ[+}Ս@~q[sr=-y\J"b`^9 6h wƌp̗|I =SƊ)i|,іj>ixAlwpXʼ8"`_7F>ڰ"B610tc ,Qh4pyahʮ|,ȗv 6k { U)|nP{6""mr̞W:z>ADO%[\fs7?Ne"^y]S}|BoꊑC] y" Jj/D]aʢ̰)hpd7~ت>TUIQ KF' PXLL֢YMHqU ӼZ`w:q]2qIׅY zƮ$0>ΔqKS! {l6R+4* 2Q f3!qS">LǫbQO{'}sA*#@FIou.2+]XHRy'#e$ ۉSM,&INعa*uf Nh`2좉&ŁʗjoNܶ[L bWq=ʻ\Ar~+i;W~NrK[ם{Ou{M#?N]t$a7Y Gr]qgy;+*;ԉ+]k˳\( J*jNNKZ)ad``Elר @_=71S$I/d(cӠd6u^^5d#H Ow}ًw!rrxnDWC7u>zC3onrhv_yJXi̘~ @~{b΂╩8Y 9< ľ>tS<0+?IU.?;C|4g%/)iv;z \|qAFS^\݂cH^h|m34qᵄlP7`ոCba E.ceW̓4rݴ:{Kbj->a,jҚ8b(:xxH.kђʶYf?[3EmK~on޶9Ǭ5QfE9Š#jzΟ6r.gWL|l6)$P[n+u_ˇЂ햳3j/.w<,ۆg.lZƶ6+m T[̉Z}:h&[#PBbro\^6ܧxP_@62 <2,@4ho0r}xbFyP"`gvE-@ӚH]vǹO w(<~OU,vz荔VRU 4r|ݣoσWr0:pX+2;X?ǧi~-ysoѭqǎeQG23^D# ]|=QDn}XL:&` 6A%"a]ImeG19!bՀCp1+Aie(T_ _sPp*?(ffeT5v[ȼ ŋrAklu'kf g&, endstream endobj 111 0 obj << /Type /XRef /Length 112 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 112 /ID [<876253ef3542ae1163f05b40bc85d937><71241f24c9ec45e3169a3171cf48ac73>] >> stream xcb&F~0 $8Jh?U@6{:(=" RDHlDr`8)=w RN,"V٧A$ x U6a6<h endstream endobj startxref 70514 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5VU$z[r|Lov^Sk{BJNNu$cV55\BN'qt[5!.&}]36NFJWWdtgqwRxƋRb2eQV!q=zdROb$wنWr 7*v(~$"pBJ|BTO±ӌ}4F1 zi0/K4ln\5 ӛEQQJv3 )~jn_&-(2yid:l[n˶zA mG뽁[ 57RHaPZ^z.Fuj']a)*FG= W 1J4}sGٖZݟM,K6#c5ly+_ќnK5xpq=\ug:hE2BWo*MQ6.m PQ(>lŌ/B]i#׾]YU_LN-2Z˹m?@V4uJ~+q.ɬ%^Io)]d4Cr% |Fk2It(JdR xѾ#VU1 HeD[ Pmׄ_xuQ9޸-V5ZQuNGV֝~c3(S/1m^b IO-׾O2+nU=L`"*qu"o7|C&tJ-%rq* AZhj–-y*kvH璓rG[:^Zyznom[^=Zf+eݱ᷸hѰ)t,ˬOIӝkEkO״sB?d9SULhF6wƯ[aUAgC%U+#m |-QrB![;AoKmǻT0{mf7~Ҙ[:!%{ -K H 㬶kTRNKbG"kW U5GJ(-iKyMY^q VlGQʒ#7k鋭bƬ~a:OX&AI>TNtӉA I t"0][8ӿU Ao Q>uZى1 ĂL[,}wHPfJ$HL)m@OKgR L$)aaJ{  ˧c2 )-t Y1%m ؐMVSi:nD*`A<}J5v#CYwyV&Sa3}36;cAagUQy+T_[52\>wnCC64nMD/rj(ђ)P YՀ z?ǰyO?İj[ߟ?;W a \/P`TK|ܬve5GW*]s+endstream endobj 71 0 obj << /Subtype /XML /Type /Metadata /Length 1557 >> stream GPL Ghostscript 9.20 2017-11-16T15:56:23+01:00 2017-11-16T15:56:23+01:00 LaTeX with hyperref package endstream endobj 72 0 obj << /Type /ObjStm /Length 3280 /Filter /FlateDecode /N 68 /First 592 >> stream xZkS~|KR,q+7ULL 'TE/dwqp~==vZV~\Ehci&.IcLY͜cFK<2y΂ƭ ҡWLh+&2 NX-^1){&U0&U,pU0fA2@IPLsCk1$ /˴g&}ό$!04✙@-YWz 8` @o9B`n<䏧v ! [ @;lR`Mci8II,%v[ Vh&I)V( HPȸ z/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h$1DaY1=v4ȋJN ZPSVL^M0 F(ʴm`@LSu}L7Gޫ\{[~-L"jm[7p[$!heW7q;ݨy|d>q|$,@r%*Σ Ree顤uQAN;-@˦O*=`'Emժ9-纒qG*+bsPcҨ#=Po46' -\f mFfǤa!txP(N 25JgPK~N ƫ؃I]h|210 c0<ka6g/T{(2wvsp!=5( ~[ȍez|mS[TxfWWha4Sba`XP$;6DScbQa<<;23i\PCfM Yeg*ލ#[Lp`Oi_i80ލS+rXz @(ga,C_caݫ 8?7qCZzbR!R >n̴iӴf[4\DL;mS^Ȅi=L?HKi:*wCDDG1aDq&&$hàܴF[pF I> stream x:CMSS10/u`B@~̬  5kfbouCopyright (c) 1997, 2009 American Mathematical Society (), with Reserved Font Name CMSS10.CMSS10Computer ModernRS34O7ҋ#J2PG$PDDKP ue.TTB4)(`aa^}vrzj`ITI0b17|:T}ʋlu\j/Q{mo߻jluPWb  7 Ȏ ٖ fendstream endobj 147 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 5336 >> stream xX TSgھ1zE{^qPZ[]VWTDaI $B$$!HX (괵V[umN[Nݞ3Ι3v{} څxX|ݺ&ry+]WH=}U9^^|ЫsCB`S_Re$!.^62fT3 1#lnr$!&Z"Z-$$Jea##Ҕ&dffNN/56,3A&6-V+lX$ [/NNIJVwJDADOY I/Ȍڹ\bq kKJ8ikSN>4|YG3z˘QO *"x F%뉷b#1D'xb!1XD,&KekěbO ^"hb 1%J &HU!X;уB$"^Dob6чK#BYAO2!+k/X*%n˺]©M=Fp)&:{T޷oߋߥA6 8RKlZO_8`ඁ̓f* = _f?}87zZc& AxBȜTG_Ɋ) #. sR@TߘX2׍8AQ79Bɨ>Ko_Qog6v}} AP?"% DQvD+E V`y|USQɵ vTnhbn!k"uj#Oԍ~رKۅp#4wY< >IpBjp杤ݒf9@ްsnDJJeAŮ?fF\l kaU9>j;G6GIS؃>عPBt*6 ͐F!, YIKV4INFSvS,4/=5eXr!_!I[ (OsvPY\`ŵ@|^qⅹ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bٲ>$i>qJLżkh S౏uТǧm֓hiaA-Gi:jra V+gOH vl̓ ,J9ǹs{yU`X?;V[%mkAwQJkW08~zƇӅ@ATڪVɍ%. {zxIŠht^%$b};!̲q8ٍ{6[kOڭ*( m]]m;S4VIN c#lO1sҬP%\'H&x:0DNAaS: n^w@L~%)+BգM\~`M棛6HLۯg]x$]>J͎q Rz辻6։ B?鋚̃3/.2=A+c{p'S𡳸 >~b>Y\> stream xeOKa6y`vġL$Y bѹnvvsIi4㡡 u[,@^2,؛za T0w<-]| ` {|lqeȬ5e^>;!!<; pҌӹq]PK: sIEKD4$q%)0)фHq]O\[NfUmK%4dmZIՔ.]tgd:+4-b~ԋZ>ƧusQܳes?ß}܃GFhO]ΝD]^GSkgv B#62,X Cg@C30I`'j/mm>qKc>B~g ͥk O(բLI<=q'{+ NzAMÏu y~nӬ`` =)ErÑ bt$u"[QG+)lLAJT8KURk5dT*ILb~el\-\]F e> endstream endobj 176 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 365 >> stream xcd`ab`ddds ~H3a!G?,lݙ5|=<<<, !={3#c^qs~AeQfzFFcnjQfrbobIFjnb ZRaQRR`_^^[_nPYZZTWvt-(-I-ROI-c```db`XR繖?r3~71{'tO8Aw*}O-YX>Q{td]]g[wdݴSMT=wބ%gL6}r[w|&ߍCs/it\;wb^uendstream endobj 177 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 935 >> stream xmRmL;6Ώ$HLE`0@bJOzJ{M9VF|+a0[62X!u1?,Hb&˒<ɛM}'Ih$ K j܌NRٕj@5Xqb* ?mi@gcؼ [VBCw %i`yC}:lnnNh_ NlK̲UWH yVYvr\f[Slx!=w?.4 S?,el23Bh'_"Y ${lih$cD%QE"^"J*IGpB[œ Lvd4]98WMz3I-LV©KE4\YEHJOzU}GRϐFRHsg/yZP2Mopڙۡ>73iZNC@y\ c%W1p5)9<\W6 *zܣ0tQ] wI Bՠ[٥GcD5bEER&-6S{:~!z{:, 1n.9GVy܉7+?U5S}u4U>-~j),JPe]0)P*sG}]QYgܺvBɩZE5(ɩ{؅غ_6h.vx|p]7zf}7~bY䂣QOowВ Lu[ F.-]rs7 hY'3& ^_^GZv#aj@> :՛8R'15U}k5q ރrgmHk;VWxn x!n=ۣJ> stream x[L[uНZ.Is"h"2XˆɈ[-V7Zri 0;paJ Ex{1I?X!/|}AҖNիVs|P.KxLA9*j~ufB2 W~XGK_)FЏ[aAۯʞ*~~S=j=ݮ4N!ۣe8 ]yRq'L&SZ7ROU&-3#mVzY[X(v1Bae:.6t(G'~ >2(4{?"9D!o *IXH:!݌Ssrp.4H^[-F&Ek/H|02۽!VkTƽpR{|5 `&{z" sX=B xE3'a.xܐۑqlSSجK\贈Ěbkᣏ~ON9=M]T4tf&$JM .) 팹J>JnL -3 R̡Lea~0endstream endobj 179 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 523 >> stream xcd`ab`ddds~H3a!K/,lݙ5KzxyyXVh!={3#c^qs~AeQfzFFcnjQfrbobIFjnb ZRaQRR`_^^[_nPYZZTWvt-(-I-ROI-c```e`c`zQG/?302}n7uީ֜پf5wsl_[Z'RXZP/VՒQ2yYӧO8yH@Lygњ5{vm?ͱ~AYLHohŽ ]n0cjs_K}gKc\Ebjj7GuE&/D~ٻs\ _'|{nxwl_us1EeU1QݝM'_:InǶvs,XTZVќ%\^[K|e ~8O6{ SWsb1ùlF׮endstream endobj 180 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 557 >> stream x"CMMI60`d,B@~̬  id`nsCopyright (c) 1997, 2009 American Mathematical Society (), with Reserved Font Name CMMI6.CMMI6Computer ModernijJK#Qئytpnqnr|OYY%Zu~tw|Wn~i~m~zXgy}x{XbOXy`٫ds{krlsvxi1x@PXQoq}pmufV YKExÿ‹rr~}vCp`  7 Nendstream endobj 181 0 obj << /Type /XRef /Length 190 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 182 /ID [<5ec52bc9e0b13f0cbf90a84e3e189305>] >> stream xcb&F~0 $8J:?߃=@6{:(^3#3(YA"H)uD2kHQcɻDl2' dH_`Y]ɤ"M`Ej8@u)"9g3DWHTɚ"'M>]Y &mg`_23k endstream endobj startxref 129710 %%EOF Matrix/inst/doc/Intro2Matrix.R0000644000176200001440000000472313203323421015724 0ustar liggesusers### R code from vignette source 'Intro2Matrix.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: preliminaries ################################################### options(width=75) ################################################### ### code chunk number 2: ex1 ################################################### library(Matrix) M <- Matrix(10 + 1:28, 4, 7) M tM <- t(M) ################################################### ### code chunk number 3: ex2 ################################################### (M2 <- cBind(-1, M)) M[2, 1] M[4, ] ################################################### ### code chunk number 4: set0 ################################################### M2[, c(2,4:6)] <- 0 M2[2, ] <- 0 M2 <- rBind(0, M2, 0) M2[1:2,2] <- M2[3,4:5] <- NA ################################################### ### code chunk number 5: asSparse ################################################### sM <- as(M2, "sparseMatrix") 10 * sM identical(sM * 2, sM + sM) is(sM / 10 + M2 %/% 2, "sparseMatrix") ################################################### ### code chunk number 6: add1 ################################################### sM + 10 ################################################### ### code chunk number 7: Comp1 ################################################### Mg2 <- (sM > 2) Mg2 ################################################### ### code chunk number 8: str_mat ################################################### str(Mg2) summary(Mg2) ################################################### ### code chunk number 9: drop0 ################################################### Mg2 <- drop0(Mg2) str(Mg2@x) # length 13, was 16 ################################################### ### code chunk number 10: image ################################################### data(CAex) print(image(CAex, main = "image(CAex)")) # print(.) needed for Sweave ################################################### ### code chunk number 11: sub_logi ################################################### sM[sM > 2] sml <- sM[sM <= 2] sml ################################################### ### code chunk number 12: Tsparse-class ################################################### getClass("TsparseMatrix") # (i,j, Dim, Dimnames) slots are common to all getClass("dgTMatrix") ################################################### ### code chunk number 13: sessionInfo ################################################### toLatex(sessionInfo()) Matrix/inst/doc/Design-issues.pdf0000644000176200001440000016711013203323427016462 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 3442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||}!uGח)WkT;*ckї$;Ttgy"vHf5M'mS2 uռ]'|fI ]Bk2C Y %~ZJOWÝ3}~DWbDw%}ŋ7[/mnuy[R^m)~;N8.r>=*V+O"TDarOy]J EQ԰xubzՂrU-DiH/tV-!}xDT}న+ذ zYâDžE]˗0Y> )g!2R%,_W  >_r~@㽵PBhLo%A+eB4M*^yZ_쮎Yrca9lhȣ|%AuáxXeX3%gz%P~UCy}[d.CbE)\+mo=RۦD`X Uӷ+:]:(5Oc]=9°9o\^V|sU\vo+:⋀Q06)R#R ºkd#T]O'.>ᴆ' b\ed;J}SU]j1&ĔQUCi`4J1P*D?7 n}q+>.&l#lrs`Dr/4#ĆZԢՉ"Á.?i\y:endstream endobj 64 0 obj << /Subtype /XML /Type /Metadata /Length 1557 >> stream GPL Ghostscript 9.20 2017-11-16T15:56:23+01:00 2017-11-16T15:56:23+01:00 LaTeX with hyperref package endstream endobj 65 0 obj << /Filter /FlateDecode /Length 3829 >> stream xZ[o~ׯ8K>[/FQ[E]<ȲDȗ? je'LQpo\Q(W?>w:n.NͿή7ߜD8IY71 ڏ6Vη;p'o!┶6<4ʅfJY$sN1a6*ؠې-viJ&/l3H"*gU2&4GZǨ7U!ap54f4Y{ ad^I=)3ؙ'=^W$6999؜ki]9VFU 1{o(:fٙ47(zVWДrUkRr.qX-.i(B%]Epr0v E{ҽ)Y@48z@U%B}Am ;9O@Ikژ\o,!nvڎMqwڠXz+>k3# `/y6{rQ[9X ` Gq2*ϼtpNߋ!SW]4աw5t @6H31{9^e <{\8 bzݷeUsUnBWl9V<Ɛ$ Z]y=F'U}ݖnx۶/Fe6{hB1!2߁OApo%,5ȴ\RrجM%e|ëqfmܘL_֍:tEvQ",!Qp (dFS _dL0GlFe@燲t9INvŧEMB5 ̉Mb-X)ɚ\6i!p'qmv L$7Xrt""e|dʢe@y*Ic8>:@1`6$ifL>޺pZTfFd8y@rU0 H}f`qmZ~/ZCAր=Z s@k8)K-|Z]*gDfZC3lMt4wBw* ++eR>92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AMwz =z QMDzw4;e8CQϩEaN䙂䅅 T|c[goΩT~9ߨi.3ҵ1(T1d@b&0Clq8d^ }1n%SP@׋*_pw pP™&8kzsgQ'-|S]Y+0:v x5 fsqaq~9_r5;]`q=t\m-2}]zm?~KП:B[fc1ޔ= 枒Khe^*+WR鎊ɼJI-bPRԿccendstream endobj 83 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 223 >> stream xcd`ab`dd v 1400qt~H3aUAK_7s7IBE ``bdT6r-(-I-ROI-S,H-/$敤````Tg`igsL~X}W9_?D#:}ړۓ:9&W/[ױzey$&,w>Gy%r|~8M0wD\{帘p20yPendstream endobj 84 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 210 >> stream xcd`ab`dd v 5400qt~H3a#UAK _7s7˲~Bg``bdSu-(-I-ROI-SMCd`````(`we?$ ^#P4%4+!?&;CwO^on9m]m|e 83c)n\{帘[y8bUIendstream endobj 85 0 obj << /Filter /FlateDecode /Length 1489 >> stream xYKS[7Wxy݉ggXBڴ&P,2Ic Z >AvkI7ө/"KGGy;>쪷5YCOoUwitRr 72 ?5&~PWxfr{ی惡s%`șL/`SDځ|v8΅?M]%4,z PCdsDިv-IFo2:h/N2:͈]F,Ľ/2f kWHP~@9Ca.]ү $mWkF24l@ 6ayچ3l׆u a3`^k)d4"NFT=lK W,v; s~p7C>ͅF#?"v剧WfPc㐈8@KLn}ΝdBPy6E] Mlʭ#bwV'O<NH\3QOM ^RgP)!-kPvV<_u:ЂUpQuZq`K`oÞ^ X,ŸF# $l5Ocڹ&bv!VR|^VoMFPKωFES59 )mF9%]dgFN[4[r_6؅#Uqm¡BmxR]N|" wpbtR5W*0L%>N+i4\O?G p:eVO9ߎz6[9W.2et4[byF[)2ZvC|[^U~,.WQ$]b-9vVT;Jױ{޲oK@^mU\0 fME1yuĉ)#d`hp[Xk$,!:,?\#b |/™Eu.-L(~]UɝBi:#p>(+m.I3^_3lJ:`w=ɭӝkS[a nXw['B~݆3^mڑ~3u^Gd/*@8)|y$@UBt>FHNm"+K3jd?q%T(+iφ"|tP4Ƕ'6ڦ>Y˃Q l9A=Y+k˖ -cq,Fyݯd0~q4Pui?N*h{\ [e34AhzU>nO_)]$h´R. g{0*UWo[Cn|vbsqO!iS&S*C^l'%\N 7-N6-DV9 M9 HJUX~KW.~4UEe8 "9+])]N\f~Y.Z-˪](CІ#{ޏ?ۘendstream endobj 86 0 obj << /Type /XRef /Length 108 /Filter /FlateDecode /DecodeParms << /Columns 4 /Predictor 12 >> /W [ 1 2 1 ] /Info 3 0 R /Root 2 0 R /Size 87 /ID [<97b06dc79d1605e95900fd5b80705376>] >> stream xcb&F~ c%H >? :~; !Hp ` $8*AD `{$Xk< !X H @- IJ@MPh endstream endobj startxref 60620 %%EOF Matrix/inst/doc/SuiteSparse/0000755000176200001440000000000013203323314015501 5ustar liggesusersMatrix/inst/doc/SuiteSparse/UserGuides.txt0000644000176200001440000000133710500056651020331 0ustar liggesusersPDF files of the User's Guides for the CHOLMOD, AMD and CAMD sparse matrix libraries are available from Tim Davis's web site for his sparse matrix packages. The base URL for the web site is http://www.cise.ufl.edu/research/sparse A direct link to "The CHOLMOD User's Guide" is http://www.cise.ufl.edu/research/sparse/cholmod/current/CHOLMOD/Doc/UserGuide.pdf A direct link to "The AMD User's Guide" is http://www.cise.ufl.edu/research/sparse/amd/current/AMD/Doc/AMD_UserGuide.pdf (Apparently Tim has taken Oscar Wilde's observation that "consistency is the last refuge of the unimaginative" to heart.) A direct link to "The CAMD User's Guide" is http://www.cise.ufl.edu/research/sparse/camd/current/CAMD/Doc/AMD_UserGuide.pdf Matrix/inst/doc/SuiteSparse/AMD.txt0000644000176200001440000002130112457153247016660 0ustar liggesusersAMD, Copyright (c) 2009-2012 by Timothy A. Davis (http://www.suitesparse.com), Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. AMD is available under alternate licences; contact T. Davis for details. AMD: a set of routines for permuting sparse matrices prior to factorization. Includes a version in C, a version in Fortran, and a MATLAB mexFunction. Requires SuiteSparse_config, in the ../SuiteSparse_config directory relative to this directory. Quick start (Unix, or Windows with Cygwin): To compile, test, and install AMD, you may wish to first configure the installation by editting the ../SuiteSparse_config/SuiteSparse_config.mk file. Next, cd to this directory (AMD) and type "make" (or "make lib" if you do not have MATLAB). To compile and run a demo program for the Fortran version, type "make fortran". When done, type "make clean" to remove unused *.o files (keeps the compiled libraries and demo programs). See the User Guide (Doc/AMD_UserGuide.pdf), or ../SuiteSparse_config/SuiteSparse_config.mk for more details. Quick start (for MATLAB users); To compile, test, and install the AMD mexFunction, cd to the AMD/MATLAB directory and type amd_make at the MATLAB prompt. ------------------------------------------------------------------------------- AMD License: Your use or distribution of AMD or any modified version of AMD implies that you agree to this License. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Permission is hereby granted to use or copy this program under the terms of the GNU LGPL, provided that the Copyright, this License, and the Availability of the original version is retained on all copies. User documentation of any code that uses this code or any modified version of this code must cite the Copyright, this License, the Availability note, and "Used by permission." Permission to modify the code and to distribute modified code is granted, provided the Copyright, this License, and the Availability note are retained, and a notice that the code was modified is included. Availability: http://www.suitesparse.com ------------------------------------------------------------------------------- This is the AMD README file. It is a terse overview of AMD. Refer to the User Guide (Doc/AMD_UserGuide.pdf) for how to install and use AMD. Description: AMD is a set of routines for pre-ordering sparse matrices prior to Cholesky or LU factorization, using the approximate minimum degree ordering algorithm. Written in ANSI/ISO C with a MATLAB interface, and in Fortran 77. Authors: Timothy A. Davis (DrTimothyAldenDavis@gmail.com) Patrick R. Amestory, ENSEEIHT, Toulouse, France. Iain S. Duff, Rutherford Appleton Laboratory, UK. Acknowledgements: This work was supported by the National Science Foundation, under grants DMS-9504974, DMS-9803599, and CCR-0203270. Portions of this work were done while on sabbatical at Stanford University and Lawrence Berkeley National Laboratory (with funding from the SciDAC program). I would like to thank Gene Golub, Esmond Ng, and Horst Simon for making this sabbatical possible. ------------------------------------------------------------------------------- Files and directories in the AMD distribution: ------------------------------------------------------------------------------- --------------------------------------------------------------------------- Subdirectories of the AMD directory: --------------------------------------------------------------------------- Doc documentation Source primary source code Include include file for use in your code that calls AMD Demo demo programs. also serves as test of the AMD installation. MATLAB AMD mexFunction for MATLAB, and supporting m-files Lib where the compiled C-callable and Fortran-callable AMD libraries placed. --------------------------------------------------------------------------- Files in the AMD directory: --------------------------------------------------------------------------- Makefile top-level Makefile for GNU make or original make. Windows users would require Cygwin to use "make" README.txt this file --------------------------------------------------------------------------- Doc directory: documentation --------------------------------------------------------------------------- ChangeLog change log License the AMD License Makefile for creating the documentation AMD_UserGuide.bib AMD User Guide (references) AMD_UserGuide.tex AMD User Guide (LaTeX) AMD_UserGuide.pdf AMD User Guide (PDF) lesser.txt the GNU LGPL license --------------------------------------------------------------------------- Source directory: --------------------------------------------------------------------------- amd_order.c user-callable, primary AMD ordering routine amd_control.c user-callable, prints the control parameters amd_defaults.c user-callable, sets default control parameters amd_info.c user-callable, prints the statistics from AMD amd_1.c non-user-callable, construct A+A' amd_2.c user-callable, primary ordering kernel (a C version of amd.f and amdbar.f, with post-ordering added) amd_aat.c non-user-callable, computes nnz (A+A') amd_dump.c non-user-callable, debugging routines amd_postorder.c non-user-callable, postorder amd_post_tree.c non-user-callable, postorder just one tree amd_valid.c non-user-callable, verifies a matrix amd_preprocess.c non-user-callable, computes A', removes duplic amd.f user-callable Fortran 77 version amdbar.f user-callable Fortran 77 version --------------------------------------------------------------------------- Include directory: --------------------------------------------------------------------------- amd.h include file for C programs that use AMD amd_internal.h non-user-callable, include file for AMD --------------------------------------------------------------------------- Demo directory: --------------------------------------------------------------------------- Makefile for GNU make or original make amd_demo.c C demo program for AMD amd_demo.out output of amd_demo.c amd_demo2.c C demo program for AMD, jumbled matrix amd_demo2.out output of amd_demo2.c amd_l_demo.c C demo program for AMD (long integer version) amd_l_demo.out output of amd_l_demo.c amd_simple.c simple C demo program for AMD amd_simple.out output of amd_simple.c amd_f77demo.f Fortran 77 demo program for AMD amd_f77demo.out output of amd_f77demo.f amd_f77simple.c simple Fortran 77 demo program for AMD amd_f77simple.out output of amd_f77simple.f amd_f77cross.f Fortran 77 demo, calls the C version of AMD amd_f77cross.out output of amd_f77cross.f amd_f77wrapper.c Fortran-callable wrapper for C version of AMD --------------------------------------------------------------------------- MATLAB directory: --------------------------------------------------------------------------- GNUmakefile a nice Makefile, for GNU make Makefile an ugly Unix Makefile (for older make's) Contents.m for "help amd2" listing of toolbox contents amd2.m MATLAB help file for AMD amd_make.m MATLAB m-file for compiling AMD mexFunction amd_install.m compile and install the AMD mexFunction amd_mex.c AMD mexFunction for MATLAB amd_demo.m MATLAB demo for AMD amd_demo.m.out diary output of amd_demo.m can_24.mat input file for AMD demo --------------------------------------------------------------------------- Lib directory: libamd.a and libamdf77.a libraries placed here --------------------------------------------------------------------------- GNUmakefile a nice Makefile, for GNU make Makefile an ugly Unix Makefile (for older make's) libamd.def AMD definitions for Windows Matrix/inst/doc/SuiteSparse/COLAMD.txt0000644000176200001440000001157312457153247017230 0ustar liggesusersCOLAMD, Copyright 1998-2012, Timothy A. Davis. http://www.suitesparse.com ------------------------------------------------------------------------------- The COLAMD column approximate minimum degree ordering algorithm computes a permutation vector P such that the LU factorization of A (:,P) tends to be sparser than that of A. The Cholesky factorization of (A (:,P))'*(A (:,P)) will also tend to be sparser than that of A'*A. SYMAMD is a symmetric minimum degree ordering method based on COLAMD, available as a MATLAB-callable function. It constructs a matrix M such that M'*M has the same pattern as A, and then uses COLAMD to compute a column ordering of M. Colamd and symamd tend to be faster and generate better orderings than their MATLAB counterparts, colmmd and symmmd. To compile and test the colamd m-files and mexFunctions, just unpack the COLAMD/ directory from the COLAMD.tar.gz file, and run MATLAB from within that directory. Next, type colamd_test to compile and test colamd and symamd. This will work on any computer with MATLAB (Unix, PC, or Mac). Alternatively, type "make" (in Unix) to compile and run a simple example C code, without using MATLAB. To compile and install the colamd m-files and mexFunctions, just cd to COLAMD/MATLAB and type colamd_install in the MATLAB command window. A short demo will run. Optionally, type colamd_test to run an extensive tests. Type "make" in Unix in the COLAMD directory to compile the C-callable library and to run a short demo. Colamd is a built-in routine in MATLAB, available from The Mathworks, Inc. Under most cases, the compiled COLAMD from Versions 2.0 to the current version do not differ. Colamd Versions 2.2 and 2.3 differ only in their mexFunction interaces to MATLAB. v2.4 fixes a bug in the symamd routine in v2.3. The bug (in v2.3 and earlier) has no effect on the MATLAB symamd mexFunction. v2.5 adds additional checks for integer overflow, so that the "int" version can be safely used with 64-bit pointers. Refer to the ChangeLog for more details. To use colamd and symamd within an application written in C, all you need are colamd.c, colamd_global.c, and colamd.h, which are the C-callable colamd/symamd codes. See colamd.c for more information on how to call colamd from a C program. Requires SuiteSparse_config, in the ../SuiteSparse_config directory relative to this directory. See the colamd.c file or http://www.suitesparse.com for the license to COLAMD. Related papers: T. A. Davis, J. R. Gilbert, S. Larimore, E. Ng, An approximate column minimum degree ordering algorithm, ACM Transactions on Mathematical Software, vol. 30, no. 3., pp. 353-376, 2004. T. A. Davis, J. R. Gilbert, S. Larimore, E. Ng, Algorithm 836: COLAMD, an approximate column minimum degree ordering algorithm, ACM Transactions on Mathematical Software, vol. 30, no. 3., pp. 377-380, 2004. "An approximate minimum degree column ordering algorithm", S. I. Larimore, MS Thesis, Dept. of Computer and Information Science and Engineering, University of Florida, Gainesville, FL, 1998. CISE Tech Report TR-98-016. Approximate Deficiency for Ordering the Columns of a Matrix, J. L. Kern, Senior Thesis, Dept. of Computer and Information Science and Engineering, University of Florida, Gainesville, FL, 1999. Authors: Stefan I. Larimore and Timothy A. Davis, in collaboration with John Gilbert, Xerox PARC (now at UC Santa Barbara), and Esmong Ng, Lawrence Berkeley National Laboratory (much of this work he did while at Oak Ridge National Laboratory). COLAMD files: Demo simple demo Doc additional documentation (see colamd.c for more) Include include file Lib compiled C-callable library Makefile primary Unix Makefile MATLAB MATLAB functions README.txt this file Source C source code ./Demo: colamd_example.c simple example colamd_example.out output of colamd_example.c colamd_l_example.c simple example, long integers colamd_l_example.out output of colamd_l_example.c Makefile Makefile for C demos ./Doc: ChangeLog change log lesser.txt license ./Include: colamd.h include file ./Lib: Makefile Makefile for C-callable library ./MATLAB: colamd2.m MATLAB interface for colamd2 colamd_demo.m simple demo colamd_install.m compile and install colamd2 and symamd2 colamd_make.m compile colamd2 and symamd2 colamdmex.ca MATLAB mexFunction for colamd2 colamd_test.m extensive test colamdtestmex.c test function for colamd Contents.m contents of the MATLAB directory luflops.m test code Makefile Makefile for MATLAB functions symamd2.m MATLAB interface for symamd2 symamdmex.c MATLAB mexFunction for symamd2 symamdtestmex.c test function for symamd ./Source: colamd.c primary source code colamd_global.c globally defined function pointers (malloc, free, ...) Matrix/inst/doc/SuiteSparse/CHOLMOD.txt0000644000176200001440000001002112457153247017341 0ustar liggesusersCHOLMOD: a sparse CHOLesky MODification package, Copyright (c) 2005-2012. http://www.suitesparse.com ----------------------------------------------- CHOLMOD is a set of routines for factorizing sparse symmetric positive definite matrices of the form A or AA', updating/downdating a sparse Cholesky factorization, solving linear systems, updating/downdating the solution to the triangular system Lx=b, and many other sparse matrix functions for both symmetric and unsymmetric matrices. Its supernodal Cholesky factorization relies on LAPACK and the Level-3 BLAS, and obtains a substantial fraction of the peak performance of the BLAS. Both real and complex matrices are supported. CHOLMOD is written in ANSI/ISO C, with both C and MATLAB interfaces. This code works on Microsoft Windows and many versions of Unix and Linux. Some Modules of CHOLMOD are copyrighted by the University of Florida (the Core and Partition Modules). The rest are copyrighted by the authors: Timothy A. Davis (all of them), and William W. Hager (the Modify Module). CHOLMOD relies on several other packages: AMD, CAMD, COLAMD, CCOLAMD, SuiteSparse_config, METIS, the BLAS, and LAPACK. All but METIS, the BLAS, and LAPACK are part of SuiteSparse. AMD is authored by T. Davis, Iain Duff, and Patrick Amestoy. COLAMD is authored by T. Davis and Stefan Larimore, with algorithmic design in collaboration with John Gilbert and Esmond Ng. CCOLAMD is authored by T. Davis and Siva Rajamanickam. CAMD is authored by T. Davis and Y. Chen. LAPACK and the BLAS are authored by Jack Dongarra and many others. LAPACK is available at http://www.netlib.org/lapack METIS is authored by George Karypis, Univ. of Minnesota. Its use in CHOLMOD is optional. See http://www-users.cs.umn.edu/~karypis/metis. Place a copy of the metis-4.0 directory in the same directory that contains the CHOLMOD, AMD, COLAMD, and CCOLAMD directories prior to compiling with "make". If you do not wish to use METIS, you must edit SuiteSparse_config and change the line: CHOLMOD_CONFIG = to CHOLMOD_CONFIG = -DNPARTITION The CHOLMOD, AMD, COLAMD, CCOLAMD, and SuiteSparse)config directories must all reside in a common parent directory. To compile all these libraries, edit SuiteSparse)config/SuiteSparse)config.mk to reflect your environment (C compiler, location of the BLAS, and so on) and then type "make" in either the CHOLMOD directory or in the parent directory of CHOLMOD. See each package for more details on how to compile them. For use in MATLAB (on any system, including Windows): start MATLAB, cd to the CHOLMOD/MATLAB directory, and type cholmod_make in the MATLAB Command Window. This is the best way to compile CHOLMOD for MATLAB; it provides a workaround for a METIS design feature, in which METIS terminates your program (and thus MATLAB) if it runs out of memory. Using cholmod_make also ensures your mexFunctions are compiled with -fexceptions, so that exceptions are handled properly (when hitting control-C in the MATLAB command window, for example). On the Pentium, do NOT use the Intel MKL BLAS prior to MKL Version 8.0 with CHOLMOD. Older versions (prior to 8.0) have a bug in dgemm when computing A*B'. The bug generates a NaN result, when the inputs are well-defined. Use the Goto BLAS or the MKL v8.0 BLAS instead. The Goto BLAS is faster and more reliable. See http://www.tacc.utexas.edu/~kgoto/ or http://www.cs.utexas.edu/users/flame/goto/. Sadly, the Intel MKL BLAS 7.x is the default for MATLAB 7.0.4. See http://www.mathworks.com/support/bugreports/details.html?rp=252103 for more details. To workaround this problem on Linux, set environment variable BLAS_VERSION to libmkl_p3.so:libguide.so. On Windows, set environment variable BLAS_VERSION to mkl_p3.dll. Better yet, get MATLAB 7sp3 (MATLAB 7.1) or later. Acknowledgements: this work was supported in part by the National Science Foundation (NFS CCR-0203270 and DMS-9803599), and a grant from Sandia National Laboratories (Dept. of Energy) which supported the development of CHOLMOD's Partition Module. Matrix/inst/doc/SuiteSparse/SPQR.txt0000644000176200001440000000434311072415476017050 0ustar liggesusersSuiteSparseQR version 1.1.0, Sept 20, 2008, Copyright (c) 2008, Timothy A. Davis SuiteSparseQR is a a multithread, multifrontal, rank-revealing sparse QR factorization method. QUICK START FOR MATLAB USERS (on Windows, Linux, Solaris, or the Mac OS): To compile and test the MATLAB mexFunctions, do this in the MATLAB command window: cd SuiteSparse/SPQR/MATLAB spqr_install spqr_demo FOR MORE DETAILS: please see the User Guide in Doc/spqr_user_guide.pdf. FOR LINUX/UNIX/Mac USERS who want to use the C++ callable library: To compile the C++ library and run a short demo, just type "make" in the Unix shell. To compile the SuiteSparseQR C++ library, in the Unix shell, do: cd Lib ; make To compile and test an exhaustive test, edit the Tcov/Makefile to select the LAPACK and BLAS libraries, and then do (in the Unix shell): cd Tcov ; make Compilation options in UFconfig/UFconfig.mk, SPQR/*/Makefile, or SPQR/MATLAB/spqr_make.m: -DNPARTITION to compile without METIS (default is to use METIS) -DNEXPERT to compile without the min 2-norm solution option (default is to include the Expert routines) -DHAVE_TBB to compile with Intel's Threading Building Blocks (default is to not use Intel TBB) -DTIMING to compile with timing and exact flop counts enabled (default is to not compile with timing and flop counts) -------------------------------------------------------------------------------- SuiteSparseQR is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. SuiteSparseQR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Matrix/inst/doc/SuiteSparse/SuiteSparse_config.txt0000644000176200001440000000451312457153247022061 0ustar liggesusersSuiteSparse_config, 2013, Timothy A. Davis, http://www.suitesparse.com (formerly the UFconfig package) SuiteSparse_config contains configuration settings for all many of the software packages that I develop or co-author. Note that older versions of some of these packages do not require SuiteSparse_config. Package Description ------- ----------- AMD approximate minimum degree ordering CAMD constrained AMD COLAMD column approximate minimum degree ordering CCOLAMD constrained approximate minimum degree ordering UMFPACK sparse LU factorization, with the BLAS CXSparse int/long/real/complex version of CSparse CHOLMOD sparse Cholesky factorization, update/downdate KLU sparse LU factorization, BLAS-free BTF permutation to block triangular form LDL concise sparse LDL' LPDASA LP Dual Active Set Algorithm RBio read/write files in Rutherford/Boeing format SPQR sparse QR factorization (full name: SuiteSparseQR) SuiteSparse_config is not required by these packages: CSparse a Concise Sparse matrix package MATLAB_Tools toolboxes for use in MATLAB In addition, the xerbla/ directory contains Fortan and C versions of the BLAS/LAPACK xerbla routine, which is called when an invalid input is passed to the BLAS or LAPACK. The xerbla provided here does not print any message, so the entire Fortran I/O library does not need to be linked into a C application. Most versions of the BLAS contain xerbla, but those from K. Goto do not. Use this if you need too. If you edit this directory (SuiteSparse_config.mk in particular) then you must do "make purge ; make" in the parent directory to recompile all of SuiteSparse. Otherwise, the changes will not necessarily be applied. -------------------------------------------------------------------------------- A note on the update to SuiteSparse Version 4.0.0: The SuiteSparse_long macro defines an integer that is 64-bits in size on 64-bit platforms, and 32-bits on 32-bit platforms. It was formerly called UF_long, but UF_long has been removed because of potential name conflicts. UF_long is still available to user codes, but it can now be safely #undef'd in case of name conflicts in user code. Future codes should use SuiteSparse_long in place of UF_long. -------------------------------------------------------------------------------- Matrix/inst/doc/Comparisons.Rnw0000644000176200001440000002150212070262574016232 0ustar liggesusers\documentclass{article} \usepackage{myVignette} \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} %%\VignetteIndexEntry{Comparisons of Least Squares calculation speeds} %%\VignetteDepends{Matrix} \begin{document} \SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=true,keep.source=TRUE} \setkeys{Gin}{width=\textwidth} \title{Comparing Least Squares Calculations} \author{Douglas Bates\\R Development Core Team\\\email{Douglas.Bates@R-project.org}} \date{\today} \maketitle \begin{abstract} Many statistics methods require one or more least squares problems to be solved. There are several ways to perform this calculation, using objects from the base R system and using objects in the classes defined in the \code{Matrix} package. We compare the speed of some of these methods on a very small example and on a example for which the model matrix is large and sparse. \end{abstract} <>= options(width=75) @ \section{Linear least squares calculations} \label{sec:LeastSquares} Many statistical techniques require least squares solutions \begin{equation} \label{eq:LeastSquares} \widehat{\bm{\beta}}= \arg\min_{\bm{\beta}}\left\|\bm{y}-\bX\bm{\beta}\right\|^2 \end{equation} where $\bX$ is an $n\times p$ model matrix ($p\leq n$), $\bm{y}$ is $n$-dimensional and $\bm{\beta}$ is $p$ dimensional. Most statistics texts state that the solution to (\ref{eq:LeastSquares}) is \begin{equation} \label{eq:XPX} \widehat{\bm{\beta}}=\left(\bX\trans\bX\right)^{-1}\bX\trans\bm{y} \end{equation} when $\bX$ has full column rank (i.e. the columns of $\bX$ are linearly independent) and all too frequently it is calculated in exactly this way. \subsection{A small example} \label{sec:smallLSQ} As an example, let's create a model matrix, \code{mm}, and corresponding response vector, \code{y}, for a simple linear regression model using the \code{Formaldehyde} data. <>= data(Formaldehyde) str(Formaldehyde) (m <- cbind(1, Formaldehyde$carb)) (yo <- Formaldehyde$optden) @ Using \code{t} to evaluate the transpose, \code{solve} to take an inverse, and the \code{\%*\%} operator for matrix multiplication, we can translate \ref{eq:XPX} into the \Slang{} as <>= solve(t(m) %*% m) %*% t(m) %*% yo @ On modern computers this calculation is performed so quickly that it cannot be timed accurately in \RR{} \footnote{From R version 2.2.0, \code{system.time()} has default argument \code{gcFirst = TRUE} which is assumed and relevant for all subsequent timings} <>= system.time(solve(t(m) %*% m) %*% t(m) %*% yo) @ and it provides essentially the same results as the standard \code{lm.fit} function that is called by \code{lm}. <>= dput(c(solve(t(m) %*% m) %*% t(m) %*% yo)) dput(unname(lm.fit(m, yo)$coefficients)) @ %$ \subsection{A large example} \label{sec:largeLSQ} For a large, ill-conditioned least squares problem, such as that described in \citet{koen:ng:2003}, the literal translation of (\ref{eq:XPX}) does not perform well. <>= library(Matrix) data(KNex, package = "Matrix") y <- KNex$y mm <- as(KNex$mm, "matrix") # full traditional matrix dim(mm) system.time(naive.sol <- solve(t(mm) %*% mm) %*% t(mm) %*% y) @ Because the calculation of a ``cross-product'' matrix, such as $\bX\trans\bX$ or $\bX\trans\bm{y}$, is a common operation in statistics, the \code{crossprod} function has been provided to do this efficiently. In the single argument form \code{crossprod(mm)} calculates $\bX\trans\bX$, taking advantage of the symmetry of the product. That is, instead of calculating the $712^2=506944$ elements of $\bX\trans\bX$ separately, it only calculates the $(712\cdot 713)/2=253828$ elements in the upper triangle and replicates them in the lower triangle. Furthermore, there is no need to calculate the inverse of a matrix explicitly when solving a linear system of equations. When the two argument form of the \code{solve} function is used the linear system \begin{equation} \label{eq:LSQsol} \left(\bX\trans\bX\right) \widehat{\bm{\beta}} = \bX\trans\by \end{equation} is solved directly. Combining these optimizations we obtain <>= system.time(cpod.sol <- solve(crossprod(mm), crossprod(mm,y))) all.equal(naive.sol, cpod.sol) @ On this computer (2.0 GHz Pentium-4, 1 GB Memory, Goto's BLAS, in Spring 2004) the crossprod form of the calculation is about four times as fast as the naive calculation. In fact, the entire crossprod solution is faster than simply calculating $\bX\trans\bX$ the naive way. <>= system.time(t(mm) %*% mm) @ Note that in newer versions of \RR{} and the BLAS library (as of summer 2007), \RR's \code{\%*\%} is able to detect the many zeros in \code{mm} and shortcut many operations, and is hence much faster for such a sparse matrix than \code{crossprod} which currently does not make use of such optimizations. This is not the case when \RR{} is linked against an optimized BLAS library such as GOTO or ATLAS. %% Also, for fully dense matrices, \code{crossprod()} indeed remains faster (by a factor of two, typically) independently of the BLAS library: <>= fm <- mm set.seed(11) fm[] <- rnorm(length(fm)) system.time(c1 <- t(fm) %*% fm) system.time(c2 <- crossprod(fm)) stopifnot(all.equal(c1, c2, tol = 1e-12)) @ % using stopifnot(.) to save output \subsection{Least squares calculations with Matrix classes} \label{sec:MatrixLSQ} The \code{crossprod} function applied to a single matrix takes advantage of symmetry when calculating the product but does not retain the information that the product is symmetric (and positive semidefinite). As a result the solution of (\ref{eq:LSQsol}) is performed using general linear system solver based on an LU decomposition when it would be faster, and more stable numerically, to use a Cholesky decomposition. The Cholesky decomposition could be used but it is rather awkward <>= system.time(ch <- chol(crossprod(mm))) system.time(chol.sol <- backsolve(ch, forwardsolve(ch, crossprod(mm, y), upper = TRUE, trans = TRUE))) stopifnot(all.equal(chol.sol, naive.sol)) @ The \code{Matrix} package uses the S4 class system \citep{R:Chambers:1998} to retain information on the structure of matrices from the intermediate calculations. A general matrix in dense storage, created by the \code{Matrix} function, has class \code{"dgeMatrix"} but its cross-product has class \code{"dpoMatrix"}. The \code{solve} methods for the \code{"dpoMatrix"} class use the Cholesky decomposition. <>= mm <- as(KNex$mm, "dgeMatrix") class(crossprod(mm)) system.time(Mat.sol <- solve(crossprod(mm), crossprod(mm, y))) stopifnot(all.equal(naive.sol, unname(as(Mat.sol,"matrix")))) @ Furthermore, any method that calculates a decomposition or factorization stores the resulting factorization with the original object so that it can be reused without recalculation. <>= xpx <- crossprod(mm) xpy <- crossprod(mm, y) system.time(solve(xpx, xpy)) system.time(solve(xpx, xpy)) # reusing factorization @ The model matrix \code{mm} is sparse; that is, most of the elements of \code{mm} are zero. The \code{Matrix} package incorporates special methods for sparse matrices, which produce the fastest results of all. <>= mm <- KNex$mm class(mm) system.time(sparse.sol <- solve(crossprod(mm), crossprod(mm, y))) stopifnot(all.equal(naive.sol, unname(as(sparse.sol, "matrix")))) @ As with other classes in the \code{Matrix} package, the \code{dsCMatrix} retains any factorization that has been calculated although, in this case, the decomposition is so fast that it is difficult to determine the difference in the solution times. <>= xpx <- crossprod(mm) xpy <- crossprod(mm, y) system.time(solve(xpx, xpy)) system.time(solve(xpx, xpy)) @ \subsection*{Session Info} <>= toLatex(sessionInfo()) @ <>= if(identical(1L, grep("linux", R.version[["os"]]))) { ##----- Linux - only ---- Sys.procinfo <- function(procfile) { l2 <- strsplit(readLines(procfile),"[ \t]*:[ \t]*") r <- sapply(l2[sapply(l2, length) == 2], function(c2)structure(c2[2], names= c2[1])) attr(r,"Name") <- procfile class(r) <- "simple.list" r } Scpu <- Sys.procinfo("/proc/cpuinfo") Smem <- Sys.procinfo("/proc/meminfo") } # Linux only @ <>= if(identical(1L, grep("linux", R.version[["os"]]))) { ## Linux - only --- Scpu <- sfsmisc::Sys.procinfo("/proc/cpuinfo") Smem <- sfsmisc::Sys.procinfo("/proc/meminfo") print(Scpu[c("model name", "cpu MHz", "cache size", "bogomips")]) print(Smem[c("MemTotal", "SwapTotal")]) } @ <>= if(identical(1L, grep("linux", R.version[["os"]]))) { ## Linux - only --- print(Scpu[c("model name", "cpu MHz", "cache size", "bogomips")]) print(Smem[c("MemTotal", "SwapTotal")]) } @ \bibliography{Matrix} \end{document} Matrix/inst/external/0000755000176200001440000000000013203323431014307 5ustar liggesusersMatrix/inst/external/symA.rda0000644000176200001440000000153712215114135015717 0ustar liggesusersmTiHTa}3c˨9-:iP RI%{n)ea4樥6e9DDK4HRAd?ȐH2"Z{{̢䠢 EQ̊bR>,LbqQ1 QS ֢gB|ϜalW_sP Ն ͕s"µo~ >Q9Y۪t˜vEj%f/m_LEH2zp,XM΍3p\΋o <4ǰX Q(lRm.l"a&udVղ<QY9lE݄E;H; tLHԶ$ j'3DTۘ?<|7ID-՟ꞟxY=)+b/ <v>B-n"u YO&?0_}?.7 Բ6HO3𦾢} Ro=50s#ÚMOD?[iǹQ~ ov'źQ?eƼCg-^xL hw;ꎡ18xW:h0`2x*PM~x1zzT_J{u&&huc/WSPp]ѬӄnȀ:z}'r3 G<7o?!0k{r}ں{Nr}G>G{OУ^4uI~[ A:~ù=E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ȷg&pq+ф;K0wӳ:LO}+ʎ}#wGG;Ym‘7v > yOұ4]0IC&<AIASWxpc%lFFΔUjkC/cNZ0|cZLDL+"O$|*y@l7d8="<>DB~Ҫ%<ζ{!~ٔXygPЉ<ꯣZ0'n ,v>^>ZB>% h1c}h_w?jӗz!иo(X4;/>7)W6K֥zLҁ7 QxJ(TPbK.O%hXRI(g$LJt^IHVjxg&$2JfFZ-ZQJMc7D i05$$>z9y~9PŢ ݠ\H$-캊_šEΚوy! }5Oes"\i,Vi]~ W UG|`X:B!"QN4kKEEg4';kȱ~j^m~%6mht;KιN0fs):!p=fq E7` X@p I:k@MzfOXެ9rC#aMIS{3Á!o\R^ 8^wNG)Bk ;<ie;crjP uF4ˆ- cZ`==Yp"w^m׸V[1nI1),ᗚA< JL3qLwa.PA}6ۙN@|Y4psHN-iW% $o[%6>\*nn9/DJqEP&S4lMe~*/')#{)?>^538_TdA8?}h3a"ڗ9O1FgbfN!}޲;˜;% p+V[YHnVs] I@6P|onsnB^f_{tH{z@ʴqpLB늶VH[~LA8lRc)H{)Qߦ !V4Q=^/|= q}֌уCsA*8 Ʌ5m㑇 , *w}*v#lGѫ?^!B@<%Y/;!oi2hvaaV?9O4GV|08k̩sc΃[3F~|^X5BӱkDҎHj%+u0؇991wmHcfwq>bhy4 Y8NU8ʃ"Z|rY-|rdFW~I#%R_$j'h{u<_c6OhQ?sR[Ʃroϣ %?; Y^E _"7o lamĩt[`u;4om\XIsgd}(QTo4r{6寅lS3q^QձϮu\=Q}?,Cfg($qк5[#<?/(Ł,n}9@PU&J&V|vt&x,T /UA@Matrix/inst/external/wrong.mtx0000644000176200001440000000010311204272304016170 0ustar liggesusers%%MatrixMarket matrix coordinate integer general 2 3 2 0 1 1 1 3 4 Matrix/inst/external/lund_a.rsa0000644000176200001440000007024410275502035016274 0ustar liggesusers1SYMMETRIC MATRIX A OF LUND EIGENVALUE PROBLEM, MAY 1974 LUND A 352 10 82 260 0 RSA 147 147 1298 0 (16I5) (16I5) (5E16.8) 1 7 15 23 31 39 47 53 58 68 77 85 97 108 118 130 141 151 163 174 184 196 207 217 228 238 247 254 260 265 275 284 292 304 315 325 337 348 358 370 381 391 403 414 424 435 445 454 461 467 472 482 491 499 510 521 531 543 554 564 576 587 597 609 620 630 641 651 660 667 673 678 688 697 705 717 728 738 750 761 771 783 794 804 815 826 836 847 857 866 873 879 884 894 903 911 923 934 944 956 967 977 989 1000 1010 1022 1033 1043 1053 1063 1072 1079 1085 1090 1099 1107 1114 1124 1133 1141 1151 1160 1168 1178 1187 1195 1205 1214 1222 1231 1239 1246 1251 1255 1258 1262 1265 1269 1272 1276 1279 1283 1286 1290 1293 1296 1298 1299 1 2 8 9 10 11 2 3 9 10 11 12 13 14 3 4 12 13 14 15 16 17 4 5 15 16 17 18 19 20 5 6 18 19 20 21 22 23 6 7 21 22 23 24 25 26 7 24 25 26 27 28 8 9 10 11 29 9 10 11 12 13 14 29 30 31 32 10 11 12 13 14 29 30 31 32 11 12 13 14 29 30 31 32 12 13 14 15 16 17 30 31 32 33 34 35 13 14 15 16 17 30 31 32 33 34 35 14 15 16 17 30 31 32 33 34 35 15 16 17 18 19 20 33 34 35 36 37 38 16 17 18 19 20 33 34 35 36 37 38 17 18 19 20 33 34 35 36 37 38 18 19 20 21 22 23 36 37 38 39 40 41 19 20 21 22 23 36 37 38 39 40 41 20 21 22 23 36 37 38 39 40 41 21 22 23 24 25 26 39 40 41 42 43 44 22 23 24 25 26 39 40 41 42 43 44 23 24 25 26 39 40 41 42 43 44 24 25 26 27 28 42 43 44 45 46 47 25 26 27 28 42 43 44 45 46 47 26 27 28 42 43 44 45 46 47 27 28 45 46 47 48 49 28 45 46 47 48 49 29 30 31 32 50 30 31 32 33 34 35 50 51 52 53 31 32 33 34 35 50 51 52 53 32 33 34 35 50 51 52 53 33 34 35 36 37 38 51 52 53 54 55 56 34 35 36 37 38 51 52 53 54 55 56 35 36 37 38 51 52 53 54 55 56 36 37 38 39 40 41 54 55 56 57 58 59 37 38 39 40 41 54 55 56 57 58 59 38 39 40 41 54 55 56 57 58 59 39 40 41 42 43 44 57 58 59 60 61 62 40 41 42 43 44 57 58 59 60 61 62 41 42 43 44 57 58 59 60 61 62 42 43 44 45 46 47 60 61 62 63 64 65 43 44 45 46 47 60 61 62 63 64 65 44 45 46 47 60 61 62 63 64 65 45 46 47 48 49 63 64 65 66 67 68 46 47 48 49 63 64 65 66 67 68 47 48 49 63 64 65 66 67 68 48 49 66 67 68 69 70 49 66 67 68 69 70 50 51 52 53 71 51 52 53 54 55 56 71 72 73 74 52 53 54 55 56 71 72 73 74 53 54 55 56 71 72 73 74 54 55 56 57 58 59 73 74 75 76 77 55 56 57 58 59 72 73 74 75 76 77 56 57 58 59 72 73 74 75 76 77 57 58 59 60 61 62 75 76 77 78 79 80 58 59 60 61 62 75 76 77 78 79 80 59 60 61 62 75 76 77 78 79 80 60 61 62 63 64 65 78 79 80 81 82 83 61 62 63 64 65 78 79 80 81 82 83 62 63 64 65 78 79 80 81 82 83 63 64 65 66 67 68 81 82 83 84 85 86 64 65 66 67 68 81 82 83 84 85 86 65 66 67 68 81 82 83 84 85 86 66 67 68 69 70 84 85 86 87 88 89 67 68 69 70 84 85 86 87 88 89 68 69 70 84 85 86 87 88 89 69 70 87 88 89 90 91 70 87 88 89 90 91 71 72 73 74 92 72 73 74 75 76 77 92 93 94 95 73 74 75 76 77 92 93 94 95 74 75 76 77 92 93 94 95 75 76 77 78 79 80 93 94 95 96 97 98 76 77 78 79 80 93 94 95 96 97 98 77 78 79 80 93 94 95 96 97 98 78 79 80 81 82 83 96 97 98 99 100 101 79 80 81 82 83 96 97 98 99 100 101 80 81 82 83 96 97 98 99 100 101 81 82 83 84 85 86 99 100 101 102 103 104 82 83 84 85 86 99 100 101 102 103 104 83 84 85 86 99 100 101 102 103 104 84 85 86 87 88 89 103 104 105 106 107 85 86 87 88 89 102 103 104 105 106 107 86 87 88 89 102 103 104 105 106 107 87 88 89 90 91 105 106 107 108 109 110 88 89 90 91 105 106 107 108 109 110 89 90 91 105 106 107 108 109 110 90 91 108 109 110 111 112 91 108 109 110 111 112 92 93 94 95 113 93 94 95 96 97 98 113 114 115 116 94 95 96 97 98 113 114 115 116 95 96 97 98 113 114 115 116 96 97 98 99 100 101 114 115 116 117 118 119 97 98 99 100 101 114 115 116 117 118 119 98 99 100 101 114 115 116 117 118 119 99 100 101 102 103 104 117 118 119 120 121 122 100 101 102 103 104 117 118 119 120 121 122 101 102 103 104 117 118 119 120 121 122 102 103 104 105 106 107 120 121 122 123 124 125 103 104 105 106 107 120 121 122 123 124 125 104 105 106 107 120 121 122 123 124 125 105 106 107 108 109 110 123 124 125 126 127 128 106 107 108 109 110 123 124 125 126 127 128 107 108 109 110 123 124 125 126 127 128 108 109 110 111 112 127 128 129 130 131 109 110 111 112 126 127 128 129 130 131 110 111 112 126 127 128 129 130 131 111 112 129 130 131 132 133 112 129 130 131 132 133 113 114 115 116 134 114 115 116 117 118 119 134 135 136 115 116 117 118 119 134 135 136 116 117 118 119 134 135 136 117 118 119 120 121 122 135 136 137 138 118 119 120 121 122 135 136 137 138 119 120 121 122 135 136 137 138 120 121 122 123 124 125 137 138 139 140 121 122 123 124 125 137 138 139 140 122 123 124 125 137 138 139 140 123 124 125 126 127 128 139 140 141 142 124 125 126 127 128 139 140 141 142 125 126 127 128 139 140 141 142 126 127 128 129 130 131 141 142 143 144 127 128 129 130 131 141 142 143 144 128 129 130 131 141 142 143 144 129 130 131 132 133 143 144 145 146 130 131 132 133 143 144 145 146 131 132 133 143 144 145 146 132 133 145 146 147 133 145 146 147 134 135 136 135 136 137 138 136 137 138 137 138 139 140 138 139 140 139 140 141 142 140 141 142 141 142 143 144 142 143 144 143 144 145 146 144 145 146 145 146 147 146 147 147 0.75000000E+08 0.96153881E+06 -0.12179486E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.75000000E+08 0.96153869E+06 -0.74786312E+05 0.96153840E+07 -0.12179486E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.75000000E+08 0.96153844E+06 -0.74786375E+05 0.96153840E+07 -0.12179486E+08 -0.26175210E+07 0.28846144E+08 0.57692310E+07 0.75000000E+08 0.96153869E+06 -0.74786312E+05 0.96153840E+07 -0.12179487E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.75000000E+08 0.96153894E+06 -0.74786375E+05 0.96153840E+07 -0.12179486E+08 -0.26175210E+07 0.28846160E+08 0.57692310E+07 0.75000000E+08 0.96153894E+06 -0.74786312E+05 0.96153850E+07 -0.12179488E+08 -0.26175220E+07 0.28846160E+08 0.57692310E+07 0.44230768E+08 -0.74786312E+05 0.96153850E+07 -0.12179488E+08 -0.15405980E+07 0.14423078E+08 0.75000000E+08 0.26175210E+07 0.57692300E+07 0.28846144E+08 0.96153831E+06 0.50256406E+06 0.78125000E-02 0.78125000E-02 -0.12564100E+06 0.74786312E+05 -0.26175210E+07 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.14999998E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 0.57692310E+07 -0.12179486E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.14999998E+09 0.26175210E+07 0.57692300E+07 0.28846144E+08 0.96153840E+07 0.74786312E+05 0.57692300E+07 0.19230770E+07 0.50256406E+06 -0.10937500E+00 0.54687500E-01 -0.12564100E+06 0.74786312E+05 -0.26175210E+07 -0.24414062E-03 0.74786375E+05 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786250E+05 0.14999998E+09 0.12820520E+07 -0.74786312E+05 0.19230770E+07 0.57692300E+07 -0.74786312E+05 0.96153840E+07 -0.12179487E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.14999998E+09 0.26175210E+07 0.57692300E+07 0.28846144E+08 -0.74786375E+05 -0.12179486E+08 0.96153840E+07 0.74786312E+05 0.57692310E+07 0.19230770E+07 0.50256406E+06 0.14843750E+00 -0.11718750E+00 -0.12564100E+06 0.74786312E+05 -0.26175210E+07 -0.36621094E-03 0.74786375E+05 0.74786250E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.14999998E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 0.57692310E+07 -0.74786250E+05 0.96153840E+07 -0.12179488E+08 -0.26175210E+07 0.28846160E+08 0.57692310E+07 0.14999998E+09 0.26175210E+07 0.57692310E+07 0.28846144E+08 -0.74786375E+05 -0.12179485E+08 0.96153830E+07 0.74786375E+05 0.57692300E+07 0.19230770E+07 0.50256406E+06 -0.13281250E+00 0.17187500E+00 -0.12564100E+06 0.74786312E+05 -0.26175210E+07 0.48828125E-03 0.74786312E+05 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786250E+05 0.14999998E+09 0.12820510E+07 -0.74786375E+05 0.19230770E+07 0.57692300E+07 -0.74786250E+05 0.96153840E+07 -0.12179488E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.14999998E+09 0.26175210E+07 0.57692300E+07 0.28846144E+08 -0.74786375E+05 -0.12179487E+08 0.96153850E+07 0.74786375E+05 0.57692310E+07 0.19230760E+07 0.50256412E+06 0.32031250E+00 -0.68750000E+00 -0.12564106E+06 0.74786375E+05 -0.26175220E+07 -0.12207031E-03 0.74786437E+05 0.74786187E+05 -0.12564106E+06 0.26175220E+07 -0.74786375E+05 0.15000002E+09 0.12820520E+07 -0.74786312E+05 0.19230770E+07 0.57692320E+07 -0.74786250E+05 0.96153840E+07 -0.12179490E+08 -0.26175220E+07 0.28846160E+08 0.57692320E+07 0.15000000E+09 0.26175220E+07 0.57692320E+07 0.28846160E+08 -0.74786437E+05 -0.12179483E+08 0.96153830E+07 0.74786312E+05 0.57692320E+07 0.19230770E+07 0.50256419E+06 0.41406250E+00 0.85937500E-01 -0.12564106E+06 0.74786375E+05 0.36621094E-03 0.74786312E+05 0.74786375E+05 -0.12564106E+06 0.26175220E+07 -0.74786375E+05 0.15000002E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 -0.74786312E+05 0.96153860E+07 -0.12179491E+08 -0.26175220E+07 0.28846160E+08 0.57692320E+07 0.15000002E+09 0.26175220E+07 0.57692320E+07 -0.74786375E+05 -0.12179491E+08 0.96153880E+07 0.74786375E+05 0.57692320E+07 0.19230770E+07 0.25128206E+06 0.46367550E+06 0.36621094E-03 0.74786312E+05 0.74786375E+05 -0.62820531E+05 0.10769230E+07 0.75000016E+08 -0.74786312E+05 0.96153860E+07 -0.12179491E+08 -0.15405990E+07 0.14423080E+08 0.75000000E+08 0.26175210E+07 0.57692300E+07 0.28846144E+08 0.96153831E+06 0.50256406E+06 -0.10937500E+00 0.54687500E-01 -0.12564100E+06 0.74786250E+05 -0.26175210E+07 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.14999998E+09 0.12820520E+07 -0.74786312E+05 0.19230770E+07 0.57692310E+07 -0.12179486E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.14999998E+09 0.26175210E+07 0.57692300E+07 0.28846144E+08 0.96153840E+07 0.74786312E+05 0.57692300E+07 0.19230770E+07 0.50256412E+06 0.24218750E+00 -0.38281250E+00 -0.12564106E+06 0.74786375E+05 -0.26175220E+07 -0.48828125E-03 0.74786312E+05 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786375E+05 0.14999998E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 0.57692310E+07 -0.74786250E+05 0.96153820E+07 -0.12179487E+08 -0.26175210E+07 0.28846160E+08 0.57692300E+07 0.14999998E+09 0.26175220E+07 0.57692310E+07 0.28846160E+08 -0.74786375E+05 -0.12179485E+08 0.96153840E+07 0.74786312E+05 0.57692310E+07 0.19230770E+07 0.50256412E+06 -0.23437500E-01 0.34375000E+00 -0.12564100E+06 0.74786250E+05 -0.26175210E+07 0.24414062E-03 0.74786312E+05 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.15000000E+09 0.12820520E+07 -0.74786312E+05 0.19230770E+07 0.57692310E+07 -0.74786312E+05 0.96153850E+07 -0.12179488E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.15000000E+09 0.26175210E+07 0.57692310E+07 0.28846144E+08 -0.74786312E+05 -0.12179488E+08 0.96153850E+07 0.74786375E+05 0.57692300E+07 0.19230770E+07 0.50256406E+06 0.19531250E+00 -0.27343750E+00 -0.12564100E+06 0.74786312E+05 -0.26175210E+07 0.48828125E-03 0.74786312E+05 0.74786250E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.14999998E+09 0.12820510E+07 -0.74786375E+05 0.19230770E+07 0.57692310E+07 -0.74786250E+05 0.96153820E+07 -0.12179488E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.14999998E+09 0.26175210E+07 0.57692300E+07 0.28846160E+08 -0.74786375E+05 -0.12179485E+08 0.96153850E+07 0.74786375E+05 0.57692310E+07 0.19230770E+07 0.50256412E+06 -0.55468750E+00 -0.32812500E+00 -0.12564106E+06 0.74786250E+05 -0.26175220E+07 -0.24414062E-03 0.74786312E+05 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786375E+05 0.15000002E+09 0.12820510E+07 -0.74786375E+05 0.19230770E+07 0.57692320E+07 -0.74786312E+05 0.96153830E+07 -0.12179486E+08 -0.26175210E+07 0.28846144E+08 0.57692310E+07 0.15000002E+09 0.26175220E+07 0.57692320E+07 0.28846160E+08 -0.74786312E+05 -0.12179486E+08 0.96153830E+07 0.74786312E+05 0.57692300E+07 0.19230760E+07 0.50256419E+06 0.53906250E+00 0.15625000E-01 -0.12564106E+06 0.74786250E+05 -0.73242187E-03 0.74786562E+05 0.74786125E+05 -0.12564106E+06 0.26175220E+07 -0.74786250E+05 0.15000005E+09 0.12820520E+07 -0.74786375E+05 0.19230770E+07 -0.74786125E+05 0.96153870E+07 -0.12179498E+08 -0.26175230E+07 0.28846160E+08 0.57692320E+07 0.15000002E+09 0.26175220E+07 0.57692320E+07 -0.74786625E+05 -0.12179486E+08 0.96153900E+07 0.74786500E+05 0.57692330E+07 0.19230770E+07 0.25128206E+06 0.46367500E+06 -0.61035156E-03 0.74786312E+05 0.74786375E+05 -0.62820516E+05 0.10769230E+07 0.75000000E+08 -0.74786312E+05 0.96153830E+07 -0.12179487E+08 -0.15405980E+07 0.14423077E+08 0.75000000E+08 0.26175210E+07 0.57692310E+07 0.28846144E+08 0.96153856E+06 0.50256406E+06 0.18750000E+00 0.23437500E-01 -0.12564100E+06 0.74786312E+05 -0.26175210E+07 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.14999998E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 0.57692300E+07 -0.12179487E+08 -0.26175210E+07 0.28846160E+08 0.57692310E+07 0.14999998E+09 0.26175210E+07 0.57692310E+07 0.28846144E+08 0.96153830E+07 0.74786312E+05 0.57692310E+07 0.19230770E+07 0.50256406E+06 -0.24218750E+00 -0.62500000E-01 -0.12564100E+06 0.74786250E+05 -0.26175210E+07 0.74786375E+05 0.74786250E+05 -0.12564100E+06 0.26175210E+07 -0.74786250E+05 0.15000000E+09 0.12820510E+07 -0.74786437E+05 0.19230760E+07 0.57692290E+07 -0.74786312E+05 0.96153850E+07 -0.12179488E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.14999998E+09 0.26175210E+07 0.57692300E+07 0.28846144E+08 -0.74786375E+05 -0.12179487E+08 0.96153840E+07 0.74786375E+05 0.57692310E+07 0.19230770E+07 0.50256412E+06 0.20312500E+00 -0.24218750E+00 -0.12564100E+06 0.74786312E+05 -0.26175210E+07 0.85449219E-03 0.74786375E+05 0.74786250E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.14999998E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 0.57692310E+07 -0.74786250E+05 0.96153850E+07 -0.12179488E+08 -0.26175210E+07 0.28846160E+08 0.57692320E+07 0.15000000E+09 0.26175210E+07 0.57692320E+07 0.28846160E+08 -0.74786312E+05 -0.12179485E+08 0.96153820E+07 0.74786312E+05 0.57692310E+07 0.19230770E+07 0.50256412E+06 0.22656250E+00 0.25000000E+00 -0.12564100E+06 0.74786375E+05 -0.26175210E+07 0.24414062E-03 0.74786312E+05 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.15000000E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 0.57692300E+07 -0.74786312E+05 0.96153850E+07 -0.12179489E+08 -0.26175210E+07 0.28846160E+08 0.57692310E+07 0.15000000E+09 0.26175210E+07 0.57692310E+07 0.28846144E+08 -0.74786312E+05 -0.12179489E+08 0.96153860E+07 0.74786312E+05 0.57692320E+07 0.19230770E+07 0.50256412E+06 0.18750000E+00 -0.82031250E+00 -0.12564106E+06 0.74786125E+05 -0.26175220E+07 0.36621094E-03 0.74786500E+05 0.74786187E+05 -0.12564100E+06 0.26175210E+07 -0.74786187E+05 0.15000002E+09 0.12820520E+07 -0.74786500E+05 0.19230780E+07 0.57692330E+07 -0.74786250E+05 0.96153880E+07 -0.12179493E+08 -0.26175220E+07 0.28846160E+08 0.57692310E+07 0.15000002E+09 0.26175220E+07 0.57692330E+07 0.28846160E+08 -0.74786437E+05 -0.12179487E+08 0.96153850E+07 0.74786437E+05 0.57692310E+07 0.19230770E+07 0.50256425E+06 -0.69531250E+00 -0.15625000E+00 -0.12564106E+06 0.74786437E+05 -0.85449219E-03 0.74786312E+05 0.74786312E+05 -0.12564106E+06 0.26175220E+07 -0.74786500E+05 0.15000003E+09 0.12820520E+07 -0.74786250E+05 0.19230770E+07 -0.74786312E+05 0.96153820E+07 -0.12179484E+08 -0.26175210E+07 0.28846160E+08 0.57692320E+07 0.15000003E+09 0.26175220E+07 0.57692330E+07 -0.74786312E+05 -0.12179484E+08 0.96153820E+07 0.74786187E+05 0.57692310E+07 0.19230770E+07 0.25128212E+06 0.46367594E+06 0.97656250E-03 0.74786375E+05 0.74786375E+05 -0.62820547E+05 0.10769240E+07 0.75000016E+08 -0.74786375E+05 0.96153890E+07 -0.12179494E+08 -0.15405990E+07 0.14423084E+08 0.75000000E+08 0.26175210E+07 0.57692300E+07 0.28846144E+08 0.96153831E+06 0.50256406E+06 -0.15625000E+00 0.70312500E-01 -0.12564100E+06 0.74786250E+05 -0.26175210E+07 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.14999998E+09 0.12820520E+07 -0.74786375E+05 0.19230770E+07 0.57692310E+07 -0.12179486E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.14999998E+09 0.26175210E+07 0.57692300E+07 0.28846144E+08 0.96153840E+07 0.74786375E+05 0.57692300E+07 0.19230760E+07 0.50256406E+06 0.70312500E-01 -0.14843750E+00 -0.12564100E+06 0.74786312E+05 -0.26175210E+07 -0.85449219E-03 0.74786375E+05 0.74786250E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.14999998E+09 0.12820510E+07 -0.74786375E+05 0.19230770E+07 0.57692310E+07 -0.74786250E+05 0.96153820E+07 -0.12179487E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.14999998E+09 0.26175210E+07 0.57692300E+07 0.28846144E+08 -0.74786375E+05 -0.12179484E+08 0.96153830E+07 0.74786312E+05 0.57692300E+07 0.19230770E+07 0.50256412E+06 -0.24218750E+00 -0.25000000E+00 -0.12564100E+06 0.74786312E+05 -0.26175210E+07 -0.24414062E-03 0.74786312E+05 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786375E+05 0.15000000E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 0.57692320E+07 -0.74786312E+05 0.96153830E+07 -0.12179486E+08 -0.26175210E+07 0.28846144E+08 0.57692310E+07 0.15000000E+09 0.26175210E+07 0.57692310E+07 0.28846160E+08 -0.74786312E+05 -0.12179486E+08 0.96153830E+07 0.74786312E+05 0.57692300E+07 0.19230760E+07 0.50256419E+06 0.59375000E+00 -0.60937500E+00 -0.12564106E+06 0.74786375E+05 -0.26175220E+07 -0.73242187E-03 0.74786437E+05 0.74786250E+05 -0.12564106E+06 0.26175220E+07 -0.74786312E+05 0.15000003E+09 0.12820520E+07 -0.74786375E+05 0.19230770E+07 0.57692330E+07 -0.74786187E+05 0.96153850E+07 -0.12179493E+08 -0.26175220E+07 0.28846160E+08 0.57692320E+07 0.15000003E+09 0.26175220E+07 0.57692320E+07 0.28846160E+08 -0.74786500E+05 -0.12179487E+08 0.96153880E+07 0.74786375E+05 0.57692330E+07 0.19230770E+07 0.50256412E+06 0.85937500E-01 0.15781250E+01 -0.12564100E+06 0.74786250E+05 -0.26175200E+07 0.74786312E+05 0.74786312E+05 -0.12564100E+06 0.26175210E+07 -0.74786187E+05 0.15000000E+09 0.12820520E+07 -0.74786312E+05 0.19230770E+07 0.57692300E+07 -0.74786375E+05 0.96153870E+07 -0.12179490E+08 -0.26175210E+07 0.28846144E+08 0.57692300E+07 0.15000000E+09 0.26175200E+07 0.57692290E+07 0.28846144E+08 -0.74786375E+05 -0.12179490E+08 0.96153870E+07 0.74786437E+05 0.57692300E+07 0.19230770E+07 0.50256400E+06 -0.12890625E+01 -0.11250000E+01 -0.12564100E+06 0.74786187E+05 -0.85449219E-03 0.74786250E+05 0.74786312E+05 -0.12564100E+06 0.26175200E+07 -0.74786312E+05 0.14999998E+09 0.12820510E+07 -0.74786437E+05 0.19230770E+07 -0.74786312E+05 0.96153800E+07 -0.12179482E+08 -0.26175200E+07 0.28846144E+08 0.57692280E+07 0.14999998E+09 0.26175220E+07 0.57692310E+07 -0.74786375E+05 -0.12179482E+08 0.96153820E+07 0.74786312E+05 0.57692280E+07 0.19230760E+07 0.25128206E+06 0.46367419E+06 -0.85449219E-03 0.74786250E+05 0.74786312E+05 -0.62820488E+05 0.10769230E+07 0.75000000E+08 -0.74786312E+05 0.96153800E+07 -0.12179482E+08 -0.15405980E+07 0.14423071E+08 0.75000000E+08 0.26175210E+07 0.57692310E+07 0.28846160E+08 0.96153850E+06 0.50256412E+06 0.70312500E+00 -0.13281250E+00 -0.12564106E+06 0.74786375E+05 -0.26175220E+07 0.74786312E+05 -0.12564106E+06 0.26175220E+07 -0.74786375E+05 0.15000000E+09 0.12820510E+07 -0.74786250E+05 0.19230770E+07 0.57692310E+07 -0.12179488E+08 -0.26175220E+07 0.28846160E+08 0.57692320E+07 0.15000000E+09 0.26175220E+07 0.57692320E+07 0.28846160E+08 0.96153840E+07 0.74786250E+05 0.57692320E+07 0.19230770E+07 0.50256412E+06 0.28906250E+00 0.39843750E+00 -0.12564100E+06 0.74786375E+05 -0.26175210E+07 0.24414062E-03 0.74786250E+05 0.74786375E+05 -0.12564100E+06 0.26175210E+07 -0.74786312E+05 0.15000000E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 0.57692300E+07 -0.74786437E+05 0.96153870E+07 -0.12179488E+08 -0.26175210E+07 0.28846160E+08 0.57692310E+07 0.15000000E+09 0.26175210E+07 0.57692310E+07 0.28846144E+08 -0.74786250E+05 -0.12179491E+08 0.96153850E+07 0.74786312E+05 0.57692310E+07 0.19230770E+07 0.50256412E+06 0.25000000E+00 -0.27343750E+00 -0.12564100E+06 0.74786187E+05 -0.26175210E+07 0.36621094E-03 0.74786500E+05 0.74786187E+05 -0.12564100E+06 0.26175210E+07 -0.74786187E+05 0.15000000E+09 0.12820520E+07 -0.74786437E+05 0.19230780E+07 0.57692310E+07 -0.74786250E+05 0.96153880E+07 -0.12179493E+08 -0.26175220E+07 0.28846160E+08 0.57692310E+07 0.15000000E+09 0.26175220E+07 0.57692320E+07 0.28846160E+08 -0.74786437E+05 -0.12179487E+08 0.96153850E+07 0.74786437E+05 0.57692310E+07 0.19230770E+07 0.50256412E+06 -0.15234375E+01 -0.78125000E-01 -0.12564100E+06 0.74786250E+05 -0.26175210E+07 -0.85449219E-03 0.74786312E+05 0.74786312E+05 -0.12564100E+06 0.26175200E+07 -0.74786250E+05 0.15000000E+09 0.12820520E+07 -0.74786437E+05 0.19230770E+07 0.57692300E+07 -0.74786312E+05 0.96153820E+07 -0.12179484E+08 -0.26175200E+07 0.28846144E+08 0.57692280E+07 0.15000000E+09 0.26175210E+07 0.57692300E+07 0.28846144E+08 -0.74786312E+05 -0.12179484E+08 0.96153820E+07 0.74786312E+05 0.57692300E+07 0.19230760E+07 0.50256419E+06 0.94531250E+00 -0.10156250E+01 -0.12564106E+06 0.74786625E+05 -0.26175230E+07 -0.12207031E-03 0.74786312E+05 0.74786250E+05 -0.12564106E+06 0.26175230E+07 -0.74786625E+05 0.15000002E+09 0.12820510E+07 -0.74786062E+05 0.19230780E+07 0.57692330E+07 -0.74786312E+05 0.96153820E+07 -0.12179482E+08 -0.26175220E+07 0.28846160E+08 0.57692340E+07 0.15000002E+09 0.26175220E+07 0.57692350E+07 0.28846160E+08 -0.74786250E+05 -0.12179482E+08 0.96153790E+07 0.74786062E+05 0.57692330E+07 0.19230780E+07 0.50256425E+06 0.42109375E+01 0.16250000E+01 -0.12564100E+06 0.74786500E+05 0.74786687E+05 0.74786250E+05 -0.12564119E+06 0.26175240E+07 -0.74786125E+05 0.15000006E+09 0.12820520E+07 -0.74786187E+05 0.19230770E+07 -0.74786250E+05 0.96154010E+07 -0.12179514E+08 -0.26175250E+07 0.28846192E+08 0.57692380E+07 0.15000005E+09 0.26175210E+07 0.57692320E+07 -0.74786687E+05 -0.12179502E+08 0.96154010E+07 0.74786687E+05 0.57692390E+07 0.19230790E+07 0.25128194E+06 0.46367419E+06 0.97656250E-03 0.74785812E+05 0.74786750E+05 -0.62820441E+05 0.10769220E+07 0.74999952E+08 -0.74786750E+05 0.96153810E+07 -0.12179472E+08 -0.15405970E+07 0.14423061E+08 0.75000000E+08 0.26175220E+07 0.57692310E+07 0.28846160E+08 0.96153850E+06 0.50256419E+06 -0.46875000E-01 -0.21093750E+00 -0.12564106E+06 0.74786375E+05 -0.26175220E+07 0.74786312E+05 -0.12564106E+06 -0.74786375E+05 0.15000002E+09 0.12820510E+07 -0.74786312E+05 0.19230770E+07 0.57692310E+07 -0.12179488E+08 -0.26175220E+07 0.57692320E+07 0.15000002E+09 0.26175220E+07 0.57692320E+07 0.28846160E+08 0.96153840E+07 0.74786250E+05 0.19230770E+07 0.50256419E+06 0.78125000E-02 -0.14843750E+00 -0.12564106E+06 0.74786312E+05 -0.26175220E+07 0.24414062E-03 0.74786375E+05 -0.12564100E+06 -0.74786312E+05 0.15000002E+09 0.12820510E+07 -0.74786437E+05 0.19230770E+07 0.57692310E+07 -0.74786437E+05 -0.12179488E+08 -0.26175210E+07 0.57692310E+07 0.15000002E+09 0.26175220E+07 0.57692310E+07 0.28846160E+08 -0.74786250E+05 0.96153850E+07 0.74786312E+05 0.19230770E+07 0.50256412E+06 0.23437500E-01 0.28125000E+00 -0.12564106E+06 0.74786500E+05 -0.26175220E+07 0.24414062E-03 0.74786375E+05 -0.12564100E+06 -0.74786500E+05 0.15000000E+09 0.12820510E+07 -0.74786187E+05 0.19230770E+07 0.57692310E+07 -0.74786437E+05 -0.12179482E+08 -0.26175210E+07 0.57692320E+07 0.15000002E+09 0.26175210E+07 0.57692320E+07 0.28846160E+08 -0.74786125E+05 0.96153810E+07 0.74786187E+05 0.19230770E+07 0.50256400E+06 0.11640625E+01 0.13359375E+01 -0.12564100E+06 0.74786312E+05 -0.26175200E+07 0.97656250E-03 0.74786375E+05 -0.12564100E+06 -0.74786187E+05 0.14999998E+09 0.12820510E+07 -0.74786312E+05 0.19230760E+07 0.57692280E+07 -0.74786375E+05 -0.12179494E+08 -0.26175220E+07 0.57692310E+07 0.14999998E+09 0.26175200E+07 0.57692280E+07 0.28846144E+08 -0.74786312E+05 0.96153890E+07 0.74786500E+05 0.19230770E+07 0.50256406E+06 -0.31093750E+01 -0.27187500E+01 -0.12564106E+06 0.74785812E+05 -0.26175220E+07 -0.12207031E-03 0.74786250E+05 -0.12564094E+06 -0.74786125E+05 0.15000000E+09 0.12820520E+07 -0.74786937E+05 0.19230780E+07 0.57692350E+07 -0.74786312E+05 -0.12179482E+08 -0.26175190E+07 0.57692270E+07 0.15000002E+09 0.26175230E+07 0.57692330E+07 0.28846160E+08 -0.74786250E+05 0.96153790E+07 0.74786375E+05 0.19230750E+07 0.50256425E+06 -0.35390625E+01 0.13046875E+01 -0.12564100E+06 0.74786562E+05 0.73242187E-03 0.74786250E+05 -0.12564100E+06 -0.74786562E+05 0.15000005E+09 0.12820500E+07 -0.74786062E+05 0.19230760E+07 -0.74786250E+05 -0.12179474E+08 -0.26175200E+07 0.57692300E+07 0.15000000E+09 0.26175200E+07 0.57692300E+07 -0.74786250E+05 0.96153740E+07 0.74786000E+05 0.19230760E+07 0.25128200E+06 0.46367700E+06 0.97656250E-03 0.74786375E+05 -0.62820547E+05 0.74999984E+08 -0.74786375E+05 -0.12179494E+08 -0.15405990E+07 0.44230768E+08 0.15405980E+07 0.14423078E+08 0.25128206E+06 -0.46367525E+06 -0.62820520E+05 -0.10769230E+07 0.75000000E+08 0.15405980E+07 0.14423078E+08 0.25128206E+06 -0.46367462E+06 -0.62820488E+05 -0.10769230E+07 0.74999984E+08 0.15405980E+07 0.14423071E+08 0.25128206E+06 -0.46367625E+06 -0.62820543E+05 -0.10769240E+07 0.75000016E+08 0.15405990E+07 0.14423084E+08 0.25128206E+06 -0.46367419E+06 -0.62820488E+05 -0.10769230E+07 0.75000000E+08 0.15405980E+07 0.14423071E+08 0.25128187E+06 -0.46367400E+06 -0.62820441E+05 -0.10769220E+07 0.74999936E+08 0.15405970E+07 0.14423061E+08 0.25128200E+06 -0.46367694E+06 -0.62820543E+05 0.74999984E+08 0.15405990E+07 0.12564106E+06 Matrix/inst/external/test3comp.rda0000644000176200001440000001062110463734405016734 0ustar liggesusers{XL7SMM3SMRL(DH%d$%$"$"GŦrcKJR)Jݕ~ح>;9<;5k^ߵg}grwS(F*2h*z:uҥkVQ(tjo;n1"ex P%o:/L v}O\>ZtUo3}-YZ/[~], 1o^y=?xLΘei)].KevӾ{I*?M]-UK:ua//\Im5m9֫yҹ45Ch]V䌒kDcfIwMk APpBb`X(hڋa6Mа=nx{s<3 Ll{\\tN?pNcn?+zbRiBỊ|^raCdw[}w5 :/ vrqb=`ԭm_a]MCe,N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a.mtx0000644000176200001440000010575510275502035016325 0ustar liggesusers%%MatrixMarket matrix coordinate real symmetric 147 147 1298 1 1 7.5000000000000e+07 2 1 9.6153881000000e+05 8 1 -1.2179486000000e+07 9 1 -2.6175210000000e+06 10 1 2.8846144000000e+07 11 1 5.7692300000000e+06 2 2 7.5000000000000e+07 3 2 9.6153869000000e+05 9 2 -7.4786312000000e+04 10 2 9.6153840000000e+06 11 2 -1.2179486000000e+07 12 2 -2.6175210000000e+06 13 2 2.8846144000000e+07 14 2 5.7692300000000e+06 3 3 7.5000000000000e+07 4 3 9.6153844000000e+05 12 3 -7.4786375000000e+04 13 3 9.6153840000000e+06 14 3 -1.2179486000000e+07 15 3 -2.6175210000000e+06 16 3 2.8846144000000e+07 17 3 5.7692310000000e+06 4 4 7.5000000000000e+07 5 4 9.6153869000000e+05 15 4 -7.4786312000000e+04 16 4 9.6153840000000e+06 17 4 -1.2179487000000e+07 18 4 -2.6175210000000e+06 19 4 2.8846144000000e+07 20 4 5.7692300000000e+06 5 5 7.5000000000000e+07 6 5 9.6153894000000e+05 18 5 -7.4786375000000e+04 19 5 9.6153840000000e+06 20 5 -1.2179486000000e+07 21 5 -2.6175210000000e+06 22 5 2.8846160000000e+07 23 5 5.7692310000000e+06 6 6 7.5000000000000e+07 7 6 9.6153894000000e+05 21 6 -7.4786312000000e+04 22 6 9.6153850000000e+06 23 6 -1.2179488000000e+07 24 6 -2.6175220000000e+06 25 6 2.8846160000000e+07 26 6 5.7692310000000e+06 7 7 4.4230768000000e+07 24 7 -7.4786312000000e+04 25 7 9.6153850000000e+06 26 7 -1.2179488000000e+07 27 7 -1.5405980000000e+06 28 7 1.4423078000000e+07 8 8 7.5000000000000e+07 9 8 2.6175210000000e+06 10 8 5.7692300000000e+06 11 8 2.8846144000000e+07 29 8 9.6153831000000e+05 9 9 5.0256406000000e+05 10 9 7.8125000000000e-03 11 9 7.8125000000000e-03 12 9 -1.2564100000000e+05 13 9 7.4786312000000e+04 14 9 -2.6175210000000e+06 29 9 7.4786312000000e+04 30 9 -1.2564100000000e+05 31 9 2.6175210000000e+06 32 9 -7.4786312000000e+04 10 10 1.4999998000000e+08 11 10 1.2820510000000e+06 12 10 -7.4786312000000e+04 13 10 1.9230770000000e+06 14 10 5.7692310000000e+06 29 10 -1.2179486000000e+07 30 10 -2.6175210000000e+06 31 10 2.8846144000000e+07 32 10 5.7692300000000e+06 11 11 1.4999998000000e+08 12 11 2.6175210000000e+06 13 11 5.7692300000000e+06 14 11 2.8846144000000e+07 29 11 9.6153840000000e+06 30 11 7.4786312000000e+04 31 11 5.7692300000000e+06 32 11 1.9230770000000e+06 12 12 5.0256406000000e+05 13 12 -1.0937500000000e-01 14 12 5.4687500000000e-02 15 12 -1.2564100000000e+05 16 12 7.4786312000000e+04 17 12 -2.6175210000000e+06 30 12 -2.4414062000000e-04 31 12 7.4786375000000e+04 32 12 7.4786312000000e+04 33 12 -1.2564100000000e+05 34 12 2.6175210000000e+06 35 12 -7.4786250000000e+04 13 13 1.4999998000000e+08 14 13 1.2820520000000e+06 15 13 -7.4786312000000e+04 16 13 1.9230770000000e+06 17 13 5.7692300000000e+06 30 13 -7.4786312000000e+04 31 13 9.6153840000000e+06 32 13 -1.2179487000000e+07 33 13 -2.6175210000000e+06 34 13 2.8846144000000e+07 35 13 5.7692300000000e+06 14 14 1.4999998000000e+08 15 14 2.6175210000000e+06 16 14 5.7692300000000e+06 17 14 2.8846144000000e+07 30 14 -7.4786375000000e+04 31 14 -1.2179486000000e+07 32 14 9.6153840000000e+06 33 14 7.4786312000000e+04 34 14 5.7692310000000e+06 35 14 1.9230770000000e+06 15 15 5.0256406000000e+05 16 15 1.4843750000000e-01 17 15 -1.1718750000000e-01 18 15 -1.2564100000000e+05 19 15 7.4786312000000e+04 20 15 -2.6175210000000e+06 33 15 -3.6621094000000e-04 34 15 7.4786375000000e+04 35 15 7.4786250000000e+04 36 15 -1.2564100000000e+05 37 15 2.6175210000000e+06 38 15 -7.4786312000000e+04 16 16 1.4999998000000e+08 17 16 1.2820510000000e+06 18 16 -7.4786312000000e+04 19 16 1.9230770000000e+06 20 16 5.7692310000000e+06 33 16 -7.4786250000000e+04 34 16 9.6153840000000e+06 35 16 -1.2179488000000e+07 36 16 -2.6175210000000e+06 37 16 2.8846160000000e+07 38 16 5.7692310000000e+06 17 17 1.4999998000000e+08 18 17 2.6175210000000e+06 19 17 5.7692310000000e+06 20 17 2.8846144000000e+07 33 17 -7.4786375000000e+04 34 17 -1.2179485000000e+07 35 17 9.6153830000000e+06 36 17 7.4786375000000e+04 37 17 5.7692300000000e+06 38 17 1.9230770000000e+06 18 18 5.0256406000000e+05 19 18 -1.3281250000000e-01 20 18 1.7187500000000e-01 21 18 -1.2564100000000e+05 22 18 7.4786312000000e+04 23 18 -2.6175210000000e+06 36 18 4.8828125000000e-04 37 18 7.4786312000000e+04 38 18 7.4786312000000e+04 39 18 -1.2564100000000e+05 40 18 2.6175210000000e+06 41 18 -7.4786250000000e+04 19 19 1.4999998000000e+08 20 19 1.2820510000000e+06 21 19 -7.4786375000000e+04 22 19 1.9230770000000e+06 23 19 5.7692300000000e+06 36 19 -7.4786250000000e+04 37 19 9.6153840000000e+06 38 19 -1.2179488000000e+07 39 19 -2.6175210000000e+06 40 19 2.8846144000000e+07 41 19 5.7692300000000e+06 20 20 1.4999998000000e+08 21 20 2.6175210000000e+06 22 20 5.7692300000000e+06 23 20 2.8846144000000e+07 36 20 -7.4786375000000e+04 37 20 -1.2179487000000e+07 38 20 9.6153850000000e+06 39 20 7.4786375000000e+04 40 20 5.7692310000000e+06 41 20 1.9230760000000e+06 21 21 5.0256412000000e+05 22 21 3.2031250000000e-01 23 21 -6.8750000000000e-01 24 21 -1.2564106000000e+05 25 21 7.4786375000000e+04 26 21 -2.6175220000000e+06 39 21 -1.2207031000000e-04 40 21 7.4786437000000e+04 41 21 7.4786187000000e+04 42 21 -1.2564106000000e+05 43 21 2.6175220000000e+06 44 21 -7.4786375000000e+04 22 22 1.5000002000000e+08 23 22 1.2820520000000e+06 24 22 -7.4786312000000e+04 25 22 1.9230770000000e+06 26 22 5.7692320000000e+06 39 22 -7.4786250000000e+04 40 22 9.6153840000000e+06 41 22 -1.2179490000000e+07 42 22 -2.6175220000000e+06 43 22 2.8846160000000e+07 44 22 5.7692320000000e+06 23 23 1.5000000000000e+08 24 23 2.6175220000000e+06 25 23 5.7692320000000e+06 26 23 2.8846160000000e+07 39 23 -7.4786437000000e+04 40 23 -1.2179483000000e+07 41 23 9.6153830000000e+06 42 23 7.4786312000000e+04 43 23 5.7692320000000e+06 44 23 1.9230770000000e+06 24 24 5.0256419000000e+05 25 24 4.1406250000000e-01 26 24 8.5937500000000e-02 27 24 -1.2564106000000e+05 28 24 7.4786375000000e+04 42 24 3.6621094000000e-04 43 24 7.4786312000000e+04 44 24 7.4786375000000e+04 45 24 -1.2564106000000e+05 46 24 2.6175220000000e+06 47 24 -7.4786375000000e+04 25 25 1.5000002000000e+08 26 25 1.2820510000000e+06 27 25 -7.4786312000000e+04 28 25 1.9230770000000e+06 42 25 -7.4786312000000e+04 43 25 9.6153860000000e+06 44 25 -1.2179491000000e+07 45 25 -2.6175220000000e+06 46 25 2.8846160000000e+07 47 25 5.7692320000000e+06 26 26 1.5000002000000e+08 27 26 2.6175220000000e+06 28 26 5.7692320000000e+06 42 26 -7.4786375000000e+04 43 26 -1.2179491000000e+07 44 26 9.6153880000000e+06 45 26 7.4786375000000e+04 46 26 5.7692320000000e+06 47 26 1.9230770000000e+06 27 27 2.5128206000000e+05 28 27 4.6367550000000e+05 45 27 3.6621094000000e-04 46 27 7.4786312000000e+04 47 27 7.4786375000000e+04 48 27 -6.2820531000000e+04 49 27 1.0769230000000e+06 28 28 7.5000016000000e+07 45 28 -7.4786312000000e+04 46 28 9.6153860000000e+06 47 28 -1.2179491000000e+07 48 28 -1.5405990000000e+06 49 28 1.4423080000000e+07 29 29 7.5000000000000e+07 30 29 2.6175210000000e+06 31 29 5.7692300000000e+06 32 29 2.8846144000000e+07 50 29 9.6153831000000e+05 30 30 5.0256406000000e+05 31 30 -1.0937500000000e-01 32 30 5.4687500000000e-02 33 30 -1.2564100000000e+05 34 30 7.4786250000000e+04 35 30 -2.6175210000000e+06 50 30 7.4786312000000e+04 51 30 -1.2564100000000e+05 52 30 2.6175210000000e+06 53 30 -7.4786312000000e+04 31 31 1.4999998000000e+08 32 31 1.2820520000000e+06 33 31 -7.4786312000000e+04 34 31 1.9230770000000e+06 35 31 5.7692310000000e+06 50 31 -1.2179486000000e+07 51 31 -2.6175210000000e+06 52 31 2.8846144000000e+07 53 31 5.7692300000000e+06 32 32 1.4999998000000e+08 33 32 2.6175210000000e+06 34 32 5.7692300000000e+06 35 32 2.8846144000000e+07 50 32 9.6153840000000e+06 51 32 7.4786312000000e+04 52 32 5.7692300000000e+06 53 32 1.9230770000000e+06 33 33 5.0256412000000e+05 34 33 2.4218750000000e-01 35 33 -3.8281250000000e-01 36 33 -1.2564106000000e+05 37 33 7.4786375000000e+04 38 33 -2.6175220000000e+06 51 33 -4.8828125000000e-04 52 33 7.4786312000000e+04 53 33 7.4786312000000e+04 54 33 -1.2564100000000e+05 55 33 2.6175210000000e+06 56 33 -7.4786375000000e+04 34 34 1.4999998000000e+08 35 34 1.2820510000000e+06 36 34 -7.4786312000000e+04 37 34 1.9230770000000e+06 38 34 5.7692310000000e+06 51 34 -7.4786250000000e+04 52 34 9.6153820000000e+06 53 34 -1.2179487000000e+07 54 34 -2.6175210000000e+06 55 34 2.8846160000000e+07 56 34 5.7692300000000e+06 35 35 1.4999998000000e+08 36 35 2.6175220000000e+06 37 35 5.7692310000000e+06 38 35 2.8846160000000e+07 51 35 -7.4786375000000e+04 52 35 -1.2179485000000e+07 53 35 9.6153840000000e+06 54 35 7.4786312000000e+04 55 35 5.7692310000000e+06 56 35 1.9230770000000e+06 36 36 5.0256412000000e+05 37 36 -2.3437500000000e-02 38 36 3.4375000000000e-01 39 36 -1.2564100000000e+05 40 36 7.4786250000000e+04 41 36 -2.6175210000000e+06 54 36 2.4414062000000e-04 55 36 7.4786312000000e+04 56 36 7.4786312000000e+04 57 36 -1.2564100000000e+05 58 36 2.6175210000000e+06 59 36 -7.4786312000000e+04 37 37 1.5000000000000e+08 38 37 1.2820520000000e+06 39 37 -7.4786312000000e+04 40 37 1.9230770000000e+06 41 37 5.7692310000000e+06 54 37 -7.4786312000000e+04 55 37 9.6153850000000e+06 56 37 -1.2179488000000e+07 57 37 -2.6175210000000e+06 58 37 2.8846144000000e+07 59 37 5.7692300000000e+06 38 38 1.5000000000000e+08 39 38 2.6175210000000e+06 40 38 5.7692310000000e+06 41 38 2.8846144000000e+07 54 38 -7.4786312000000e+04 55 38 -1.2179488000000e+07 56 38 9.6153850000000e+06 57 38 7.4786375000000e+04 58 38 5.7692300000000e+06 59 38 1.9230770000000e+06 39 39 5.0256406000000e+05 40 39 1.9531250000000e-01 41 39 -2.7343750000000e-01 42 39 -1.2564100000000e+05 43 39 7.4786312000000e+04 44 39 -2.6175210000000e+06 57 39 4.8828125000000e-04 58 39 7.4786312000000e+04 59 39 7.4786250000000e+04 60 39 -1.2564100000000e+05 61 39 2.6175210000000e+06 62 39 -7.4786312000000e+04 40 40 1.4999998000000e+08 41 40 1.2820510000000e+06 42 40 -7.4786375000000e+04 43 40 1.9230770000000e+06 44 40 5.7692310000000e+06 57 40 -7.4786250000000e+04 58 40 9.6153820000000e+06 59 40 -1.2179488000000e+07 60 40 -2.6175210000000e+06 61 40 2.8846144000000e+07 62 40 5.7692300000000e+06 41 41 1.4999998000000e+08 42 41 2.6175210000000e+06 43 41 5.7692300000000e+06 44 41 2.8846160000000e+07 57 41 -7.4786375000000e+04 58 41 -1.2179485000000e+07 59 41 9.6153850000000e+06 60 41 7.4786375000000e+04 61 41 5.7692310000000e+06 62 41 1.9230770000000e+06 42 42 5.0256412000000e+05 43 42 -5.5468750000000e-01 44 42 -3.2812500000000e-01 45 42 -1.2564106000000e+05 46 42 7.4786250000000e+04 47 42 -2.6175220000000e+06 60 42 -2.4414062000000e-04 61 42 7.4786312000000e+04 62 42 7.4786312000000e+04 63 42 -1.2564100000000e+05 64 42 2.6175210000000e+06 65 42 -7.4786375000000e+04 43 43 1.5000002000000e+08 44 43 1.2820510000000e+06 45 43 -7.4786375000000e+04 46 43 1.9230770000000e+06 47 43 5.7692320000000e+06 60 43 -7.4786312000000e+04 61 43 9.6153830000000e+06 62 43 -1.2179486000000e+07 63 43 -2.6175210000000e+06 64 43 2.8846144000000e+07 65 43 5.7692310000000e+06 44 44 1.5000002000000e+08 45 44 2.6175220000000e+06 46 44 5.7692320000000e+06 47 44 2.8846160000000e+07 60 44 -7.4786312000000e+04 61 44 -1.2179486000000e+07 62 44 9.6153830000000e+06 63 44 7.4786312000000e+04 64 44 5.7692300000000e+06 65 44 1.9230760000000e+06 45 45 5.0256419000000e+05 46 45 5.3906250000000e-01 47 45 1.5625000000000e-02 48 45 -1.2564106000000e+05 49 45 7.4786250000000e+04 63 45 -7.3242187000000e-04 64 45 7.4786562000000e+04 65 45 7.4786125000000e+04 66 45 -1.2564106000000e+05 67 45 2.6175220000000e+06 68 45 -7.4786250000000e+04 46 46 1.5000005000000e+08 47 46 1.2820520000000e+06 48 46 -7.4786375000000e+04 49 46 1.9230770000000e+06 63 46 -7.4786125000000e+04 64 46 9.6153870000000e+06 65 46 -1.2179498000000e+07 66 46 -2.6175230000000e+06 67 46 2.8846160000000e+07 68 46 5.7692320000000e+06 47 47 1.5000002000000e+08 48 47 2.6175220000000e+06 49 47 5.7692320000000e+06 63 47 -7.4786625000000e+04 64 47 -1.2179486000000e+07 65 47 9.6153900000000e+06 66 47 7.4786500000000e+04 67 47 5.7692330000000e+06 68 47 1.9230770000000e+06 48 48 2.5128206000000e+05 49 48 4.6367500000000e+05 66 48 -6.1035156000000e-04 67 48 7.4786312000000e+04 68 48 7.4786375000000e+04 69 48 -6.2820516000000e+04 70 48 1.0769230000000e+06 49 49 7.5000000000000e+07 66 49 -7.4786312000000e+04 67 49 9.6153830000000e+06 68 49 -1.2179487000000e+07 69 49 -1.5405980000000e+06 70 49 1.4423077000000e+07 50 50 7.5000000000000e+07 51 50 2.6175210000000e+06 52 50 5.7692310000000e+06 53 50 2.8846144000000e+07 71 50 9.6153856000000e+05 51 51 5.0256406000000e+05 52 51 1.8750000000000e-01 53 51 2.3437500000000e-02 54 51 -1.2564100000000e+05 55 51 7.4786312000000e+04 56 51 -2.6175210000000e+06 71 51 7.4786312000000e+04 72 51 -1.2564100000000e+05 73 51 2.6175210000000e+06 74 51 -7.4786312000000e+04 52 52 1.4999998000000e+08 53 52 1.2820510000000e+06 54 52 -7.4786312000000e+04 55 52 1.9230770000000e+06 56 52 5.7692300000000e+06 71 52 -1.2179487000000e+07 72 52 -2.6175210000000e+06 73 52 2.8846160000000e+07 74 52 5.7692310000000e+06 53 53 1.4999998000000e+08 54 53 2.6175210000000e+06 55 53 5.7692310000000e+06 56 53 2.8846144000000e+07 71 53 9.6153830000000e+06 72 53 7.4786312000000e+04 73 53 5.7692310000000e+06 74 53 1.9230770000000e+06 54 54 5.0256406000000e+05 55 54 -2.4218750000000e-01 56 54 -6.2500000000000e-02 57 54 -1.2564100000000e+05 58 54 7.4786250000000e+04 59 54 -2.6175210000000e+06 73 54 7.4786375000000e+04 74 54 7.4786250000000e+04 75 54 -1.2564100000000e+05 76 54 2.6175210000000e+06 77 54 -7.4786250000000e+04 55 55 1.5000000000000e+08 56 55 1.2820510000000e+06 57 55 -7.4786437000000e+04 58 55 1.9230760000000e+06 59 55 5.7692290000000e+06 72 55 -7.4786312000000e+04 73 55 9.6153850000000e+06 74 55 -1.2179488000000e+07 75 55 -2.6175210000000e+06 76 55 2.8846144000000e+07 77 55 5.7692300000000e+06 56 56 1.4999998000000e+08 57 56 2.6175210000000e+06 58 56 5.7692300000000e+06 59 56 2.8846144000000e+07 72 56 -7.4786375000000e+04 73 56 -1.2179487000000e+07 74 56 9.6153840000000e+06 75 56 7.4786375000000e+04 76 56 5.7692310000000e+06 77 56 1.9230770000000e+06 57 57 5.0256412000000e+05 58 57 2.0312500000000e-01 59 57 -2.4218750000000e-01 60 57 -1.2564100000000e+05 61 57 7.4786312000000e+04 62 57 -2.6175210000000e+06 75 57 8.5449219000000e-04 76 57 7.4786375000000e+04 77 57 7.4786250000000e+04 78 57 -1.2564100000000e+05 79 57 2.6175210000000e+06 80 57 -7.4786312000000e+04 58 58 1.4999998000000e+08 59 58 1.2820510000000e+06 60 58 -7.4786312000000e+04 61 58 1.9230770000000e+06 62 58 5.7692310000000e+06 75 58 -7.4786250000000e+04 76 58 9.6153850000000e+06 77 58 -1.2179488000000e+07 78 58 -2.6175210000000e+06 79 58 2.8846160000000e+07 80 58 5.7692320000000e+06 59 59 1.5000000000000e+08 60 59 2.6175210000000e+06 61 59 5.7692320000000e+06 62 59 2.8846160000000e+07 75 59 -7.4786312000000e+04 76 59 -1.2179485000000e+07 77 59 9.6153820000000e+06 78 59 7.4786312000000e+04 79 59 5.7692310000000e+06 80 59 1.9230770000000e+06 60 60 5.0256412000000e+05 61 60 2.2656250000000e-01 62 60 2.5000000000000e-01 63 60 -1.2564100000000e+05 64 60 7.4786375000000e+04 65 60 -2.6175210000000e+06 78 60 2.4414062000000e-04 79 60 7.4786312000000e+04 80 60 7.4786312000000e+04 81 60 -1.2564100000000e+05 82 60 2.6175210000000e+06 83 60 -7.4786312000000e+04 61 61 1.5000000000000e+08 62 61 1.2820510000000e+06 63 61 -7.4786312000000e+04 64 61 1.9230770000000e+06 65 61 5.7692300000000e+06 78 61 -7.4786312000000e+04 79 61 9.6153850000000e+06 80 61 -1.2179489000000e+07 81 61 -2.6175210000000e+06 82 61 2.8846160000000e+07 83 61 5.7692310000000e+06 62 62 1.5000000000000e+08 63 62 2.6175210000000e+06 64 62 5.7692310000000e+06 65 62 2.8846144000000e+07 78 62 -7.4786312000000e+04 79 62 -1.2179489000000e+07 80 62 9.6153860000000e+06 81 62 7.4786312000000e+04 82 62 5.7692320000000e+06 83 62 1.9230770000000e+06 63 63 5.0256412000000e+05 64 63 1.8750000000000e-01 65 63 -8.2031250000000e-01 66 63 -1.2564106000000e+05 67 63 7.4786125000000e+04 68 63 -2.6175220000000e+06 81 63 3.6621094000000e-04 82 63 7.4786500000000e+04 83 63 7.4786187000000e+04 84 63 -1.2564100000000e+05 85 63 2.6175210000000e+06 86 63 -7.4786187000000e+04 64 64 1.5000002000000e+08 65 64 1.2820520000000e+06 66 64 -7.4786500000000e+04 67 64 1.9230780000000e+06 68 64 5.7692330000000e+06 81 64 -7.4786250000000e+04 82 64 9.6153880000000e+06 83 64 -1.2179493000000e+07 84 64 -2.6175220000000e+06 85 64 2.8846160000000e+07 86 64 5.7692310000000e+06 65 65 1.5000002000000e+08 66 65 2.6175220000000e+06 67 65 5.7692330000000e+06 68 65 2.8846160000000e+07 81 65 -7.4786437000000e+04 82 65 -1.2179487000000e+07 83 65 9.6153850000000e+06 84 65 7.4786437000000e+04 85 65 5.7692310000000e+06 86 65 1.9230770000000e+06 66 66 5.0256425000000e+05 67 66 -6.9531250000000e-01 68 66 -1.5625000000000e-01 69 66 -1.2564106000000e+05 70 66 7.4786437000000e+04 84 66 -8.5449219000000e-04 85 66 7.4786312000000e+04 86 66 7.4786312000000e+04 87 66 -1.2564106000000e+05 88 66 2.6175220000000e+06 89 66 -7.4786500000000e+04 67 67 1.5000003000000e+08 68 67 1.2820520000000e+06 69 67 -7.4786250000000e+04 70 67 1.9230770000000e+06 84 67 -7.4786312000000e+04 85 67 9.6153820000000e+06 86 67 -1.2179484000000e+07 87 67 -2.6175210000000e+06 88 67 2.8846160000000e+07 89 67 5.7692320000000e+06 68 68 1.5000003000000e+08 69 68 2.6175220000000e+06 70 68 5.7692330000000e+06 84 68 -7.4786312000000e+04 85 68 -1.2179484000000e+07 86 68 9.6153820000000e+06 87 68 7.4786187000000e+04 88 68 5.7692310000000e+06 89 68 1.9230770000000e+06 69 69 2.5128212000000e+05 70 69 4.6367594000000e+05 87 69 9.7656250000000e-04 88 69 7.4786375000000e+04 89 69 7.4786375000000e+04 90 69 -6.2820547000000e+04 91 69 1.0769240000000e+06 70 70 7.5000016000000e+07 87 70 -7.4786375000000e+04 88 70 9.6153890000000e+06 89 70 -1.2179494000000e+07 90 70 -1.5405990000000e+06 91 70 1.4423084000000e+07 71 71 7.5000000000000e+07 72 71 2.6175210000000e+06 73 71 5.7692300000000e+06 74 71 2.8846144000000e+07 92 71 9.6153831000000e+05 72 72 5.0256406000000e+05 73 72 -1.5625000000000e-01 74 72 7.0312500000000e-02 75 72 -1.2564100000000e+05 76 72 7.4786250000000e+04 77 72 -2.6175210000000e+06 92 72 7.4786312000000e+04 93 72 -1.2564100000000e+05 94 72 2.6175210000000e+06 95 72 -7.4786312000000e+04 73 73 1.4999998000000e+08 74 73 1.2820520000000e+06 75 73 -7.4786375000000e+04 76 73 1.9230770000000e+06 77 73 5.7692310000000e+06 92 73 -1.2179486000000e+07 93 73 -2.6175210000000e+06 94 73 2.8846144000000e+07 95 73 5.7692300000000e+06 74 74 1.4999998000000e+08 75 74 2.6175210000000e+06 76 74 5.7692300000000e+06 77 74 2.8846144000000e+07 92 74 9.6153840000000e+06 93 74 7.4786375000000e+04 94 74 5.7692300000000e+06 95 74 1.9230760000000e+06 75 75 5.0256406000000e+05 76 75 7.0312500000000e-02 77 75 -1.4843750000000e-01 78 75 -1.2564100000000e+05 79 75 7.4786312000000e+04 80 75 -2.6175210000000e+06 93 75 -8.5449219000000e-04 94 75 7.4786375000000e+04 95 75 7.4786250000000e+04 96 75 -1.2564100000000e+05 97 75 2.6175210000000e+06 98 75 -7.4786312000000e+04 76 76 1.4999998000000e+08 77 76 1.2820510000000e+06 78 76 -7.4786375000000e+04 79 76 1.9230770000000e+06 80 76 5.7692310000000e+06 93 76 -7.4786250000000e+04 94 76 9.6153820000000e+06 95 76 -1.2179487000000e+07 96 76 -2.6175210000000e+06 97 76 2.8846144000000e+07 98 76 5.7692300000000e+06 77 77 1.4999998000000e+08 78 77 2.6175210000000e+06 79 77 5.7692300000000e+06 80 77 2.8846144000000e+07 93 77 -7.4786375000000e+04 94 77 -1.2179484000000e+07 95 77 9.6153830000000e+06 96 77 7.4786312000000e+04 97 77 5.7692300000000e+06 98 77 1.9230770000000e+06 78 78 5.0256412000000e+05 79 78 -2.4218750000000e-01 80 78 -2.5000000000000e-01 81 78 -1.2564100000000e+05 82 78 7.4786312000000e+04 83 78 -2.6175210000000e+06 96 78 -2.4414062000000e-04 97 78 7.4786312000000e+04 98 78 7.4786312000000e+04 99 78 -1.2564100000000e+05 100 78 2.6175210000000e+06 101 78 -7.4786375000000e+04 79 79 1.5000000000000e+08 80 79 1.2820510000000e+06 81 79 -7.4786312000000e+04 82 79 1.9230770000000e+06 83 79 5.7692320000000e+06 96 79 -7.4786312000000e+04 97 79 9.6153830000000e+06 98 79 -1.2179486000000e+07 99 79 -2.6175210000000e+06 100 79 2.8846144000000e+07 101 79 5.7692310000000e+06 80 80 1.5000000000000e+08 81 80 2.6175210000000e+06 82 80 5.7692310000000e+06 83 80 2.8846160000000e+07 96 80 -7.4786312000000e+04 97 80 -1.2179486000000e+07 98 80 9.6153830000000e+06 99 80 7.4786312000000e+04 100 80 5.7692300000000e+06 101 80 1.9230760000000e+06 81 81 5.0256419000000e+05 82 81 5.9375000000000e-01 83 81 -6.0937500000000e-01 84 81 -1.2564106000000e+05 85 81 7.4786375000000e+04 86 81 -2.6175220000000e+06 99 81 -7.3242187000000e-04 100 81 7.4786437000000e+04 101 81 7.4786250000000e+04 102 81 -1.2564106000000e+05 103 81 2.6175220000000e+06 104 81 -7.4786312000000e+04 82 82 1.5000003000000e+08 83 82 1.2820520000000e+06 84 82 -7.4786375000000e+04 85 82 1.9230770000000e+06 86 82 5.7692330000000e+06 99 82 -7.4786187000000e+04 100 82 9.6153850000000e+06 101 82 -1.2179493000000e+07 102 82 -2.6175220000000e+06 103 82 2.8846160000000e+07 104 82 5.7692320000000e+06 83 83 1.5000003000000e+08 84 83 2.6175220000000e+06 85 83 5.7692320000000e+06 86 83 2.8846160000000e+07 99 83 -7.4786500000000e+04 100 83 -1.2179487000000e+07 101 83 9.6153880000000e+06 102 83 7.4786375000000e+04 103 83 5.7692330000000e+06 104 83 1.9230770000000e+06 84 84 5.0256412000000e+05 85 84 8.5937500000000e-02 86 84 1.5781250000000e+00 87 84 -1.2564100000000e+05 88 84 7.4786250000000e+04 89 84 -2.6175200000000e+06 103 84 7.4786312000000e+04 104 84 7.4786312000000e+04 105 84 -1.2564100000000e+05 106 84 2.6175210000000e+06 107 84 -7.4786187000000e+04 85 85 1.5000000000000e+08 86 85 1.2820520000000e+06 87 85 -7.4786312000000e+04 88 85 1.9230770000000e+06 89 85 5.7692300000000e+06 102 85 -7.4786375000000e+04 103 85 9.6153870000000e+06 104 85 -1.2179490000000e+07 105 85 -2.6175210000000e+06 106 85 2.8846144000000e+07 107 85 5.7692300000000e+06 86 86 1.5000000000000e+08 87 86 2.6175200000000e+06 88 86 5.7692290000000e+06 89 86 2.8846144000000e+07 102 86 -7.4786375000000e+04 103 86 -1.2179490000000e+07 104 86 9.6153870000000e+06 105 86 7.4786437000000e+04 106 86 5.7692300000000e+06 107 86 1.9230770000000e+06 87 87 5.0256400000000e+05 88 87 -1.2890625000000e+00 89 87 -1.1250000000000e+00 90 87 -1.2564100000000e+05 91 87 7.4786187000000e+04 105 87 -8.5449219000000e-04 106 87 7.4786250000000e+04 107 87 7.4786312000000e+04 108 87 -1.2564100000000e+05 109 87 2.6175200000000e+06 110 87 -7.4786312000000e+04 88 88 1.4999998000000e+08 89 88 1.2820510000000e+06 90 88 -7.4786437000000e+04 91 88 1.9230770000000e+06 105 88 -7.4786312000000e+04 106 88 9.6153800000000e+06 107 88 -1.2179482000000e+07 108 88 -2.6175200000000e+06 109 88 2.8846144000000e+07 110 88 5.7692280000000e+06 89 89 1.4999998000000e+08 90 89 2.6175220000000e+06 91 89 5.7692310000000e+06 105 89 -7.4786375000000e+04 106 89 -1.2179482000000e+07 107 89 9.6153820000000e+06 108 89 7.4786312000000e+04 109 89 5.7692280000000e+06 110 89 1.9230760000000e+06 90 90 2.5128206000000e+05 91 90 4.6367419000000e+05 108 90 -8.5449219000000e-04 109 90 7.4786250000000e+04 110 90 7.4786312000000e+04 111 90 -6.2820488000000e+04 112 90 1.0769230000000e+06 91 91 7.5000000000000e+07 108 91 -7.4786312000000e+04 109 91 9.6153800000000e+06 110 91 -1.2179482000000e+07 111 91 -1.5405980000000e+06 112 91 1.4423071000000e+07 92 92 7.5000000000000e+07 93 92 2.6175210000000e+06 94 92 5.7692310000000e+06 95 92 2.8846160000000e+07 113 92 9.6153850000000e+05 93 93 5.0256412000000e+05 94 93 7.0312500000000e-01 95 93 -1.3281250000000e-01 96 93 -1.2564106000000e+05 97 93 7.4786375000000e+04 98 93 -2.6175220000000e+06 113 93 7.4786312000000e+04 114 93 -1.2564106000000e+05 115 93 2.6175220000000e+06 116 93 -7.4786375000000e+04 94 94 1.5000000000000e+08 95 94 1.2820510000000e+06 96 94 -7.4786250000000e+04 97 94 1.9230770000000e+06 98 94 5.7692310000000e+06 113 94 -1.2179488000000e+07 114 94 -2.6175220000000e+06 115 94 2.8846160000000e+07 116 94 5.7692320000000e+06 95 95 1.5000000000000e+08 96 95 2.6175220000000e+06 97 95 5.7692320000000e+06 98 95 2.8846160000000e+07 113 95 9.6153840000000e+06 114 95 7.4786250000000e+04 115 95 5.7692320000000e+06 116 95 1.9230770000000e+06 96 96 5.0256412000000e+05 97 96 2.8906250000000e-01 98 96 3.9843750000000e-01 99 96 -1.2564100000000e+05 100 96 7.4786375000000e+04 101 96 -2.6175210000000e+06 114 96 2.4414062000000e-04 115 96 7.4786250000000e+04 116 96 7.4786375000000e+04 117 96 -1.2564100000000e+05 118 96 2.6175210000000e+06 119 96 -7.4786312000000e+04 97 97 1.5000000000000e+08 98 97 1.2820510000000e+06 99 97 -7.4786312000000e+04 100 97 1.9230770000000e+06 101 97 5.7692300000000e+06 114 97 -7.4786437000000e+04 115 97 9.6153870000000e+06 116 97 -1.2179488000000e+07 117 97 -2.6175210000000e+06 118 97 2.8846160000000e+07 119 97 5.7692310000000e+06 98 98 1.5000000000000e+08 99 98 2.6175210000000e+06 100 98 5.7692310000000e+06 101 98 2.8846144000000e+07 114 98 -7.4786250000000e+04 115 98 -1.2179491000000e+07 116 98 9.6153850000000e+06 117 98 7.4786312000000e+04 118 98 5.7692310000000e+06 119 98 1.9230770000000e+06 99 99 5.0256412000000e+05 100 99 2.5000000000000e-01 101 99 -2.7343750000000e-01 102 99 -1.2564100000000e+05 103 99 7.4786187000000e+04 104 99 -2.6175210000000e+06 117 99 3.6621094000000e-04 118 99 7.4786500000000e+04 119 99 7.4786187000000e+04 120 99 -1.2564100000000e+05 121 99 2.6175210000000e+06 122 99 -7.4786187000000e+04 100 100 1.5000000000000e+08 101 100 1.2820520000000e+06 102 100 -7.4786437000000e+04 103 100 1.9230780000000e+06 104 100 5.7692310000000e+06 117 100 -7.4786250000000e+04 118 100 9.6153880000000e+06 119 100 -1.2179493000000e+07 120 100 -2.6175220000000e+06 121 100 2.8846160000000e+07 122 100 5.7692310000000e+06 101 101 1.5000000000000e+08 102 101 2.6175220000000e+06 103 101 5.7692320000000e+06 104 101 2.8846160000000e+07 117 101 -7.4786437000000e+04 118 101 -1.2179487000000e+07 119 101 9.6153850000000e+06 120 101 7.4786437000000e+04 121 101 5.7692310000000e+06 122 101 1.9230770000000e+06 102 102 5.0256412000000e+05 103 102 -1.5234375000000e+00 104 102 -7.8125000000000e-02 105 102 -1.2564100000000e+05 106 102 7.4786250000000e+04 107 102 -2.6175210000000e+06 120 102 -8.5449219000000e-04 121 102 7.4786312000000e+04 122 102 7.4786312000000e+04 123 102 -1.2564100000000e+05 124 102 2.6175200000000e+06 125 102 -7.4786250000000e+04 103 103 1.5000000000000e+08 104 103 1.2820520000000e+06 105 103 -7.4786437000000e+04 106 103 1.9230770000000e+06 107 103 5.7692300000000e+06 120 103 -7.4786312000000e+04 121 103 9.6153820000000e+06 122 103 -1.2179484000000e+07 123 103 -2.6175200000000e+06 124 103 2.8846144000000e+07 125 103 5.7692280000000e+06 104 104 1.5000000000000e+08 105 104 2.6175210000000e+06 106 104 5.7692300000000e+06 107 104 2.8846144000000e+07 120 104 -7.4786312000000e+04 121 104 -1.2179484000000e+07 122 104 9.6153820000000e+06 123 104 7.4786312000000e+04 124 104 5.7692300000000e+06 125 104 1.9230760000000e+06 105 105 5.0256419000000e+05 106 105 9.4531250000000e-01 107 105 -1.0156250000000e+00 108 105 -1.2564106000000e+05 109 105 7.4786625000000e+04 110 105 -2.6175230000000e+06 123 105 -1.2207031000000e-04 124 105 7.4786312000000e+04 125 105 7.4786250000000e+04 126 105 -1.2564106000000e+05 127 105 2.6175230000000e+06 128 105 -7.4786625000000e+04 106 106 1.5000002000000e+08 107 106 1.2820510000000e+06 108 106 -7.4786062000000e+04 109 106 1.9230780000000e+06 110 106 5.7692330000000e+06 123 106 -7.4786312000000e+04 124 106 9.6153820000000e+06 125 106 -1.2179482000000e+07 126 106 -2.6175220000000e+06 127 106 2.8846160000000e+07 128 106 5.7692340000000e+06 107 107 1.5000002000000e+08 108 107 2.6175220000000e+06 109 107 5.7692350000000e+06 110 107 2.8846160000000e+07 123 107 -7.4786250000000e+04 124 107 -1.2179482000000e+07 125 107 9.6153790000000e+06 126 107 7.4786062000000e+04 127 107 5.7692330000000e+06 128 107 1.9230780000000e+06 108 108 5.0256425000000e+05 109 108 4.2109375000000e+00 110 108 1.6250000000000e+00 111 108 -1.2564100000000e+05 112 108 7.4786500000000e+04 127 108 7.4786687000000e+04 128 108 7.4786250000000e+04 129 108 -1.2564119000000e+05 130 108 2.6175240000000e+06 131 108 -7.4786125000000e+04 109 109 1.5000006000000e+08 110 109 1.2820520000000e+06 111 109 -7.4786187000000e+04 112 109 1.9230770000000e+06 126 109 -7.4786250000000e+04 127 109 9.6154010000000e+06 128 109 -1.2179514000000e+07 129 109 -2.6175250000000e+06 130 109 2.8846192000000e+07 131 109 5.7692380000000e+06 110 110 1.5000005000000e+08 111 110 2.6175210000000e+06 112 110 5.7692320000000e+06 126 110 -7.4786687000000e+04 127 110 -1.2179502000000e+07 128 110 9.6154010000000e+06 129 110 7.4786687000000e+04 130 110 5.7692390000000e+06 131 110 1.9230790000000e+06 111 111 2.5128194000000e+05 112 111 4.6367419000000e+05 129 111 9.7656250000000e-04 130 111 7.4785812000000e+04 131 111 7.4786750000000e+04 132 111 -6.2820441000000e+04 133 111 1.0769220000000e+06 112 112 7.4999952000000e+07 129 112 -7.4786750000000e+04 130 112 9.6153810000000e+06 131 112 -1.2179472000000e+07 132 112 -1.5405970000000e+06 133 112 1.4423061000000e+07 113 113 7.5000000000000e+07 114 113 2.6175220000000e+06 115 113 5.7692310000000e+06 116 113 2.8846160000000e+07 134 113 9.6153850000000e+05 114 114 5.0256419000000e+05 115 114 -4.6875000000000e-02 116 114 -2.1093750000000e-01 117 114 -1.2564106000000e+05 118 114 7.4786375000000e+04 119 114 -2.6175220000000e+06 134 114 7.4786312000000e+04 135 114 -1.2564106000000e+05 136 114 -7.4786375000000e+04 115 115 1.5000002000000e+08 116 115 1.2820510000000e+06 117 115 -7.4786312000000e+04 118 115 1.9230770000000e+06 119 115 5.7692310000000e+06 134 115 -1.2179488000000e+07 135 115 -2.6175220000000e+06 136 115 5.7692320000000e+06 116 116 1.5000002000000e+08 117 116 2.6175220000000e+06 118 116 5.7692320000000e+06 119 116 2.8846160000000e+07 134 116 9.6153840000000e+06 135 116 7.4786250000000e+04 136 116 1.9230770000000e+06 117 117 5.0256419000000e+05 118 117 7.8125000000000e-03 119 117 -1.4843750000000e-01 120 117 -1.2564106000000e+05 121 117 7.4786312000000e+04 122 117 -2.6175220000000e+06 135 117 2.4414062000000e-04 136 117 7.4786375000000e+04 137 117 -1.2564100000000e+05 138 117 -7.4786312000000e+04 118 118 1.5000002000000e+08 119 118 1.2820510000000e+06 120 118 -7.4786437000000e+04 121 118 1.9230770000000e+06 122 118 5.7692310000000e+06 135 118 -7.4786437000000e+04 136 118 -1.2179488000000e+07 137 118 -2.6175210000000e+06 138 118 5.7692310000000e+06 119 119 1.5000002000000e+08 120 119 2.6175220000000e+06 121 119 5.7692310000000e+06 122 119 2.8846160000000e+07 135 119 -7.4786250000000e+04 136 119 9.6153850000000e+06 137 119 7.4786312000000e+04 138 119 1.9230770000000e+06 120 120 5.0256412000000e+05 121 120 2.3437500000000e-02 122 120 2.8125000000000e-01 123 120 -1.2564106000000e+05 124 120 7.4786500000000e+04 125 120 -2.6175220000000e+06 137 120 2.4414062000000e-04 138 120 7.4786375000000e+04 139 120 -1.2564100000000e+05 140 120 -7.4786500000000e+04 121 121 1.5000000000000e+08 122 121 1.2820510000000e+06 123 121 -7.4786187000000e+04 124 121 1.9230770000000e+06 125 121 5.7692310000000e+06 137 121 -7.4786437000000e+04 138 121 -1.2179482000000e+07 139 121 -2.6175210000000e+06 140 121 5.7692320000000e+06 122 122 1.5000002000000e+08 123 122 2.6175210000000e+06 124 122 5.7692320000000e+06 125 122 2.8846160000000e+07 137 122 -7.4786125000000e+04 138 122 9.6153810000000e+06 139 122 7.4786187000000e+04 140 122 1.9230770000000e+06 123 123 5.0256400000000e+05 124 123 1.1640625000000e+00 125 123 1.3359375000000e+00 126 123 -1.2564100000000e+05 127 123 7.4786312000000e+04 128 123 -2.6175200000000e+06 139 123 9.7656250000000e-04 140 123 7.4786375000000e+04 141 123 -1.2564100000000e+05 142 123 -7.4786187000000e+04 124 124 1.4999998000000e+08 125 124 1.2820510000000e+06 126 124 -7.4786312000000e+04 127 124 1.9230760000000e+06 128 124 5.7692280000000e+06 139 124 -7.4786375000000e+04 140 124 -1.2179494000000e+07 141 124 -2.6175220000000e+06 142 124 5.7692310000000e+06 125 125 1.4999998000000e+08 126 125 2.6175200000000e+06 127 125 5.7692280000000e+06 128 125 2.8846144000000e+07 139 125 -7.4786312000000e+04 140 125 9.6153890000000e+06 141 125 7.4786500000000e+04 142 125 1.9230770000000e+06 126 126 5.0256406000000e+05 127 126 -3.1093750000000e+00 128 126 -2.7187500000000e+00 129 126 -1.2564106000000e+05 130 126 7.4785812000000e+04 131 126 -2.6175220000000e+06 141 126 -1.2207031000000e-04 142 126 7.4786250000000e+04 143 126 -1.2564094000000e+05 144 126 -7.4786125000000e+04 127 127 1.5000000000000e+08 128 127 1.2820520000000e+06 129 127 -7.4786937000000e+04 130 127 1.9230780000000e+06 131 127 5.7692350000000e+06 141 127 -7.4786312000000e+04 142 127 -1.2179482000000e+07 143 127 -2.6175190000000e+06 144 127 5.7692270000000e+06 128 128 1.5000002000000e+08 129 128 2.6175230000000e+06 130 128 5.7692330000000e+06 131 128 2.8846160000000e+07 141 128 -7.4786250000000e+04 142 128 9.6153790000000e+06 143 128 7.4786375000000e+04 144 128 1.9230750000000e+06 129 129 5.0256425000000e+05 130 129 -3.5390625000000e+00 131 129 1.3046875000000e+00 132 129 -1.2564100000000e+05 133 129 7.4786562000000e+04 143 129 7.3242187000000e-04 144 129 7.4786250000000e+04 145 129 -1.2564100000000e+05 146 129 -7.4786562000000e+04 130 130 1.5000005000000e+08 131 130 1.2820500000000e+06 132 130 -7.4786062000000e+04 133 130 1.9230760000000e+06 143 130 -7.4786250000000e+04 144 130 -1.2179474000000e+07 145 130 -2.6175200000000e+06 146 130 5.7692300000000e+06 131 131 1.5000000000000e+08 132 131 2.6175200000000e+06 133 131 5.7692300000000e+06 143 131 -7.4786250000000e+04 144 131 9.6153740000000e+06 145 131 7.4786000000000e+04 146 131 1.9230760000000e+06 132 132 2.5128200000000e+05 133 132 4.6367700000000e+05 145 132 9.7656250000000e-04 146 132 7.4786375000000e+04 147 132 -6.2820547000000e+04 133 133 7.4999984000000e+07 145 133 -7.4786375000000e+04 146 133 -1.2179494000000e+07 147 133 -1.5405990000000e+06 134 134 4.4230768000000e+07 135 134 1.5405980000000e+06 136 134 1.4423078000000e+07 135 135 2.5128206000000e+05 136 135 -4.6367525000000e+05 137 135 -6.2820520000000e+04 138 135 -1.0769230000000e+06 136 136 7.5000000000000e+07 137 136 1.5405980000000e+06 138 136 1.4423078000000e+07 137 137 2.5128206000000e+05 138 137 -4.6367462000000e+05 139 137 -6.2820488000000e+04 140 137 -1.0769230000000e+06 138 138 7.4999984000000e+07 139 138 1.5405980000000e+06 140 138 1.4423071000000e+07 139 139 2.5128206000000e+05 140 139 -4.6367625000000e+05 141 139 -6.2820543000000e+04 142 139 -1.0769240000000e+06 140 140 7.5000016000000e+07 141 140 1.5405990000000e+06 142 140 1.4423084000000e+07 141 141 2.5128206000000e+05 142 141 -4.6367419000000e+05 143 141 -6.2820488000000e+04 144 141 -1.0769230000000e+06 142 142 7.5000000000000e+07 143 142 1.5405980000000e+06 144 142 1.4423071000000e+07 143 143 2.5128187000000e+05 144 143 -4.6367400000000e+05 145 143 -6.2820441000000e+04 146 143 -1.0769220000000e+06 144 144 7.4999936000000e+07 145 144 1.5405970000000e+06 146 144 1.4423061000000e+07 145 145 2.5128200000000e+05 146 145 -4.6367694000000e+05 147 145 -6.2820543000000e+04 146 146 7.4999984000000e+07 147 146 1.5405990000000e+06 147 147 1.2564106000000e+05 Matrix/inst/external/pores_1.mtx0000644000176200001440000001131210275433311016414 0ustar liggesusers%%MatrixMarket matrix coordinate real general 30 30 180 1 1 -9.4810113490000e+02 2 1 -7.1785016460000e+06 3 1 4.7312729960000e+00 4 1 3.5742618540000e+04 11 1 9.4625459920000e+02 12 1 7.1341308750000e+06 1 2 2.3349693090000e+04 2 2 -2.4613410870000e+07 3 2 -3.0051645960000e+03 4 2 1.2934346290000e+07 11 2 -3.6807151210000e+03 12 2 6.1495431850000e+06 1 3 4.7312729960000e+00 2 3 3.5670210950000e+04 3 3 -3.1208606780000e+03 4 3 -3.2500820450000e+06 5 3 1.5522075550000e+01 6 3 1.6287803340000e+04 13 3 3.1044151100000e+03 14 3 3.1914882100000e+06 3 4 2.9953986350000e+04 4 4 -1.0035133800000e+07 5 4 -7.8658863460000e+03 6 4 6.3330904920000e+06 13 4 -5.2284380090000e+03 14 4 -1.1610330070000e+06 3 5 1.5522075550000e+01 4 5 1.5956339430000e+04 5 5 -5.9720828860000e+03 6 5 -1.6395834630000e+06 7 5 2.9661271480000e+01 8 5 8.7000917550000e+03 15 5 5.9322542970000e+03 16 5 1.6097273710000e+06 5 6 1.7473258330000e+04 6 6 -4.1182170880000e+06 7 6 -2.7076007450000e+02 8 6 -7.3466724480000e+04 15 6 -4.0817635000000e+01 16 6 -1.1075258970000e+04 5 7 2.9661271480000e+01 6 7 8.0481454440000e+03 7 7 -5.9475459880000e+03 8 7 -1.3740635160000e+06 9 7 2.9419951740000e+01 10 7 6.7909579670000e+03 17 7 5.8839903490000e+03 18 7 1.3581915900000e+06 7 8 1.1788389530000e+01 8 8 -6.0472270900000e+03 10 8 7.0730320960000e+02 18 8 7.7968763160000e+01 7 9 2.9419951740000e+01 8 9 6.7909579510000e+03 9 9 -5.9713573530000e+03 10 9 -1.3323692060000e+06 19 9 5.9491819500000e+03 20 9 1.3189422360000e+06 9 10 1.8213815350000e+04 10 10 -2.5059847620000e+06 19 10 -2.4969274700000e+02 20 10 -5.5328319620000e+04 1 11 9.4625459920000e+02 2 11 7.1340421910000e+06 11 11 -2.7807437790000e+03 12 11 -7.7182097420000e+06 13 11 4.4060542710000e+00 14 11 1.4480734490000e+03 21 11 1.8358559460000e+03 22 11 5.7572487430000e+05 11 12 2.5797297290000e+04 12 12 -9.2407184210000e+06 13 12 -1.1588958390000e+02 14 12 2.3027380050000e+05 21 12 -6.8657039450000e+02 22 12 7.1253609460000e+05 3 13 3.1044151100000e+03 4 13 3.1912678870000e+06 11 13 4.4060542710000e+00 12 13 1.3807829320000e+03 13 13 -4.7848602210000e+03 14 13 -3.5808334290000e+06 15 13 3.9963378410000e+00 16 13 9.2558550540000e+02 23 13 1.6651407670000e+03 24 13 3.8566062220000e+05 13 14 1.8139423920000e+01 14 14 -8.4585448840000e+03 16 14 1.0738622860000e+02 24 14 2.6158080350000e+02 5 15 5.9322542970000e+03 6 15 1.6096290890000e+06 13 15 3.9963378410000e+00 14 15 9.2558549330000e+02 15 15 -7.6610458140000e+03 16 15 -2.0016469780000e+06 17 15 4.1131980110000e+00 18 15 9.3265571700000e+02 25 15 1.7138325050000e+03 26 15 3.8860654870000e+05 15 16 1.8316189080000e+01 16 16 -8.4066950400000e+03 18 16 1.0674546920000e+02 26 16 8.0723176430000e+01 7 17 5.8839903490000e+03 8 17 1.3581915900000e+06 15 17 4.1131980110000e+00 16 17 9.3265571690000e+02 17 17 -7.6966204670000e+03 18 17 -1.7682272950000e+06 19 17 4.3138675330000e+00 20 17 9.7583624590000e+02 27 17 1.7974448050000e+03 28 17 4.0659843580000e+05 17 18 1.8104876340000e+01 18 18 -8.2868969120000e+03 20 18 1.0561495530000e+02 28 18 5.1700319220000e+01 9 19 5.9491819500000e+03 10 19 1.3182531100000e+06 17 19 4.3138675330000e+00 18 19 9.7583624590000e+02 19 19 -7.8034482760000e+03 20 19 -1.7423949200000e+06 29 19 1.8608642830000e+03 30 19 4.1338216070000e+05 19 20 2.7213686810000e+04 20 20 -3.7862462010000e+06 29 20 -2.7268589770000e+02 30 20 -6.0465513710000e+04 11 21 1.8358559460000e+03 12 21 5.7532622180000e+05 21 21 -1.8730197800000e+03 22 21 -5.8390768360000e+05 23 21 2.5519125110000e+01 24 21 5.8925928100000e+03 21 22 3.0689873960000e+01 22 22 -1.4220855320000e+04 24 22 5.2041902550000e+02 13 23 1.6651407670000e+03 14 23 3.8566062220000e+05 21 23 2.5519125110000e+01 22 23 5.8925927520000e+03 23 23 -1.7282309830000e+03 24 23 -4.0006143080000e+05 25 23 2.5979289500000e+01 26 23 5.8831777310000e+03 23 24 3.1037943720000e+01 24 24 -1.4640445490000e+04 26 24 7.0608811070000e+02 15 25 1.7138325050000e+03 16 25 3.8860654870000e+05 23 25 2.5979289500000e+01 24 25 5.8831777300000e+03 25 25 -1.7785733520000e+03 26 25 -4.0325726390000e+05 27 25 2.7334717910000e+01 28 25 6.1828826750000e+03 25 26 3.0617826380000e+01 26 26 -1.4459345430000e+04 28 26 7.1015603570000e+02 17 27 1.7974448050000e+03 18 27 4.0659843580000e+05 25 27 2.7334717910000e+01 26 27 6.1828826750000e+03 27 27 -1.8647846840000e+03 28 27 -4.2182964720000e+05 29 27 2.8739153910000e+01 30 27 6.5001941810000e+03 27 28 3.0184152090000e+01 28 28 -1.4268956760000e+04 30 28 7.1493041500000e+02 19 29 1.8608642830000e+03 20 29 4.1262902020000e+05 27 29 2.8739153910000e+01 28 29 6.5001941810000e+03 29 29 -1.8714356470000e+03 30 29 -4.3693045430000e+05 29 30 4.4912526670000e+04 30 30 -6.3991790180000e+06 Matrix/inst/external/USCounties_slots.rda0000644000176200001440000007321310770571602020305 0ustar liggesusers},=On!&@$ <[p@[m՛oUWW̬/FQ9t% Ր+.1*jIΧa"6)[8*1rYP]ռ߮$#/x{Ȼwu =^I18ȣB}Q,LPk9ڗ ~<>uK$(mY|m/u|)ӓ+yEs:z#r' 6M#+"]+"ö:y?`GVvS>tէ^G Ę P.18BB#M%f~#NKowy.4ab6Cy!?C>^~9_̒ƉY1x!KLg= ye)^'\_ qQbQ_KKyG%V\Rlsl\[̦,^Z_%XڔcIKUk1u=$ZzLkPV؉yxɻ&ۼWe=Rw /jebw5)ŲJr:Nobb6,'a|O`O?!q)K捠w77K IHWb/˵dRqMbwx1NbON̂WB@,=bzM_~7lړ؟Gx_xH;.#CmdڼAǁNμrǘ8m=e13c{t ą ^D3xO>kOy`w^]aPOYϼsS&}9nCނ `*Xb1q(徎zZٳXϿԋx"q6v]##$Kb؈`<s\Gr8ۅ%x%qޤyzp8mQ$9חg]϶ODЕxulStr*y Ǩ?YLR)ƞ=3OkMذء=>?_&~WcYȁج{/;BlYŞ/Uu /׉׉Lr-}|c];ዘ/>Mw>]Y}8pajlGllXlqΟahhdlETUCʟMS-Oщ_~H},)냔S|'bgԩg3w,$$a1ke4*%N{ݠ~\<1+MP^>HYkO^Ϭ\«I^Ιog6~ƙ.ђے{0*(Oow 1Wq\r߈'+1b$bCϒ듫,45XUra \e%1_Rfy]m:\Mxˋ?f]{sk9\i?%{{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>ҏѽ~T^oMA-Z\)z'C:G x~J$j?J>WnujhS`7?e/$}|-jr g27xXaمYZ<)4U%ϧi0~cYeی޴||Ym/_q}[Ȗ?v~ߢUϑ>HӼS]/xh~^I,}/br0;t??YoZ%ϫ͏?,n#I: VtFMatrix/inst/external/CAex_slots.rda0000644000176200001440000000321010464427703017054 0ustar liggesuserskXi:P I$9)PɤR%+l$eqQE(.j)PH'9r_w~uz};9@Y2~SsG_7EZ(x񸟫_m lk AcQod EH CNH !g-j8rA8@&2A5DHBnH""34CHtrGXI?B4Y#$B6h2F#}pkI:u Ѐ߃s0`=?.cs>h*Gh6 B(-BKP8@+*C(%$3@P ڇtteLNlt")GW5TQ HEkT͚~),? 3&vnX=z;HD_ߋ4s`yVw #/8h28hwdA=@'8I7,惽`FiKSQHrک7䑎̺.:n~?#a0Lޣ9P[hmͽu+p5z^lV=O´ּы-vh8,Xu+m0u`ˍ?pt$0Mg)* aJ]8!S?A⍟ƮyeJe'|[SUV8ڵe,XEtS.jtL8w57ulsEu#=:sbCI{l73(7zQ,Zr؉]1V<*ߎ7ܰBG>T9>nZurÊծ [)7vmeIwC(7 f{sC [kZұrJ_Nˬ Z]k)N(7DM) D_Ga"֍z5kSnXygPS`Q50rnX VK UKܰ2hזB͠O 3Iv#lj1T-&SnX빬owfHa'4A2kܸfŌ4Nhx^faYMatJٞ; N}CaE'J0&o(7Lqru,0a{c- 冽g~= y*^QPnlEx |srd' J^jSPn,Aկ ?2M}Ca^kRPnlX|9 0 4jQPn|}A7&SSk99ދrM>7nLɍsZ7$1=rӝOo(7L%|p7I T)N{+ s1 Matrix/inst/external/symW.rda0000644000176200001440000000251012214433704015742 0ustar liggesusersV PTe]ayc\ Dh9B#:?Fc>AN} O$y21F.Ð#6T&iTSE%b**$SOJ5#TjrJ=nBsY$gۃG ! bMKd w@~̞5u,HHб<\>& zqh{dG=]+ eߪ$mgGWZI`ud}/BzE~qbx'PW]tˀW5jp> `GxegO>R~EhX}9T2x]Z>4G5pݾ 0WwP!ylDF Ծw'/dG}(\,6@6lrn 4ku s_RdvfTNf3KZgwr=M< )>~c6ATsv1alSR7Mi7c)bޜѧLij/K)fr Matrix/inst/external/utm300.rua0000644000176200001440000024553510275433311016073 0ustar liggesusersUTM300 UTM300 1290 16 122 1052 100 RUA 300 300 3155 1 (20I4) (26I3) (3D21.15) (3D21.15) FNN 1 1 3 9 13 17 20 22 28 32 36 44 46 52 56 60 68 69 70 72 74 82 83 84 86 88 96 97 98 100 102 110 111 112 114 116 124 126 132 136 140 148 150 156 160 164 172 174 178 182 186 189 191 196 201 208 217 225 242 257 279 297 306 324 339 355 374 382 399 415 431 451 458 475 491 511 531 538 555 571 591 611 619 637 653 669 689 697 714 729 744 763 771 775 790 812 831 833 837 842 849 858 860 865 870 877 886 895 912 928 950 970 979 9971013103110511060107710931111 11311140115711731195121512241241125712791299130813261342136013801389140614221440 14601469147314891511153115331537154215491558156015651570157715861594161116271649 16691677169417101732175217611778179418161836184518621878190019201929194619621984 20042013203020462068208820972114213021522172218021842200222222422244224822532260 22692271227622812288229723052322233723592379238724042419244124612470248725022524 25442553257025852607262726362653266826902710271927362751277327922800281728322854 28742883288729022924294329452949295429612970297229782980298229852987299329952997 30053007301330153017302530273033303530373045304730533055305730653067307330753077 30853087309330953097310431063112311431163124312631323134313631433145314931513153 3156 1 51 1 2 6 51 52 56 1 3 51 53 1 4 51 54 5 10 55 6 56 6 7 11 56 57 61 6 8 56 58 6 9 56 59 6 8 9 10 56 58 59 60 11 61 11 12 36 61 62 86 11 13 61 63 11 14 61 64 11 13 14 15 61 63 64 65 16 17 16 18 16 19 16 18 19 20 66 68 69 70 21 22 21 23 21 24 21 23 24 25 71 73 74 75 26 27 26 28 26 29 26 28 29 30 76 78 79 80 31 32 31 33 31 34 31 33 34 35 81 83 84 85 36 86 36 37 41 86 87 91 36 38 86 88 36 39 86 89 36 38 39 40 86 88 89 90 41 91 41 42 46 91 92 96 41 43 91 93 41 44 91 94 41 43 44 45 91 93 94 95 46 96 46 47 96 97 46 48 96 98 46 49 96 99 45 50100 51 56 51 52 53 54 56 51 52 53 56 58 51 52 54 56 57 59 61 51 52 53 54 55 56 58 59 60 6 51 52 56 57 58 60106 6 7 11 51 52 56 57 58 59 61 62 63 64 86106107111 6 8 51 52 53 56 57 58 59 60 61 63106108109 1 2 6 7 9 11 51 52 54 56 57 58 59 60 61 64101102106107109111 6 9 10 51 54 55 56 58 59 60 61 63 64 65106108109110 11 56 57 61 62 63 65 86111 11 12 36 56 57 61 62 63 64 86 87 88 89 91111112116136 11 13 56 57 58 61 62 63 64 65 86 88111113114 6 7 11 14 56 57 59 61 62 63 64 65 86 89111114 11 14 15 56 58 59 60 61 63 64 65 86 88 89 90111113114115 16 66 67 68 70 81 82116 16 17 21 66 67 68 69 71 72 73 74 76 81 82116117121 16 18 19 66 67 68 69 70 71 73 81 82 83116118119 16 17 19 32 66 67 68 69 70 71 74 81 82 84116119 16 18 19 20 66 68 69 70 71 73 74 75 81 83 84 85116118119120 21 67 71 72 73 75121 21 22 26 66 67 71 72 73 74 76 77 78 79 81121122126 21 23 24 66 67 68 71 72 73 74 75 76 78121123124 17 21 22 24 66 67 69 71 72 73 74 75 76 79116117121122124126 21 23 24 25 66 68 69 70 71 73 74 75 76 78 79 80121123124125 26 72 76 77 78 80126 26 27 31 66 71 72 76 77 78 79 81 82 83 84126127131 26 28 29 71 72 73 76 77 78 79 80 81 83126128129 22 26 27 29 71 72 74 76 77 78 79 80 81 84121122126127129131 26 28 29 30 71 73 74 75 76 78 79 80 81 83 84 85126128129130 31 66 77 81 82 83 85131 16 31 32 66 67 68 69 71 76 77 81 82 83 84116131132136 31 33 34 66 68 76 77 78 81 82 83 84 85131 133134 27 31 32 34 66 69 76 77 79 81 82 83 84 85131134 31 33 34 35 66 68 69 70 76 78 79 80 81 83 84 85131133134135 36 61 62 86 87 88 90136 36 37 41 61 62 86 87 88 89 91 92 93 94 96136137141 36 38 61 62 63 86 87 88 89 90 91 93136138139 36 37 39 61 62 64 86 87 88 89 90 91 94136139 36 39 40 61 63 64 65 86 88 89 90 91 93 94 95136138139140 41 86 87 91 92 93 95141 91 92 96 97 41 43 86 87 88 91 92 93 94 95 96 98141143144 36 37 41 42 44 46 86 87 89 91 92 93 94 95 96 99136 137141142144146 41 44 45 86 88 89 90 91 93 94 95 96 98 99100141143144145 91 96 96 97 98 99 91 92 93 96 98 86 87 91 92 94 96 99 91 92 93 94 95 96 98 99100101 106101102103104106101102103106108101102104106107109111101102103104105106108109 110 56101102106107108110111156 56 57 61101102106107108109111112113114116156157 161 56 58 59101102103106107108109110111113156158159 51 52 56 57 59 61101102104 106107108109110111114151152156157159161 56 58 59 60101103104105106108109110111 113114115156158159160 61106107111112113115116161 61 62 86106107111112113114116 117118119121136161162166 61 63 64106107108111112113114115116118161163164 61 64 106107109111112113114115116119156157161162164166 61 63 64 65106108109110111113 114115116118119120161163164165 66111112116117118120121166 66 67 71111112116117 118119121122123124126166167171 66 68 69111112113116117118119120121123166168169 66 69111112114116117118119120121124161162166167169171 66 68 69 70111113114115 116118119120121123124125166168169170 71116117121122123125126171 71 72 76116117 121122123124126127128129131171172176 71 73 74116117118121122123124125126128171 173174 66 67 71 72 74 76116117119121122123124125126129166167171172174176 71 73 74 75116118119120121123124125126128129130171173174175 76121122126127128130131 176 76 77 81121122126127128129131132133134136176177181 76 78 79121122123126127 128129130131133176178179 71 72 76 77 79 81121122124126127128129130131134171172 176177179181 76 78 79 80121123124125126128129130131133134135176178179180 81126 127131132133135136181 66 81 82116126127131132133134136137138139141181182186 81 83 84126127128131132133134135136138181183184 81 84126127129131132133134135136 139176177181182184186 81 83 84 85126128129130131133134135136138139140181183184 185 86131132136137138140141186 86 87 91131132136137138139141142143144146186187 191 86 88 89131132133136137138139140141143186188189 86 89131132134136137138139 140141144181182186187189191 86 88 89 90131133134135136138139140141143144145186 188189190 91136137141142143145146191141142146147 91 93 94136137138141142143144 145146148191193194 86 87 91 92 94 96136137139141142143144145146149186187191192 194196 91 93 94 95136138139140141143144145146148149150191193194195141146146147 148149141142143146148136137141142144146149141142143144145146148149150151156151 152153154156151152153156158151152154156157159161151152153154155156158159160106 151152156157158160206106107111151152156157158159161162163164166206207211106108 109151152153156157158159160161163206208209101102106107109111151152154156157158 159160161164201202206207209211106108109110151153154155156158159160161163164165 206208209210111157161162163165166211111112116156157161162163164166167168169171 211212216111113114156157158161162163164165166168211213214106107111112114116156 157159161162163164165166169206207211212214216111113114115156158159160161163164 165166168169170211213214215116161162166167168170171216116117121161162166167168 169171172173174176216217221116118119161162163166167168169170171173216218219111 112116117119121161162164166167168169170171174211212216217219221116118119120161 163164165166168169170171173174175216218219220121166167171172173175176221121122 126166167171172173174176177178179181221222226121123124166167168171172173174175 176178221223224116117121122124126166167169171172173174175176179216217221222224 226121123124125166168169170171173174175176178179180221223224225126171172176177 178180181226126127131171172176177178179181182183184186226227231126128129171172 173176177178179180181183226228229121122126127129131171172174176177178179180181 184221222226227229231126128129130171173174175176178179180181183184185226228229 230131176177181182183185186231131132136176177181182183184186187188189191231232 236131133134176177178181182183184185186188231233234126127131132134136176177179 181182183184185186189226227231232234236131133134135176178179180181183184185186 188189190231233234235136181182186187188190191236136137141181182186187188189191 192193194196236237241136138139181182183186187188189190191193236238239131132136 137139141181182184186187188189190191194231232236237239241136138139140181183184 185186188189190191193194195236238239240141186187191192193195241191192196197141 143144186187188191192193194195196198241243244136137141142144146186187189191192 193194195196199236237241242244246141143144145186188189190191193194195196198199 200241243244245191196196197198199191192193196198186187191192194196199191192193 194195196198199200201206201202203204206201202203206208201202204206207209211201 202203204205206208209210156202206207208210211256156157161201202206207208209211 212213214216256257261156158159201202203206207208209210211213256258151152156157 159161201202204206207208209210211214251252256257259261156158159160201203204205 206208209210211213214215256258259260161207211212213215216261161162166206207211 212213214216217218219221261262266161163164206207208211212213214215216218261263 156157161162164166206207209211212213214215216219256257261262264266161163164165 206208209210211213214215216218219220261263264265166211212216217218220221266166 167171211212216217218219221222223224226266267271166168169211212213216217218219 220221223266268161162166167169171211212214216217218219220221224261262266267269 271166168169170211213214215216218219220221223224225266268269270171216217221222 223225226271171172176216217221222223224226227228229231271272276171173174216217 218221222223224225226228271273166167171172174176216217219221222223224225226229 266267271272274276171173174175216218219220221223224225226228229230271273274275 176221222226227228230231276176177181221222226227228229231232233234236276277281 176178179221222223226227228229230231233276278171172176177179181221222224226227 228229230231234271272276277279281176178179180221223224225226228229230231233234 235276278279280181226227231232233235236281181182186226227231232233234236237238 239241281282286181183184226227228231232233234235236238281283176177181182184186 226227229231232233234235236239276277281282284286181183184185226228229230231233 234235236238239240281284285186231232236237238240286186187191231232236237238239 241242243244246286287291186188189231232233236237238239240241243286288181182186 187189191231232234236237238239240241244281282286287289291186188189190231233234 235236238239240241243244245286288289290191236237241242243245246291241242246247 191193194236237238241242243244245246248291293186187191192194196236237239241242 243244245246249286287291292294296191193194195236238239240241243244245246248249 250291294295241246246247248249241242243246248236237241242244246249241242243244 245246248249250201251201202206251252256251253251254205255260206256206207211256 257261256258256259206208209210256258259260211261211212216261262266261263261264 211213214215261263264265216266216217221266267271266268266269216218219220266268 269270221271221222226271272276271273271274221223224225271273274275226276226227 231276277281276278276279226228229230276278279280231281231232236281282286281283 281284231233234235281284285236286236237241286287291286288286289236238239240286 288289290241291241242246291292296291293291294241243244245291294295246296246247 296297296298296299250295300 -.707106816579618E+000.707106745793467E+00-.844334130890272E-01 -.696951911168316E+00-.844334130890552E-010.844333971430866E-01 0.696951959550198E+000.844333971430866E-010.169379293548785E-01 -.706903887803993E+00-.169379269811943E-010.706903887799719E+00 0.245538507221060E-01-.706680324381466E+00-.245538469074249E-01 0.706680363494609E+00-.816418512372678E+000.416234647777442E+00 0.400261827613855E+00-.707106816579739E+000.707106745793357E+00 -.692246657276026E-01-.700297003669988E+00-.692246686484270E-01 0.692246561667109E-010.700297003664129E+000.692246429669856E-01 0.201259425073776E-01-.706820307066788E+00-.201259404946509E-01 0.706820307062134E+000.247547275541103E-01-.706673335798275E+00 -.247547250784765E-010.706673335793667E+000.244951179721711E-01 0.141798045683355E-19-.699515386900931E+00-.100390257306135E+00 -.244951125432383E-010.403797585699602E-130.699515399846145E+00 0.100390257306048E+00-.707106840518851E+000.707106721854245E+00 -.132398684210425E-02-.707104302076665E+00-.132398682112846E-02 0.132398661033321E-020.707104302222497E+000.132398652689601E-02 0.251871166539414E-01-.706658056811822E+00-.251871127758866E-01 0.706658056805146E+000.264048027660490E-01-.706613622993380E+00 -.264047987662912E-010.706613586618012E+000.250107227346610E-01 0.259324348882091E-18-.669582765977545E+00-.225905619309715E+00 -.250107188007798E-010.166054197615496E-120.669582814615445E+00 0.225905627940471E+00-.999999999999996E+00-.100000000000000E+01 0.707106751263410E+00-.707106811109693E+000.707106751263400E+00 -.707106811109696E+000.594184615923025E-04-.522534802243499E-12 -.594354881940039E-04-.764126330976698E+00-.654895649435869E-04 -.555850754291422E-100.775951072359707E-040.645066611238772E+00 -.999999999999996E+00-.100000000000000E+010.707106751263410E+00 -.707106811109693E+000.707106751263407E+00-.707106811109700E+00 0.265041818209181E-04-.508541053041430E-12-.265118042346652E-04 -.757862392871900E+00-.311410747072004E-04-.431724688636464E-10 0.361816791523382E-040.652414431007056E+00-.999999999999996E+00 -.100000000000000E+010.707106751263410E+00-.707106811109693E+00 0.707106794782394E+00-.707106767590709E+000.247298538585594E-04 0.173057137779142E-12-.247369664563574E-04-.758133034802306E+00 -.288203567500599E-04-.373198365066270E-100.335135601768647E-04 0.652099914402839E+00-.999999999999996E+00-.100000000000000E+01 0.707106751263410E+00-.707106811109693E+000.707106773022893E+00 -.707106789350199E+000.526001426328733E-04-.686257777907160E-12 -.526151918089806E-04-.763904838719903E+00-.579153207211495E-04 -.480634147895882E-100.685730564085902E-040.645328895826580E+00 -.707106816579021E+000.707106745794075E+000.907453690126752E-01 -.695363616933204E+000.907453584845728E-01-.907453530938325E-01 0.695363616931083E+00-.907453541634382E-010.388412996851262E-01 -.706039176488765E+00-.388412958008106E-010.706039225852471E+00 0.405384669021764E-01-.705943788823106E+00-.405384601326821E-01 0.705943788819880E+000.374910477226837E-010.836910668696327E-19 -.653009130497729E+00-.268651354886250E+00-.374910441557599E-01 0.139197855810201E-120.653009053988256E+000.268651341635424E+00 -.707106816577767E+000.707106745795336E+000.110699028877342E+00 -.689558863568468E+000.110699028877342E+00-.110699023342189E+00 0.689558899694259E+00-.110699023342207E+000.353901421432703E-01 -.706220615039452E+00-.353901386042155E-010.706220587934077E+00 0.400455576932894E-01-.705971921162636E+00-.400455536886817E-01 0.705971921161698E+000.397033469335430E-010.518711104785870E-19 -.700067560303143E+00-.912639778518622E-01-.397033514193168E-01 0.669670689866494E-130.700067476628409E+000.912639778518489E-01 -.707106816577706E+000.707106745795397E+000.216163600604371E+00 -.673255732353994E+00-.216163567662612E+000.673255767625957E+00 0.343171978221466E-01-.706273565834579E+00-.343171943903884E-01 0.706273537877586E+000.384789098875664E-01-.706059044020112E+00 -.384789060396264E-010.706059044019181E+000.428340687803781E+00 -.816002001388647E+000.388155882219383E+00-.707106781186546E+00 0.707106781186546E+000.919164088258896E-12-.323903147050126E+00 -.668411207904565E+00-.668411136933422E+00-.392397821342358E-01 0.126741961371568E-010.848341585451701E-02-.686488249101334E+00 -.164737403383030E-010.726794259837522E+000.253811998949423E-01 0.427304877010395E-02-.713017416797165E+00-.242972297547323E-01 -.379326587583946E-020.700241968358579E+00-.374966055507997E-03 0.244954510496371E-01-.107305914771803E-020.854576884136081E-09 -.704999716109445E+00-.101177314154959E+00-.240417637527367E-01 0.106896353468138E-020.693652910717219E+000.101999329282549E+00 0.369802367784965E-02-.998478946766033E-080.628213615438288E+00 -.111695501554557E-01-.639775962557707E+000.441805243310407E+00 0.264916681259199E-010.150179388402961E-02-.323621717853948E-03 0.878267323059556E-020.250020432185017E-03-.492283767812116E-02 -.406353565923736E-010.234750587315863E-02-.173455232422632E+00 0.500624797585161E+000.467986775089445E+00-.171309845650195E-01 0.108659111149954E+00-.500624772325725E+00-.485548310627230E+00 0.203453546805473E-030.924723892346221E-040.596021551608855E-02 0.144977252778252E-030.727990528604067E-040.170446169406913E-02 -.713900928598815E-020.219802264290567E-010.370608562041904E+00 0.207893595583177E-01-.258848244250827E-01-.903242099366874E+00 0.922248994905455E-01-.305257817801369E-02-.700818827730815E-02 0.191302757843644E+000.148579185954640E-040.171121650781410E-02 0.486934889722714E-030.150620182701511E-040.124328766057256E-03 0.239016721169981E-030.115323810912666E-030.404520413743159E-02 0.113998101983268E-04-.207057801906026E-020.590390599498483E-01 0.229989382973123E+000.126638864121696E-01-.636607683510642E-01 0.320190435990360E+00-.860187903320348E+000.144893930539319E-02 -.120356442673852E-010.311102756171715E+00-.160900125595186E-05 -.788680156986552E-05-.220582013341250E-04-.808877643315356E-05 0.290559263145904E-02-.124362898928145E-05-.455696078386797E-02 0.130134687021089E+000.186761496719130E-01-.209760100786787E-01 0.603707240598609E+000.866404279134079E-010.268410288213005E-01 -.160761288050858E-02-.771455917360623E+00-.118795008750806E+00 0.233433259368892E-030.357198977531906E-020.125468663142325E-01 0.105518298214813E-01-.219409073721873E-03-.516770485999043E-03 0.155737420002396E-020.475170697294222E-020.375437524196078E-02 0.125599035320910E-080.160955314931229E+00-.223800543931700E-01 -.167424614451373E+000.958946814478864E+000.161130765277663E+00 0.196534771283384E-030.229515992283831E-020.576258431242573E-05 0.123745953025444E-01-.106995672755502E-04-.451052406900802E-04 -.456298622807265E-03-.275196027305474E-03-.305282850369034E+00 0.519423576775914E+000.505241937641198E+00-.130908849130573E-01 0.201635085589468E-01-.519423633116087E+00-.333293227117524E+00 -.263134929283539E-020.118328199171819E-030.104150622740462E-01 0.193141117505181E-03-.154345791282011E-030.173868931704905E-03 0.325208290050746E-02-.373216687782401E-030.149265726829690E-01 0.635804228599679E-010.820369767656903E-02-.212632332341540E-01 -.863649530175426E+000.489006964790317E+00-.348933539662262E-01 -.515727866020910E-020.944324418994364E-010.774875938152194E-04 0.482971314170869E-020.112759618007829E-020.222168874154256E-11 -.469066568608033E-100.220035735034216E-030.392555412688333E-02 0.141255360917606E-030.174989934363485E-010.515531740150388E-01 -.461588326613025E-03-.250983472579693E-010.684732202756503E+00 -.726228124582573E+000.842387322611238E-02-.317841553099293E-03 0.582455539039689E-02-.217823676656004E-040.446878338884266E-02 -.200617977872690E-010.537091052490130E+000.181205202614563E+00 -.379058590472633E-02-.114631325054326E-020.100346775148016E+00 0.271648560515299E-010.259196853345346E-01-.272445450180131E-01 -.728159919978982E+00-.314123286436018E+00-.938624176704406E-02 -.362203896936131E-020.153775041043447E+000.781378322348654E-01 0.426720954014265E-030.112760204809835E-02-.167938108847192E-02 0.854993026183699E-010.457577468747559E-03-.644980511474331E-03 -.215375382943762E-020.354875964291731E-050.999992692546311E+00 0.164898274978811E-070.304934046331858E-020.228760962681150E-03 -.247128995183060E-100.118007080764899E+00-.123564497591530E-09 0.162728422837746E-01-.819861260960444E+000.141941206609466E+00 0.125775224074353E+000.393535557751079E-020.178021559472064E+00 -.141941215640452E+00-.147146706681122E+000.753144190049640E-03 0.236859750590249E-020.447439294418169E+000.359129436315990E-02 0.627754930398190E-01-.139244701906877E-020.214783034756772E-03 0.131512191293389E-030.124438240310255E-040.487697648747908E+00 -.148174054632193E-02-.535785553537011E+000.309890918116741E-03 -.688115252161152E-01-.283340125674097E-010.310257496437506E-01 -.461205326885983E+000.191293743934847E-020.505833990447865E+00 0.750983511657879E-040.705267092317584E-04-.786060719406271E-05 0.565417053429881E-020.369600487362671E-040.443122584382949E-02 0.369600487362671E-040.389809678124690E+00-.480919973513487E-01 0.104050264453308E-01-.489891790728507E+000.512175326664710E+00 -.251878239510859E-010.293966079442228E-01-.374941991066111E+00 0.641782125495638E-010.443884509856657E+000.415631588510590E-02 0.291724739467156E-02-.315602200752062E-040.276258179505761E-12 0.315692669405107E-040.405867061011481E+000.378690131926348E-04 -.918882285479390E-06-.585087468913459E-04-.901978941696008E+00 0.113474779210659E-090.132088859541395E-090.452016593238905E-08 0.153981616917685E-03-.187604508266648E-060.449094630629618E-09 0.238044864556349E-060.236695170296057E-02-.429542502073789E-04 -.134103249836867E-040.103819281934490E-030.147310120826308E+00 0.289572954091881E-010.166544091372661E-01-.414623249348314E-01 -.271830205766233E-01-.834413463006351E-060.998136392031476E+00 0.122395916553052E-010.632739099986892E-090.212633687143486E+00 0.632739099986892E-09-.110266703181475E-030.137411102806595E+00 -.541373056555355E-02-.813199727026674E+000.185364035933384E+00 0.189529013238867E+000.865340666265890E-020.342605965282138E+00 -.185364035366044E+00-.194177150813847E+000.294623504846971E-02 -.481686497086705E-030.121545876488085E+00-.530804639167663E-03 0.456286581451462E-020.286575521807902E-020.404296415827950E-03 -.687084666871018E-010.346805266614458E-020.753574515516031E-01 0.505627623174092E+00-.574252270940695E-02-.564511679616764E+00 -.357473139901688E-04-.231037907805869E-01-.434238694510366E+00 0.475492620831160E+000.115770063050651E-020.134140728510668E-02 -.263260049701307E-030.105471222881001E-020.116593856850648E+00 0.105471222881001E-020.922493324714324E-01-.579437302697594E-01 0.121570291545597E+000.685873943808266E-010.273378233184083E+00 -.204837707484476E+000.360576001215734E-02-.677988803582434E+00 0.173174484916547E+00-.380656063886276E+000.442368547231428E+00 -.558513583720547E-04-.823757328985934E-030.669330729666884E-01 -.959833802074539E-030.601389213056274E-010.962184060000759E-05 -.187827323783031E-040.360387968584401E-120.187881360370489E-04 0.537074764821504E+00-.241847150836626E-08-.239399430153665E-10 0.201204711161572E-080.245123711639579E-040.343859473382981E-04 0.142820901368339E-07-.395427510919049E-04-.803141296002529E+00 -.308798916471791E-080.372565513480860E-110.372134699667619E-08 0.695751722977721E-04-.206823361952197E-04-.867594640014316E-07 0.320490380387678E-040.257904527488446E+000.251527713105688E-01 0.160670486494815E-01-.359427383128825E-01-.208315603223150E-01 -.106749103877009E-050.998634620717329E+000.105947158447703E-01 0.786357166775589E-090.644554062825855E-010.147441968768947E-09 0.283415543445799E-020.685059169690794E-030.161928254063469E+00 -.734658112367259E-02-.795436981644603E+000.112005113951728E+00 0.116112410074604E+00-.122748344137133E-010.535385505713645E+00 -.112005114710728E+00-.101694000626255E+000.376112318286562E-03 0.337223222160585E-01-.160461773121821E-020.572257030714030E-02 0.358983271090535E-020.483648722770236E-03-.374378469350919E+00 0.491681099797348E-020.409889093974485E+000.530964917213129E+00 -.627250620485439E-02-.595098741464305E+00-.241170615534876E-04 -.334285861829879E-01-.157354286153396E+000.172548982335806E+00 0.149808311102240E-020.164824307470865E-02-.307153539074260E-03 -.106756314785166E-020.139626387190351E+00-.106756314785166E-02 0.110156897634196E+00-.309911159440874E+000.167408292491309E+00 0.360213501196167E+000.241963975861273E+00-.208694806147609E+00 0.493267448076731E-02-.709971239067276E+000.237100559219863E+00 -.131217716617825E+000.154290771975884E+00-.959074851003528E-05 0.956731538415544E-030.794297126275660E-010.783541617392965E-03 0.693456870140263E-01-.453325254228497E-04-.176585350383745E-04 -.123562725125358E-120.176636156078052E-040.541350527616704E+00 -.240773125362821E-08-.233457660732528E-110.271455532902927E-08 0.477531482574202E-040.318748202945685E-040.168773004647976E-07 -.366100077933934E-04-.802382883088274E+00-.189243713536815E-08 -.175937555189488E-100.161357154454997E-080.220750984082187E-04 -.182827311837541E-04-.810192048052132E-070.287394278084876E-04 0.251239543599436E+000.460154655563629E-030.109020541892817E-07 0.301020760096669E-02-.676020538863894E-03-.201397582313553E-02 0.265255685432536E-050.999993076694352E+000.245686508966199E-03 0.528725086162795E-100.528725086162795E-100.139137638304773E-01 -.931476122820135E-020.187667088561186E+00-.806168464489319E-01 -.741318518217202E-01-.150594948497854E-030.496927937442151E-02 0.577857814421090E+000.106703220081005E-01-.779133836752166E+00 0.806168453826879E-010.695241882699640E-01-.515203579148082E-04 -.229418112929880E-030.809403648149187E-02-.283211984912348E-03 0.309218219416329E-030.189421944285213E-030.177162332103893E-04 -.436862641845423E+000.479152582846512E+00-.712381219969140E-01 0.294435744654024E-020.780917998203279E-010.502921115640390E+00 -.181070913767124E-02-.552926222784265E+000.443750531523610E-03 -.985965310703518E-010.118852928374641E-030.109862679157740E-03 -.109006539468286E-040.144672961940265E-030.716786890076843E-02 0.144672961940265E-030.561128618870810E-02-.311695309851634E+00 0.369140461343607E+00-.564818818963682E-010.843996016463362E-01 0.683479449787785E-010.353180746937538E+00-.525397161080030E-01 0.131036844385976E-01-.456640065049356E+000.644420456556119E+00 0.559396888735261E-020.394650581663461E-02-.276030758828090E-04 0.359262044720999E-120.276109760275352E-040.400875800538385E+00 -.153565440406287E-06-.284270058405151E-090.171772862729932E-06 0.153454876917201E-02-.233754388154802E-090.978810924525225E-10 0.373622626632746E-080.130985708337576E-030.345983153605038E-04 -.692008542158418E-06-.515924281953249E-04-.901011303111012E+00 -.327069748284931E-04-.724156296312873E-050.719917974521585E-04 0.165755363482073E+000.474803594620760E-020.116474496930673E-03 0.161427927008894E+00-.319233613834862E-01-.199249049476415E+00 0.943952542138753E+000.205279273142504E+000.363324353033546E-02 -.108482676139213E-020.157536226523168E-010.130255045013827E-02 0.301913162646137E-030.161243332301578E+000.606695718965107E-01 -.397526540444055E+000.554748860175678E+000.383966542560385E+00 -.236530864243820E-010.493155556414269E-01-.554748767500591E+00 -.214301755749183E+00-.791692179238457E-02-.552245530472999E-03 0.117804913038090E-010.534077055607152E-040.359651953275203E-03 0.435838693521165E-020.413002012631367E-030.215005754443115E-01 -.121296060755018E-010.287291230583004E-01-.295083695975163E-01 -.936024399941001E+000.150963209808127E+00-.471083210162908E-01 -.930017973181041E-020.310435446284620E+000.200383312665818E-03 0.797662512256087E-020.202677154721335E-020.821695118252034E-03 0.185995596284431E-090.953942751065062E-020.579222037124909E-04 0.419784017723221E-01-.482975532332040E-030.904470811910962E-02 -.574430934800443E-010.451700983218531E+00-.847632099722912E+00 0.206216564248354E-01-.952089249595826E-030.267683914514290E+00 -.442089263297538E-040.130227346463139E-01-.334575236633050E-01 0.582754336569465E+000.239748154997497E+00-.232703116519158E-02 0.632586030004597E-030.656015033332231E-010.269019293740100E-01 0.372932091845224E-01-.227602290610941E-01-.680109638438260E+00 -.349237624883250E+00-.320426217305454E-02-.232449893005120E-02 0.496936332823237E-010.161945477273113E-010.379014284144202E-03 0.396327632422365E-03-.858744763106854E-030.871345710795191E-01 0.870146384175541E-020.110748991451490E-070.647459393211122E+00 -.211020858629368E-01-.655608719224489E+000.387108539259607E+00 0.241779008380115E-010.386469431151273E-020.112081023309811E+00 -.698167490986286E+00-.112081012101691E+000.698167490986229E+00 0.609105524539040E-040.810324884139280E-03-.604954208771893E-02 0.822458556079886E-020.108535292536380E+000.377476685106857E-01 -.774936024964465E-02-.787880717753179E+000.225369702812543E-02 -.562892718869109E-03-.285497312308102E-010.604196076303872E+00 0.134876218565383E-040.885850836022477E-030.240861803747173E-03 0.320725483445566E-04-.245765498175867E-030.518563563274593E-03 -.258064430088833E-030.523073530082049E-020.414286362962317E-04 -.134296280739007E-010.454147960865441E-010.246095955438665E+00 0.381810162664600E-01-.458578109756278E-010.309247721541881E-01 -.840168641477295E+000.726706384663128E-03-.200805330145389E-01 0.475756927113320E+00-.348987049372346E-050.163014746453075E-04 -.406433530604126E-040.174811555826052E-040.416347324487490E-02 -.503900886600453E-05-.243879091555047E-010.430018804227158E+00 0.560591961221790E-010.114237883088519E-020.652452798290859E-02 -.245918402416141E-020.608972012498249E-020.461425942228189E-01 -.102539319935843E-02-.815026724296231E+00-.117156972700854E+00 -.195325680784950E-010.236697927830689E-080.358408016308951E+00 0.467236881616071E-01-.528487928757052E-03-.344478060267522E-03 0.327754210659766E-020.101409566262696E-010.707106781186500E+00 -.707106781186603E+000.662262870273973E-01-.412532285002360E+00 0.642429494386874E+000.642429402719959E+00-.339222881485481E-01 -.440624356497263E-020.721314558783405E+000.318354889292678E-01 -.691029429413945E+00-.298330170970555E-020.228604569444274E-01 -.372782349555383E-01-.271115201819383E-010.688164533706434E+00 0.441086820619143E-01-.722376492423855E+00-.383619480806987E-01 0.123858524819484E-020.211675332716350E-020.682478888494490E+00 0.970441548327741E-010.390369360953282E-01-.238759561039506E-08 -.716298578374737E+00-.933799186770630E-01-.707106781186575E+00 0.707106781186525E+00-.167263560147883E-07-.497215731964989E+00 -.609297473009121E+00-.609297508136205E+00-.101437921164760E+00 0.396808464685394E-010.145837777501628E-01-.681042143793224E+00 -.504664615069257E-010.729278738542803E+000.681269617691656E-01 0.666444114418943E-02-.712408745146810E+00-.648638844371203E-01 -.636842463844503E-020.695369860658179E+00-.979129339670780E-03 0.300892878154688E-01-.298674746023331E-010.482956299067998E-07 -.322605724633322E+00-.646186912478413E+00-.121318406636933E-01 0.582015570576082E-010.215407605396003E+000.653173445595279E+00 0.570507474805564E-030.942716646294706E-080.298476109835370E+00 -.229767996041610E-01-.303221070862048E+000.602037576303353E+00 0.675266720258527E+000.245053547811273E-020.585960686889018E-03 0.513031006915004E-030.865194342723113E-020.787352240189772E-03 -.123009456216638E-01-.602952293381838E-010.100813384569477E-01 -.235623029749862E+000.486151508253275E+000.442775079628557E+00 -.405512246939388E-010.216904069577573E+00-.486151536353640E+00 -.472136317138705E+000.126301180815325E-010.792403668237731E-04 0.413297540850655E-020.352171169359473E-03-.329573224578663E-04 0.652940718111332E-03-.256262482273700E-03-.234114335976204E-01 0.337110002433409E-010.381021013468887E+000.601463636725532E-01 -.545256280105584E-01-.868532468572194E+000.679937091073461E-01 -.847858651657671E-01-.411597864503930E-010.280521986517897E+00 0.105879134718726E-040.416765143704468E-03-.123099030948993E-03 0.301756375767690E-040.249083843067110E-030.209120900143790E-03 0.231043094154576E-030.257036870345741E-020.228387047244176E-04 -.574755821099979E-020.974467519929338E-010.236333894525561E+00 0.396680034546653E-01-.132253076018475E+000.265114915419996E+00 -.853424947855451E+000.479397847921161E-01-.427817436974369E-01 0.335850084444527E+00-.148408460429058E-04-.748161136435617E-04 0.110753604160756E-03-.706119611472251E-040.152624617518191E-02 -.110951858901099E-04-.644113284807349E-020.650828991401486E-02 0.228749967414610E+000.600635730865104E-01-.223553067564437E-01 -.358150776105921E-070.239684957296783E+000.480094650288983E+00 0.192145309729517E-01-.836123635137684E-01-.225899275367096E+00 -.765138432844402E+000.313411371419374E-020.742995638243971E-02 -.136119349521726E-010.825709237069057E-01-.389328976578801E-02 0.308727616620548E-020.502762790374560E-010.457631940177901E-01 0.210671082150144E-030.136670157899477E-030.177999280509586E-01 -.174707401413546E-02-.146934442009727E-010.371048542182972E-01 0.999042801658376E+000.917293575579656E-030.136933469979301E-03 0.442668224180858E-030.123494540316625E-010.557234391914227E-04 -.570137556406672E-02-.370827223466650E-01-.472433665133362E-02 -.278122948398114E+000.410144945494006E+000.397557322797068E+00 0.448319999663166E-030.493871784844263E+00-.410144933519769E+00 -.425418904107767E+000.334848699759163E-010.127375877370595E-03 0.110532019406746E-020.237091582126644E-01-.113844312723035E-03 -.380925034819731E-040.158908676155912E-02-.494574442295410E-03 -.136516243012434E-020.289433905657649E-010.514912248937955E-01 -.303914167730759E-02-.422251074843907E-01-.203227767720065E+00 0.153753347019584E+00-.917153830215156E+00-.763258755002147E-01 0.287706323687985E+000.216506567822838E-040.829796579240233E-03 -.283433609785619E-030.559390318691268E-030.633501377261939E-02 0.131319120514597E-020.701963998257549E-010.905217459477781E-01 0.357923735038388E-01-.123891945774251E+000.395903508691244E+00 -.702671794969916E+000.557691797337480E+00-.205098607153493E-01 0.909184509497725E-01-.190654151029481E-04-.121336165082983E-03 0.328915099482047E-03-.149272779124686E-030.338462654696031E-02 -.112851204297636E-04-.445463552536016E-02-.835576313571940E-02 0.752932544467666E-010.137534847523132E+00-.259114738485208E-03 -.563852731001187E-030.190774804903477E-020.242779688270085E-01 -.194309000886799E-02-.285769460002899E-010.895054924400790E-02 -.983116941827859E+000.212645158251803E-030.125707197364705E-03 -.350836204080841E-030.430592564883796E-01-.853469359816533E-03 -.777078218862946E-030.742620013435782E-020.734967290854320E-01 0.381446313628261E-030.124845056146456E-030.414383331747861E-02 -.940271526508416E-03-.404221951901942E-020.644204016897479E-03 0.999982450334638E+000.102526910708690E-030.342667220082544E-03 0.539407713885730E-030.112182650588275E+000.291963953692846E-02 0.243306172940037E-020.417843161548503E-01-.339945353959363E-01 -.797488637176752E+000.274980044994610E+000.286636867608651E+00 -.136712222555940E+000.267568964966806E+00-.274980025426080E+00 -.117859587300834E+00-.268224051763144E-020.846984655215149E-02 0.104013252256216E+00-.706725077066978E-020.221871308732617E-02 0.219868236428274E-020.201981444706414E-030.458618437592934E-02 0.126809928213090E-01-.320380956077024E-010.204506522896203E-01 -.148582793941879E-01-.113780442017961E+000.374335203551583E-01 -.990721098034612E+00-.210726169380195E-010.426373790397174E-01 0.136555208806411E-030.224198476974885E-02-.571391145031755E-03 0.566586344120537E-020.959780379361985E-020.318911180367516E-02 0.620827710669931E-01-.568901108942749E-02-.180691343789712E-01 -.740521161628900E-010.209179385162360E+00-.195609548916247E+00 0.952445669749881E+00-.250646268674595E-010.131476157327279E-01 -.369071287024797E-04-.488185333132813E-030.346924020436468E-02 -.801030241372621E-030.135234270359219E-01-.699427244703543E-04 -.227371817304806E-040.305526739861381E-070.280327128925278E-04 0.499079983149445E+00-.678543881782044E-05-.141311621891559E-04 0.323882026853012E-040.296376197095334E-020.557320090650802E-05 -.203285194749962E-03-.242749015745857E-03-.829871103648760E+00 0.275295157139778E-080.407862664671703E-080.240492921342678E-07 0.447132367465700E-03-.196841317648305E-03-.835445317130868E-04 0.803921598880989E-030.249446072407021E+000.188844328303154E-01 0.538455289838268E-030.291708523636470E-01-.372703108642742E-01 -.496393478982733E-010.254758647814956E-050.997313376037241E+00 0.179944080258892E-040.174653471249788E-01-.387280835249212E-03 0.135120879213858E+00-.332591407056297E-030.839200840958193E-02 0.123774549670626E+000.710355862613081E-01-.816903955833649E+00 0.259111769955954E+000.169922195433962E+00-.967589717675854E-01 0.295181562913193E+00-.259111775222573E+00-.121879896040359E+00 -.170780062460303E-01-.456215445186038E-030.138493391082666E+00 -.756584484839288E-030.462615585354142E-020.747070123653290E-02 0.121523955801067E-020.121318890601466E-020.855595803629244E-02 -.618607852540523E-020.306525760240591E+00-.136562251008736E-01 -.673592315256137E+000.589580615384586E-03-.573566359288367E-01 -.288004951243023E+000.604707526771186E+000.152712274111098E-02 0.506016895702041E-02-.105440009914927E-02-.424305489168350E-06 0.528751207416300E-030.254336715238593E-010.543992283805514E-03 0.769918527154085E-010.230146570594166E-050.776291852346123E-02 0.118061461199013E+00-.143472302037430E-010.270617786854460E+00 -.198234957495660E+000.136950886553168E-01-.726560688324639E+00 0.141188296603900E+00-.294523042192644E+000.472157830749985E+00 -.110872557472870E-03-.126978546655609E-020.577296043463924E-01 -.144384353054288E-020.752577368093954E-010.243418539483478E-04 -.142888328684564E-04-.114490935915299E-070.161979153767801E-04 0.390904820917777E+00-.107263660415500E-07-.465323015112817E-08 0.223347461190187E-070.281951787649733E-040.642263470427003E-04 0.343724131105744E-06-.989576291726829E-04-.832242768277343E+00 -.120177009576371E-070.103799950061146E-090.199722827564297E-07 0.126564714211728E-03-.692324238576580E-04-.138592840130219E-05 0.152324103553164E-030.393147982873812E+000.154917438959898E-01 0.104654297961220E-040.278259108674488E-01-.303490991488291E-01 -.354216368215474E-01-.374358936472513E-060.998306540843242E+00 0.583345098154626E-030.139166982303768E-01-.219188756453223E-02 0.757662900455562E-01-.152524631871661E-03-.321278040358060E-02 0.320493204006391E+000.101985556245574E+00-.783316817911260E+00 0.276533341997327E+000.164610994180330E+000.186915934215290E-01 0.109466950808409E+00-.276533344763605E+00-.262128799339971E+00 -.711582411610634E-020.316741118718987E-020.798075059151104E-01 -.549305914149587E-020.680591161936855E-020.103957194354297E-01 0.165449572551216E-02-.297305272856413E+000.133512169424708E-01 0.620313041634109E+000.288681103087594E+00-.177630992643315E-01 -.657895338706556E+000.101100937639440E-02-.995075900155844E-01 0.378031371560238E-03-.715073997670865E-020.226932302359274E-02 0.680513181941886E-02-.134886288914828E-02-.489664457071443E-05 -.115741943188504E-020.340181330921379E-01-.112000827068954E-02 0.949249299187529E-01-.963143805549435E-05-.279314130074537E+00 0.159118172145863E+000.440690486502383E+000.219264647394360E+00 -.223531848223986E+000.209613224177962E-01-.730529530601576E+00 0.216119903392971E+000.149639207047947E-01-.229194735289877E-01 -.501177261368179E-040.297277225627281E-020.694032145798862E-01 0.257686371432962E-020.885479588062585E-01-.207970163074130E-03 -.138923090909384E-04-.127238716380106E-070.157058480423797E-04 0.409492189251564E+00-.102996885080796E-07-.678584712436506E-10 0.157848450480880E-070.936451399983214E-040.583579087160737E-04 0.356385494683888E-06-.910641984638006E-04-.829776111590451E+00 -.749823348792695E-08-.249102776330744E-080.140200580837383E-07 0.281551872354774E-04-.595312905301544E-04-.125463596060752E-05 0.134246582370566E-030.379193497185602E+000.426249993318591E-03 0.138136677625042E-030.600027532935093E-02-.104715937420707E-02 -.410412425692858E-020.360816358907135E-030.999972748532237E+00 0.815344840941258E-040.470003277126032E-03-.975581912704339E-03 -.758387765641282E-030.311201162620555E-010.163127700276862E-03 -.379406664406015E-010.655778353245633E+000.196424421346421E-01 -.478876541054886E+000.310326047253723E+000.286814367728409E+00 0.475138107439813E-02-.411328427070017E-01-.310326040307785E+00 -.244615833492320E+000.880585133137490E-02-.212605409102574E-02 0.364624809606826E-01-.259201452975158E-020.224527879066681E-02 0.209234382545644E-020.156319489577705E-03-.307758905489842E-01 0.220261326059213E-010.671643419853845E-010.118321296739216E+00 -.103277528307138E-01-.428144170934312E+000.286625510817101E-01 -.869306495280380E+00-.510672066662528E-010.193647111457262E+00 -.378647105337771E-040.317666846458886E-02-.835552638858626E-03 0.701619192360112E-020.105374907692704E-01-.522925349009331E-01 0.132709858923520E+000.526721064437783E-01-.202405945294266E-01 -.725368516726221E-010.194688239718319E+00-.189260055568609E+00 0.946300940701786E+000.792544711088228E-02-.355764043826012E-01 -.246135745872575E-030.304975551354759E-020.420239640621067E-02 0.261040112096898E-020.218379335165771E-01-.341978135298371E-03 -.172457015309441E-040.431356008346286E-070.219590871210806E-04 0.442659543701007E+000.620442416979269E-090.258920030491552E-08 0.168861954232395E-070.306596243662881E-030.323138773456644E-04 -.960348097112365E-04-.218166081265305E-03-.838067704175618E+00 -.589914917310024E-05-.416409183798882E-050.216992518203371E-04 0.171734903009034E-02-.172262703654395E-03-.255366933603604E-04 0.588840143324276E-030.318891160231964E+000.323051769754980E-03 0.527812440603705E-030.184483412376782E-010.172904899351989E-02 -.209517265408227E-010.158263229092178E-010.999483262596492E+00 0.789622357502747E-090.215857232441392E-03-.225609164740967E-02 0.149823816969244E-01-.499062773662014E-03-.236548692000563E-01 0.363896924656256E+000.107483034761124E+00-.391270672966822E+00 0.502192301820578E+000.405412180298002E+00-.678056199914652E-01 -.960614884631456E-02-.502192338841198E+00-.169129058584629E+00 0.276901186419182E-02-.169243266660495E-020.927155007066666E-02 0.145412623807367E-030.264674993738985E-040.763553538678154E-03 -.274044971065333E-03-.206553196141291E+000.192544222065392E-01 0.710409976253818E+000.130366138371823E+00-.228795553119039E-01 -.549279079167324E+000.144877887368590E-01-.339041201676814E+00 -.242405803695270E-010.131562971065629E+00-.258376806382172E-05 0.656278446202110E-03-.236769424458550E-030.141355471070267E-02 0.105244043606728E-01-.660332708148621E-010.210625908749795E+00 0.206019596480891E+000.666155188911710E-01-.131785375279779E+00 0.629358709986443E-01-.579139160435087E+000.687848108070714E+00 0.249885689824524E-020.272623878087522E+00-.189083942331165E-03 0.144332387792429E-02-.964970276958600E-040.142997186912260E-02 0.905906105727050E-02-.335003383098555E-03-.761567012733616E-02 -.106277964677985E-010.104274987796965E+000.200717863329688E+00 0.167157754026795E-030.800103307358312E-04-.239487412514881E-03 0.288613812865254E-01-.280311412689388E-02-.102833078885913E-01 -.246652115998060E-02-.958907097949439E+00-.199282635800055E-03 -.133451307121677E-030.122389068203788E-020.121150111192682E-01 -.553097739420755E-02-.738697421077239E-030.291299759234546E-01 0.164877272058817E+000.176933543460421E-020.636048637279320E-08 0.386389399803415E+000.837523572201287E-02-.392389715572957E+00 0.177968659061121E+000.815465158463628E+000.145621272878538E-07 0.199985867714712E-020.195851833059782E+00-.679442478235078E+00 -.195851722041146E+000.679442478235217E+00-.357201584439584E-05 0.104508299723225E-03-.430429753409975E-04-.161992044701792E-01 0.665913332291113E-020.627943984135420E-010.158766162588137E+00 -.580681991929644E-02-.725442566426469E+000.389377340629332E-03 -.543997834523727E-02-.141418550919330E+000.651316976488143E+00 0.103704333512308E-040.760162068660251E-04-.215295048130131E-04 0.814462510058118E-04-.624103587955855E-030.512727498773690E-03 -.655337427526513E-030.405937494843178E-020.105205018006757E-03 -.430493797466982E-010.888089058101809E-010.296501401773398E+00 0.820849426591335E-01-.704003772035664E-010.934683955500087E-02 -.849557747276744E+000.299284353890857E-01-.307351278117629E-01 0.408597009486543E+00-.477326696952231E-040.203748305369640E-03 0.145051551564250E-030.213311096242107E-030.268327332614296E-02 -.611874011102725E-04-.337262668853664E-010.924166207019878E-02 0.621949633428841E+000.161210309761146E+000.165557847623496E-02 0.133402559164063E-02-.540323718323402E-020.349527344820291E-01 0.158972038010233E-01-.191896754436189E-01-.167295225035774E+00 -.680665052123196E+00-.120576509551053E-01-.194282041054332E-07 0.106218810781638E+000.201171754213052E+00-.152846247993426E-01 0.126495382860975E-020.105728483537333E+000.171716077268080E+00 0.707106781186532E+00-.707106781186564E+000.179199321427276E+00 -.621672299758036E+000.539171163068275E+000.539171226818681E+00 -.150859012548334E+00-.346779801559453E-020.696421358249040E+00 0.147705689688260E+00-.685864311448068E+00-.549676070744279E-02 0.256758327647866E-01-.750726041803840E-01-.317246623417171E-01 0.668536882366567E+000.938655702018445E-01-.732745439276634E+00 0.170870172221987E-010.583898068138768E-010.619301667958476E-01 0.600138230146652E-010.677664207154702E+000.385190232285779E-01 0.619119497642184E-07-.339323566159786E+00-.642657517212704E+00 -.707106781186557E+000.707106781186543E+00-.245736663857741E-07 -.487017594237811E+00-.613791894359277E+00-.613791883445462E+00 -.966069207569462E-010.429174371243619E-010.113832073170950E-01 -.678381985760620E+00-.504298591343777E-010.731630526211845E+00 0.635386735290795E-010.125742853429528E-01-.716745907330516E+00 -.583613871779776E-01-.110212329091957E-010.691772730437950E+00 -.173175445674593E-020.383841621124299E-01-.110416382473008E-01 0.256741288464596E-07-.453880443429687E+00-.554991234753238E+00 -.318174114684711E-010.218019157967283E-010.404853975196401E+00 0.564789870930429E+000.102068503593475E-020.285623013061450E-07 0.492754819127494E+00-.203842046987441E-01-.499362468921001E+00 0.587824361647918E+000.402336839078275E+000.918169007117501E-03 0.700012494926306E-040.377013393139683E-020.158061746585615E-03 -.923345838286210E-02-.465479735545722E-010.161317275038019E-01 -.241725710157609E+000.498377849088563E+000.419438718550452E+00 -.424078491233497E-010.210523737367770E+00-.498377789898282E+00 -.469006127421801E+000.159157362192407E-010.971442723612329E-04 0.370429343061676E-020.185402222885231E-030.140361401801025E-04 0.454359178768059E-030.828774296805545E-04-.312157931261559E-01 0.221644959830577E-010.467147250894710E+000.605956757459247E-01 -.286080598138955E-01-.839766996204144E+000.216291917452147E-01 -.219985152720672E-01-.281124096984636E-010.262424344259733E+00 0.116417805123626E-040.267635114197098E-03-.672215219544455E-04 -.813735173184751E-06-.398866592646904E-050.204362284917030E-04 -.409081302153415E-050.158462400066490E-02-.628949975187434E-06 -.111533654039953E-010.945756611763469E-010.309305220492670E+00 0.491707927664971E-01-.110293923293886E+000.131202023612183E+00 -.859274284355457E+000.187676429483093E-01-.364156143118406E-01 0.351325562001735E+000.302673825658693E-050.179685592317993E-04 0.140441788487869E-030.172457286836458E-040.142844320681775E-02 0.256541507301178E-05-.135974180846842E-02-.135228523273871E-02 0.124160279154033E-010.226781889854867E-01-.333271203637093E-01 -.223082863493948E-070.394082533781187E+000.481872165055281E+00 0.354794598302177E-01-.290941802402022E-01-.430896016118760E+00 -.640798137718591E+000.185037448827823E-020.962525823705057E-02 -.494931284124744E-020.815259078185888E-01-.366652507262709E-02 0.308654674398379E-020.634740521082287E-010.386973240214517E-01 0.920203922416232E-030.108629350498719E+00-.143184031301651E-01 -.103310610340044E+000.268157434783449E+000.951507667518300E+00 0.667459177312360E-020.957709173457184E-030.603352690579251E-03 0.211234307770364E-01-.913404167729270E-04-.490567395888047E-02 -.312206895692159E-01-.377826865054100E-02-.253367241251457E+00 0.457238405489630E+000.431443403923000E+00-.580916488736549E-02 0.327729924464284E+00-.457238455836453E+00-.470035771580013E+00 0.286160495778913E-010.162251095002671E-020.295291942973934E-01 -.510593888156111E-030.133176045858044E-030.288550864294607E-02 0.326671120515064E-03-.119940694302481E-010.493611977238944E-01 0.200835967502284E+000.375222748159743E-01-.763181518223535E-01 -.607170442032405E+000.141924071866228E+00-.357268263812569E+00 -.111584072433367E+000.648806072874006E+000.101939051155568E-03 0.200605309319850E-02-.579965588212036E-030.258630208821450E-05 0.168217775562306E-040.144330153595768E-030.232887229287876E-04 0.675044602369196E-020.135607924906647E-05-.512253262244723E-03 0.115533485002037E+000.143965680843651E+000.283648332042478E-01 -.214797768570874E+000.391457522572237E+00-.810085558883003E+00 0.188501006513896E+00-.442767460955475E-010.268178435111368E+00 -.134851379999611E-04-.906524042141700E-040.706947400427236E-03 -.102644794357619E-030.682221155305948E-02-.107940584113467E-04 0.116235358609001E-030.166025085883410E-020.156776146399450E-02 0.189682979375326E+00-.361695504819792E-02-.346080365688096E-02 0.364161680538411E-010.123107662892829E+000.479565835504608E-02 -.696332330928824E-01-.557688540661065E-01-.907343267826924E+00 0.167427784956671E-020.249525019706888E-02-.429288818316120E-02 0.715872231770214E-01-.122267448202732E-01-.590040106779471E-02 0.156528369965063E+000.293967791211871E+000.175081783184165E-02 0.771184964438607E-030.221373065832482E-01-.621763107712101E-02 -.194592641016047E-010.714969543950864E-020.999514994545450E+00 0.597860704577673E-030.269402465479075E-020.515023791883851E-02 0.121292326773534E+00-.392528020472177E-020.118992126450666E-02 0.157395445789034E-01-.394082381129670E-01-.733003478782031E+00 0.337599559770288E+000.349142686729564E+00-.139463400368514E+00 0.227145186540549E+00-.337599510291875E+00-.916649623724561E-01 -.382942486348092E-020.925240648625014E-020.129158226356516E+00 -.853888047471263E-020.140096596740043E-020.126071176579125E-01 0.124720535117440E-020.303634316616343E-020.377300486494654E-01 -.294767602556083E-010.567360891048372E-01-.465498595571141E-01 -.420230611207414E+000.880228217424541E-01-.881922252676869E+00 -.505991235370717E-010.165262464703570E+000.146288106742103E-02 0.119437537909616E-01-.215022129020119E-020.937096633811036E-05 0.160932871380580E-030.293463833607639E-020.286155735433417E-03 0.429322788825650E-010.194015643940606E-040.838523134684283E-02 0.161717170334286E+00-.203051876371348E-02-.246917146462747E-01 -.230101940514772E+000.430203686138714E+00-.518676737549693E+00 0.666606010923658E+00-.696498178573828E-010.109439876538281E+00 -.849241779494426E-04-.807577859098053E-030.152659284083099E-01 -.110538323322089E-020.532650783719748E-01-.106908413345438E-03 0.521037564689083E-050.395491098356925E-040.916942038480008E-04 0.267445501897429E+00-.146929108520377E-04-.414381105364060E-04 0.883752978684304E-040.203583744031505E-020.552720532282201E-03 -.353106948059371E-03-.268158909150081E-02-.877321689364557E+00 0.129483762335851E-060.943389430578574E-07-.520801832045056E-07 0.542619061617278E-03-.897761281568731E-03-.531645372045277E-03 0.721153625769991E-020.398389736428573E+000.339439726157846E-01 0.127008998561281E-020.558849142773434E-01-.700047885835571E-01 -.972864026383786E-010.120387721105454E-030.990042699494239E+00 0.104923379909149E-030.342517600102390E-01-.374697094457425E-03 0.152312877545830E+00-.478817790311942E-030.872860861790242E-02 0.999657868488493E-010.761029238391244E-01-.789918683778005E+00 0.312925273563142E+000.179124695926111E+00-.106456692876792E+00 0.254396861436815E+00-.312925287652934E+00-.969397708740387E-01 -.205315405806358E-010.172023645205085E-030.152210304270155E+00 -.330338109710651E-030.459563407489116E-020.143990070124588E-01 0.222644377622351E-020.800563370830329E-030.104489137273485E-01 -.602561369632559E-020.201418904467542E+00-.171281646426121E-01 -.737384008805705E+000.102553883472058E-02-.588018158817250E-01 -.181397584082343E+000.615273770267933E+000.216302320816593E-02 0.949387888312259E-02-.138702989735942E-020.152795495644916E-04 0.225359384945996E-030.225891473319397E-010.262583707734798E-03 0.105723087052347E+00-.263236897139808E-050.655669812546020E-02 0.110649523915327E+00-.129806789078049E-010.165077126998700E+00 -.192799365643284E+000.282186057827035E-01-.807718334950653E+00 0.102142581525374E+00-.192428566915823E+000.444747023264972E+00 -.548606964381622E-04-.567233548395388E-030.635340804994158E-01 -.626317548109333E-030.945045541747214E-010.789273378979099E-05 -.288979693703195E-04-.182319839053481E-060.443515421301361E-04 0.379919944695107E+00-.409896592504587E-07-.502833020468807E-07 0.120494589988032E-060.308036843749235E-040.140521908879047E-03 0.816277654525576E-05-.295259341239829E-03-.861438578734898E+00 -.277471726737075E-070.876533127563630E-090.662575211226712E-07 0.129028505756325E-03-.126377308405864E-03-.370449666662370E-04 0.550391609228765E-030.337022199602707E+000.254458699117238E-01 0.592584625065294E-040.514303172879869E-01-.512809050778411E-01 -.660648944428663E-010.951604713061685E-040.994540487621631E+00 0.100924642958156E-020.245217454649157E-010.184864876070133E-02 0.884721194989155E-01-.324244362088066E-02-.510930961910458E-02 0.303062330901710E+000.112878700333972E+00-.734565742176333E+00 0.347055364976695E+000.162412105382276E+00-.955021556489723E-03 0.848583542242443E-01-.347055368580516E+00-.250105923935497E+00 -.111169531807995E-010.355726590647559E-020.103808638914381E+00 -.419452883677787E-020.629179201941255E-020.186690274364628E-01 0.284594451775678E-02-.187651556580809E+000.162329962057502E-01 0.630915974421175E+000.187697560444679E+00-.210296554317769E-01 -.720224407521837E+000.223339360929664E-02-.104660843730164E+00 -.610626897833574E-020.229830867380655E-010.282458435792497E-02 0.118792023957512E-01-.170210445347221E-020.280196207015836E-05 -.279505004776387E-030.277071634101624E-01-.228909652598038E-03 0.119275380848415E+000.132437572800541E-04-.187601509624841E+00 0.141896128311551E+000.422365578665326E+000.128760036033913E+00 -.204838957235195E+000.434078772092150E-01-.806694510076191E+00 0.157787515993729E+000.591835161997387E-020.747010198847334E-02 -.805107391111651E-050.638873231222047E-030.680896813628902E-01 0.535850756882113E-030.102376722309374E+00-.412953070633613E-04 -.276931733144833E-04-.197474903775786E-060.430124026148356E-04 0.398149815745455E+00-.263184149901006E-07-.620746678004172E-09 0.576570088020053E-070.103875521776964E-030.125421883145019E-03 0.739661812433390E-05-.270405853635920E-03-.857409440491406E+00 -.277976071921764E-07-.193794904133083E-070.662509931437069E-07 0.348154383702452E-04-.110067008670377E-03-.330352097595245E-04 0.493295101362000E-030.326075781848338E+000.261637800500639E-02 0.593341606111460E-030.314880806247675E-01-.856875384808786E-02 -.235422243388757E-010.258747526082075E-020.999168100504882E+00 0.319275874645435E-030.547296896534694E-02-.116992826176418E-02 0.338370513154134E-01-.142777025302056E-02-.406778354377311E-01 0.504020403061023E+000.882092418045004E-01-.541496381623848E+00 0.411585398853575E+000.256567719316976E+00-.245588779787715E-01 0.823411976718524E-02-.411585419791624E+00-.183646426853795E+00 -.192903059548171E-020.123785362328905E-030.558759547771277E-01 -.250818717172438E-020.733379618122733E-030.955412980135956E-02 0.892865110995397E-03-.540490019218027E-010.372660426311295E-01 0.185501518436011E+000.158352234759734E+00-.216219089020215E-01 -.753414549089406E+000.241909096941899E-01-.408978751559392E+00 -.892679382602970E-010.438255593031304E+000.202475991596905E-02 0.108697778577146E-01-.151558617647810E-020.158189155579921E-04 -.273419002779876E-030.226951112635693E-02-.192207014371830E-03 0.576369410134945E-010.124942742956545E-04-.131329073179166E+00 0.305611774621079E+000.254739263535127E+000.552445048191232E-01 -.164344958886550E+000.206564820276684E+00-.662834178384440E+00 0.544315066876567E+00-.396148205477567E-020.698461846680987E-01 -.954984862955493E-040.123919551849472E-020.329652662042095E-01 0.103982753519749E-020.824191920632282E-01-.137575992812755E-03 -.118262824998473E-040.123526003258420E-040.707450826197362E-04 0.199578367733588E+000.363708976451750E-070.321899201930129E-07 -.250041569150016E-080.225985817010339E-030.399465008189380E-03 -.383274536444598E-04-.146616509322618E-02-.883662801063188E+00 -.664010684521299E-05-.735402308780296E-050.216923907460852E-04 0.824256599274688E-03-.523153796336422E-03-.266383346326575E-03 0.361288604263049E-020.423428960439017E+000.173851036205211E-02 0.222870073788660E-020.147323973899202E+00-.145602763087638E-02 -.153553351053440E+000.124330762289657E+000.969144432517211E+00 -.670088769709058E-080.279928963613627E-02-.535336505050603E-03 0.571786431162824E-020.501111613013933E-04-.375294159509387E-01 0.286470981196203E+000.189845534980769E+00-.635875367893217E+00 0.398691041336605E+000.186217324361401E+00-.114177856312955E+00 0.244995441534964E+00-.398691042678259E+000.213291086621552E+00 -.702759278074976E-01-.285865195571977E-030.607323396528475E-02 0.177522666938543E-030.232624905150071E-040.871528520081471E-03 0.104242811764133E-03-.117190708001031E+000.172804418631202E-01 0.531354146114651E+000.147827925084915E+00-.173568415846287E-01 -.754028144632404E+000.362393328445694E-02-.504753734217587E-01 -.606045340700605E-010.326623017330199E+000.140948202581589E-03 0.702783387652478E-03-.107036079108171E-030.590209447893790E-07 -.908741189140752E-06-.537857176299051E-04-.821800159702671E-06 0.742259477778545E-020.175891555799017E-06-.127575373639961E+00 0.173884621836369E+000.488642885545859E+000.101063732588886E+00 -.130420282060893E+000.415306618536464E-01-.760148095701464E+00 0.976580937993439E-01-.254359609712527E-010.312471985413515E+00 -.574123283391161E-060.433910605356674E-050.205862756366894E-02 0.430410468022567E-050.783406586305063E-02-.778456164311075E-06 -.423214058359036E-030.919140921167062E-030.661874120526856E-02 0.117109755045484E+000.562189141098998E-030.519894877621451E-03 -.109887397286355E-020.184158676355906E-010.128559805126469E-01 -.985063481572301E-02-.793770939849137E-01-.885499725592162E+00 -.183772385564369E-02-.887523056274150E-030.105538790154888E-01 0.403343983135072E-01-.178576536206106E-01-.109963830700987E-01 0.165007678884550E+000.407206303906568E+000.306348529486999E-02 0.239930764984804E-070.601420059751685E+00-.141146313644592E-02 -.605225595551520E+000.230075880325225E+000.468016488374206E+00 0.318887906876394E-020.194968143237539E+00-.679696569745449E+00 -.194968123740749E+000.679696569745495E+000.433921650703326E-05 0.686239809673315E-040.134914310172025E-04-.158714965443381E-01 0.332719906827371E-020.784843725910340E-010.139678381750007E+00 -.317681035662774E-02-.734092568722168E+000.988288218555025E-04 -.128106164851903E-02-.122669376425973E+000.648163369247435E+00 0.894069909141543E-050.405720798599522E-04-.531085987799746E-05 -.171919591025308E-050.803049222354254E-050.130444794348500E-04 0.861156968395583E-050.110231449582210E-02-.248231645536447E-05 -.375937616255964E-010.355819759338922E-010.229692292043488E+00 0.108667338908260E+00-.264758743157882E-010.393712049859257E-02 -.813756878731386E+000.512266270133843E-02-.668002364102831E-01 0.515117604605447E+000.492260750079268E-05-.272219895394282E-04 0.208694217366870E-03-.283952525261720E-040.917376031998474E-03 0.581122815426736E-05-.455060985419248E-02-.919535789492620E-03 0.349190607723191E-010.763767596648188E-010.265591381650204E-02 0.521301039994967E-02-.401859423332637E-020.732525315960548E-01 0.535241281320955E-01-.115977550287200E-01-.375723852306493E+00 -.771464840486708E+00-.315965957352218E-01-.143459287868964E-07 0.227393868069098E+000.322787116054316E+00-.215711586956064E-01 0.108257024347966E-020.242983985741911E+000.178264096966029E+00 0.707106766183749E+00-.707106796189347E+000.177843854234752E+00 -.619997921177283E+000.540358273709987E+000.540358286028759E+00 -.131869994779899E+00-.196304501085975E-020.698246561864295E+00 0.130169226789683E+00-.691457997403106E+00-.128013211249068E-01 0.546427753459058E-01-.934052075111080E-01-.664941001276631E-01 0.678859335665877E+000.119191372805422E+00-.713195424947486E+00 -.404938617540185E-010.181062659918079E-010.232791185547601E-01 0.321138225103363E+000.619279730616487E+000.570137931646475E-01 0.258785337293530E-07-.410315942496114E+00-.582446223508185E+00 -.707106781186560E+000.707106781186535E+00-.721341536320415E-08 -.428989822532113E+00-.636689094459996E+00-.636689104237412E+00 -.722614261203267E-010.282343743720400E-010.938364903717614E-02 -.678889534403801E+00-.334569836275536E-010.732874066643181E+00 0.490057224614373E-010.139296369817684E-01-.713288124764123E+00 -.453244904721617E-01-.128587843097479E-010.697424647376202E+00 -.191282821385874E-020.400397255563485E-01-.392330176179403E-02 0.585593361868326E-08-.614848650012675E+00-.364459981119449E+00 -.378769195029760E-010.669732104564358E-020.591610797545009E+00 0.368820602608620E+000.123195855168806E-020.621112322271792E+00 -.142906888883486E-01-.629115104083898E+000.451903369348001E+00 0.118349072475903E+00-.110429569969675E-070.218385917379393E-02 0.474020131646410E-040.341856293650974E-020.106540652945231E-03 -.645360819374788E-02-.383127542619521E-010.125973858299685E-01 -.215314667589504E+000.493886045857771E+000.440903158857425E+00 -.363141787614656E-010.220456050264233E+00-.493886011421948E+00 -.468226459066813E+000.231829628021786E-01-.362744711248249E-04 0.492042069801937E-020.330696552912518E-040.202644371713308E-04 0.496659907643311E-030.736840121878654E-04-.198191879706170E-01 0.183303009260840E-010.449742417866469E+000.410829172385245E-01 -.221035301005096E-01-.845083570129830E+000.229988122217302E-01 -.633862858502668E-02-.190597419343020E-010.282360542508567E+00 -.915253709884024E-050.467860617318541E-03-.936082013898601E-06 -.471900999515919E-050.360154552581113E-04-.445382936066878E-05 0.161761440053278E-02-.699826636234017E-06-.100518297978727E-01 0.813344640279481E-010.322240982462986E+000.365348966340719E-01 -.898377311847809E-010.138505009350467E+00-.847528994615232E+00 0.484822858208514E-02-.286713955100532E-010.376428436355344E+00 0.305214288653784E-050.181194673226224E-040.148033919232344E-03 0.173905350410810E-040.178925671284225E-020.258695791232144E-05 -.135493060354600E-02-.135066372724518E-020.135603142952304E-01 0.185868253362159E-01-.352836497074884E-01-.511901396462545E-08 0.541814512743478E+000.321167993263074E+000.399514083113646E-01 -.879433456844653E-02-.619330290540681E+00-.454991628886887E+00 -.105596987591205E-020.705649764873231E-020.285295653675024E-01 0.585189397982255E-01-.120981119976275E-02-.164054205324875E-07 0.605748606344640E-010.359064075394220E-010.286188393180971E-02 0.302723797596224E+00-.393634811399195E-01-.303819324099225E+00 0.770938930261185E+000.468969096158830E+000.138220192540853E-01 0.495490516333219E-020.992452014486792E-030.282067170458185E-01 -.526320537210620E-03-.626140892699711E-02-.420916642531304E-01 -.372664848981284E-02-.271564230509885E+000.464750601983194E+00 0.441452754120364E+00-.154463635706786E-010.286305584915958E+00 -.464750603183541E+00-.459710281950070E+000.276903753399330E-01 0.164107973795033E-020.494331015087113E-01-.288169856338215E-02 0.181384528842341E-030.371596182844276E-020.528440319457944E-03 -.941885934972875E-020.370997823273176E-010.231848896187434E+00 0.366243340421597E-01-.532260858845199E-01-.799048803738820E+00 0.134190051866849E+00-.785968234612202E-01-.524280946553506E-01 0.524565851490170E+00-.969902988985165E-040.332166998097683E-02 0.178393887634442E-050.113533332194821E-040.181974060923368E-03 0.139673311333751E-040.748922993006937E-020.105594089085603E-05 -.125119713273718E-020.902096536931047E-010.147246951099762E+00 0.149737886688360E-01-.133913301824410E+000.418936033466391E+00 -.811341515728799E+000.369333524141069E-01-.333282371384749E-01 0.340069402844183E+00-.681313090765745E-05-.458006071986632E-04 0.684063550008274E-03-.518596031454553E-040.780440694537957E-02 -.545350364764260E-05-.188819474609356E-020.169410258829227E-02 0.212175769390214E-010.173958315025131E+00-.797638722213490E-02 -.293947799718114E-020.113587530023477E+000.109694252187022E+00 0.142919996767946E-01-.337701654742926E-01-.209384087697011E+00 -.845567642095652E+000.201133506974394E-020.616308901856066E-02 -.971356627744613E-020.292603070320401E-01-.560758539688166E-02 -.946440555507977E-070.280843258259704E+000.322810651789196E+00 0.100624941112454E-010.259672364681204E-020.817713789100689E-01 -.378487363357314E-01-.713365278141413E-010.523743917330373E-01 0.991717031383619E+000.197738512819566E-020.208413168788660E-01 0.650446596813922E-020.135072660963680E+00-.621746918612862E-02 -.966281355133967E-03-.918875977233796E-02-.289501236543810E-01 -.685382822420014E+000.361708105505221E+000.357137550448023E+00 -.266613412827571E-010.782040935170842E-01-.361708121793891E+00 -.239799476892995E+00-.985520373764162E-030.124217593525461E-01 0.238575082904427E+00-.196146477726306E-010.488773826113334E-02 0.349527507620209E-010.379484360472854E-02-.190335388122274E-02 0.447950884527639E-010.432841152042769E-010.388755048096654E-01 -.538304662046303E-01-.789807137487042E+000.235705022604824E+00 -.513957403747273E+00-.370616288007413E-010.209032049105300E+00 -.288368196965015E-020.432040578288786E-010.127521601121691E-04 0.168677884713730E-030.617877501892261E-020.276772111811215E-03 0.600611597756269E-010.241666265834041E-040.303528049568012E-02 0.942997003617236E-010.379042102331497E-01-.330454305947829E-01 -.128113287104398E+000.555973181880454E+00-.775895571131535E+00 0.198144727494078E+00-.310709714778411E-010.100592357864689E+00 -.672609772397682E-04-.639611891632221E-030.104051260731826E-01 -.875477524731695E-030.832817668969010E-01-.846727903271358E-04 -.207408821420728E-030.486560668082637E-050.979491912068454E-03 0.277397787870578E+00-.138842323987768E-04-.406202819318755E-04 0.110309257668976E-030.939959189060195E-030.569551259786794E-03 -.294882488065178E-03-.498973942338665E-02-.880817149857464E+00 0.187425605060980E-060.501129676429758E-06-.300671605978139E-06 0.241872213478973E-03-.255178043170943E-03-.120288168640803E-07 0.127780982294317E-010.383433180051282E+000.725838932670944E-01 0.252083195843648E-020.117006173486548E+00-.223393012118206E+00 -.208342404872242E+000.234209847200587E-020.930605964661460E+00 0.173828081375503E-030.147277990800831E+000.181434246890757E-03 0.170536287384264E+00-.309107241232440E-030.259166691097343E-02 0.267966291631130E-010.188199924025729E-01-.669691184768908E+00 0.369388402445399E+000.298437454764436E+00-.279860191285971E-01 0.602660083184696E-01-.369388385141567E+00-.248022967896360E+00 -.464439367770653E-020.500024221342130E-030.305677755406208E+00 -.444449132690379E-030.124526942124952E-010.412389063954632E-01 0.477962868100348E-020.121324350674267E-030.172316413671693E-01 0.206626091962812E-020.826042674682101E-01-.291949989074805E-01 -.807935585115537E+000.719562126724321E-02-.844418266345479E-01 -.865202850613294E-010.565496269575906E+00-.854734894082898E-02 0.534551683245710E-010.248113583813972E-040.284156083985196E-03 0.468661828942036E-010.323108007624496E-030.188307985273998E+00 -.544725160151694E-050.322850342593503E-020.113497207464359E+00 0.155469184155135E-01-.196939954403634E+00-.194657514389626E+00 0.969404504569904E-01-.859164413239739E+000.872264017923245E-01 -.388952182996452E-010.189593190383465E+00-.795671796675343E-04 -.822688558144623E-030.606453458049934E-01-.908377415704067E-03 0.276089968873254E+000.114472964265622E-04-.488773078956015E-04 -.396188336235372E-050.999659673670207E-040.310777183676489E+00 -.571298251501996E-07-.143066131598022E-060.317328824163547E-06 0.183060084594285E-040.886359900474387E-040.190300654410858E-04 -.393117861683414E-03-.877646247157486E+00-.373857766313145E-07 0.404625131158292E-080.185231894502927E-060.706529209549547E-04 -.204895952319792E-04-.194471437864013E-080.102610554232600E-02 0.364901867847999E+000.517095658659024E-010.980626985835659E-04 0.109751994430230E+00-.156570782738845E+00-.139532788543006E+00 0.213245059817445E-020.964892906217063E+000.251687159024994E-02 0.101329163413399E+000.277117162597201E-020.118636768143132E+00 -.352176514804628E-02-.151217924652192E-020.119996119063301E+00 0.301941926097845E-01-.609479618054216E+000.407610676820285E+00 0.303999762041851E+000.761324043901745E-020.710147150771023E-02 -.407610668100491E+00-.356147653325360E+00-.939570530183214E-03 0.763317786414497E-020.217680817050759E+00-.493762301165418E-02 0.146000447120399E-010.479479620035907E-010.566504813998350E-02 -.844499638835638E-010.256283929519846E-010.544801062552938E+00 0.737368671651306E-01-.326618131262042E-01-.812123287123367E+00 0.154297518539648E-01-.144246520083369E+00-.462193369264405E-02 0.445557502386635E-01-.935867171427351E-020.605927338092271E-01 -.336190661502138E-050.199412672691505E-030.450587704881531E-01 0.172855825862255E-030.183127683802625E+00-.139506417990564E-04 -.371032128812401E-010.136441962315432E+000.173292355829121E+00 -.191031363946136E+00-.181314220103855E+000.140001406724419E+00 -.858012964858887E+000.124946578064121E+000.319424061996110E-02 0.399157810449760E-010.690865516433771E-05-.548226189109581E-03 0.563223050755544E-01-.459820360442181E-030.262427675882098E+00 0.354360602071234E-04-.450936989333873E-04-.377667649549115E-05 0.945332035517973E-040.319025562226798E+00-.368743805844936E-07 -.308404229414676E-080.169494334962014E-060.602269526486935E-04 0.812755972306230E-040.174914793561078E-04-.370843264734492E-03 -.875757998566261E+00-.335945798006633E-07-.675440572999075E-07 0.170899586778266E-060.198556153617846E-04-.186285422087375E-04 -.200657120064962E-080.932994787873637E-030.362311452102434E+00 0.191936222893093E-010.258518345891082E-020.109774305627631E+00 -.678956495743090E-01-.847535774245336E-010.232392489249417E-01 0.986521218946578E+000.106117819809660E-020.449024629045529E-01 0.124017224428534E-030.574386556615052E-01-.199965617249553E-02 -.247780638305697E-010.321522084088771E+000.379770340137811E-01 -.428306904638573E+000.454704028913566E+000.379204249645586E+00 -.148852886838934E-02-.367461131823450E-01-.454704049118167E+00 -.369132510355556E+000.664495198760334E-020.334719861886340E-02 0.113293303776695E+00-.281077382106382E-020.819596959668489E-02 0.379111551975742E-010.321568225388857E-02-.459084942734722E-01 0.541417868140426E-010.284992838760775E+000.576708222071649E-01 -.319166382924372E-01-.850884680215138E+000.981709154419468E-01 -.314558014739248E+00-.238292299646862E-010.267247900942539E+00 -.476409274846684E-020.572696388851242E-01-.253434325420875E-05 0.314019523401166E-040.175619612277255E-010.268781992242801E-04 0.102137732079325E+00-.352118389928833E-05-.431151846300100E-01 0.194195952369355E+000.171383771689655E+00-.727889707064056E-01 -.105037796330727E+000.373070405104482E+00-.832876291198495E+00 0.185201328324870E+00-.210719287242549E-020.883704590081362E-01 0.759148616038630E-05-.985068757445580E-040.241611227450762E-01 -.826584349992673E-040.168592324349136E+000.109363536546192E-04 -.140286296725473E-03-.128215836815657E-040.494558244488533E-03 0.280847654126040E+000.321515679088376E-070.120434247248497E-06 -.156044392922250E-070.887469968549317E-040.309083310171081E-03 -.137384777211738E-04-.226540409047954E-02-.880128001169638E+00 -.382651653993193E-05-.108131101348007E-040.233963836825757E-04 0.270492489874145E-03-.122252666299678E-030.612356227618477E-02 0.382695975727179E+000.732428021226023E-020.547713996664140E-02 0.396049984501415E+00-.481141822977436E-01-.405642629586525E+00 0.635749564952352E+000.521347508869209E+000.148024935841334E-01 -.301295407799686E-030.723544959371664E-020.207642865415858E-03 -.348694792387385E-010.263550631173699E+000.889595566279424E-01 -.418984214602752E+000.500266357695299E+000.408119429597393E+00 -.363233885356471E-010.804413318688337E-01-.500266373002098E+00 -.265517664767941E+00-.164627094124487E-01-.292271209593851E-03 0.124794323490641E-010.336449804275239E-030.498076969884902E-03 0.271691736959086E-020.231277279264080E-03-.567655532785492E-01 0.271848648436447E-010.503661384603298E+000.655366565640398E-01 -.243230693129746E-01-.789632788520066E+000.183179034548534E-01 -.311651765431028E-01-.255025625534976E-010.334633855693646E+00 -.190063900887600E-030.353945762482508E-02-.977710956462515E-05 0.746309618330485E-040.131595722141013E-020.739405964402529E-04 0.119008502370693E-01-.173222930707446E-04-.555999356456072E-01 0.142824249504943E+000.430859451845448E+000.458944077528358E-01 -.115195465102762E+000.132957232431433E+00-.828429389734122E+00 0.298427846700954E-01-.960653777292320E-020.264770324901898E+00 0.294775292625976E-04-.222797414239782E-030.199648632405749E-02 -.221026344617562E-030.169463786498493E-010.399691019732668E-04 -.412776023938866E-020.252572320635840E-030.233873710864906E-01 0.259719891251546E+000.415140740182975E-030.113529818985204E-02 -.174804710873652E-020.578214115132270E-020.122117368574587E-01 -.751426870967600E-02-.124904020763724E+00-.845228958797211E+00 -.212620236485092E-02-.168622369330729E-020.211514253839871E-01 0.215369670240951E-01-.534820692965796E-02-.144346899834284E-06 0.267863054400291E+000.359203496211911E+000.331086374854943E-02 -.845474757581534E-080.632504086378518E+00-.235118751978227E-01 -.638143102372112E+000.422974828693201E+000.114871343439142E+00 0.183672600439000E-070.671269422302639E-020.141774326820363E+00 -.692748182182047E+00-.141774300990027E+000.692748182182314E+00 0.481957392698951E-040.270388157735588E-030.258091963527867E-04 -.154613472923139E-010.788913409868525E-020.166281063480095E+00 0.631548573348084E-01-.719098717124253E-02-.783605853008467E+00 0.133352995840027E-02-.155351765852490E-02-.469231283040379E-01 0.593097595003567E+00-.145124296629042E-040.363129440721168E-03 -.755130544285567E-050.322329789563514E-040.162865732101339E-03 0.337458039242355E-040.188676716333058E-02-.967983875236429E-05 -.280294852982924E-010.560451599699661E-010.283514625914695E+00 0.623656558031793E-01-.513514652564355E-010.206258387156799E-01 -.826238746166489E+000.239687498883366E-02-.329344008682935E-01 0.474308373685584E+000.161872833336829E-04-.895145426991688E-04 0.315360387518861E-03-.933730942829438E-040.280130679481694E-02 0.191092696904015E-04-.835451218901018E-02-.224824288339140E-02 0.516928270523294E-010.109704348827131E+000.108269387812490E-02 0.107731305293616E-010.427800356853278E-020.368562069578784E-01 0.485484135495873E-01-.102507986038446E-01-.552216485696899E+00 -.594260620325315E+00-.316691755671850E-01-.132825140699132E-07 0.364597166754599E+000.174700089420081E+00-.717406486290489E-02 0.359222945921040E+000.172123612118179E+000.707106781186543E+00 -.707106781186557E+000.101992154740172E+00-.498361637024495E+00 0.608782920354223E+000.608782912866900E+00-.563724703278934E-01 -.438434828311532E-020.716766147603742E+000.537258122841962E-01 -.692937766919190E+00-.627170199294769E-020.346820800292373E-01 -.597760582014308E-01-.390085053120361E-010.691950856253261E+00 0.704045963162265E-01-.714079956171652E+00-.518737623309080E-01 0.761022812732684E-020.159550167655143E-010.604843345813386E+00 0.321896613542082E+000.567209593954754E-010.237137403293247E-07 -.653010405795925E+00-.312895948443595E+000.707106728865803E+00 -.707106833507286E+000.115866760025710E+000.687858841009181E+00 0.115866760025706E+00-.115866777390875E+00-.687858841015537E+00 -.115866765820121E+000.199959993541363E-01-.999800060016923E+00 0.199959993541364E-01-.999800060016920E+000.591447559760272E+00 -.774079952713837E+000.225809678402336E+000.707106745792210E+00 -.707106816580882E+000.102933637605961E+000.691960495020240E+00 0.102933654691574E+00-.102933654674223E+00-.691960495026485E+00 -.102933660046180E+000.199959993541364E-01-.999800060016920E+00 0.199960012762684E-01-.999800059978472E+00-.127452310568665E-01 -.132034018886979E-060.193643357350621E+000.641757529728320E+00 0.127452468624267E-010.175461378776522E-06-.638150377049360E+00 -.378270719499168E+000.707106745792551E+00-.707106816580538E+00 0.735498311658631E-010.699414631300659E+000.735498231523910E-01 -.735498255093039E-01-.699414659275387E+00-.735498261761447E-01 0.199960012762683E-01-.999800059978476E+000.199960003152027E-01 -.999800059997703E+00-.793687288626499E-02-.801466233668395E-07 0.109332282606681E+000.788133320380449E+000.793689353370808E-02 0.133933796941923E-06-.397501359005163E+00-.456901524012506E+00 0.707106745794469E+00-.707106816578630E+000.677577761723365E-01 0.700583874311953E+000.677577840360550E-01-.677577956934772E-01 -.700583874313761E+00-.677577869993615E-010.199960022373348E-01 -.999800059959256E+000.199960012762687E-01-.999800059978472E+00 -.319883555175909E-03-.118986023366735E-070.281838347380330E-02 0.876754646848632E+000.319884871920509E-030.150806759592284E-07 -.160183057271965E-01-.480662620945026E+000.707106745795564E+00 -.707106816577532E+00-.890947474946424E-020.706994528505650E+00 -.890947463346475E-020.890947671897219E-02-.706994499014701E+00 0.890947653156449E-020.199960022373347E-01-.999800059959259E+00 0.199960012762683E-01-.999800059978472E+00-.260858972545533E-04 -.191844269302226E-080.122620469735823E-030.885535385661900E+00 0.260860624298151E-040.247588712962808E-08-.130637283259506E-02 -.464570078388519E+000.707106732355502E+00-.707106830017597E+00 -.541723283909854E-010.702944338249317E+00-.541723317379545E-01 0.541723443718538E-01-.702944299891371E+000.541723452463965E-01 0.199960003152022E-01-.999800059997696E+000.199959993541364E-01 -.999800060016920E+00-.239127687416373E-04-.151460465105004E-08 0.115672896862657E-030.885262435736919E+000.239129677845735E-04 0.257585781747041E-08-.119766065837865E-02-.465090282588456E+00 0.707106725206366E+00-.707106837166720E+00-.919589760709782E-01 0.695044669841039E+00-.919589734520017E-010.919589804407779E-01 -.695044669843202E+000.919589782786625E-010.199960022373347E-01 -.999800059959252E+000.199960022373348E-01-.999800059959256E+00 -.151924628664646E-03-.510312341108572E-080.114456686280757E-02 0.879637007792521E+000.151925412556267E-03-.760985148748386E-02 -.475583292900870E+000.707106745794441E+00-.707106816578655E+00 -.123882094148375E+000.685059468109205E+00-.123882083877434E+00 0.123882100598866E+00-.685059436248697E+000.123882101836301E+00 0.199960012762683E-01-.999800059978476E+000.199960012762682E-01 -.999800059978480E+00-.678767592186647E-02-.117643398718500E-06 0.687172030420897E-010.819622591650248E+000.678770879243693E-02 0.183330445795151E-06-.339959963271509E+00-.455885765406123E+00 0.707106745794739E+00-.707106816578357E+00-.139007785337744E+00 0.679230170872582E+00-.139007785337747E+000.139007815139815E+00 -.679230226703378E+000.139007815139786E+000.199960003152020E-01 -.999800059997686E+000.199960003152021E-01-.999800059997696E+00 -.141044682813303E-01-.262174622790849E-060.157938172071501E+00 0.601128701028703E+000.141045167897438E-01-.706247527620910E+00 -.338402681597202E+000.707106745794821E+00-.707106816578275E+00 -.267856550417132E+000.654410317897785E+000.267856566195439E+00 -.654410317899671E+000.199960012762682E-01-.999800059978476E+00 0.199960012762681E-01-.999800059978476E+000.593949158047806E+00 0.223352700169129E+00-.772876425427416E+00 0.202394105899437E-120.274823389968666E-14-.554892366794151E-15 -.819274160312709E-15-.668810055472496E-160.212241558104048E-12 0.526299506130443E-14-.489385623532121E-15-.677032376568762E-15 -.451623379287585E-150.374666605049989E-120.222425138831361E-13 -.181544572943050E-14-.147988975572570E-14-.186104552378963E-14 0.000000000000000E+000.000000000000000E+000.435189840959789E-14 -.382967060044728E-130.505291153767714E-160.000000000000000E+00 0.000000000000000E+000.435189840959789E-14-.226298717299133E-13 0.121146683837838E-140.000000000000000E+000.000000000000000E+00 0.435189840959789E-140.130556952287927E-130.445674391403092E-14 0.000000000000000E+000.000000000000000E+000.435189840959789E-14 -.783341737833116E-140.234227328474855E-140.108206124046458E-12 -.215883859283577E-14-.403946870939676E-15-.686616926286516E-15 -.862012111631899E-150.303533244284811E-130.138010344467711E-14 -.404018824222715E-15-.286385196638407E-15-.390704401891710E-15 0.273411624622911E-13-.765610157434584E-15-.268141684612874E-15 -.132194093079351E-15-.601621965854667E-150.000000000000000E+00 0.384762796083885E-13-.193731562836694E-15-.413645768293773E-14 -.114278485295537E-050.807508878162117E-13-.380818779406990E-13 0.223648500602427E-14-.909889585701067E-140.331562834926780E-05 0.285043306029678E-12-.207058352673703E-13-.636970533077854E-14 0.524252010357629E-140.269297853105648E-050.171627453082871E-14 0.717975632069722E-14-.527448437137286E-140.464287948246645E-13 0.771098257180396E-080.234809096656618E-14-.359395808792810E-14 0.665552106043155E-140.757280959611803E-140.143718570281886E-11 0.222572869532307E-14-.139716009607018E-130.780446860517369E-15 0.362157028369366E-130.536540168957500E-100.307875265929601E-14 -.705504318733115E-140.337799402074240E-140.500401555294291E-13 0.426280731858752E-080.913287848754867E-130.103614716445489E-13 -.522859350784418E-140.499148370186354E-140.478624017132153E-05 0.121456366975691E-130.101624213254850E-140.216701101200512E-14 -.345271197980365E-140.110880789697911E-050.301216196618491E-14 -.540428228214019E-14-.222140164388316E-140.434955330079947E-15 -.160601989555048E-050.157559231112031E-130.420001628718037E-12 0.150572252957974E-13-.606223423353496E-13-.281774303279372E-03 -.161762764929301E-12-.342092744508673E-120.108249355143259E-12 -.615731698119600E-120.114252946436998E-030.846620542762694E-13 -.152621157809399E-12-.109809342763844E-12-.217943874621490E-12 0.797723962847499E-050.180888084740301E-130.122644376958020E-12 0.888551767886481E-130.204169584974151E-120.639904466172473E-07 0.102694065070745E-130.185542222646612E-13-.980356568716921E-14 0.213689007015383E-130.148657983204524E-100.938171534597355E-14 0.386707150480676E-130.185686924559307E-130.629279530815653E-13 0.178538186267594E-090.303591605636916E-130.247507485473141E-12 0.601948765785340E-130.259328208787118E-130.825012119453497E-07 0.165489865824259E-130.126909717971805E-12-.809972621173125E-15 0.260221066762617E-120.440673145488575E-04-.577391192374903E-13 -.141685739715840E-13-.898379506962308E-14-.587589075806416E-13 0.854336895419281E-040.695114309023588E-14-.183400756501765E-12 -.351268034790456E-13-.212800439402798E-13-.786196346629773E-03 0.231704757800883E-140.428729786047385E-12-.921006657969298E-13 -.722393149668797E-13-.500822403978593E-04-.114151854183011E-12 -.219912598762636E-120.126673756206235E-12-.382620831589828E-12 0.297225488674877E-040.234508048410960E-12-.218856288176897E-12 -.406403766139363E-12-.198463290029409E-120.217128723459237E-04 0.756454004598282E-130.728205498076627E-130.218097882502026E-12 0.166565512837028E-120.194699855455599E-060.325953303999443E-13 0.141059018716547E-120.163148755045124E-140.168350227066847E-13 0.364655761535216E-100.318693236147873E-130.629300865896806E-12 0.832072227609808E-130.104391586556431E-120.219566882979375E-08 0.966294840559207E-130.105322792611619E-120.154817975688185E-11 -.129150687222302E-120.159284559755380E-060.255359618793750E-12 -.669568573719880E-12-.140319512989452E-11-.148808193119654E-11 0.174243935653877E-040.235964900478605E-13-.158921691210278E-14 0.427286687073893E-13-.383875253964354E-130.209458122839295E-04 0.695114255617233E-15-.778936609739444E-12-.555263495967613E-13 0.178057460686566E-12-.931728111057866E-040.162193337546363E-14 0.192082021351027E-12-.338830504552759E-13-.259959064560709E-13 -.102908168635522E-040.119780901141838E-12-.705626182733349E-13 0.477777856036666E-13-.122188353215107E-120.628204494195552E-05 0.360502341905674E-12-.158458353411481E-12-.107460877005768E-12 -.543852067739607E-130.999832651169842E-050.223928511470390E-12 0.219031617335137E-130.683930191759728E-130.993011534250549E-13 0.421065904949251E-070.795593192526987E-130.200393330802057E-14 -.544643938855520E-14-.129085088280889E-130.307220157212393E-10 0.769647462983260E-13-.708645844756138E-130.190209280278036E-13 0.140249871726619E-15-.129729632851381E-080.200188825456105E-12 0.416378030603160E-130.430348021674659E-13-.704010864682257E-14 0.216263094106671E-080.146886604283455E-120.841533706518667E-13 -.661595658689806E-13-.941058011231196E-140.391430381205002E-05 -.756476598943381E-13-.606765392737815E-140.229242559524678E-13 -.319044605764485E-130.548350629631716E-050.695114303103693E-15 -.146061553715816E-12-.276900163448222E-130.327090370418689E-14 -.241110654148327E-040.497470124823223E-120.178190122707317E-13 -.335610877544072E-150.269804823123547E-15-.754610311602206E-14 0.504652984537124E-120.132811426043152E-130.276385428565550E-15 0.171095749713042E-15-.565706170888985E-090.495616483348267E-12 0.270460386923519E-140.213967823565366E-160.114116167083434E-15 -.307378214952379E-090.148059343055948E-120.704938251717327E-15 0.796554343080852E-160.134418545397471E-15-.214702302708836E-10 0.264143427774681E-13-.393383383587686E-15-.224429000369457E-15 -.166387009518229E-15-.956414562064006E-130.275728664863706E-13 -.252625379126553E-140.290067003721533E-16-.372943254642494E-16 -.292904363272568E-110.108669533011201E-12-.373828633891879E-14 -.135252686834076E-150.811516121004296E-16-.248539101337132E-10 0.179802895868020E-12-.101106161740470E-13-.776828549128017E-16 -.185243730945928E-15-.969762553748463E-090.132071717589703E-12 -.156903353468787E-14-.269565415329845E-15-.275066750336520E-16 -.168359295253083E-080.123035231649352E-12-.239352379930970E-14 -.225554746116851E-150.935226996093998E-16-.392547043891108E-14 Matrix/inst/Doxyfile0000644000176200001440000031430012703733441014206 0ustar liggesusers# Doxyfile 1.8.10 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = Matrix # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = "$Rev: 3170 $ at $LastChangedDate: 2016-04-14 17:28:33 +0200 (Thu, 14 Apr 2016) $" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = ../../../www/doxygen # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = YES # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = NO # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = YES # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text " # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = ../src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, # *.vhdl, *.ucf, *.qsf, *.as and *.js. FILE_PATTERNS = # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = NO # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = . # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = YES # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 8 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /

## Utility -- used in `dim<-` below, but also in Matrix(.) : ##' @title sparseVector --> sparseMatrix constructor ##' @param x "sparseVector" object ##' @param nrow integer or missing, as in matrix(), see ?matrix ##' @param ncol (ditto) ##' @param byrow logical (see ?matrix) ##' @param check logical indicating if it needs to be checked that 'x' is a sparseVector ##' @param symmetric logical indicating if result must be "symmetricMatrix" ##' @return an object inheriting from "sparseMatrix" ##' @author Martin Maechler, May 2007 ff. spV2M <- function (x, nrow, ncol, byrow = FALSE, check = TRUE, symmetric = FALSE) { cx <- class(x) if(check && !extends(cx, "sparseVector")) stop("'x' must inherit from \"sparseVector\"") if(!missing(ncol)) { ncol <- as.integer(ncol) if(ncol < 0) stop("'ncol' must be >= 0") } if(!missing(nrow)) { nrow <- as.integer(nrow) if(nrow < 0) stop("'nrow' must be >= 0") } n <- length(x) if(symmetric) { if(missing(nrow)) stop("Must specify 'nrow' when 'symmetric' is true") if(!missing(ncol) && nrow != ncol) stop("'nrow' and 'ncol' must be the same when 'symmetric' is true") ## otherwise ncol will not used at all when (symmetric) if(check && as.double(nrow)^2 != n) stop("'x' must have length nrow^2 when 'symmetric' is true") ## x <- x[indTri(nrow, upper=TRUE, diag=TRUE)] } else if(missing(nrow)) { nrow <- as.integer( if(missing(ncol)) { ## both missing: --> (n x 1) ncol <- 1L n } else { if(n %% ncol != 0) warning("'ncol' is not a factor of length(x)") as.integer(ceiling(n / ncol)) }) } else if(missing(ncol)) { ncol <- if(symmetric) nrow else { if(n %% nrow != 0) warning("'nrow' is not a factor of length(x)") as.integer(ceiling(n / nrow)) } } else { ## both nrow and ncol specified n.n <- as.double(ncol) * nrow # no integer overflow if(n.n < n) stop("nrow * ncol < length(x)", domain = NA) if(n.n != n) warning("nrow * ncol != length(x)", domain = NA) } ## now nrow * ncol >= n (or 'symmetric') ## ~~~~~~~~~~~~~~~~ cld <- getClassDef(cx) kind <- .M.kindC(cld) # "d", "n", "l", "i", "z", ... has.x <- kind != "n" clStem <- if(symmetric) "sTMatrix" else "gTMatrix" ## "careful_new()" : cNam <- paste0(kind, clStem) chngCl <- is.null(slotNames(newCl <- getClass(cNam, .Force=TRUE))) if(chngCl) { ## e.g. "igTMatrix" is not yet implemented if(substr(cNam,1,1) == "z") stop(gettextf("Class %s is not yet implemented", dQuote(cNam)), domain=NA) ## coerce to "double": newCl <- getClass(paste0("d", clStem)) } r <- new(newCl, Dim = c(nrow, ncol)) ## now "compute" the (i,j,x) slots given x@(i,x) i0 <- x@i - 1L if(byrow) { ## need as.integer(.) since @ i can be double j <- as.integer(i0 %% ncol) i <- as.integer(i0 %/% ncol) } else { ## default{byrow = FALSE} i <- as.integer(i0 %% nrow) j <- as.integer(i0 %/% nrow) } if(has.x) x <- if(chngCl) as.numeric(x@x) else x@x if(symmetric) { ## using uplo = "U" i0 <- i <= j ## i.e., indTri(nrow, upper=TRUE, diag=TRUE) i <- i[i0] j <- j[i0] if(has.x) x <- x[i0] } r@j <- j r@i <- i if(has.x) r@x <- x r }## {spV2M} .sparseV2Mat <- function(from) spV2M(from, nrow=from@length, ncol=1L, check=FALSE) setAs("sparseVector","Matrix", .sparseV2Mat) setAs("sparseVector","sparseMatrix", .sparseV2Mat) setAs("sparseVector","TsparseMatrix", .sparseV2Mat) setAs("sparseVector","CsparseMatrix", function(from) .Call(Tsparse_to_Csparse, .sparseV2Mat(from), FALSE)) ## This is very similar to the 'x = "sparseMatrix"' method in ./sparseMatrix.R: setMethod("dim<-", signature(x = "sparseVector", value = "ANY"), function(x, value) { if(!is.numeric(value) || length(value) != 2) stop("dim(.) value must be numeric of length 2") if(length(x) != prod(value <- round(value))) stop("dimensions don't match the number of cells") spV2M(x, nrow=value[1], ncol=value[2]) }) setMethod("length", "sparseVector", function(x) x@length) setMethod("t", "sparseVector", function(x) spV2M(x, nrow=1L, ncol=x@length, check=FALSE)) setMethod("show", signature(object = "sparseVector"), function(object) { n <- object@length cl <- class(object) cat(sprintf('sparse vector (nnz/length = %d/%.0f) of class "%s"\n', length(object@i), as.double(n), cl)) maxp <- max(1, getOption("max.print")) if(n <= maxp) { prSpVector(object, maxp = maxp) } else { # n > maxp : will cut length of what we'll display : ## cannot easily show head(.) & tail(.) because of "[1] .." printing of tail prSpVector(head(object, maxp), maxp = maxp) cat(" ............................", "\n ........suppressing ", n - maxp, " entries in show(); maybe adjust 'options(max.print= *)'", "\n ............................\n\n", sep='') } invisible(object) }) prSpVector <- function(x, digits = getOption("digits"), maxp = getOption("max.print"), zero.print = ".") { cld <- getClassDef(class(x)) stopifnot(extends(cld, "sparseVector"), maxp >= 1) if(is.logical(zero.print)) zero.print <- if(zero.print) "0" else " " ## kind <- .M.kindC(cld) ## has.x <- kind != "n" n <- x@length if(n > 0) { if(n > maxp) { # n > maxp =: nn : will cut length of what we'll display : x <- head(x, maxp) n <- maxp } xi <- x@i is.n <- extends(cld, "nsparseVector") logi <- is.n || extends(cld, "lsparseVector") cx <- if(logi) rep.int("N", n) else character(n) cx[if(length(xi)) -xi else TRUE] <- zero.print cx[ xi] <- { if(is.n) "|" else if(logi) c(":","|")[x@x + 1L] else ## numeric (or --not yet-- complex): 'has.x' in any cases format(x@x, digits = digits) } ## right = TRUE : cheap attempt to get better "." alignment print(cx, quote = FALSE, right = TRUE, max = maxp) } invisible(x) # TODO? in case of n > maxp, "should" return original x } ## This is a simplified intI() {-> ./Tsparse.R } -- for sparseVector indexing: intIv <- function(i, n, cl.i = getClass(class(i))) { ### Note: undesirable to use this for negative indices; ### ---- using seq_len(n) below means we are NON-sparse ... ### Fixed, for "x[i] with negative i" at least. ## Purpose: translate numeric | logical index into 1-based integer ## -------------------------------------------------------------------- ## Arguments: i: index vector (numeric | logical) *OR* sparseVector ## n: array extent { == length(.) } if(missing(i)) return(seq_len(n)) ## else : if(extends(cl.i, "numeric")) { storage.mode(i) <- "integer" int2i(i,n) ##-> ./Tsparse.R } else if (extends(cl.i, "logical")) { seq_len(n)[i] } else if(extends(cl.i, "nsparseVector")) { i@i # the indices are already there ! } else if(extends(cl.i, "lsparseVector")) { i@i[i@x] # "drop0", i.e. FALSE; NAs ok } else if (extends(cl.i, "sparseVector")) { ## 'i'sparse, 'd'sparse (etc) as.integer(i@x[i@i]) } else stop("index must be numeric, logical or sparseVector for indexing sparseVectors") } ## intIv() setMethod("head", signature(x = "sparseVector"), function(x, n = 6, ...) { stopifnot(length(n) == 1) if(n >= (nx <- x@length)) return(x) if(is.integer(x@i)) n <- as.integer(n) else stopifnot(n == round(n)) if(n < 0) n <- max(0L, n + nx) ## now be careful to *NOT* use seq_len(n), as this be efficient for huge n ## n < x@length now. ## As we *know* that '@i' is sorted increasingly: [x@i <= n] <==> [1:kk] x@length <- n x@i <- x@i[ii <- seq_len(which.max(x@i > n) - 1L)] if(.hasSlot(x, "x")) ## has.x: has "x" slot x@x <- x@x[ii] x }) setMethod("tail", signature(x = "sparseVector"), function(x, n = 6, ...) { stopifnot(length(n) == 1) if(n >= (nx <- x@length)) return(x) if(is.integer(x@i)) n <- as.integer(n) else stopifnot(n == round(n)) if(n < 0) n <- max(0L, n + nx) ## now be careful to *NOT* use seq_len(n), as this be efficient for huge n ## n < x@length now. ## As we *know* '@i' is sorted increasingly: [x@i > nx-n] <==> [kk:nx] x@length <- n n <- nx-n # and keep indices > n N <- length(x@i) ii <- if(any(G <- x@i > n)) which.max(G):N else FALSE x@i <- x@i[ii] - n if(.hasSlot(x, "x")) ## has.x: has "x" slot x@x <- x@x[ii] x }) setMethod("[", signature(x = "sparseVector", i = "index"), function (x, i, j, ..., drop) { has.x <- .hasSlot(x, "x")## has "x" slot n <- x@length if(extends(cl.i <- getClass(class(i)), "numeric") && any(i < 0)) { ## negative indices - remain sparse --> *not* using intIv() if(any(i > 0)) stop("you cannot mix negative and positive indices") if(any(z <- i == 0)) i <- i[!z] ## all (i < 0) : ## FIXME: an efficient solution would use C here i <- unique(sort(-i)) # so we need to drop the 'i's if(any(nom <- is.na(m <- match(x@i, i)))) { ## eliminate those with non-0 match x@i <- x@i[nom] if(has.x) x@x <- x@x[nom] } ii <- findInterval(x@i, i) ## subtract that : x@i <- x@i - ii x@length <- x@length - length(i) } else { ii <- intIv(i, n, cl.i=cl.i) m <- match(x@i, ii, nomatch = 0) sel <- m > 0L x@length <- length(ii) x@i <- m[sel] if(any(iDup <- duplicated(ii))) { i.i <- match(ii[iDup], ii) jm <- lapply(i.i, function(.) which(. == m)) if (has.x) sel <- c(which(sel), unlist(jm)) x@i <- c(x@i, rep.int(which(iDup), lengths(jm))) } if (has.x) x@x <- x@x[sel] } x }) setMethod("[", signature(x = "sparseVector", i = "lsparseVector"), function (x, i, j, ..., drop) x[sort.int(i@i[i@x])]) setMethod("[", signature(x = "sparseVector", i = "nsparseVector"), function (x, i, j, ..., drop) x[sort.int(i@i)]) ##--- Something else: Allow v[ ] -- exactly similarly: if(FALSE) { ## R_FIXME: Not working, as internal "[" only dispatches on 1st argument setMethod("[", signature(x = "atomicVector", i = "lsparseVector"), function (x, i, j, ..., drop) x[sort.int(i@i[i@x])]) setMethod("[", signature(x = "atomicVector", i = "nsparseVector"), function (x, i, j, ..., drop) x[sort.int(i@i)]) } ##' Implement x[i] <- value ##' @param x a "sparseVector" ##' @param i an "index" (integer, logical, ..) ##' @param value ##' @return a "sparseVector" of the same length as 'x' ## This is much analogous to replTmat in ./Tsparse.R: replSPvec <- function (x, i, value) { n <- x@length ii <- intIv(i, n) lenRepl <- length(ii) if(!lenRepl) return(x) ## else: lenRepl = length(ii) > 0 lenV <- length(value) if(lenV == 0) stop("nothing to replace with") ## else: lenV := length(value) > 0 if(lenRepl %% lenV != 0) stop("number of items to replace is not a multiple of replacement length") if(anyDuplicated(ii)) { ## multiple *replacement* indices: last one wins ## TODO: in R 2.6.0 use duplicate(*, fromLast=TRUE) ir <- lenRepl:1 keep <- match(ii, ii[ir]) == ir ii <- ii[keep] lenV <- length(value <- rep(value, length = lenRepl)[keep]) lenRepl <- length(ii) } has.x <- .hasSlot(x, "x")## has "x" slot m <- match(x@i, ii, nomatch = 0) sel <- m > 0L ## the simplest case if(all0(value)) { ## just drop the non-zero entries if(any(sel)) { ## non-zero there x@i <- x@i[!sel] if(has.x) x@x <- x@x[!sel] } return(x) } ## else -- some( value != 0 ) -- if(lenV > lenRepl) stop("too many replacement values") else if(lenV < lenRepl) value <- rep(value, length = lenRepl) ## now: length(value) == lenRepl > 0 v0 <- is0(value) ## value[1:lenRepl]: which are structural 0 now, which not? v.sp <- inherits(value, "sparseVector") if(any(sel)) { ## indices of non-zero entries -- WRT to subvector iN0 <- m[sel] ## == match(x@i[sel], ii) ## 1a) replace those that are already non-zero with new val. vN0 <- !v0[iN0] if(any(vN0) && has.x) { vs <- value[iN0[vN0]] x@x[sel][vN0] <- if(v.sp) sp2vec(vs, mode=typeof(x@x)) else vs } ## 1b) replace non-zeros with 0 --> drop entries if(any(!vN0)) { i <- which(sel)[!vN0] if(has.x) x@x <- x@x[-i] x@i <- x@i[-i] } iI0 <- if(length(iN0) < lenRepl) seq_len(lenRepl)[-iN0] # else NULL } else iI0 <- seq_len(lenRepl) if(length(iI0) && any(vN0 <- !v0[iI0])) { ## 2) add those that were structural 0 (where value != 0) ij0 <- iI0[vN0] x@i <- c(x@i, ii[ij0]) if(has.x) x@x <- c(x@x, if(v.sp) sp2vec(value[ij0], mode=typeof(x@x)) else value[ij0]) } x } setReplaceMethod("[", signature(x = "sparseVector", i = "index", j = "missing", value = "replValueSp"), replSPvec) setReplaceMethod("[", signature(x = "sparseVector", i = "sparseVector", j = "missing", value = "replValueSp"), ## BTW, the important case: 'i' a *logical* sparseVector replSPvec) ## Something else: Also allow x[ ] <- v e.g. for atomic x : if(FALSE) { ## R_FIXME: Not working, as internal "[<-" only dispatches on 1st argument ## Now "the work is done" inside intIv() : setReplaceMethod("[", signature(x = "atomicVector", i = "sparseVector", j = "missing", value = "replValue"), function (x, i, value) callGeneric(x, i = intIv(i, x@length), value=value)) } ## a "method" for c(<(sparse)Vector>, <(sparse)Vector>): ## FIXME: This is not exported, nor used (nor documented) c2v <- function(x, y) { ## these as(., "sp..V..") check input implicitly: cx <- class(x <- as(x, "sparseVector")) cy <- class(y <- as(y, "sparseVector")) if(cx != cy) { ## find "common" class; result does have 'x' slot cxy <- c(cx,cy) commType <- { if(all(cxy %in% c("nsparseVector", "lsparseVector"))) "lsparseVector" else { # ==> "numeric" ("integer") or "complex" xslot1 <- function(u, cl.u) if(cl.u != "nsparseVector") u@x[1] else TRUE switch(typeof(xslot1(x, cx) + xslot1(y, cy)), ## "integer", "double", or "complex" "integer" = "isparseVector", "double" = "dsparseVector", "complex" = "zsparseVector") } } if(cx != commType) x <- as(x, commType) if(cy != commType) y <- as(y, commType) cx <- commType } ## now *have* common type -- transform 'x' into result: nx <- x@length x@length <- nx + y@length x@i <- c(x@i, nx + y@i) if(cx != "nsparseVector") x@x <- c(x@x, y@x) x } ## sort.default() does ## x[order(x, na.last = na.last, decreasing = decreasing)] ## but that uses a *dense* integer order vector ## ==> need direct sort() method for "sparseVector" for mean(*,trim), median(),.. sortSparseV <- function(x, decreasing = FALSE, na.last = NA) { if(length(ina <- which(is.na(x)))) { if(is.na(na.last)) x <- x[-ina] } ## TODO .NotYetImplemented() } all.equal.sparseV <- function(target, current, ...) { if(!is(target, "sparseVector") || !is(current, "sparseVector")) { return(paste0("target is ", data.class(target), ", current is ", data.class(current))) } lt <- length(target) lc <- length(current) if(lt != lc) { return(paste0("sparseVector", ": lengths (", lt, ", ", lc, ") differ")) } t.has.x <- .hasSlot(target, "x")## has "x" slot c.has.x <- .hasSlot(current, "x")## has "x" slot nz.t <- length(i.t <- target @i) nz.c <- length(i.c <- current@i) t.x <- if(t.has.x) target@x else rep.int(TRUE, nz.t) c.x <- if(c.has.x) current@x else rep.int(TRUE, nz.c) if(nz.t != nz.c || any(i.t != i.c)) { ## "work" if indices are not the same i1.c <- setdiff(i.t, i.c)# those in i.t, not yet in i.c i1.t <- setdiff(i.c, i.t) if((n1t <- length(i1.t))) { target@i <- i.t <- c(i.t, i1.t) t.x <- c(t.x, rep.int(if(t.has.x) 0 else 0L, n1t)) } if((n1c <- length(i1.c))) { current@i <- i.c <- c(i.c, i1.c) c.x <- c(c.x, rep.int(if(c.has.x) 0 else 0L, n1c)) } } if(is.unsorted(i.t)) { ## method="quick" {"radix" not ok for large range} ii <- sort.list(i.t, method = "quick", na.last=NA) target@i <- i.t <- i.t[ii] t.x <- t.x[ii] } if(is.unsorted(i.c)) { ii <- sort.list(i.c, method = "quick", na.last=NA) current@i <- i.c <- i.c[ii] c.x <- c.x[ii] } ## Now, we have extended both target and current ## *and* have sorted the respective i-slot, the i-slots should match! stopifnot(all(i.c == i.t)) all.equal.numeric(c.x, t.x, ...) } ## all.equal.sparseV ## For these, we remain sparse: setMethod("all.equal", c(target = "sparseVector", current = "sparseVector"), all.equal.sparseV) setMethod("all.equal", c(target = "sparseVector", current = "sparseMatrix"), function(target, current, ...) all.equal.sparseV(target, as(current, "sparseVector"), ...)) setMethod("all.equal", c(target = "sparseMatrix", current = "sparseVector"), function(target, current, ...) all.equal.sparseV(as(target, "sparseVector"), current, ...)) ## For the others, where one is "dense", "go to" dense rather now than later: setMethod("all.equal", c(target = "ANY", current = "sparseVector"), function(target, current, ...) all.equal(target, as.vector(current), ...)) setMethod("all.equal", c(target = "sparseVector", current = "ANY"), function(target, current, ...) all.equal(as.vector(target), current, ...)) ## S3 method for 'c' [but only for dispatch on 1st arg, hence also exported as fn] c.sparseVector <- function(...) { svl <- lapply(list(...), as, Class = "sparseVector") ## cls <- unique(unlist(lapply(svl, is))) ns <- vapply(svl, slot, 1, "length") if((N <- sum(ns)) < .Machine$integer.max) { # some purism .. ns <- as.integer(ns) N <- as.integer(N) } narg <- length(ns) iss <- lapply(svl, slot, "i") ## new 'i' slot: ii <- unlist(iss) + rep(cumsum(c(0L, ns[-narg])), lengths(iss)) ## result must have 'x' slot if we have any has.x <- any(have.x <- vapply(svl, .hasSlot, logical(1L), name = "x")) if(has.x) { cls <- if (any(vapply(svl, is, NA, "zsparseVector"))) "zsparseVector" else if(any(vapply(svl, is, NA, "dsparseVector"))) "dsparseVector" else if(any(vapply(svl, is, NA, "isparseVector"))) "isparseVector" else "lsparseVector" if(!(all.x <- all(have.x))) one <- if (identical(cls, "lsparseVector")) TRUE else if(identical(cls, "isparseVector")) 1L else 1. xx <- unlist(if(all.x) lapply(svl, slot, "x") else lapply(seq_len(narg), function(i) { if(have.x[[i]]) svl[[i]]@x else rep_len(one, length(iss[[i]])) })) new(cls, x = xx, i = ii, length = N) } else ## no "x" slot new("nsparseVector", i = ii, length = N) } ### rep(x, ...) -- rep() is primitive with internal default method with these args: ### ----------- ### till R 2.3.1, it had rep.default() which we use as 'model' here. repSpV <- function(x, times) { ## == rep.int(, times)" times <- as.integer(times)# truncating as rep.default() n <- x@length has.x <- .hasSlot(x, "x")## has "x" slot ## just assign new correct slots: if(times <= 1) { ## be quick for {0, 1} times if(times < 0) stop("'times >= 0' is required") if(times == 0) { x@length <- 0L x@i <- integer(0) if(has.x) x@x <- rep.int(x@x, 0) } return(x) } n. <- as.double(n) if(n. * times >= .Machine$integer.max) n <- n. # so won't have overflow in subsequent multiplys x@length <- n * times x@i <- rep.int(x@i, times) + n * rep(0:(times-1L), each=length(x@i)) ## := outer(x@i, 0:(times-1) * n, "+") but a bit faster if(has.x) x@x <- rep.int(x@x, times) x } setMethod("rep", "sparseVector", function(x, times, length.out, each, ...) { if (length(x) == 0) return(if(missing(length.out)) x else head(x, length.out)) if (!missing(each)) { tm <- rep.int(each, length(x)) x <- rep(x, tm) # "recursively" if(missing(length.out) && missing(times)) return(x) } ## else : if (!missing(length.out)) # takes precedence over times times <- ceiling(length.out/length(x)) r <- repSpV(x, times) if (!missing(length.out) && length(r) != length.out) { if(length.out > 0) head(r, length.out) else r[integer(0)] } else r }) ### Group Methods (!) ## "Ops" : ["Arith", "Compare", "Logic"]: ---> in ./Ops.R ## ----- ## "Summary" ---> ./Summary.R ## --------- ## "Math", "Math2": ./Math.R ## ------- setMethod("solve", signature(a = "Matrix", b = "sparseVector"), function(a, b, ...) callGeneric(a, as(b, "sparseMatrix"))) ## the 'i' slot is 1-based *and* has no NA's: setMethod("which", "nsparseVector", function(x, arr.ind, useNames) x@i) setMethod("which", "lsparseVector", function(x, arr.ind, useNames) x@i[is1(x@x)]) ## and *error* for "dsparseVector", "i*", ... ##' indices of vector x[] to construct Toeplitz matrix ##' FIXME: write in C, port to R('stats' package), and use in stats::toeplitz() ind4toeplitz <- function(n) { A <- matrix(raw(), n, n) abs(as.vector(col(A) - row(A))) + 1L } .toeplitz.spV <- function(x, symmetric=TRUE, giveCsparse=TRUE) { ## semantically "identical" to stats::toeplitz n <- length(x) r <- spV2M(x[ind4toeplitz(n)], n,n, symmetric=symmetric, check=FALSE) if (giveCsparse) as(r, "CsparseMatrix") else r } setMethod("toeplitz", "sparseVector", .toeplitz.spV) Matrix/R/Csparse.R0000644000176200001440000004322213046326257013455 0ustar liggesusers#### Methods for the virtual class 'CsparseMatrix' of sparse matrices stored in #### "column compressed" format. #### -- many more specific things are e.g. in ./dgCMatrix.R setAs("CsparseMatrix", "TsparseMatrix", function(from) ## |-> cholmod_C -> cholmod_T -> chm_triplet_to_SEXP ## modified to support triangular (../src/Csparse.c) .Call(Csparse_to_Tsparse, from, is(from, "triangularMatrix"))) ## special cases (when a specific "to" class is specified) setAs("dgCMatrix", "dgTMatrix", function(from) .Call(Csparse_to_Tsparse, from, FALSE)) setAs("dsCMatrix", "dsTMatrix", function(from) .Call(Csparse_to_Tsparse, from, FALSE)) setAs("dsCMatrix", "dgCMatrix", function(from) .Call(Csparse_symmetric_to_general, from)) for(prefix in c("d", "l", "n")) setAs(paste0(prefix,"sCMatrix"), "generalMatrix", function(from) .Call(Csparse_symmetric_to_general, from)) rm(prefix) setAs("dtCMatrix", "dtTMatrix", function(from) .Call(Csparse_to_Tsparse, from, TRUE)) if(FALSE) ## old version C2dense <- function(from) { ## |-> cholmod_C -> cholmod_dense -> chm_dense_to_dense cld <- getClassDef(class(from)) if (extends(cld, "generalMatrix")) .Call(Csparse_to_dense, from, FALSE) else { ## "triangular" or "symmetric" : tri <- extends(cld, "triangularMatrix") ## Csparse_to_dense loses symmetry and triangularity properties. ## With suitable changes to chm_dense_to_SEXP (../src/chm_common.c) ## we could do this in C code -- or do differently in C {FIXME!} if (tri && from@diag == "U") from <- .Call(Csparse_diagU2N, from) as(.Call(Csparse_to_dense, from, symm = !tri), # -> "[dln]geMatrix" paste0(.M.kindC(cld), .dense.prefixes[if(tri) "t" else "s"], "Matrix")) } } C2dense <- function(from) .Call(Csparse_to_dense, from, NA_integer_) setAs("CsparseMatrix", "denseMatrix", C2dense) ## special cases (when a specific "to" class is specified) setAs("dgCMatrix", "dgeMatrix", function(from) .Call(Csparse_to_dense, from, 0L)) setAs("dsCMatrix", "denseMatrix", function(from) .Call(Csparse_to_dense, from, 1L)) setAs("dtCMatrix", "denseMatrix", function(from) .Call(Csparse_to_dense, from, -1L)) setAs("dgCMatrix", "vector", function(from) .Call(Csparse_to_vector, from)) setAs("dsCMatrix", "vector", function(from) .Call(Csparse_to_vector, from)) setMethod("as.vector", "dgCMatrix", function(x, mode) as.vector(.Call(Csparse_to_vector, x), mode)) setMethod("as.vector", "dsCMatrix", function(x, mode) as.vector(.Call(Csparse_to_vector, x), mode)) ## could do these and more for as(., "numeric") ... but we *do* recommend as(*,"vector"): ## setAs("dgCMatrix", "numeric", Csp2vec) ## setAs("dsCMatrix", "numeric", Csp2vec) ## |-> cholmod_C -> cholmod_dense -> chm_dense_to_matrix ## cholmod_sparse_to_dense converts symmetric storage to general ## storage so symmetric classes are ok for conversion to matrix. ## unit triangular needs special handling ##' exported .dxC2mat <- function(from, chkUdiag=TRUE) .Call(Csparse_to_matrix, from, chkUdiag, NA) setAs("dgCMatrix", "matrix", function(from) .Call(Csparse_to_matrix, from, FALSE, FALSE)) setAs("dsCMatrix", "matrix", function(from) .Call(Csparse_to_matrix, from, FALSE, TRUE)) setAs("dtCMatrix", "matrix", function(from) .Call(Csparse_to_matrix, from, TRUE, FALSE)) ## NB: Would *not* be ok for l*Matrix or n*Matrix, ## --------- as cholmod coerces to "REAL" aka "double" setAs("CsparseMatrix", "symmetricMatrix", function(from) { if(isSymmetric(from)) forceCspSymmetric(from) else stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") }) .validateCsparse <- function(x, sort.if.needed = FALSE) .Call(Csparse_validate2, x, sort.if.needed) ##-> to be used in sparseMatrix(.), e.g. --- but is unused currently ## NB: 'sort.if.needed' is called 'maybe_modify' in C -- so be careful ## more useful: .sortCsparse <- function(x) .Call(Csparse_sort, x) ## modifies 'x' !! ### Some group methods: ### Subsetting -- basic things (drop = "missing") are done in ./Matrix.R ### ---------- "[" and (currently) also ./sparseMatrix.R subCsp_cols <- function(x, j, drop) { ## x[ , j, drop=drop] where we know that x is Csparse* dn <- x@Dimnames jj <- intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE) r <- .Call(Csparse_submatrix, x, NULL, jj) if(!is.null(n <- dn[[1]])) r@Dimnames[[1]] <- n if(!is.null(n <- dn[[2]])) r@Dimnames[[2]] <- n[jj+1L] if(drop && any(r@Dim == 1L)) drop(as(r, "matrix")) else { if(!is.null(n <- names(dn))) names(r@Dimnames) <- n r } } subCsp_rows <- function(x, i, drop)# , cl = getClassDef(class(x)) { ## x[ i, drop=drop] where we know that x is Csparse* dn <- x@Dimnames ii <- intI(i, n = x@Dim[1], dn[[1]], give.dn = FALSE) r <- .Call(Csparse_submatrix, x, ii, NULL) if(!is.null(n <- dn[[1]])) r@Dimnames[[1]] <- n[ii+1L] if(!is.null(n <- dn[[2]])) r@Dimnames[[2]] <- n if(drop && any(r@Dim == 1L)) drop(as(r, "matrix")) else { if(!is.null(n <- names(dn))) names(r@Dimnames) <- n r } } subCsp_ij <- function(x, i, j, drop) { ## x[i, j, drop=drop] where we know that x is Csparse* d <- x@Dim dn <- x@Dimnames ## Take care that x[i,i] for symmetricM* stays symmetric i.eq.j <- identical(i,j) # < want fast check ii <- intI(i, n = d[1], dn[[1]], give.dn = FALSE) jj <- if(i.eq.j && d[1] == d[2]) ii else intI(j, n = d[2], dn[[2]], give.dn = FALSE) r <- .Call(Csparse_submatrix, x, ii, jj) if(!is.null(n <- dn[[1]])) r@Dimnames[[1]] <- n[ii + 1L] if(!is.null(n <- dn[[2]])) r@Dimnames[[2]] <- n[jj + 1L] if(!i.eq.j) { if(drop && any(r@Dim == 1L)) drop(as(r, "matrix")) else { if(!is.null(n <- names(dn))) names(r@Dimnames) <- n r } } else { ## i == j if(drop) drop <- any(r@Dim == 1L) if(drop) drop(as(r, "matrix")) else { if(!is.null(n <- names(dn))) names(r@Dimnames) <- n if(extends((cx <- getClassDef(class(x))), "symmetricMatrix")) ## TODO? make more efficient: .gC2sym(r, uplo = x@uplo)## preserve uplo ! else if(extends(cx, "triangularMatrix") && !is.unsorted(ii)) as(r, "triangularMatrix") else r } } } setMethod("[", signature(x = "CsparseMatrix", i = "index", j = "missing", drop = "logical"), function (x, i,j, ..., drop) { na <- nargs() Matrix.msg("Csp[i,m,l] : nargs()=",na, .M.level = 2) if(na == 4) subCsp_rows(x, i, drop=drop) else if(na == 3) .M.vectorSub(x, i) # as(x, "TsparseMatrix")[i, drop=drop] else ## should not happen stop("Matrix-internal error in [i,,d]; please report") }) setMethod("[", signature(x = "CsparseMatrix", i = "missing", j = "index", drop = "logical"), function (x,i,j, ..., drop) { Matrix.msg("Csp[m,i,l] : nargs()=",nargs(), .M.level = 2) subCsp_cols(x, j, drop=drop) }) setMethod("[", signature(x = "CsparseMatrix", i = "index", j = "index", drop = "logical"), function (x, i, j, ..., drop) { Matrix.msg("Csp[i,i,l] : nargs()=",nargs(), .M.level = 2) subCsp_ij(x, i, j, drop=drop) }) ## workhorse for "[<-" -- for d*, l*, and n..C-sparse matrices : ## --------- ----- replCmat <- function (x, i, j, ..., value) { di <- dim(x) dn <- dimnames(x) iMi <- missing(i) jMi <- missing(j) na <- nargs() Matrix.msg("replCmat[x,i,j,.., val] : nargs()=", na,"; ", if(iMi | jMi) sprintf("missing (i,j) = (%d,%d)", iMi,jMi), .M.level = 2) if(na == 3) { ## vector (or 2-col) indexing M[i] <- v : includes M[TRUE] <- v or M[] <- v ! x <- as(x, "TsparseMatrix") x[i] <- value # may change class e.g. from dtT* to dgT* clx <- sub(".Matrix$", "CMatrix", (c.x <- class(x))) if("x" %in% .slotNames(c.x) && any0(x@x)) ## drop all values that "happen to be 0" drop0(x, is.Csparse=FALSE) else as_CspClass(x, clx) } else ## nargs() == 4 : replCmat4(x, i1 = if(iMi) 0:(di[1] - 1L) else .ind.prep2(i, 1, di, dn), i2 = if(jMi) 0:(di[2] - 1L) else .ind.prep2(j, 2, di, dn), iMi=iMi, jMi=jMi, value=value) } ## replCmat replCmat4 <- function(x, i1, i2, iMi, jMi, value, spV = is(value,"sparseVector")) { dind <- c(length(i1), length(i2)) # dimension of replacement region lenRepl <- prod(dind) lenV <- length(value) if(lenV == 0) { if(lenRepl != 0) stop("nothing to replace with") else return(x) } ## else: lenV := length(value) is > 0 if(lenRepl %% lenV != 0) stop("number of items to replace is not a multiple of replacement length") if(lenV > lenRepl) stop("too many replacement values") clx <- class(x) clDx <- getClassDef(clx) # extends() , is() etc all use the class definition ## keep "symmetry" if changed here: x.sym <- extends(clDx, "symmetricMatrix") if(x.sym) { ## only half the indices are there.. ## using array() for large dind is a disaster... mkArray <- if(spV) # TODO: room for improvement function(v, dim) spV2M(v, dim[1],dim[2]) else array x.sym <- (dind[1] == dind[2] && all(i1 == i2) && (lenRepl == 1 || lenV == 1 || isSymmetric(mkArray(value, dim=dind)))) ## x.sym : result is *still* symmetric x <- .Call(Csparse_symmetric_to_general, x) ## but do *not* redefine clx! } else if(extends(clDx, "triangularMatrix")) { xU <- x@uplo == "U" r.tri <- ((any(dind == 1) || dind[1] == dind[2]) && if(xU) max(i1) <= min(i2) else max(i2) <= min(i1)) if(r.tri) { ## result is *still* triangular if(any(i1 == i2)) # diagonal will be changed x <- diagU2N(x) # keeps class (!) } else { # go to "generalMatrix" and continue x <- as(x, paste0(.M.kind(x), "gCMatrix")) ## & do not redefine clx! } } ## Temporary hack for debugging --- remove eventually -- FIXME : ## see also MATRIX_SUBASSIGN_VERBOSE in ../src/t_Csparse_subassign.c if(!is.null(v <- getOption("Matrix.subassign.verbose")) && v) { op <- options(Matrix.verbose = 2); on.exit(options(op)) ## the "hack" to signal "verbose" to the C code: i1[1] <- -i1[1] if(i1[1] == 0) warning("i1[1] == 0 ==> C-level verbosity will not happen!") } if(extends(clDx, "dMatrix")) { has.x <- TRUE x <- .Call(dCsparse_subassign, if(clx %in% c("dgCMatrix", "dtCMatrix")) x else as(x, "dgCMatrix"), i1, i2, as(value, "sparseVector")) } else if(extends(clDx, "lMatrix")) { has.x <- TRUE x <- .Call(lCsparse_subassign, if(clx %in% c("lgCMatrix", "ltCMatrix")) x else as(x, "lgCMatrix"), i1, i2, as(value, "sparseVector")) } else if(extends(clDx, "nMatrix")) { has.x <- FALSE x <- .Call(nCsparse_subassign, if(clx %in% c("ngCMatrix", "ntCMatrix"))x else as(x, "ngCMatrix"), i1, i2, as(value, "sparseVector")) } else if(extends(clDx, "iMatrix")) { has.x <- TRUE x <- .Call(iCsparse_subassign, if(clx %in% c("igCMatrix", "itCMatrix"))x else as(x, "igCMatrix"), i1, i2, as(value, "sparseVector")) } else if(extends(clDx, "zMatrix")) { has.x <- TRUE x <- .Call(zCsparse_subassign, if(clx %in% c("zgCMatrix", "ztCMatrix"))x else as(x, "zgCMatrix"), i1, i2, ## here we only want zsparseVector {to not have to do this in C}: as(value, "zsparseVector")) } else { ## use "old" code ... ## does this happen ? ==> if(identical(Sys.getenv("USER"),"maechler"))## does it still happen? __ FIXME __ stop("using \"old code\" part in Csparse subassignment") ## else warning("using\"old code\" part in Csparse subassignment\n >>> please report to Matrix-authors@r-project.org", immediate. = TRUE) xj <- .Call(Matrix_expand_pointers, x@p) sel <- (!is.na(match(x@i, i1)) & !is.na(match( xj, i2))) has.x <- "x" %in% slotNames(clDx)# === slotNames(x), ## has.x <==> *not* nonzero-pattern == "nMatrix" if(has.x && sum(sel) == lenRepl) { ## all entries to be replaced are non-zero: ## need indices instead of just 'sel', for, e.g., A[2:1, 2:1] <- v non0 <- cbind(match(x@i[sel], i1), match(xj [sel], i2), deparse.level=0L) iN0 <- 1L + .Call(m_encodeInd, non0, di = dind, orig1=TRUE, checkBounds=FALSE) has0 <- if(spV) length(value@i) < lenV else any(value[!is.na(value)] == 0) if(lenV < lenRepl) value <- rep_len(value, lenRepl) ## Ideally we only replace them where value != 0 and drop the value==0 ## ones; FIXME: see Davis(2006) "2.7 Removing entries", p.16, e.g. use cs_dropzeros() ## but really could be faster and write something like cs_drop_k(A, k) ## v0 <- 0 == value ## if (lenRepl == 1) and v0 is TRUE, the following is not doing anything ##- --> ./dgTMatrix.R and its replTmat() ## x@x[sel[!v0]] <- value[!v0] x@x[sel] <- as.vector(value[iN0]) if(extends(clDx, "compMatrix") && length(x@factors)) # drop cashed ones x@factors <- list() if(has0) x <- .Call(Csparse_drop, x, 0) return(if(x.sym) as_CspClass(x, clx) else x) } ## else go via Tsparse.. {FIXME: a waste! - we already have 'xj' ..} ## and inside Tsparse... the above i1, i2,..., sel are *all* redone! ## Happens too often {not anymore, I hope!} ## Matrix.msg("wasteful C -> T -> C in replCmat(x,i,j,v) for [i,j] <- v") x <- as(x, "TsparseMatrix") if(iMi) x[ ,i2+1L] <- value else if(jMi) x[i1+1L, ] <- value else x[i1+1L,i2+1L] <- value if(extends(clDx, "compMatrix") && length(x@factors)) # drop cashed ones x@factors <- list() }# else{ not using new memory-sparse code if(has.x && any0(x@x)) ## drop all values that "happen to be 0" as_CspClass(drop0(x), clx) else as_CspClass(x, clx) } ## replCmat4 setReplaceMethod("[", signature(x = "CsparseMatrix", i = "index", j = "missing", value = "replValue"), replCmat) setReplaceMethod("[", signature(x = "CsparseMatrix", i = "missing", j = "index", value = "replValue"), replCmat) setReplaceMethod("[", signature(x = "CsparseMatrix", i = "index", j = "index", value = "replValue"), replCmat) ### When the RHS 'value' is a sparseVector, now can use replCmat as well setReplaceMethod("[", signature(x = "CsparseMatrix", i = "missing", j = "index", value = "sparseVector"), replCmat) setReplaceMethod("[", signature(x = "CsparseMatrix", i = "index", j = "missing", value = "sparseVector"), replCmat) setReplaceMethod("[", signature(x = "CsparseMatrix", i = "index", j = "index", value = "sparseVector"), replCmat) ## A[ ij ] <- value, where ij is (i,j) 2-column matrix setReplaceMethod("[", signature(x = "CsparseMatrix", i = "matrix", j = "missing", value = "replValue"), function(x, i, j, ..., value) ## goto Tsparse modify and convert back: as(.TM.repl.i.mat(as(x, "TsparseMatrix"), i=i, value=value), "CsparseMatrix")) ## more in ./sparseMatrix.R (and ./Matrix.R ) setReplaceMethod("[", signature(x = "CsparseMatrix", i = "Matrix", j = "missing", value = "replValue"), function(x, i, j, ..., value) ## goto Tsparse modify and convert back: as(.TM.repl.i.mat(as(x, "TsparseMatrix"), i=i, value=value), "CsparseMatrix")) setMethod("t", signature(x = "CsparseMatrix"), function(x) .Call(Csparse_transpose, x, is(x, "triangularMatrix"))) ## NB: have extra tril(), triu() methods for symmetric ["dsC" and "lsC"] and ## for all triangular ones, where the latter may 'callNextMethod()' these: setMethod("tril", "CsparseMatrix", function(x, k = 0, ...) { k <- as.integer(k[1]) dd <- dim(x); sqr <- dd[1] == dd[2] stopifnot(-dd[1] <= k, k <= dd[1]) # had k <= 0 r <- .Call(Csparse_band, x, -dd[1], k) ## return "lower triangular" if k <= 0 if(sqr && k <= 0) .gC2tC(r, uplo = "L") else r }) setMethod("triu", "CsparseMatrix", function(x, k = 0, ...) { k <- as.integer(k[1]) dd <- dim(x); sqr <- dd[1] == dd[2] stopifnot(-dd[1] <= k, k <= dd[1]) # had k >= 0 r <- .Call(Csparse_band, x, k, dd[2]) ## return "upper triangular" if k >= 0 if(sqr && k >= 0) .gC2tC(r, uplo = "U") else r }) setMethod("band", "CsparseMatrix", function(x, k1, k2, ...) { k1 <- as.integer(k1[1]) k2 <- as.integer(k2[1]) dd <- dim(x); sqr <- dd[1] == dd[2] stopifnot(-dd[1] <= k1, k1 <= k2, k2 <= dd[2]) r <- .Call(Csparse_band, diagU2N(x), k1, k2) if(sqr && k1 * k2 >= 0) ## triangular as(r, paste0(.M.kind(x), "tCMatrix")) else if (k1 < 0 && k1 == -k2 && isSymmetric(x)) ## symmetric as(r, paste0(.M.kind(x), "sCMatrix")) else r }) setMethod("diag", "CsparseMatrix", function(x, nrow, ncol) { ## "FIXME": could be more efficient; creates new ..CMatrix: dm <- .Call(Csparse_band, diagU2N(x), 0, 0) dlen <- min(dm@Dim) ind1 <- dm@i + 1L # 1-based index vector if (is(dm, "nMatrix")) { val <- rep.int(FALSE, dlen) val[ind1] <- TRUE } else if (is(dm, "lMatrix")) { val <- rep.int(FALSE, dlen) val[ind1] <- as.logical(dm@x) } else { val <- rep.int(0, dlen) ## cMatrix not yet active but for future expansion if (is(dm, "cMatrix")) val <- as.complex(val) val[ind1] <- dm@x } val }) setMethod("writeMM", "CsparseMatrix", function(obj, file, ...) .Call(Csparse_MatrixMarket, obj, path.expand(as.character(file)))) setMethod("Cholesky", signature(A = "CsparseMatrix"), function(A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, ...) Cholesky(as(A, "symmetricMatrix"), perm=perm, LDL=LDL, super=super, Imult=Imult, ...)) ## TODO (in ../TODO for quite a while .....): setMethod("Cholesky", signature(A = "nsparseMatrix"), function(A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, ...) stop("Cholesky() -> *symbolic* factorization -- not yet implemented")) Matrix/R/bind2.R0000644000176200001440000004152412620623410013042 0ustar liggesusers#### Containing all cbind2() and rbind2() methods for all our Matrices ###-- General ----------------------------------------------------------- ###-- Dense, incl Diagonal ---------------------------------------------- ###-- Sparse ------------------------------------------------------------ setMethod("cbind2", signature(x = "sparseMatrix", y = "matrix"), function(x, y, ...) cbind2(x, .Call(dense_to_Csparse, y))) setMethod("cbind2", signature(x = "matrix", y = "sparseMatrix"), function(x, y, ...) cbind2(.Call(dense_to_Csparse, x), y)) setMethod("rbind2", signature(x = "sparseMatrix", y = "matrix"), function(x, y, ...) rbind2(x, .Call(dense_to_Csparse, y))) setMethod("rbind2", signature(x = "matrix", y = "sparseMatrix"), function(x, y, ...) rbind2(.Call(dense_to_Csparse, x), y)) ## originally from ./Matrix.R : ------------------------------- ## The trivial methods : setMethod("cbind2", signature(x = "Matrix", y = "NULL"), function(x, y, ...) x) setMethod("cbind2", signature(x = "Matrix", y = "missing"), function(x, y, ...) x) setMethod("cbind2", signature(x = "NULL", y="Matrix"), function(x, y, ...) x) ## using "atomicVector" not just "numeric" setMethod("cbind2", signature(x = "Matrix", y = "atomicVector"), function(x, y, ...) cbind2(x, matrix(y, nrow = nrow(x)))) setMethod("cbind2", signature(x = "atomicVector", y = "Matrix"), function(x, y, ...) cbind2(matrix(x, nrow = nrow(y)), y)) setMethod("cbind2", signature(x = "ANY", y = "Matrix"), function(x, y, ...) .bail.out.2(.Generic, class(x), class(y))) setMethod("cbind2", signature(x = "Matrix", y = "ANY"), function(x, y, ...) .bail.out.2(.Generic, class(x), class(y))) setMethod("rbind2", signature(x = "Matrix", y = "NULL"), function(x, y, ...) x) setMethod("rbind2", signature(x = "Matrix", y = "missing"), function(x, y, ...) x) setMethod("rbind2", signature(x = "NULL", y="Matrix"), function(x, y, ...) x) setMethod("rbind2", signature(x = "Matrix", y = "atomicVector"), function(x, y, ...) rbind2(x, matrix(y, ncol = ncol(x)))) setMethod("rbind2", signature(x = "atomicVector", y = "Matrix"), function(x, y, ...) rbind2(matrix(x, ncol = ncol(y)), y)) setMethod("rbind2", signature(x = "ANY", y = "Matrix"), function(x, y, ...) .bail.out.2(.Generic, class(x), class(y))) setMethod("rbind2", signature(x = "Matrix", y = "ANY"), function(x, y, ...) .bail.out.2(.Generic, class(x), class(y))) ## Makes sure one gets x decent error message for the unimplemented cases: setMethod("cbind2", signature(x = "Matrix", y = "Matrix"), function(x, y, ...) { rowCheck(x,y) .bail.out.2("cbind2", class(x), class(y)) }) ## Use a working fall back {particularly useful for sparse}: ## FIXME: implement rbind2 via "cholmod" for C* and Tsparse ones setMethod("rbind2", signature(x = "Matrix", y = "Matrix"), function(x, y, ...) { colCheck(x,y) t(cbind2(t(x), t(y))) }) ## originally from ./denseMatrix.R : ------------------------------- ### cbind2 setMethod("cbind2", signature(x = "denseMatrix", y = "numeric"), function(x, y, ...) { d <- dim(x); nr <- d[1]; nc <- d[2] y <- rep_len(y, nr) # 'silent procrustes' ## beware of (packed) triangular, symmetric, ... x <- as(x, geClass(x)) x@x <- c(x@x, as.double(y)) x@Dim[2] <- nc + 1L if(is.character(dn <- x@Dimnames[[2]])) x@Dimnames[[2]] <- c(dn, "") x }) ## the same, (x,y) <-> (y,x): setMethod("cbind2", signature(x = "numeric", y = "denseMatrix"), function(x, y, ...) { d <- dim(y); nr <- d[1]; nc <- d[2] x <- rep_len(x, nr) y <- as(y, geClass(y)) y@x <- c(as.double(x), y@x) y@Dim[2] <- nc + 1L if(is.character(dn <- y@Dimnames[[2]])) y@Dimnames[[2]] <- c("", dn) y }) setMethod("cbind2", signature(x = "denseMatrix", y = "matrix"), function(x, y, ...) cbind2(x, as_geSimpl(y))) setMethod("cbind2", signature(x = "matrix", y = "denseMatrix"), function(x, y, ...) cbind2(as_geSimpl(x), y)) cbind2DN <- function(dnx,dny, ncx,ncy) { ## R and S+ are different in which names they take ## if they differ -- but there's no warning in any case rn <- if(!is.null(dnx[[1]])) dnx[[1]] else dny[[1]] cx <- dnx[[2]] ; cy <- dny[[2]] cn <- if(is.null(cx) && is.null(cy)) NULL else c(if(!is.null(cx)) cx else character(ncx), if(!is.null(cy)) cy else character(ncy)) list(rn, cn) } setMethod("cbind2", signature(x = "denseMatrix", y = "denseMatrix"), function(x, y, ...) { rowCheck(x,y) ncx <- x@Dim[2] ncy <- y@Dim[2] ## beware of (packed) triangular, symmetric, ... hasDN <- !is.null.DN(dnx <- dimnames(x)) | !is.null.DN(dny <- dimnames(y)) x <- as(x, geClass(x)) y <- as(y, geClass(y)) xx <- c(x@x, y@x) ## be careful, e.g., if we have an 'n' and 'd' if(identical((tr <- typeof(xx)), typeof(x@x))) { x@x <- xx x@Dim[2] <- ncx + ncy if(hasDN) x@Dimnames <- cbind2DN(dnx,dny, ncx,ncy) x } else if(identical(tr, typeof(y@x))) { y@x <- xx y@Dim[2] <- ncx + ncy if(hasDN) y@Dimnames <- cbind2DN(dnx,dny, ncx,ncy) y } else stop("resulting x-slot has different type than x's or y's") }) ### rbind2 -- analogous to cbind2 --- more to do for @x though: setMethod("rbind2", signature(x = "denseMatrix", y = "numeric"), function(x, y, ...) { if(is.character(dn <- x@Dimnames[[1]])) dn <- c(dn, "") y <- rbind2(as(x,"matrix"), y) new(paste0(.M.kind(y), "geMatrix"), x = c(y), Dim = x@Dim + 1:0, Dimnames = list(dn, x@Dimnames[[2]])) }) ## the same, (x,y) <-> (y,x): setMethod("rbind2", signature(x = "numeric", y = "denseMatrix"), function(x, y, ...) { if(is.character(dn <- y@Dimnames[[1]])) dn <- c("", dn) x <- rbind2(x, as(y,"matrix")) new(paste0(.M.kind(x), "geMatrix"), x = c(x), Dim = y@Dim + 1:0, Dimnames = list(dn, y@Dimnames[[2]])) }) setMethod("rbind2", signature(x = "denseMatrix", y = "matrix"), function(x, y, ...) rbind2(x, as_geSimpl(y))) setMethod("rbind2", signature(x = "matrix", y = "denseMatrix"), function(x, y, ...) rbind2(as_geSimpl(x), y)) rbind2DN <- function(dnx, dny, nrx,nry) { if(!is.null.DN(dnx) || !is.null.DN(dny)) { ## R and S+ are different in which names they take ## if they differ -- but there's no warning in any case list(if(is.null(rx <- dnx[[1]]) & is.null(ry <- dny[[1]])) NULL else c(if(!is.null(rx)) rx else character(nrx), if(!is.null(ry)) ry else character(nry)), if(!is.null(dnx[[2]])) dnx[[2]] else dny[[2]]) } else list(NULL, NULL) } setMethod("rbind2", signature(x = "denseMatrix", y = "denseMatrix"), function(x, y, ...) { colCheck(x,y) nrx <- x@Dim[1] nry <- y@Dim[1] ## beware of (packed) triangular, symmetric, ... hasDN <- !is.null.DN(dnx <- dimnames(x)) | !is.null.DN(dny <- dimnames(y)) x <- as(x, geClass(x)) y <- as(y, geClass(y)) ## xx <- as.vector(.Internal(rbind(-1L, ## array(x@x, dim=x@Dim), ## array(y@x, dim=y@Dim)))) xx <- .Call(R_rbind2_vector, x, y) ## be careful, e.g., if we have an 'n' and 'd' if(identical((tr <- typeof(xx)), typeof(x@x))) { x@x <- xx x@Dim[1] <- nrx + nry if(hasDN) x@Dimnames <- rbind2DN(dnx,dny, nrx,nry) x } else if(identical(tr, typeof(y@x))) { y@x <- xx y@Dim[1] <- nrx + nry if(hasDN) y@Dimnames <- rbind2DN(dnx,dny, nrx,nry) y } else stop("resulting x-slot has different type than x's or y's") }) ## originally from ./diagMatrix.R : -------------------------------------- ## For diagonalMatrix: preserve sparseness {not always optimal, but "the law"} ## hack to suppress the obnoxious dispatch ambiguity warnings: diag2Sp <- function(x) suppressWarnings(as(x, "CsparseMatrix")) setMethod("cbind2", signature(x = "diagonalMatrix", y = "sparseMatrix"), function(x, y, ...) cbind2(diag2Sp(x), as(y,"CsparseMatrix"))) setMethod("cbind2", signature(x = "sparseMatrix", y = "diagonalMatrix"), function(x, y, ...) cbind2(as(x,"CsparseMatrix"), diag2Sp(y))) setMethod("rbind2", signature(x = "diagonalMatrix", y = "sparseMatrix"), function(x, y, ...) rbind2(diag2Sp(x), as(y,"CsparseMatrix"))) setMethod("rbind2", signature(x = "sparseMatrix", y = "diagonalMatrix"), function(x, y, ...) rbind2(as(x,"CsparseMatrix"), diag2Sp(y))) ## in order to evade method dispatch ambiguity, but still remain "general" ## we use this hack instead of signature x = "diagonalMatrix" for(cls in names(getClass("diagonalMatrix")@subclasses)) { setMethod("cbind2", signature(x = cls, y = "matrix"), function(x, y, ...) cbind2(diag2Sp(x), .Call(dense_to_Csparse, y))) setMethod("cbind2", signature(x = "matrix", y = cls), function(x, y, ...) cbind2(.Call(dense_to_Csparse, x), diag2Sp(y))) setMethod("rbind2", signature(x = cls, y = "matrix"), function(x, y, ...) rbind2(diag2Sp(x), .Call(dense_to_Csparse, y))) setMethod("rbind2", signature(x = "matrix", y = cls), function(x, y, ...) rbind2(.Call(dense_to_Csparse, x), diag2Sp(y))) ## These are already defined for "Matrix" ## -- repeated here for method dispatch disambiguation {"design-FIXME" ?} setMethod("cbind2", signature(x = cls, y = "atomicVector"), function(x, y, ...) cbind2(x, matrix(y, nrow = nrow(x)))) setMethod("cbind2", signature(x = "atomicVector", y = cls), function(x, y, ...) cbind2(matrix(x, nrow = nrow(y)), y)) setMethod("rbind2", signature(x = cls, y = "atomicVector"), function(x, y, ...) rbind2(x, matrix(y, ncol = ncol(x)))) setMethod("rbind2", signature(x = "atomicVector", y = cls), function(x, y, ...) rbind2(matrix(x, ncol = ncol(y)), y)) } ## originally from ./dsparseMatrix.R : -------------------------------- ## FIXME: dimnames() handling should happen in C code ## ------> ../src/Csparse.c ## Fast - almost non-checking methods .cbind2Csp <- function(x,y) .Call(Csparse_horzcat, as_Csp2(x), as_Csp2(y)) .rbind2Csp <- function(x,y) .Call(Csparse_vertcat, as_Csp2(x), as_Csp2(y)) cbind2sparse <- function(x,y) { ## beware of (packed) triangular, symmetric, ... if(identical(c(dnx <- dimnames(x), dny <- dimnames(y)), list(NULL,NULL,NULL,NULL))) ## keep empty dimnames .cbind2Csp(x,y) else { ## R and S+ are different in which names they take ## if they differ -- but there's no warning in any case rn <- if(!is.null(dnx[[1]])) dnx[[1]] else dny[[1]] cx <- dnx[[2]] ; cy <- dny[[2]] cn <- if(is.null(cx) && is.null(cy)) NULL else c(if(!is.null(cx)) cx else character(ncol(x)), if(!is.null(cy)) cy else character(ncol(y))) ans <- .cbind2Csp(x,y) ans@Dimnames <- list(rn, cn) ans } } setMethod("cbind2", signature(x = "sparseMatrix", y = "sparseMatrix"), function(x, y, ...) { rowCheck(x,y) cbind2sparse(x,y) }) rbind2sparse <- function(x,y) { ## beware of (packed) triangular, symmetric, ... if(identical(c(dnx <- dimnames(x), dny <- dimnames(y)), list(NULL,NULL,NULL,NULL))) ## keep empty dimnames .rbind2Csp(x,y) else { ## R and S+ are different in which names they take ## if they differ -- but there's no warning in any case cn <- if(!is.null(dnx[[2]])) dnx[[2]] else dny[[2]] rx <- dnx[[1]] ; ry <- dny[[1]] rn <- if(is.null(rx) && is.null(ry)) NULL else c(if(!is.null(rx)) rx else character(nrow(x)), if(!is.null(ry)) ry else character(nrow(y))) ans <- .rbind2Csp(x,y) ans@Dimnames <- list(rn, cn) ans } } setMethod("rbind2", signature(x = "sparseMatrix", y = "sparseMatrix"), function(x, y, ...) { colCheck(x,y) rbind2sparse(x,y) }) if(length(formals(cbind2)) >= 3) { ## newer R -- can use optional 'sparse = NA' setMethod("cbind2", signature(x = "sparseMatrix", y = "denseMatrix"), function(x, y, sparse = NA, ...) { nr <- rowCheck(x,y) if(is.na(sparse)) # result is sparse if "enough zeros" <==> sparseDefault() in Matrix() sparse <- (nnzero(x,na.counted=TRUE)+nnzero(y,na.counted=TRUE)) * 2 < nr * (ncol(x)+ncol(y)) if(sparse) cbind2sparse(x,y) else cbind2(as(x, "denseMatrix"), y) }) setMethod("cbind2", signature(x = "denseMatrix", y = "sparseMatrix"), function(x, y, sparse = NA, ...) { nr <- rowCheck(x,y) if(is.na(sparse)) # result is sparse if "enough zeros" <==> sparseDefault() in Matrix() sparse <- (nnzero(x,na.counted=TRUE)+nnzero(y,na.counted=TRUE)) * 2 < nr * (ncol(x)+ncol(y)) if(sparse) cbind2sparse(x,y) else cbind2(x, as(y, "denseMatrix")) }) setMethod("rbind2", signature(x = "sparseMatrix", y = "denseMatrix"), function(x, y, sparse = NA, ...) { nc <- colCheck(x,y) if(is.na(sparse)) # result is sparse if "enough zeros" <==> sparseDefault() in Matrix() sparse <- (nnzero(x,na.counted=TRUE)+nnzero(y,na.counted=TRUE)) * 2 < (nrow(x)+nrow(y)) * nc if(sparse) rbind2sparse(x,y) else rbind2(as(x, "denseMatrix"), y) }) setMethod("rbind2", signature(x = "denseMatrix", y = "sparseMatrix"), function(x, y, sparse = NA, ...) { nc <- colCheck(x,y) if(is.na(sparse)) # result is sparse if "enough zeros" <==> sparseDefault() in Matrix() sparse <- (nnzero(x,na.counted=TRUE)+nnzero(y,na.counted=TRUE)) * 2 < (nrow(x)+nrow(y)) * nc if(sparse) rbind2sparse(x,y) else rbind2(x, as(y, "denseMatrix")) }) } else { ## older version of R -- cbind2() has no "..." setMethod("cbind2", signature(x = "sparseMatrix", y = "denseMatrix"), function(x, y, ...) { nr <- rowCheck(x,y) ## result is sparse if "enough zeros" <==> sparseDefault() in Matrix() sparse <- (nnzero(x,na.counted=TRUE)+nnzero(y,na.counted=TRUE)) * 2 < nr * (ncol(x)+ncol(y)) if(sparse) cbind2sparse(x,y) else cbind2(as(x, "denseMatrix"), y) }) setMethod("cbind2", signature(x = "denseMatrix", y = "sparseMatrix"), function(x, y, ...) { nr <- rowCheck(x,y) ## result is sparse if "enough zeros" <==> sparseDefault() in Matrix() sparse <- (nnzero(x,na.counted=TRUE)+nnzero(y,na.counted=TRUE)) * 2 < nr * (ncol(x)+ncol(y)) if(sparse) cbind2sparse(x,y) else cbind2(x, as(y, "denseMatrix")) }) setMethod("rbind2", signature(x = "sparseMatrix", y = "denseMatrix"), function(x, y, ...) { nc <- colCheck(x,y) ## result is sparse if "enough zeros" <==> sparseDefault() in Matrix() sparse <- (nnzero(x,na.counted=TRUE)+nnzero(y,na.counted=TRUE)) * 2 < (nrow(x)+nrow(y)) * nc if(sparse) rbind2sparse(x,y) else rbind2(as(x, "denseMatrix"), y) }) setMethod("rbind2", signature(x = "denseMatrix", y = "sparseMatrix"), function(x, y, ...) { nc <- colCheck(x,y) ## result is sparse if "enough zeros" <==> sparseDefault() in Matrix() sparse <- (nnzero(x,na.counted=TRUE)+nnzero(y,na.counted=TRUE)) * 2 < (nrow(x)+nrow(y)) * nc if(sparse) rbind2sparse(x,y) else rbind2(x, as(y, "denseMatrix")) }) }# older R -- no "sparse = NA" if(FALSE) { ## FIXME ##------------- maybe a bit faster --- but too much to maintain ## would have to be done for "rbind2" as well ... setMethod("cbind2", signature(x = "sparseMatrix", y = "numeric"), function(x, y, ...) { d <- dim(x); nr <- d[1]; nc <- d[2]; cl <- class(x) x <- as(x, "CsparseMatrix") if(nr > 0) { y <- rep_len(y, nr) # 'silent procrustes' n0y <- y != 0 n.e <- length(x@i) x@i <- c(x@i, (0:(nr-1))[n0y]) x@p <- c(x@p, n.e + sum(n0y)) x@x <- c(x@x, y[n0y]) } else { ## nr == 0 } x@Dim[2] <- nc + 1L if(is.character(dn <- x@Dimnames[[2]])) x@Dimnames[[2]] <- c(dn, "") x }) ## the same, (x,y) <-> (y,x): setMethod("cbind2", signature(x = "numeric", y = "sparseMatrix"), function(x, y, ...) { d <- dim(y); nr <- d[1]; nc <- d[2]; cl <- class(y) y <- as(y, "CsparseMatrix") if(nr > 0) { x <- rep_len(x, nr) # 'silent procrustes' n0x <- x != 0 y@i <- c((0:(nr-1))[n0x], y@i) y@p <- c(0L, sum(n0x) + y@p) y@x <- c(x[n0x], y@x) } else { ## nr == 0 } y@Dim[2] <- nc + 1L if(is.character(dn <- y@Dimnames[[2]])) y@Dimnames[[2]] <- c(dn, "") y }) }## -- no longer ## Can be made very efficient setMethod("rbind2", signature(x = "indMatrix", y = "indMatrix"), function(x, y, ...) { dx <- x@Dim dy <- y@Dim if(dx[2] != dy[2]) stop(gettextf("Matrices must have same number of columns in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain=NA) new("indMatrix", Dim = c(dx[1]+dy[1], dx[2]), perm = c(x@perm,y@perm), Dimnames = rbind2DN(dimnames(x), dimnames(y), dx[1],dy[1])) }) Matrix/R/Auxiliaries.R0000644000176200001440000015072313201423765014334 0ustar liggesusers#### "Namespace private" Auxiliaries such as method functions #### (called from more than one place --> need to be defined early) .Matrix.avoiding.as.matrix <- FALSE # (always on CRAN -- have documented it since 2015) ## NB: sync with ../NAMESPACE ## Need to consider NAs ; "== 0" even works for logical & complex: ## Note that "!x" is faster than "x == 0", but does not (yet!) work for complex ## if we did these in C, would gain a factor 2 (or so): is0 <- function(x) !is.na(x) & x == 0 isN0 <- function(x) is.na(x) | x != 0 is1 <- function(x) !is.na(x) & x # also == "isTRUE componentwise" ## ##allFalse <- function(x) !any(x) && !any(is.na(x))## ~= all0, but allFalse(NULL) = TRUE w/warning ##all0 <- function(x) !any(is.na(x)) && all(!x) ## ~= allFalse allFalse <- function(x) if(is.atomic(x)) .Call(R_all0, x) else !any(x) && !any(is.na(x)) all0 <- function(x) if(is.atomic(x)) .Call(R_all0, x) else all(!x) && !any(is.na(x)) ##anyFalse <- function(x) isTRUE(any(!x)) ## ~= any0 ## any0 <- function(x) isTRUE(any(x == 0)) ## ~= anyFalse anyFalse <- any0 <- function(x) if(is.atomic(x)) .Call(R_any0, x) else isTRUE(any(!x)) ## These work "identically" for 1 ('==' TRUE) and 0 ('==' FALSE) ## (but give a warning for "double" 1 or 0) ## TODO: C versions of these would be faster allTrue <- function(x) all(x) && !anyNA(x) ## Note that mode() = "numeric" -- as0(), as1() return "double" ## which is good *AS LONG AS* we do not really have i..Matrix integer matrices as1 <- function(x, mod=mode(x)) switch(mod, "integer"= 1L, "double"=, "numeric"= 1, "logical"= TRUE, "complex"= 1+0i, stop(gettextf("invalid 'mod': %s", mod), domain = NA)) as0 <- function(x, mod=mode(x)) switch(mod, "integer"= 0L, "double"=, "numeric"= 0, "logical"= FALSE, "complex"= 0+0i, stop(gettextf("invalid 'mod': %s", mod), domain = NA)) ##' Should the matrix/Matrix x or a combination of x and y be treated as 'sparse' ? ## sparseDefault <- function(x, y=NULL) { ## if(is.null(y)) ## prod(dim(x)) > 2*sum(isN0(as(x, "matrix"))) ## else ## nrow / ncol ... differentiate this would be for rbind / cbind --> ./bind2.R ## (nnzero(x) + nnzero(y)) * 2 < (nrow(x)+nrow(y)) * nc ## } sparseDefault <- function(x) prod(dim(x)) > 2*sum(isN0(as(x, "matrix"))) ## NB: .fixupDimnames() needs to be defined in ./AllClass.R .M.DN <- function(x) dimnames(x) %||% list(NULL,NULL) .has.DN <- ## has non-trivial Dimnames slot? function(x) !identical(list(NULL,NULL), x@Dimnames) ## This is exported now ( -> ../man/is.null.DN.Rd ): is.null.DN <- function(dn) { is.null(dn) || { if(!is.null(names(dn))) names(dn) <- NULL ch0 <- character(0) identical(dn, list(NULL,NULL)) || identical(dn, list(ch0, NULL)) || identical(dn, list(NULL, ch0)) || identical(dn, list(ch0, ch0)) } } ##' return 'x' unless it is NULL where you'd use 'orElse' `%||%` <- function(x, orElse) if(!is.null(x)) x else orElse ## not %in% : `%nin%` <- function (x, table) is.na(match(x, table)) nonTRUEoption <- function(ch) is.null(v <- getOption(ch)) || !isTRUE(v) ##' @title Check identical(i, 0:n) {or identical(i, 1:n) when Ostart is false} ##' @param i an integer vector, to be compared with 0:n or 1:n ##' @param n an integer number ##' @param Ostart logical indicating if comparison with 0:n or 1:n should be made ##' @return TRUE or FALSE ##' @author Martin Maechler isSeq <- function(i, n, Ostart = TRUE) { ## FIXME: Port to C, use simple .Call() which is much faster notably in FALSE cases ## and then *export* (and hence document) identical(i, if(Ostart) 0L:n else seq_len(n)) } .bail.out.1 <- function(fun, cl) { stop(gettextf( 'not-yet-implemented method for %s(<%s>).\n ->> Ask the package authors to implement the missing feature.', fun, cl[1L]), call. = FALSE, domain=NA) } .bail.out.2 <- function(fun, cl1, cl2) { stop(gettextf( 'not-yet-implemented method for %s(<%s>, <%s>).\n ->> Ask the package authors to implement the missing feature.', fun, cl1[1L], cl2[1L]), call. = FALSE, domain=NA) } Matrix.msg <- function(..., .M.level = 1) { if(!is.null(v <- getOption("Matrix.verbose")) && v >= .M.level) message(...) } ## TODO: faster via C, either R's R_data_class() [which needs to become API !] ## or even direct getAttrib(x, R_ClassSymbol); .. ##' class - single string, no "package" attribute,.. .class0 <- function(x) as.vector(class(x)) ## we can set this to FALSE and possibly measure speedup: .copyClass.check <- TRUE ## This should be done in C and be exported by 'methods': [FIXME - ask JMC ] copyClass <- function(x, newCl, sNames = intersect(slotNames(newCl), slotNames(x)), check = .copyClass.check) { r <- new(newCl) ## Equivalent of ## for(n in sNames) slot(r, n, check=check) <- slot(x, n) : if(check) for(n in sNames) slot(r, n) <- slot(x, n) else for(n in sNames) # don't check, be fast ## .Call("R_set_slot", r, n, slot(x,n), PACKAGE = "methods") ## "ugly", but not using .Call(*, "methods") attr(r, n) <- attr(x, n) r } ##' Return the (maybe super-)class of class 'cl' from "Matrix", returning character(0) if there is none. ##' ##' @title The Matrix (Super-) Class of a Class ##' @param cl string, class name ##' @param cld its class definition ##' @param ...Matrix if TRUE, the result must be of pattern "[dlniz]..Matrix" ##' where the first letter "[dlniz]" denotes the content kind. ##' @param dropVirtual ##' @param ... other arguments are passed to .selectSuperClasses() ##' @return a character string ##' @author Martin Maechler, Date: 24 Mar 2009 MatrixClass <- function(cl, cld = getClassDef(cl), ...Matrix = TRUE, dropVirtual = TRUE, ...) { ## stopifnot(is.character(cl)) ## Hmm, packageSlot(cl) *can* be misleading --> use cld@package first: if(is.null(pkg <- cld@package)) { if(is.null(pkg <- packageSlot(cl))) return(character()) ## else we use 'pkg' } if(identical(pkg, "Matrix") && (!...Matrix || (cl != "indMatrix" && identical(1L, grep("^[dlniz]..Matrix$", cl))))) cl else { ## possibly recursively r <- .selectSuperClasses(cld@contains, dropVirtual = dropVirtual, namesOnly = TRUE, ...) if(length(r)) { while(!length(r1 <- Recall(r[1], ...Matrix = ...Matrix, dropVirtual = dropVirtual)) && length(r) > 1) r <- r[-1] r1 } else r } } attrSlotNames <- function(m, factors = TRUE) { ## slotnames of Matrix objects which are *not* directly content related sn <- slotNames(m); sn[sn %nin% c("x","i","j","p", if(!factors) "factors")] } ##' @param m ##' @return the slots of 'm' which are "attributes" of some kind. attrSlots <- function(m, factors = TRUE) sapply(attrSlotNames(m, factors=factors), function(sn) slot(m, sn), simplify = FALSE) ##' @return { NULL | TRUE | character | list(.) } attr.all_Mat <- function(target, current, check.attributes = TRUE, factorsCheck = FALSE, ...) { msg <- if(check.attributes) all.equal(attrSlots(target, factors=factorsCheck), attrSlots(current, factors=factorsCheck), check.attributes = TRUE, ...) ## else NULL if((c1 <- class(target)) != (c2 <- class(current))) ## list(): so we can easily check for this list(c(if(!isTRUE(msg)) msg, paste0("class(target) is ", c1, ", current is ", c2))) else msg } ##' @return combination for all.equal() functions in ./Matrix.R & ./sparseMatrix.R .a.e.comb <- function(msg, r) { if((is.null(msg) || isTRUE(msg)) & (r.ok <- isTRUE(r))) TRUE else c(if(!isTRUE(msg)) msg, if(!r.ok) r) } ## chol() via "dpoMatrix" ## This will only be called for *dense* matrices cholMat <- function(x, pivot = FALSE, ...) { packed <- .isPacked(x) nmCh <- if(packed) "pCholesky" else "Cholesky" if(!is.null(ch <- x@factors[[nmCh]])) return(ch) ## use the cache px <- as(x, if(packed) "dppMatrix" else "dpoMatrix") if (isTRUE(validObject(px, test=TRUE))) ## 'pivot' is not used for dpoMatrix .set.factors(x, nmCh, chol(px, pivot, ...)) else stop("'x' is not positive definite -- chol() undefined.") } invPerm.R <- function(p) { p[p] <- seq_along(p) ; p } ## how much faster would this be in C? -- less than a factor of two? invPerm <- function(p, zero.p = FALSE, zero.res = FALSE) .Call(inv_permutation, p, zero.p, zero.res) ## sign( ) == determinant( ) signPerm <- function(p) { ## Purpose: sign() via the cycles ## ---------------------------------------------------------------------- ## Arguments: a permutation of 1:n ## ---------------------------------------------------------------------- ## Author: Peter Dalgaard, 14 Apr 2008 // speedup: Martin Maechler 2008-04-16 n <- length(p) x <- integer(n) ii <- seq_len(n) for (i in ii) { z <- ii[!x][1] # index of first unmarked x[] entry if (is.na(z)) break repeat { ## mark x[] <- i for those in i-th cycle x[z] <- i z <- p[z] if (x[z]) break } } ## Now, table(x) gives the cycle lengths, ## where split(seq_len(n), x) would give the cycles list ## tabulate(x, i - 1L) is quite a bit faster than the equivalent ## table(x) clen <- tabulate(x, i - 1L) ## The sign is -1 (<==> permutation is odd) iff ## the cycle factorization contains an odd number of even-length cycles: 1L - (sum(clen %% 2 == 0) %% 2L)*2L } detSparseLU <- function(x, logarithm = TRUE, ...) { ## Purpose: Compute determinant() from lu.x = lu(x) ## ---------------------------------------------------------------------- ## Author: Martin Maechler, Date: 15 Apr 2008 if(any(x@Dim == 0)) return(mkDet(numeric(0))) ll <- lu(x, errSing = FALSE) ## ^^^^^^^^^^^^^^^ no error in case of singularity if(identical(NA, ll)) { ## LU-decomposition failed with singularity return(mkDet(ldet = if(anyNA(x)) NaN else -Inf, logarithm=logarithm, sig = 1L)) } ## else stopifnot(all(c("L","U") %in% slotNames(ll))) # ensure we have *sparse* LU r <- mkDet(diag(ll@U), logarithm) ## Det(x) == Det(P L U Q) == Det(P) * 1 * Det(U) * Det(Q); where Det(P), Det(Q) in {-1,1} r$sign <- r$sign * signPerm(ll@p + 1L) * signPerm(ll@q + 1L) r } ## Log(Determinant) from diagonal ... used several times mkDet <- function(d, logarithm = TRUE, ldet = sum(log(abs(d))), sig = -1L+2L*as.integer(prod(sign(d)) >= 0)) { # sig: -1 or +1 (not 0 !) modulus <- if (logarithm) ldet else exp(ldet) attr(modulus, "logarithm") <- logarithm val <- list(modulus = modulus, sign = sig) class(val) <- "det" val } ##' utility, basically == norm(x, type = "2") norm2 <- function(x) if(anyNA(x)) NaN else svd(x, nu = 0L, nv = 0L)$d[1L] dimCheck <- function(a, b) { da <- dim(a) db <- dim(b) if(any(da != db)) stop(gettextf("Matrices must have same dimensions in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain=NA) da } mmultCheck <- function(a, b, kind = 1L) { ## Check matching matrix dimensions and return that matching dim ## 1) %*% : [n x m] , [m x k] ## 2) crossprod: [m x n] , [m x k] ## 3) tcrossprod: [n x m] , [k x m] ## switch(kind, ## { ## %*% (kind = 1) ## ca <- dim(a)[2L] ## rb <- dim(b)[1L] ## }, ## { ## crossprod (kind = 2) ## ca <- dim(a)[1L] ## rb <- dim(b)[1L] ## }, ## { ## tcrossprod (kind = 3) ## ca <- dim(a)[2L] ## rb <- dim(b)[2L] ## }) ca <- dim(a)[1L + (kind %% 2L)] rb <- dim(b)[1L + (kind > 2)] if(ca != rb) stop(gettextf("non-conformable matrix dimensions in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain=NA) ca } ##' Constructs "sensical" dimnames for something like a + b ; ##' assume dimCheck() has happened before ##' ##' NOTA BENE: R's ?Arithmetic says ##' --------- ##'> For arrays (and an array result) the dimensions and dimnames are taken from ##'> first argument if it is an array, otherwise the second. ##' but that's not quite correct: ##' The dimnames are taken from second *if* the first are NULL. ##' ##' @title Construct dimnames for a o b ##' @param a matrix ##' @param b matrix ##' @param useFirst logical indicating if dimnames(a), the first, is taken, unless NULL ##' @param check logical indicating if a warning should be signalled for mismatches ##' @return a \code{\link{list}} of length two with dimnames ##' @author Martin Maechler dimNamesCheck <- function(a, b, useFirst = TRUE, check = FALSE) { nullDN <- list(NULL,NULL) h.a <- !identical(nullDN, dna <- dimnames(a)) h.b <- !identical(nullDN, dnb <- dimnames(b)) if(h.a || h.b) { if(useFirst) { if(!h.a) dnb else dna } else { if (!h.b) dna else if(!h.a) dnb else { ## both have non-trivial dimnames r <- dna # "default" result for(j in 1:2) if(!is.null(dn <- dnb[[j]])) { if(is.null(r[[j]])) r[[j]] <- dn else if(check && !identical(r[[j]], dn)) warning(gettextf("dimnames [%d] mismatch in %s", j, deparse(sys.call(sys.parent()))), call. = FALSE, domain=NA) } r } } } else nullDN } ##' @title Symmetrize dimnames(.) ##' @param x a square matrix ##' @param col logical indicating if the column names should be taken when ##' both are non-NULL. ##' @param names logical indicating if the names(dimnames(.)) should be ##' symmetrized and kept *if* they differ. ##' @return a matrix like \code{x}, say \code{r}, with dimnames fulfilling ##' dr <- dimnames(r); identical(dr[1], dr[2]) ##' @author Martin Maechler symmetrizeDimnames <- function(x, col=TRUE, names=TRUE) { dimnames(x) <- symmDN(dimnames(x), col=col, names=names) x } symmDN <- function(dn, col=TRUE, names=TRUE) { if(is.null(dn) || identical(dn[1L], dn[2L])) return(dn) J <- if(col) { if(is.null(dn[[2L]])) 1L else 2L } else { ## !col : row if(is.null(dn[[1L]])) 2L else 1L } if(!is.null(n <- names(dn))) { if(length(n) != 2) stop("names(dimnames()) must be NULL or of length two") if(n[1L] != n[2L]) names(dn) <- if(names) n[c(J,J)] # else NULL } dn[c(J,J)] } rowCheck <- function(a, b) { da <- dim(a) db <- dim(b) if(da[1] != db[1]) stop(gettextf("Matrices must have same number of rows in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain=NA) ## return the common nrow() da[1] } colCheck <- function(a, b) { da <- dim(a) db <- dim(b) if(da[2] != db[2]) stop(gettextf("Matrices must have same number of columns in %s", deparse(sys.call(sys.parent()))), call. = FALSE, domain=NA) ## return the common ncol() da[2] } ## is.na() is FALSE everywhere. Consequently, this function ## just gives an "all-FALSE" nCsparseMatrix of same form as x ##' ##' @title all FALSE nCsparseMatrix "as x" ##' @param x Matrix ##' @return n.CsparseMatrix "as \code{x}" ##' @author Martin Maechler is.na_nsp <- function(x) { d <- x@Dim dn <- x@Dimnames ## step-wise construction ==> no validity check for speedup r <- new(if(d[1] == d[2] && identical(dn[[1]], dn[[2]])) "nsCMatrix" else "ngCMatrix") r@Dim <- d r@Dimnames <- dn r@p <- rep.int(0L, d[2]+1L) r } allTrueMat <- function(x, sym = (d[1] == d[2] && identical(dn[[1]], dn[[2]])), packed=TRUE) { d <- x@Dim dn <- x@Dimnames r <- new("ngeMatrix", Dim=d, Dimnames=dn, x = rep.int(TRUE, prod(d))) if(sym) as(r, if(packed) "nspMatrix" else "nsyMatrix") else r } allTrueMatrix <- function(x) allTrueMat(x) ## Note: !isPacked(.) i.e. `full' still contains ## ---- "*sy" and "*tr" which have "undefined" lower or upper part isPacked <- function(x) { ## Is 'x' a packed (dense) matrix ? is(x, "denseMatrix") && ## unneeded(!): any("x" == slotNames(x)) && length(x@x) < prod(x@Dim) } ##" Is 'x' a packed (dense) matrix -- "no-check" version .isPacked <- function(x) length(x@x) < prod(x@Dim) emptyColnames <- function(x, msg.if.not.empty = FALSE) { ## Useful for compact printing of (parts) of sparse matrices ## possibly dimnames(x) "==" NULL : dn <- dimnames(x) nc <- ncol(x) if(msg.if.not.empty && is.list(dn) && length(dn) >= 2 && is.character(cn <- dn[[2]]) && any(cn != "")) { lc <- length(cn) message(if(lc > 3) gettextf(" [[ suppressing %d column names %s ... ]]", nc, paste(sQuote(cn[1:3]), collapse = ", ")) else gettextf(" [[ suppressing %d column names %s ]]", nc, paste(sQuote(cn[1:lc]), collapse = ", ")), domain=NA) } dimnames(x) <- list(dn[[1]], character(nc)) x } ## The i-th unit vector e[1:n] with e[j] = \delta_{i,j} ## .E.i.log <- function(i,n) i == (1:n) ## .E.i <- function(i,n) ## r <- numeric(n) ## r[i] <- 1. ## r ## } idiag <- function(n, p=n) { ## Purpose: diag() returning *integer* ## -------------------------------------------------------- ## Author: Martin Maechler, Date: 8 Dec 2007, 23:13 r <- matrix(0L, n,p) if ((m <- min(n, p)) > 0) r[1 + 0:(m - 1) * (n + 1)] <- 1L r } ldiag <- function(n, p=n) { ## Purpose: diag() returning *logical* r <- matrix(FALSE, n,p) if ((m <- min(n, p)) > 0) r[1 + 0:(m - 1) * (n + 1)] <- TRUE r } ## The indices of the diagonal entries of an n x n matrix, n >= 1 ## i.e. indDiag(n) === which(diag(n) == 1) indDiag <- function(n) cumsum(c(1L, rep.int(n+1L, n-1))) ### TODO: write in C and port to base (or 'utils') R ### ----- ### "Theory" behind this: /u/maechler/R/MM/MISC/lower-tri-w.o-matrix.R ## NB: also have "abIndex" version: abIindTri() --> ./abIndex.R indTri <- function(n, upper = TRUE, diag = FALSE) { ## Indices of (strict) upper/lower triangular part ## == which(upper.tri(diag(n), diag=diag) or ## which(lower.tri(diag(n), diag=diag) -- but ## much more efficiently for largish 'n' stopifnot(length(n) == 1, n == (n. <- as.integer(n)), (n <- n.) >= 0) if(n <= 2) { if(n == 0) return(integer(0)) if(n == 1) return(if(diag) 1L else integer(0)) ## else n == 2 v <- if(upper) 3L else 2L return(if(diag) c(1L, v, 4L) else v) } ## n >= 3 [also for n == 2 && diag (==TRUE)] : ## First, compute the 'diff(.)' of the result [fast, using integers] n. <- if(diag) n else n - 1L n1 <- n. - 1L ## all '1' but a few r <- rep.int(1L, choose(n.+1, 2) - 1) tt <- if(diag) 2L else 3L r[cumsum(if(upper) 1:n1 else n.:2)] <- if(upper) n:tt else tt:n ## now have differences; revert to "original": cumsum(c(if(diag) 1L else if(upper) n+1L else 2L, r)) } prTriang <- function(x, digits = getOption("digits"), maxp = getOption("max.print"), justify = "none", right = TRUE) { ## modeled along stats:::print.dist upper <- x@uplo == "U" m <- as(x, "matrix") cf <- format(m, digits = digits, justify = justify) cf[if(upper) row(cf) > col(cf) else row(cf) < col(cf)] <- "." print(cf, quote = FALSE, right = right, max = maxp) invisible(x) } prMatrix <- function(x, digits = getOption("digits"), maxp = getOption("max.print")) { d <- dim(x) cl <- class(x) ## cld <- getClassDef(cl) tri <- extends(cl, "triangularMatrix") xtra <- if(tri && x@diag == "U") " (unitriangular)" else "" cat(sprintf('%d x %d Matrix of class "%s"%s\n', d[1], d[2], cl, xtra)) if(prod(d) <= maxp) { if(tri) prTriang(x, digits = digits, maxp = maxp) else print(as(x, "matrix"), digits = digits, max = maxp) } else { ## d[1] > maxp / d[2] >= nr : m <- as(x, "matrix") nr <- maxp %/% d[2] n2 <- ceiling(nr / 2) print(head(m, max(1, n2))) cat("\n ..........\n\n") print(tail(m, max(1, nr - n2))) cat("\n ..........\n\n") } ## DEBUG: cat("str(.):\n") ; str(x) invisible(x)# as print() S3 methods do } nonFALSE <- function(x) { ## typically used for lMatrices: (TRUE,NA,FALSE) |-> (TRUE,TRUE,FALSE) if(any(ix <- is.na(x))) x[ix] <- TRUE x } nz.NA <- function(x, na.value) { ## Non-Zeros of x ## na.value: TRUE: NA's give TRUE, they are not 0 ## NA: NA's are not known ==> result := NA ## FALSE: NA's give FALSE, could be 0 stopifnot(is.logical(na.value), length(na.value) == 1) if(is.na(na.value)) x != 0 else if(na.value) isN0(x) else x != 0 & !is.na(x) } ### This assumes that e.g. the i-slot in Csparse is *not* over-allocated: nnzSparse <- function(x, cl = class(x), cld = getClassDef(cl)) { ## Purpose: number of *stored* / structural non-zeros {NA's counted too} ## ---------------------------------------------------------------------- ## Arguments: x sparseMatrix ## ---------------------------------------------------------------------- ## Author: Martin Maechler, 18 Apr 2008 if(extends(cld, "CsparseMatrix") || extends(cld, "TsparseMatrix")) length(x@i) else if(extends(cld, "RsparseMatrix")) length(x@j) else if(extends(cld, "indMatrix")) # is "sparse" too x@Dim[1] else stop(gettext("'x' must be \"sparseMatrix\""), domain=NA) } ## For sparseness handling, return a ## 2-column (i,j) matrix of 0-based indices of non-zero entries: non0.i <- function(M, cM = class(M), uniqT=TRUE) { if(extends(cM, "TsparseMatrix")) { if(uniqT && is_not_uniqT(M)) .Call(compressed_non_0_ij, as(M,"CsparseMatrix"), TRUE) else cbind(M@i, M@j) } else if(extends(cM, "indMatrix")) { cbind(seq_len(nrow(M)), M@perm) - 1L } else { ## C* or R* .Call(compressed_non_0_ij, M, extends(cM, "CsparseMatrix")) } } non0ind <- function(x, cld = getClassDef(class(x)), uniqT = TRUE, xtendSymm = TRUE, check.Udiag = TRUE) { if(is.numeric(x)) return(if((n <- length(x))) { if(is.matrix(x)) arrayInd(seq_len(n)[isN0(x)], dim(x)) - 1L else (0:(n-1))[isN0(x)] } else integer(0)) ## else stopifnot(extends(cld, "sparseMatrix")) ij <- non0.i(x, cld, uniqT=uniqT) if(xtendSymm && extends(cld, "symmetricMatrix")) { # also get "other" triangle notdiag <- ij[,1] != ij[,2]# but not the diagonals again rbind(ij, ij[notdiag, 2:1], deparse.level=0) } else if(check.Udiag && extends(cld, "triangularMatrix")) { # check for "U" diag if(x@diag == "U") { i <- seq_len(dim(x)[1]) - 1L rbind(ij, cbind(i,i, deparse.level=0), deparse.level=0) } else ij } else ij } if(FALSE) { ## -- now have .Call(m_encodeInd, ...) etc : ## nr= nrow: since i in {0,1,.., nrow-1} these are 1L "decimal" encodings: ## Further, these map to and from the usual "Fortran-indexing" (but 0-based) encodeInd <- function(ij, di) { stopifnot(length(di) == 2) nr <- di[1L] ## __ care against integer overflow __ if(prod(di) >= .Machine$integer.max) nr <- as.double(nr) ij[,1] + ij[,2] * nr } encodeInd2 <- function(i,j, di) { stopifnot(length(di) == 2) nr <- di[1L] ## __ care against integer overflow __ if(prod(di) >= .Machine$integer.max) nr <- as.double(nr) i + j * nr } } else { ##' Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin} ##' ##' @param ij 2-column integer matrix ##' @param dim dim(.), i.e. length 2 integer vector ##' @param checkBnds logical indicating 0 <= ij[,k] < di[k] need to be checked. ##' ##' @return encoded index; integer if prod(dim) is small; double otherwise encodeInd <- function(ij, dim, orig1=FALSE, checkBnds=TRUE) .Call(m_encodeInd, ij, dim, orig1, checkBnds) ## --> in ../src/Mutils.c : m_encodeInd(ij, di, orig_1, chk_bnds) ## ~~~~~~~~~~~ ##' Here, 1-based indices (i,j) are default: encodeInd2 <- function(i, j, dim, orig1=TRUE, checkBnds=TRUE) .Call(m_encodeInd2, i,j, dim, orig1, checkBnds) } ##' Decode "encoded" (i,j) indices back to cbind(i,j) ##' This is the inverse of encodeInd(.) ##' ##' @title Decode "Encoded" (i,j) Indices ##' @param code integer in 0:((n x m - 1) <==> encodeInd(.) result ##' @param nr the number of rows ##' @return ##' @author Martin Maechler decodeInd <- function(code, nr) cbind(as.integer(code %% nr), as.integer(code %/% nr), deparse.level=0L) complementInd <- function(ij, dim, orig1=FALSE, checkBnds=FALSE) { ## Purpose: Compute the complement of the 2-column 0-based ij-matrix ## but as 1-based indices n <- prod(dim) if(n == 0) return(integer(0)) seq_len(n)[-(1L + .Call(m_encodeInd, ij, dim, orig1, checkBnds))] } unionInd <- function(ij1, ij2) unique(rbind(ij1, ij2)) intersectInd <- function(ij1, ij2, di, orig1=FALSE, checkBnds=FALSE) { ## from 2-column (i,j) matrices where i in {0,.., nrow-1}, ## return only the *common* entries decodeInd(intersect(.Call(m_encodeInd, ij1, di, orig1, checkBnds), .Call(m_encodeInd, ij2, di, orig1, checkBnds)), nr=di[1]) } WhichintersectInd <- function(ij1, ij2, di, orig1=FALSE, checkBnds=FALSE) { ## from 2-column (i,j) matrices where i \in {0,.., nrow-1}, ## find *where* common entries are in ij1 & ij2 m1 <- match(.Call(m_encodeInd, ij1, di, orig1, checkBnds), .Call(m_encodeInd, ij2, di, orig1, checkBnds)) ni <- !is.na(m1) list(which(ni), m1[ni]) } ### There is a test on this in ../tests/dgTMatrix.R ! uniqTsparse <- function(x, class.x = c(class(x))) { ## Purpose: produce a *unique* triplet representation: ## by having (i,j) sorted and unique ## ----------------------------------------------------------- ## The following is not quite efficient {but easy to program, ## and as() are based on C code (all of them?) ## ## FIXME: Do it fast for the case where 'x' is already 'uniq' if(extends(class.x, "TsparseMatrix")) { tri <- extends(class.x, "triangularMatrix") .Call(Csparse_to_Tsparse, .Call(Tsparse_to_Csparse, x, tri), tri) } else stop(gettextf("not yet implemented for class %s", dQuote(class.x)), domain = NA) } ## Note: maybe, using ## ---- xj <- .Call(Matrix_expand_pointers, x@p) ## would be slightly more efficient than as( , "dgTMatrix") ## but really efficient would be to use only one .Call(.) for uniq(.) ! drop0 <- function(x, tol = 0, is.Csparse = NA) { .Call(Csparse_drop, if(isTRUE(is.Csparse) || is.na(is.Csparse) && is(x, "CsparseMatrix")) x else as(x, "CsparseMatrix"), tol) } uniq <- function(x) { if(is(x, "TsparseMatrix")) uniqTsparse(x) else if(is(x, "sparseMatrix")) drop0(x) else x } asTuniq <- function(x) { if(is(x, "TsparseMatrix")) uniqTsparse(x) else as(x,"TsparseMatrix") } ## is 'x' a uniq Tsparse Matrix ? is_not_uniqT <- function(x, di = dim(x)) is.unsorted(x@j) || anyDuplicatedT(x, di) ## is 'x' a TsparseMatrix with duplicated entries (to be *added* for uniq): is_duplicatedT <- # <- keep old name for a while, as ../inst/test-tools-Matrix.R has used it anyDuplicatedT <- function(x, di = dim(x)) anyDuplicated(.Call(m_encodeInd2, x@i, x@j, di, FALSE, FALSE)) t_geMatrix <- function(x) { x@x <- as.vector(t(array(x@x, dim = x@Dim))) # no dimnames here x@Dim <- x@Dim[2:1] x@Dimnames <- x@Dimnames[2:1] x@factors <- list() ## FIXME -- do better, e.g., for "LU"? x } ## t( [dl]trMatrix ) and t( [dl]syMatrix ) : t_trMatrix <- function(x) { x@x <- as.vector(t(as(x, "matrix"))) x@Dim <- x@Dim[2:1] x@Dimnames <- x@Dimnames[2:1] x@uplo <- if (x@uplo == "U") "L" else "U" # and keep x@diag x } fixupDense <- function(m, from, cldm = getClassDef(class(m))) { if(extends(cldm, "triangularMatrix")) { m@uplo <- from@uplo m@diag <- from@diag } else if(extends(cldm, "symmetricMatrix")) { m@uplo <- from@uplo } m } ##' @title Transform {vectors, matrix, Matrix, ...} to dgeMatrix ##' @export ..2dge <- function(from) .Call(dup_mMatrix_as_dgeMatrix, from) if(FALSE) ## FIXME: From R we want something like (but all in C - where inherits() is "free" ..2dge <- function(from, check=TRUE) { if(check && inherits(from,"geMatrix")) from else .Call(dup_mMatrix_as_dgeMatrix, from) } ## -> ./ldenseMatrix.R : l2d_Matrix <- function(from, cl = MatrixClass(class(from)), cld = getClassDef(cl)) { ## stopifnot(is(from, "lMatrix")) fixupDense(new(sub("^l", "d", cl), x = as.double(from@x), Dim = from@Dim, Dimnames = from@Dimnames), from, cld) ## FIXME: treat 'factors' smartly {not for triangular!} } ## -> ./ndenseMatrix.R : n2d_Matrix <- function(from, cl = MatrixClass(class(from)), cld = getClassDef(cl)) { ## stopifnot(is(from, "nMatrix")) fixupDense(new(sub("^n", "d", cl), x = as.double(from@x), Dim = from@Dim, Dimnames = from@Dimnames), from, cld) ## FIXME: treat 'factors' smartly {not for triangular!} } n2l_Matrix <- function(from, cl = MatrixClass(class(from)), cld = getClassDef(cl)) { fixupDense(new(sub("^n", "l", cl), x = from@x, Dim = from@Dim, Dimnames = from@Dimnames), from, cld) ## FIXME: treat 'factors' smartly {not for triangular!} } ## -> ./ddenseMatrix.R : d2l_Matrix <- function(from, cl = MatrixClass(class(from)), cld = getClassDef(cl)) { fixupDense(new(sub("^d", "l", cl), x = as.logical(from@x), Dim = from@Dim, Dimnames = from@Dimnames), from, cld) ## FIXME: treat 'factors' smartly {not for triangular!} } n2l_spMatrix <- function(from) { ## stopifnot(is(from, "nMatrix")) new(sub("^n", "l", MatrixClass(class(from))), ##x = as.double(from@x), Dim = from@Dim, Dimnames = from@Dimnames) } tT2gT <- function(x, cl = class(x), toClass, cld = getClassDef(cl)) { ## coerce *tTMatrix to *gTMatrix {triangular -> general} d <- x@Dim if(uDiag <- x@diag == "U") # unit diagonal, need to add '1's uDiag <- (n <- d[1]) > 0 if(missing(toClass)) { do.n <- extends(cld, "nMatrix") toKind <- if(do.n) "n" else substr(MatrixClass(cl), 1,1) # "d" | "l"|"i"|"z" toClass <- paste0(toKind, "gTMatrix") } else { do.n <- extends(toClass, "nMatrix") toKind <- if(do.n) "n" else substr(toClass, 1,1) } if(do.n) ## no 'x' slot new(toClass, # == "ngTMatrix" Dim = d, Dimnames = x@Dimnames, i = c(x@i, if(uDiag) 0:(n-1)), j = c(x@j, if(uDiag) 0:(n-1))) else new(toClass, Dim = d, Dimnames = x@Dimnames, i = c(x@i, if(uDiag) 0:(n-1)), j = c(x@j, if(uDiag) 0:(n-1)), x = c(x@x, if(uDiag) rep.int(if(toKind == "l") TRUE else 1, n))) } ## __TODO__ ## Hack for the above, possibly considerably faster: ## Just *modify* the 'x' object , using attr(x, "class') <- toClass ## Fast very special one ../src/Tsparse.c -- as_cholmod_triplet() in ../src/chm_common.c ## 'x' *must* inherit from TsparseMatrix! .gT2tC <- function(x, uplo, diag="N") .Call(Tsparse_to_tCsparse, x, uplo, diag) ## Ditto in ../src/Csparse.c : .gC2tC <- function(x, uplo, diag="N") .Call(Csparse_to_tCsparse, x, uplo, diag) .gC2tT <- function(x, uplo, diag="N") .Call(Csparse_to_tTsparse, x, uplo, diag) gT2tT <- function(x, uplo, diag, toClass, do.n = extends(toClass, "nMatrix")) { ## coerce *gTMatrix to *tTMatrix {general -> triangular} i <- x@i j <- x@j sel <- if(uplo == "U") { if(diag == "U") i < j else i <= j } else { if(diag == "U") i > j else i >= j } i <- i[sel] j <- j[sel] if(do.n) ## no 'x' slot new("ntTMatrix", i = i, j = j, uplo = uplo, diag = diag, Dim = x@Dim, Dimnames = x@Dimnames) else new(toClass, i = i, j = j, uplo = uplo, diag = diag, x = x@x[sel], Dim = x@Dim, Dimnames = x@Dimnames) } check.gT2tT <- function(from, toClass, do.n = extends(toClass, "nMatrix")) { if(isTr <- isTriangular(from)) { gT2tT(from, uplo = attr(isTr, "kind") %||% "U", diag = "N", ## improve: also test for unit diagonal toClass = toClass, do.n = do.n) } else stop("not a triangular matrix") } gT2sT <- function(x, toClass, do.n = extends(toClass, "nMatrix")) { upper <- x@i <= x@j i <- x@i[upper] j <- x@j[upper] if(do.n) ## no 'x' slot new("nsTMatrix", Dim = x@Dim, Dimnames = x@Dimnames, i = i, j = j, uplo = "U") else new(toClass, Dim = x@Dim, Dimnames = x@Dimnames, i = i, j = j, x = x@x[upper], uplo = "U") } check.gT2sT <- function(x, toClass, do.n = extends(toClass, "nMatrix")) { if(isSymmetric(x)) gT2sT(x, toClass, do.n) else stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") } if(FALSE)# unused l2d_meth <- function(x) { cl <- MatrixClass(class(x)) as(callGeneric(as(x, sub("^l", "d", cl))), cl) } ## return "d" or "l" or "n" or "z" .M.kind <- function(x, clx = class(x)) { ## 'clx': class() *or* class definition of x if(is.matrix(x) || is.atomic(x)) { ## 'old style' matrix or vector if (is.numeric(x)) "d" ## also for integer: see .V.kind(), .M.kindC() else if(is.logical(x)) "l" ## FIXME ? "n" if no NA ?? else if(is.complex(x)) "z" else stop(gettextf("not yet implemented for matrix with typeof %s", typeof(x)), domain = NA) } else .M.kindC(clx) } ## the same as .M.kind, but also knows "i" .V.kind <- function(x, clx = class(x)) { ## 'clx': class() *or* class definition of x if(is.matrix(x) || is.atomic(x)) { ## 'old style' matrix or vector if (is.integer(x)) "i" else if(is.numeric(x)) "d" else if(is.logical(x)) "l" ## FIXME ? "n" if no NA ?? else if(is.complex(x)) "z" else stop(gettextf("not yet implemented for matrix with typeof %s", typeof(x)), domain = NA) } else .M.kindC(clx) } .M.kindC <- function(clx, ex = extends(clx)) { ## 'clx': class() *or* classdefinition if(is.character(clx)) # < speedup: get it once clx <- getClassDef(clx) if(any(ex == "sparseVector")) { ## must work for class *extending* "dsparseVector" ==> cannot use (clx@className) ! if (any(ex == "dsparseVector")) "d" else if(any(ex == "nsparseVector")) "n" else if(any(ex == "lsparseVector")) "l" else if(any(ex == "zsparseVector")) "z" else if(any(ex == "isparseVector")) "i" else stop(gettextf(" not yet implemented for %s", clx@className), domain = NA) } else if(any(ex == "dMatrix")) "d" else if(any(ex == "nMatrix")) "n" else if(any(ex == "lMatrix")) "l" else if(any(ex == "indMatrix")) "n" # permutation -> pattern else if(any(ex == "zMatrix")) "z" else if(any(ex == "iMatrix")) "i" else stop(gettextf(" not yet implemented for %s", clx@className), domain = NA) } ## typically used as .type.kind[.M.kind(x)]: .type.kind <- c("d" = "double", "i" = "integer", "l" = "logical", "n" = "logical", "z" = "complex") ## the reverse, a "version of" .M.kind(.): .kind.type <- setNames(names(.type.kind), as.vector(.type.kind)) .M.shape <- function(x, clx = class(x)) { ## 'clx': class() *or* class definition of x if(is.matrix(x)) { ## 'old style matrix' if (isDiagonal (x)) "d" else if(isTriangular(x)) "t" else if(isSymmetric (x)) "s" else "g" # general } else { if(is.character(clx)) # < speedup: get it once clx <- getClassDef(clx) ex <- extends(clx) if( any(ex == "diagonalMatrix")) "d" else if(any(ex == "triangularMatrix"))"t" else if(any(ex == "symmetricMatrix")) "s" else "g" } } ## a faster simpler version [for sparse matrices, i.e., never diagonal] .M.shapeC <- function(x, clx = class(x)) { if(is.character(clx)) # < speedup: get it once clx <- getClassDef(clx) if (extends(clx, "triangularMatrix")) "t" else if(extends(clx, "symmetricMatrix")) "s" else "g" } class2 <- function(cl, kind = "l", do.sub = TRUE) { ## Find "corresponding" class; since pos.def. matrices have no pendant: cl <- MatrixClass(cl) if(cl %in% c("dpoMatrix","corMatrix")) paste0(kind, "syMatrix") else if(cl == "dppMatrix") paste0(kind, "spMatrix") else if(do.sub) sub("^[a-z]", kind, cl) else cl } ## see also as_smartClass() below geClass <- function(x) { if (is(x, "dMatrix")) "dgeMatrix" else if(is(x, "lMatrix")) "lgeMatrix" else if(is(x, "nMatrix") || is(x, "indMatrix")) "ngeMatrix" else if(is(x, "zMatrix")) "zgeMatrix" else stop(gettextf("general Matrix class not yet implemented for %s", dQuote(class(x))), domain = NA) } .dense.prefixes <- c("d" = "tr", ## map diagonal to triangular "t" = "tr", "s" = "sy", "g" = "ge") .sparse.prefixes <- c("d" = "t", ## map diagonal to triangular "t" = "t", "s" = "s", "g" = "g") as_M.kind <- function(x, clx) { if(is.character(clx)) # < speedup: get it once clx <- getClassDef(clx) if(is(x, clx)) x else as(x, paste0(.M.kindC(clx), "Matrix")) } ## Used, e.g. after subsetting: Try to use specific class -- if feasible : as_dense <- function(x, cld = if(isS4(x)) getClassDef(class(x))) { as(x, paste0(.M.kind(x, cld), .dense.prefixes[.M.shape(x, cld)], "Matrix")) } ## This is "general" but slower than the next definition if(FALSE) .sp.class <- function(x) { ## find and return the "sparseness class" if(!is.character(x)) x <- class(x) for(cl in paste0(c("C","T","R"), "sparseMatrix")) if(extends(x, cl)) return(cl) ## else (should rarely happen) NA_character_ } .sp.class <- function(x) { ## find and return the "sparseness class" x <- if(!is.character(x)) MatrixClass(class(x)) else MatrixClass(x) if(any((ch <- substr(x,3,3)) == c("C","T","R"))) return(paste0(ch, "sparseMatrix")) ## else NA_character_ } ### Goal: Eventually get rid of these --- want to foster coercions ### ---- *to* virtual classes whenever possible, e.g. as(*, "CsparseMatrix") ## 2007-12: better goal: use them only for "matrix" [maybe speed them up later] ## Here, getting the class definition and passing it, should be faster as_Csparse <- function(x, cld = if(isS4(x)) getClassDef(class(x))) { as(x, paste0(.M.kind(x, cld), .sparse.prefixes[.M.shape(x, cld)], "CMatrix")) } if(FALSE) # replaced by .Call(dense_to_Csparse, *) which is perfect for "matrix" as_Csparse2 <- function(x, cld = if(isS4(x)) getClassDef(class(x))) { ## Csparse + U2N when needed sh <- .M.shape(x, cld) x <- as(x, paste0(.M.kind(x, cld), .sparse.prefixes[sh], "CMatrix")) if(sh == "t") .Call(Csparse_diagU2N, x) else x } ## *do* use this where applicable as_Csp2 <- function(x) { ## Csparse + U2N when needed x <- as(x, "CsparseMatrix") if(is(x, "triangularMatrix")) .Call(Csparse_diagU2N, x) else x } ## 'cl' : class() *or* class definition of from as_gCsimpl2 <- function(from, cl = class(from)) as(from, paste0(.M.kind(from, cl), "gCMatrix")) ## to be used directly in setAs(.) needs one-argument-only (from) : as_gCsimpl <- function(from) as(from, paste0(.M.kind(from), "gCMatrix")) ## slightly smarter: as_Sp <- function(from, shape, cl = class(from)) { if(is.character(cl)) cl <- getClassDef(cl) as(from, paste0(.M.kind(from, cl), shape, if(extends(cl, "TsparseMatrix")) "TMatrix" else "CMatrix")) } ## These are used in ./sparseMatrix.R: as_gSparse <- function(from) as_Sp(from, "g", getClassDef(class(from))) as_sSparse <- function(from) as_Sp(from, "s", getClassDef(class(from))) as_tSparse <- function(from) as_Sp(from, "t", getClassDef(class(from))) as_geSimpl2 <- function(from, cl = class(from)) as(from, paste0(.M.kind(from, cl), "geMatrix")) ## to be used directly in setAs(.) needs one-argument-only (from) : as_geSimpl <- function(from) as(from, paste0(.M.kind(from), "geMatrix")) ## Smarter, (but sometimes too smart!) compared to geClass() above: as_smartClass <- function(x, cl, cld = getClassDef(cl)) { if(missing(cl)) return(as_geSimpl(x)) ## else if(extends(cld, "diagonalMatrix") && isDiagonal(x)) ## diagonal* result: as(x, cl) else if(extends(cld, "symmetricMatrix") && isSymmetric(x)) { ## symmetric* result: kind <- .M.kind(x, cld) as(x, class2(cl, kind, do.sub= kind != "d")) } else if(extends(cld, "triangularMatrix") && isTriangular(x)) as(x, cl) else ## revert to as_geSimpl2(x, cld) } as_CspClass <- function(x, cl) { ## NOTE: diagonal is *not* sparse: cld <- getClassDef(cl) ##(extends(cld, "diagonalMatrix") && isDiagonal(x)) || if (extends(cld, "symmetricMatrix") && isSymmetric(x)) forceSymmetric(as(x,"CsparseMatrix")) else if (extends(cld, "triangularMatrix") && isTriangular(x)) as(x, cl) else if(is(x, "CsparseMatrix")) x else as(x, paste0(.M.kind(x, cld), "gCMatrix")) } asTri <- function(from, newclass) { ## TODO: also check for unit-diagonal: 'diag = "U"' isTri <- isTriangular(from) if(isTri) new(newclass, x = from@x, Dim = from@Dim, Dimnames = from@Dimnames, uplo = attr(isTri, "kind")) else stop("not a triangular matrix") } mat2tri <- function(from, sparse=NA) { isTri <- isTriangular(from) if(isTri) { d <- dim(from) if(is.na(sparse)) sparse <- prod(d) > 2*sum(isN0(from)) ## <==> sparseDefault() in Matrix() if(sparse) as(as(from, "sparseMatrix"), "triangularMatrix") else new(paste0(.M.kind(from),"trMatrix"), x = base::as.vector(from), Dim = d, Dimnames = .M.DN(from), uplo = attr(isTri, "kind")) } else stop("not a triangular matrix") } try_as <- function(x, classes, tryAnyway = FALSE) { if(!tryAnyway && !is(x, "Matrix")) return(x) ## else ok <- canCoerce(x, classes[1]) while(!ok && length(classes <- classes[-1])) { ok <- canCoerce(x, classes[1]) } if(ok) as(x, classes[1]) else x } ## For *dense* matrices isTriMat <- function(object, upper = NA, ...) { ## pretest: is it square? d <- dim(object) if(d[1] != d[2]) return(FALSE) TRUE.U <- structure(TRUE, kind = "U") if(d[1] == 0) return(TRUE.U) ## else slower test TRUE.L <- structure(TRUE, kind = "L") if(!is.matrix(object)) object <- as(object,"matrix") if(is.na(upper)) { if(all0(object[lower.tri(object)])) TRUE.U else if(all0(object[upper.tri(object)])) TRUE.L else FALSE } else if(upper) if(all0(object[lower.tri(object)])) TRUE.U else FALSE else ## upper is FALSE if(all0(object[upper.tri(object)])) TRUE.L else FALSE } ## For Tsparse matrices: isTriT <- function(object, upper = NA, ...) { ## pretest: is it square? d <- dim(object) if(d[1] != d[2]) return(FALSE) ## else TRUE.U <- structure(TRUE, kind = "U") if(d[1] == 0) return(TRUE.U) TRUE.L <- structure(TRUE, kind = "L") if(is.na(upper)) { if(all(object@i <= object@j)) TRUE.U else if(all(object@i >= object@j)) TRUE.L else FALSE } else if(upper) { if(all(object@i <= object@j)) TRUE.U else FALSE } else { ## 'lower' if(all(object@i >= object@j)) TRUE.L else FALSE } } ## For Csparse matrices isTriC <- function(object, upper = NA, ...) { ## pretest: is it square? d <- dim(object) if(d[1] != d[2]) return(FALSE) ## else TRUE.U <- structure(TRUE, kind = "U") if((n <- d[1]) == 0) return(TRUE.U) TRUE.L <- structure(TRUE, kind = "L") ## Need this, since 'i' slot of symmetric looks like triangular : if(is(object, "symmetricMatrix")) # triangular only iff diagonal : return(if(length(oi <- object@i) == n && isSeq(oi, n-1L) && isSeq(object@p, n)) structure(TRUE, kind = object@uplo) else FALSE) ## else ni <- 1:n ## the row indices split according to column: ilist <- split(object@i, factor(rep.int(ni, diff(object@p)), levels= ni)) lil <- lengths(ilist, use.names = FALSE) if(any(lil == 0)) { pos <- lil > 0 if(!any(pos)) ## matrix of all 0's return(TRUE.U) ilist <- ilist[pos] ni <- ni[pos] } ni0 <- ni - 1L # '0-based ni' if(is.na(upper)) { if(all(sapply(ilist, max, USE.NAMES = FALSE) <= ni0)) TRUE.U else if(all(sapply(ilist, min, USE.NAMES = FALSE) >= ni0)) TRUE.L else FALSE } else if(upper) { if(all(sapply(ilist, max, USE.NAMES = FALSE) <= ni0)) TRUE.U else FALSE } else { ## 'lower' if(all(sapply(ilist, min, USE.NAMES = FALSE) >= ni0)) TRUE.L else FALSE } } ## When the matrix is known to be [n x n] aka "square" ## (need "vector-indexing" work for 'M'): .is.diagonal.sq.matrix <- function(M, n = dim(M)[1L]) all0(M[rep_len(c(FALSE, rep.int(TRUE,n)), n^2)]) .is.diagonal <- function(object) { ## "matrix" or "denseMatrix" (but not "diagonalMatrix") d <- dim(object) if(d[1L] != (n <- d[2L])) FALSE else if(is.matrix(object)) .is.diagonal.sq.matrix(object, n) else ## "denseMatrix" -- packed or unpacked if(is(object, "generalMatrix")) # "dge", "lge", ... .is.diagonal.sq.matrix(object@x, n) else { ## "dense" but not {diag, general}, i.e. triangular or symmetric: ## -> has 'uplo' differentiate between packed and unpacked ### .......... FIXME ............... ## packed <- isPacked(object) ## if(object@uplo == "U") { ## } else { ## uplo == "L" ## } ### very cheap workaround all0(as(object,"matrix")[rep_len(c(FALSE, rep.int(TRUE,n)), n^2)]) } } ## Purpose: Transform a *unit diagonal* sparse triangular matrix ## into one with explicit diagonal entries '1' ## for "dtC*", "ltC* ..: directly xtC.diagU2N <- function(x) if(x@diag == "U") .Call(Csparse_diagU2N, x) else x ##' @title uni-diagonal to "regular" triangular Matrix ##' ##' NOTE: class is *not* checked here! {speed} ##' @param x a dense unidiagonal (x@diag == "U") triangular Matrix ##' ("ltrMatrix", "dtpMatrix", ...). ##' @param kind character indicating content kind: "d","l",.. ##' @param isPacked logical indicating if 'x' is packed ##' @return Matrix "like" x, but with x@diag == "N" (and 1 or TRUE values "filled" in .@x) ##' @author Martin Maechler .dense.diagU2N <- function(x, kind = .M.kind(x), isPacked = length(x@x) < n^2) { ### FIXME: Move this to C ----- (possibly with an option of *not* copying) ## For denseMatrix, .@diag = "U" means the 'x' slot can have wrong values ## which are documented to never be accessed n <- x@Dim[1] if(n > 0) { one <- if(kind == "d") 1. else TRUE if(isPacked) { ## { == isPacked(x)) } : dtp-, ltp-, or "ntpMatrix": ## x@x is of length n*(n+1)/2 if(n == 1) x@x <- one else { di <- if(x@uplo == "U") seq_len(n) else c(1L,n:2L) x@x[cumsum(di)] <- one } } else { ## okay: now have 'x' slot of length n x n x@x[1L+ (0:(n-1L))*(n+1L)] <- one # even for "n..Matrix" } } x@diag <- "N" x } .diagU2N <- function(x, cl, checkDense = FALSE) { ## fast "no-test" version --- we *KNOW* 'x' is 'triangularMatrix' if(extends(cl, "CsparseMatrix")) .Call(Csparse_diagU2N, x) else if(extends(cl, "TsparseMatrix")) .Call(Tsparse_diagU2N, x) else { kind <- .M.kind(x, cl) if(checkDense && extends(cl,"denseMatrix")) { .dense.diagU2N(x, kind) } else { ## possibly dense, not [CT]sparseMatrix ==> Rsparse* .Call(Tsparse_diagU2N, as(as(x, paste0(kind, "Matrix")), "TsparseMatrix")) ## leave it as T* - the caller can always coerce to C* if needed } } } ## .diagU2N() diagU2N <- function(x, cl = getClassDef(class(x)), checkDense = FALSE) { if(extends(cl, "triangularMatrix") && x@diag == "U") .diagU2N(x, cl, checkDense=checkDense) else x } ##' @title coerce triangular Matrix to uni-diagonal ##' ##' NOTE: class is *not* checked here! {speed} ##' @param x a dense triangular Matrix ("ltrMatrix", "dtpMatrix", ...). ##' @return Matrix "like" x, but with x@diag == "U" .dense.diagN2U <- function(x) { ## as we promise that the diagonal entries are not accessed when ## diag = "U", we don't even need to set them to one !! x@diag <- "U" x } diagN2U <- function(x, cl = getClassDef(class(x)), checkDense = FALSE) { if(!(extends(cl, "triangularMatrix") && x@diag == "N")) return(x) if(checkDense && extends(cl,"denseMatrix")) { .dense.diagN2U(x) } else ## still possibly dense .Call(Csparse_diagN2U, as(x, "CsparseMatrix")) } .dgC.0.factors <- function(x) if(!length(x@factors)) x else { x@factors <- list() ; x } .as.dgC.0.factors <- function(x) { if(!is(x, "dgCMatrix")) as(x, "dgCMatrix") # will not have 'factors' else ## dgCMatrix .dgC.0.factors(x) } .set.factors <- function(x, name, value, warn.no.slot=FALSE) .Call(R_set_factors, x, value, name, warn.no.slot) ### Fast, much simplified version of tapply() tapply1 <- function (X, INDEX, FUN = NULL, ..., simplify = TRUE) { sapply(unname(split(X, INDEX)), FUN, ..., simplify = simplify, USE.NAMES = FALSE) } ## tapply.x <- function (X, n, INDEX, FUN = NULL, ..., simplify = TRUE) { ## tapply1(X, factor(INDEX, 0:(n-1)), FUN = FUN, ..., simplify = simplify) ## } ### MM: Unfortunately, these are still pretty slow for large sparse ... sparsapply <- function(x, MARGIN, FUN, sparseResult = TRUE, ...) { ## Purpose: "Sparse Apply": better utility than tapply1() for colSums() etc : ## NOTE: Only applicable sum()-like where the "zeros do not count" ## ---------------------------------------------------------------------- ## Arguments: x: sparseMatrix; others as in *apply() ## ---------------------------------------------------------------------- ## Author: Martin Maechler, Date: 16 May 2007 stopifnot(MARGIN %in% 1:2) xi <- if(MARGIN == 1) x@i else x@j ui <- unique(xi) n <- x@Dim[MARGIN] ## FIXME: Here we assume 'FUN' to return 'numeric' ! r <- if(sparseResult) new("dsparseVector", length = n) else numeric(n) r[ui + 1L] <- sapply(ui, function(i) FUN(x@x[xi == i], ...)) r } sp.colMeans <- function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) { nr <- nrow(x) if(na.rm) ## use less than nrow(.) in case of NAs nr <- nr - sparsapply(x, 2, function(u) sum(is.na(u)), sparseResult=sparseResult) sparsapply(x, 2, sum, sparseResult=sparseResult, na.rm=na.rm) / nr } sp.rowMeans <- function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) { nc <- ncol(x) if(na.rm) ## use less than ncol(.) in case of NAs nc <- nc - sparsapply(x, 1, function(u) sum(is.na(u)), sparseResult=sparseResult) sparsapply(x, 1, sum, sparseResult=sparseResult, na.rm=na.rm) / nc } all0Matrix <- function(n,m) { ## an all-0 matrix -- chose what Matrix() also gives -- "most efficiently" n <- as.integer(n) m <- as.integer(m) new(if(n == m) "dsCMatrix" else "dgCMatrix", Dim = c(n,m), p = rep.int(0L, m+1L)) } .setZero <- function(x, newclass = if(d[1] == d[2]) "dsCMatrix" else "dgCMatrix") { ## all-0 matrix from x which must inherit from 'Matrix' d <- x@Dim new(newclass, Dim = d, Dimnames = x@Dimnames, p = rep.int(0L, d[2]+1L)) } .M.vectorSub <- function(x,i) { ## e.g. M[0] , M[TRUE], M[1:2] if(any(as.logical(i)) || prod(dim(x)) == 0) ## FIXME: for *large sparse*, use sparseVector ! as(x, "matrix")[i] else ## save memory (for large sparse M): as.vector(x[1,1])[FALSE] } ##' Compute the three "parts" of two sets: ##' @param x arbitrary vector; possibly with duplicated values, ##' @param y (ditto) ##' @param uniqueCheck ##' @param check ##' ##' @return list(x.only = setdiff(x,y), ##' y.only = setdiff(y,x), ##' int = intersect(x,y)) setparts <- function(x,y, uniqueCheck = TRUE, check = TRUE) { if(check) { x <- as.vector(x) y <- as.vector(y) } if(uniqueCheck) { x <- unique.default(x) y <- unique.default(y) } .setparts(x,y) } .setparts <- function(x,y) { n1 <- length(m1 <- match(x,y, 0L)) n2 <- length(m2 <- match(y,x, 0L)) ix <- seq_len(n1)[m1 == 0L] iy <- seq_len(n2)[m2 == 0L] list(x.only = x[ix], ix.only = ix, mx = m1, y.only = y[iy], iy.only = iy, my = m2, int = if(n1 < n2) y[m1] else x[m2]) } ##' @title Warn about extraneous arguments in the "..." (of its caller). ##' A merger of my approach and the one in seq.default() -- FIXME: now have base::chkDots() ##' @author Martin Maechler, June 2012, May 2014 ##' @param ... ##' @param which.call passed to sys.call(). A caller may use -2 if the message should ##' mention *its* caller chk.s <- function(..., which.call = -1, depCtrl = if(exists("..deparseOpts")) "niceNames") { if(nx <- length(list(...))) warning(sprintf(ngettext(nx, "extra argument %s will be disregarded in\n %s", "extra arguments %s will be disregarded in\n %s"), sub(")$", '', sub("^list\\(", '', deparse(list(...), control=depCtrl))), deparse(sys.call(which.call), control=depCtrl)), call. = FALSE, domain=NA) } ##' *Only* to be used as function in ##' setMethod.("Compare", ...., .Cmp.swap) --> ./Ops.R & ./diagMatrix.R .Cmp.swap <- function(e1,e2) { ## "swap RHS and LHS" and use the method below: switch(.Generic, "==" =, "!=" = callGeneric(e2, e1), "<" = e2 > e1, "<=" = e2 >= e1, ">" = e2 < e1, ">=" = e2 <= e1) } Matrix/R/dsparseMatrix.R0000644000176200001440000000431512372366236014705 0ustar liggesusers### d(ouble)sparseMatrix methods : setMethod("image", "dsparseMatrix", function(x, ...) image(as(x, "dgTMatrix"), ...)) setMethod("chol", signature(x = "dsparseMatrix"), function(x, pivot=FALSE, cache=TRUE, ...) { nm <- if(pivot) "sPdCholesky" else "spdCholesky" if(!is.null(ch <- x@factors[[nm]])) return(ch) ## use the cache px <- as(x, "symmetricMatrix") if (isTRUE(validObject(px, test=TRUE))) { if(cache) .set.factors(x, nm, chol(as(px, "CsparseMatrix"), pivot=pivot, ...)) else chol(as(px, "CsparseMatrix"), pivot=pivot, ...) } else stop("'x' is not positive definite -- chol() undefined.") }) setMethod("determinant", signature(x = "dsparseMatrix", logarithm = "logical"), function(x, logarithm = TRUE, ...) determinant(as(x,"CsparseMatrix"), logarithm, ...)) ##-> now dgC or dsC or dtC .. which *have* their methods setMethod("lu", signature(x = "dsparseMatrix"), function(x, cache=TRUE, ...) if(cache) .set.factors(x, "lu", lu(as(x, "dgCMatrix"), ...)) else lu(as(x, "dgCMatrix"), ...)) setMethod("is.finite", signature(x = "dsparseMatrix"), function(x) { if(any(!is.finite(x@x))) { r <- allTrueMat(x, packed = FALSE) x <- as(as(as(x,"CsparseMatrix"), "dgCMatrix"),"dgTMatrix") notF <- which(!is.finite(x@x)) r[cbind(x@i[notF], x@j[notF]) + 1L] <- FALSE r } else allTrueMat(x) }) setMethod("is.infinite", signature(x = "dsparseMatrix"), function(x) { if(any((isInf <- is.infinite(x@x)))) { cld <- getClassDef(class(x)) if(extends(cld, "triangularMatrix") && x@diag == "U") isInf <- is.infinite((x <- .diagU2N(x, cld))@x) r <- as(x, "lMatrix") # will be "lsparseMatrix" - *has* x slot r@x <- if(length(isInf) == length(r@x)) isInf else is.infinite(r@x) if(!extends(cld, "CsparseMatrix")) r <- as(r, "CsparseMatrix") as(.Call(Csparse_drop, r, 0), "nMatrix") # a 'pattern matrix } else is.na_nsp(x) }) ## Group Methods, see ?Arith (e.g.): "Ops" --> ./Ops.R, "Math" in ./Math.R, ... ## ----- Matrix/R/denseMatrix.R0000644000176200001440000002331713141330160014323 0ustar liggesusers### Simple fallback methods for all dense matrices ### These are "cheap" to program, but potentially far from efficient; ### Methods for specific subclasses will overwrite these: setAs("ANY", "denseMatrix", function(from) Matrix(from, sparse=FALSE, doDiag=FALSE)) ## Conceivably, could write ## setAs("matrix", "denseMatrix", ....) which was slightly more efficient than ## Matrix(.) but would have many things in common setAs("denseMatrix", "generalMatrix", as_geSimpl) ## dense to sparse: ## : if we do this, do it "right", i.e. preserve symmetric/triangular! ## setAs("denseMatrix", "dsparseMatrix", ## ## MM thought that as() will take the ``closest'' match; but that fails! ## ## function(from) as(as(from, "dgeMatrix"), "dsparseMatrix")) ## function(from) as(as(from, "dgeMatrix"), "dgCMatrix")) .dense2C <- function(from, kind = NA, uplo = "U") { useK <- is.character(kind) && length(kind) == 1 && kind %in% c("gen", "sym", "tri") if(!useK) { cl <- class(from) cld <- getClassDef(cl) ## get it once (speedup) } r <- .Call(dense_to_Csparse, from)# goes via "generalMatrix" ## FIXME: for symmetric / triangular matrices, this is a waste, notably if packed if (useK && kind == "gen" || !useK && extends(cld, "generalMatrix")) r else if(useK && kind == "sym" || !useK && extends(cld, "symmetricMatrix")) forceCspSymmetric(r, uplo, isTri = FALSE) else if(!useK && extends(cld, "diagonalMatrix")) stop("diagonalMatrix in .dense2C() -- should never happen, please report!") else { ## we have "triangular" : if(useK) { cl <- class(from) cld <- getClassDef(cl) ## get it once (speedup) } if (extends(cld,"dMatrix")) as(r, "dtCMatrix") else if (extends(cld,"lMatrix")) as(r, "ltCMatrix") else if (extends(cld,"nMatrix")) as(r, "ntCMatrix") else if (extends(cld,"zMatrix")) as(r, "ztCMatrix") else stop(gettextf("undefined method for class %s", dQuote(cl)), domain=NA) } } setAs("denseMatrix", "CsparseMatrix", function(from) .dense2C(from)) ## This sometimes fails (eg. for "lsyMatrix"), and we really want to ## use the generic ``go via Csparse'' (top of ./sparseMatrix.R) instead ## setAs("denseMatrix", "sparseMatrix", ## function(from) { ## cl <- class(from) ## cld <- getClassDef(cl) ## if (extends(cld, "generalMatrix")) ## .Call(dense_to_Csparse, from) ## else ## i.e. triangular | symmetric ## as_Csparse(from, cld) ## }) setAs("denseMatrix", "TsparseMatrix", function(from) as(.dense2C(from), "TsparseMatrix")) setMethod("show", signature(object = "denseMatrix"), function(object) prMatrix(object)) ##- ## FIXME: The following is only for the "dMatrix" objects that are not ##- ## "dense" nor "sparse" -- i.e. "packed" ones : ##- ## But these could be printed better -- "." for structural zeros. ##- setMethod("show", signature(object = "dMatrix"), prMatrix) ##- ## and improve this as well: ##- setMethod("show", signature(object = "pMatrix"), prMatrix) ##- ## this should now be superfluous [keep for safety for the moment]: setMethod("dim<-", signature(x = "denseMatrix", value = "ANY"), function(x, value) { if(!is.numeric(value) || length(value) != 2) stop("dim(.) value must be numeric of length 2") if(prod(dim(x)) != prod(value <- as.integer(value))) stop("dimensions don't match the number of cells") clx <- as.character(MatrixClass(class(x))) # as.*(): drop attr if(substring(clx,2) == "geMatrix") { x@Dim <- value if(length(x@factors) > 0) x@factors <- list() x } else { ## other "denseMatrix" x <- as_geSimpl2(x, clx) dim(x) <- value x } }) ## Using "index" for indices should allow ## integer (numeric), logical, or character (names!) indices : ## use geClass() when 'i' or 'j' are missing: ## since symmetric, triangular, .. will not be preserved anyway: setMethod("[", signature(x = "denseMatrix", i = "index", j = "missing", drop = "logical"), function (x, i, j, ..., drop) { if((na <- nargs()) == 3) r <- as(x, "matrix")[i, drop=drop] else if(na == 4) r <- as(x, "matrix")[i, , drop=drop] else stop(gettextf("invalid nargs()= %d", na), domain=NA) if(is.null(dim(r))) r else as(r, geClass(x)) }) setMethod("[", signature(x = "denseMatrix", i = "missing", j = "index", drop = "logical"), function (x, i, j, ..., drop) { r <- as(x, "matrix")[, j, drop=drop] if(is.null(dim(r))) r else as(r, geClass(x)) }) setMethod("[", signature(x = "denseMatrix", i = "index", j = "index", drop = "logical"), function (x, i, j, ..., drop) { r <- callGeneric(x = as(x, "matrix"), i=i, j=j, drop=drop) if(is.null(dim(r))) r else { cld <- getClassDef(cl <- class(x)) if(extends(cld, "symmetricMatrix") && length(i) == length(j) && isTRUE(all(i == j))) ## keep original symmetric class (but not "dpo") as(r, class2(cl, .M.kindC(cld))) else as_smartClass(r, cl) } }) .dense.sub.i.2col <- function(x, i, j, ..., drop) { r <- as(x, "matrix")[ i ] if(is.null(dim(r))) r else as(r, geClass(x)) } setMethod("[", signature(x = "denseMatrix", i = "matrix", j = "missing"),#drop="ANY" .dense.sub.i.2col) setMethod("[", signature(x = "denseMatrix", i = "matrix", j = "missing", drop="missing"), .dense.sub.i.2col) ## Now the "[<-" ones --- see also those in ./Matrix.R ## It's recommended to use setReplaceMethod() rather than setMethod("[<-",.) ## even though the former is currently just a wrapper for the latter ## x[] <- value : setReplaceMethod("[", signature(x = "denseMatrix", i = "missing", j = "missing", value = "ANY"),## double/logical/... function (x, value) { x <- as(x, "generalMatrix") x@x[] <- value validObject(x)# check if type and lengths above match x }) ## FIXME: 1) These are far from efficient ## ----- setReplaceMethod("[", signature(x = "denseMatrix", i = "index", j = "missing", value = "replValue"), function (x, i, j, ..., value) { r <- as(x, "matrix") ## message("`[<-` with nargs()= ",nargs()) if((na <- nargs()) == 3) r[i] <- value else if(na == 4) r[i, ] <- value else stop(gettextf("invalid nargs()= %d", na), domain=NA) as(r, geClass(x)) }) setReplaceMethod("[", signature(x = "denseMatrix", i = "missing", j = "index", value = "replValue"), function (x, i, j, ..., value) { r <- as(x, "matrix") r[, j] <- value as(r, geClass(x)) }) setReplaceMethod("[", signature(x = "denseMatrix", i = "index", j = "index", value = "replValue"), function (x, i, j, ..., value) { r <- as(x, "matrix") r[i, j] <- value as_smartClass(r, class(x)) ## was as(r, class(x)) }) setReplaceMethod("[", signature(x = "denseMatrix", i = "matrix", # 2-col.matrix j = "missing", value = "replValue"), function(x, i, j, ..., value) { r <- as(x, "matrix") r[ i ] <- value as(r, geClass(x)) }) setMethod("isSymmetric", signature(object = "denseMatrix"), function(object, tol = 100*.Machine$double.eps, tol1 = 8*tol, ...) { ## pretest: is it square? d <- dim(object) if((n <- d[1L]) != d[2L]) return(FALSE) if(n <= 1L) return(TRUE) ## else: square (n x n) matrix, n >= 2 : is.z <- is(object, "zMatrix") ## initial tests, fast for large non-symmetric: if(length(tol1)) { ## initial pre-tests, fast for large non-symmetric: Cj <- if(is.z) Conj else identity for(i in unique(c(1L, 2L, n-1L, n))) if(is.character(all.equal(object[i, ], Cj(object[, i]), tolerance = tol1, ...))) return(FALSE) } ## else slower test if (is(object,"dMatrix")) isTRUE(all.equal(as( object, "dgeMatrix"), as(t(object), "dgeMatrix"), tolerance = tol, ...)) else if (is(object, "nMatrix")) identical(as( object, "ngeMatrix"), as(t(object), "ngeMatrix")) else if (is(object, "lMatrix"))# not possible currently ## test for exact equality; FIXME(?): identical() too strict? identical(as( object, "lgeMatrix"), as(t(object), "lgeMatrix")) else if (is.z) ## will error out here isTRUE(all.equal(as( object, "zgeMatrix"), as(Conj(t(object)), "zgeMatrix"), tolerance = tol, ...)) else if (is(object, "iMatrix")) ## will error out here identical(as(object, "igeMatrix"), as(t(object), "igeMatrix")) }) ## rather methods in ./triangularMatrix.R ## setMethod("isTriangular", signature(object = "triangularMatrix"), ## function(object, ...) TRUE) setMethod("isTriangular", signature(object = "denseMatrix"), isTriMat) setMethod("isDiagonal", signature(object = "denseMatrix"), .is.diagonal) setMethod("rcond", signature(x = "denseMatrix", norm = "character"), function(x, norm, ...) rcond(as(as(x, "dMatrix"), "dgeMatrix"), norm=norm, ...)) setMethod("symmpart", signature(x = "denseMatrix"), function(x) symmpart(as(x, "dMatrix"))) setMethod("skewpart", signature(x = "denseMatrix"), function(x) skewpart(as(x, "dMatrix"))) setMethod("is.na", signature(x = "denseMatrix"), function(x) { if(any((inax <- is.na(x@x)))) { r <- as(x, "lMatrix")#-> logical x-slot r@x <- inax as(r, "nMatrix") } else { d <- x@Dim new("ngCMatrix", Dim = d, Dimnames = dimnames(x), i = integer(0), p = rep.int(0L, d[2]+1L)) } }) if(.Matrix.avoiding.as.matrix) { setMethod("qr", signature(x = "ddenseMatrix"), function(x, ...) qr.default(ge2mat(..2dge(x)), ...)) setMethod("qr", signature(x = "denseMatrix"), function(x, ...) qr(as(x, "ddenseMatrix"), ...)) } Matrix/R/Hilbert.R0000644000176200001440000000027110615611763013441 0ustar liggesusersHilbert <- function(n) { ## generate the Hilbert matrix of dimension n n <- as.integer(n) i <- seq_len(n) new("dpoMatrix", x = c(1/outer(i - 1L, i, "+")), Dim = c(n,n)) } Matrix/R/ddenseMatrix.R0000644000176200001440000001420212507220173014467 0ustar liggesusers### Define Methods that can be inherited for all subclasses ## This replaces many "d..Matrix" -> "dgeMatrix" ones ## >> but << needs all sub(sub(sub)) classes of "ddenseMatrix" listed ## ----- in ../src/Mutils.c setAs("ddenseMatrix", "dgeMatrix", ..2dge) setAs("ddenseMatrix", "matrix", function(from) as(..2dge(from), "matrix")) ## d(ouble) to l(ogical): setAs("dgeMatrix", "lgeMatrix", function(from) d2l_Matrix(from, "dgeMatrix")) setAs("dsyMatrix", "lsyMatrix", function(from) d2l_Matrix(from, "dsyMatrix")) setAs("dspMatrix", "lspMatrix", function(from) d2l_Matrix(from, "dspMatrix")) setAs("dtrMatrix", "ltrMatrix", function(from) d2l_Matrix(from, "dtrMatrix")) setAs("dtpMatrix", "ltpMatrix", function(from) d2l_Matrix(from, "dtpMatrix")) if(FALSE) ## FIXME, this fails for ("dtpMatrix" -> "CsparseMatrix") where .dense2C() works setAs("ddenseMatrix", "CsparseMatrix", function(from) { if (class(from) != "dgeMatrix") # don't lose symmetry/triangularity/... as_Csparse(from) else .Call(dense_to_Csparse, from) }) ## special case setAs("dgeMatrix", "dgCMatrix", function(from) .Call(dense_to_Csparse, from)) setAs("matrix", "CsparseMatrix", function(from) .Call(dense_to_Csparse, from)) ## for historical i.e. backcompatibility reasons .. setAs("matrix", "dgCMatrix", function(from) { storage.mode(from) <- "double" .Call(dense_to_Csparse, from) }) setAs("numeric", "CsparseMatrix", function(from) .Call(dense_to_Csparse, .Call(dup_mMatrix_as_dgeMatrix, from))) setMethod("as.numeric", "ddenseMatrix", function(x, ...) ..2dge(x)@x) ## -- see also ./Matrix.R e.g., for a show() method ## These methods are the 'fallback' methods for all dense numeric ## matrices in that they simply coerce the ddenseMatrix to a ## dgeMatrix. Methods for special forms override these. setMethod("norm", signature(x = "ddenseMatrix", type = "missing"), function(x, type, ...) norm(..2dge(x))) setMethod("norm", signature(x = "ddenseMatrix", type = "character"), function(x, type, ...) norm(..2dge(x), type)) setMethod("rcond", signature(x = "ddenseMatrix", norm = "missing"), function(x, norm, ...) rcond(..2dge(x), ...)) setMethod("rcond", signature(x = "ddenseMatrix", norm = "character"), function(x, norm, ...) rcond(..2dge(x), norm, ...)) ## Not really useful; now require *identical* class for result: ## setMethod("t", signature(x = "ddenseMatrix"), ## function(x) callGeneric(..2dge(x))) ## "diag" --> specific methods for dge, dtr,dtp, dsy,dsp setMethod("solve", signature(a = "ddenseMatrix", b = "missing"), function(a, b, ...) solve(..2dge(a))) for(.b in c("Matrix","ANY")) ## << against ambiguity notes setMethod("solve", signature(a = "ddenseMatrix", b = .b), function(a, b, ...) solve(..2dge(a), b)) for(.b in c("matrix","numeric")) ## << against ambiguity notes setMethod("solve", signature(a = "ddenseMatrix", b = .b), function(a, b, ...) solve(..2dge(a), Matrix(b))) rm(.b) setMethod("lu", signature(x = "ddenseMatrix"), function(x, ...) .set.factors(x, "LU", lu(..2dge(x), ...))) setMethod("chol", signature(x = "ddenseMatrix"), cholMat) setMethod("determinant", signature(x = "ddenseMatrix", logarithm = "missing"), function(x, logarithm, ...) determinant(..2dge(x))) setMethod("determinant", signature(x = "ddenseMatrix", logarithm = "logical"), function(x, logarithm, ...) determinant(..2dge(x), logarithm)) ## now done for "dMatrix": ## setMethod("expm", signature(x = "ddenseMatrix"), ## function(x) callGeneric(..2dge(x))) .trilDense <- function(x, k = 0, ...) { k <- as.integer(k[1]) d <- dim(x) stopifnot(-d[1] <= k, k <= d[1]) # had k <= 0 ## returns "lower triangular" if k <= 0 && sqr .Call(dense_band, x, -d[1], k) } ## NB: have extra tril(), triu() methods for symmetric ["dsy" and "dsp"] and ## for triangular ["dtr" and "dtp"] setMethod("tril", "denseMatrix", .trilDense) setMethod("tril", "matrix", .trilDense) .triuDense <- function(x, k = 0, ...) { k <- as.integer(k[1]) d <- dim(x) stopifnot(-d[1] <= k, k <= d[1]) # had k >= 0 ## returns "upper triangular" if k >= 0 .Call(dense_band, x, k, d[2]) } setMethod("triu", "denseMatrix", .triuDense) setMethod("triu", "matrix", .triuDense) .bandDense <- function(x, k1, k2, ...) { k1 <- as.integer(k1[1]) k2 <- as.integer(k2[1]) dd <- dim(x) sqr <- dd[1] == dd[2] stopifnot(-dd[1] <= k1, k1 <= k2, k2 <= dd[2]) r <- .Call(dense_band, x, k1, k2) if (sqr && k1 < 0 && k1 == -k2 && isSymmetric(x)) ## symmetric forceSymmetric(r) else r } setMethod("band", "denseMatrix", .bandDense) setMethod("band", "matrix", .bandDense) setMethod("symmpart", signature(x = "ddenseMatrix"), function(x) .Call(ddense_symmpart, x)) setMethod("skewpart", signature(x = "ddenseMatrix"), function(x) .Call(ddense_skewpart, x)) setMethod("is.finite", signature(x = "dgeMatrix"), function(x) { if(all(ifin <- is.finite(x@x))) allTrueMat(x) else if(any(ifin)) { r <- as(x, "lMatrix") #-> logical x-slot r@x <- ifin as(r, "nMatrix") } else is.na_nsp(x) }) ## TODO? -- rather methods for specific subclasses of ddenseMatrix setMethod("is.finite", signature(x = "ddenseMatrix"), function(x) { if(all(ifin <- is.finite(x@x))) return(allTrueMat(x)) ## *NOT* dge, i.e., either triangular or symmetric ## (possibly packed): has finite 0-triangle cdx <- getClassDef(class(x)) r <- new(if(extends(cdx,"symmetricMatrix"))"nsyMatrix" else "ngeMatrix") r@Dim <- (d <- x@Dim) r@Dimnames <- x@Dimnames isPacked <- (le <- prod(d)) > length(ifin) r@x <- rep.int(TRUE, le) iTr <- indTri(d[1], upper= x@uplo == "U", diag= TRUE) if(isPacked) { ## x@x is "usable" r@x[iTr] <- ifin } else { r@x[iTr] <- ifin[iTr] } r }) setMethod("is.infinite", signature(x = "ddenseMatrix"), function(x) { if(any((isInf <- is.infinite(x@x)))) { r <- as(x, "lMatrix")#-> logical x-slot; 0 |--> FALSE r@x <- isInf as(r, "nMatrix")# often sparse .. better way? } else is.na_nsp(x) }) Matrix/R/triangularMatrix.R0000644000176200001440000000374312414743303015407 0ustar liggesusers#### Methods for the virtual class 'triangularMatrix' of triangular matrices #### Note that specific methods are in (8 different) ./?t?Matrix.R setAs("triangularMatrix", "symmetricMatrix", function(from) as(as(from, "generalMatrix"), "symmetricMatrix")) setAs("dgeMatrix", "triangularMatrix", function(from) asTri(from, "dtrMatrix")) setAs("lgeMatrix", "triangularMatrix", function(from) asTri(from, "ltrMatrix")) setAs("ngeMatrix", "triangularMatrix", function(from) asTri(from, "ntrMatrix")) setAs("matrix", "triangularMatrix", function(from) mat2tri(from)) .tril.tr <- function(x, k = 0, ...) { # are always square k <- as.integer(k[1]) dd <- dim(x) stopifnot(-dd[1] <= k, k <= dd[1]) # had k <= 0 if(k == 0 && x@uplo == "L") x else { ## more to do if(x@diag == "U") x <- .diagU2N(x, class(x), checkDense = TRUE) callNextMethod() } } .triu.tr <- function(x, k = 0, ...) { # are always square k <- as.integer(k[1]) dd <- dim(x) stopifnot(-dd[1] <= k, k <= dd[1]) # had k >= 0 if(k == 0 && x@uplo == "U") x else { ## more to do if(x@diag == "U") x <- .diagU2N(x, class(x), checkDense = TRUE) callNextMethod() } } ## In order to evade method dispatch ambiguity (with [CTR]sparse* and ddense*), ## but still remain "general" ## we use this hack instead of signature x = "triangularMatrix" : trCls <- names(getClass("triangularMatrix")@subclasses) trCls. <- trCls[grep(".t.Matrix", trCls)] # not "*Cholesky", "*Kaufman" .. for(cls in trCls.) { setMethod("tril", cls, .tril.tr) setMethod("triu", cls, .triu.tr) } ## ditto here: isTriTri <- function(x, upper=NA) { if(is.na(upper)) structure(TRUE, kind=x@uplo) else if(upper) x@uplo == "U" else x@uplo == "L" } for(cls in trCls) setMethod("isTriangular", signature(object = cls), function(object, upper=NA, ...) isTriTri(object, upper)) ## instead of just for .... signature(object = "triangularMatrix") rm(trCls, trCls., cls) Matrix/R/dgCMatrix.R0000644000176200001440000001333112605510450013723 0ustar liggesusers#### Sparse Matrices in Compressed column-oriented format ### contains = "dsparseMatrix", "CsparseMatrix" ## Specific conversions, should they be necessary. Better to convert as ## as(x, "TsparseMatrix") or as(x, "denseMatrix") ## Moved to ./Csparse.R : ## setAs("dgCMatrix", "dgTMatrix", .... ## setAs("dgCMatrix", "dgeMatrix", .... ## setAs("dgeMatrix", "dgCMatrix", .... setAs("dgCMatrix", "ngCMatrix", function(from) .C2nC(from, FALSE)) ## rather use Csparse* to lsparse* in ./lsparseMatrix.R , ## but this is for "back-compatibility" (have had tests for it..): setAs("dgCMatrix", "lgCMatrix", function(from) { ## FIXME use .Call() too! r <- new("lgCMatrix") r@x <- as.logical(from@x) ## and copy the other slots for(nm in c("i", "p", "Dim", "Dimnames")) slot(r, nm) <- slot(from, nm) r }) setMethod("image", "dgCMatrix", function(x, ...) image(as(x, "dgTMatrix"), ...)) ## Group Methods, see ?Arith (e.g.) ## ----- ## ## "Arith" is now in ./Ops.R ## ## "Math" and "Math2" in ./Math.R ## "[<-" methods { setReplaceMethod()s } are now in ./Csparse.R ## setMethod("writeHB", signature(obj = "dgCMatrix"), ## function(obj, file, ...) { ## .Deprecated("writeMM") ## .Call(Matrix_writeHarwellBoeing, obj, ## as.character(file), "DGC") ## }) ##-> ./colSums.R for colSums,... rowMeans setMethod("t", signature(x = "dgCMatrix"), function(x) .Call(Csparse_transpose, x, FALSE), valueClass = "dgCMatrix") setMethod("determinant", signature(x = "dgCMatrix", logarithm = "logical"), detSparseLU) # using mkDet() --> ./Auxiliaries.R setMethod("qr", signature(x = "dgCMatrix"), function(x, tol = 1e-07, LAPACK = FALSE, keep.dimnames = TRUE, verbose = !is.null(v <- getOption("Matrix.verbose")) && v >= 1) .Call(dgCMatrix_QR, # -> cs_sqr() and cs_qr() >> ../src/dgCMatrix.c x, ## order = if(verbose) -1L else TRUE, keep.dimnames)) setMethod("qr", signature(x = "sparseMatrix"), function(x, ...) qr(as(as(as(x, "CsparseMatrix"), "dsparseMatrix"), "dgCMatrix"), ...)) LU.dgC <- function(x, errSing = TRUE, order = TRUE, tol = 1.0, keep.dimnames = TRUE, ...) { chk.s(..., which.call=-2) .Call(dgCMatrix_LU, x, order, tol, errSing, keep.dimnames) ## ../src/dgCMatrix.c } setMethod("lu", signature(x = "dgCMatrix"), LU.dgC) setMethod("lu", signature(x = "sparseMatrix"), function(x, ...) .set.factors(x, "lu", lu(as(as(as(x, "CsparseMatrix"), "dsparseMatrix"), "dgCMatrix"), ...))) .solve.dgC.lu <- function(a, b, tol = .Machine$double.eps) { ## @MM: see also solveSparse() in ~/R/MM/Pkg-ex/Matrix/Doran-A.R lu.a <- LU.dgC(a) if(tol > 0) { rU <- range(abs(diag(lu.a@U))) if(rU[1] / rU[2] < tol) stop(gettextf("LU computationally singular: ratio of extreme entries in |diag(U)| = %9.4g", rU[1] / rU[2]), domain=NA) } n <- dim(a)[1L] ## == dim(a)[2], as a[.,.] is square matrix b.isMat <- if(missing(b)) { ## default b = Identity = Diagonal(nrow(a)), however more efficiently b <- .sparseDiagonal(n) TRUE } else { isM <- !is.null(dim(b)) if(isM && nrow(b) != n) stop("RHS 'b' has wrong number of rows:", nrow(b)) if(!isM && length(b) != n) stop("RHS 'b' has wrong length", length(b)) isM } ## bp := P %*% b bp <- if(b.isMat) b[lu.a@p+1L, ] else b[lu.a@p+1L] ## R:= U^{-1} L^{-1} P b R <- solve(lu.a@U, solve(lu.a@L, bp)) ## result = Q'R = Q' U^{-1} L^{-1} P b = A^{-1} b, as A = P'LUQ R[invPerm(lu.a@q, zero.p=TRUE), ] } ## FIXME: workaround, till .Call(dgCMatrix_matrix_solve, a, b, sparse=TRUE) works: .solve.dgC <- function(a, b, sparse, tol = .Machine$double.eps) if(sparse) .solve.dgC.lu(a, b, tol=tol) else .Call(dgCMatrix_matrix_solve, a, b, FALSE) .solve.dgC.mat <- function(a, b, sparse=FALSE, tol = .Machine$double.eps, ...) { chk.s(..., which.call=-2) if(sparse) .solve.dgC.lu(a, b, tol=tol) else .Call(dgCMatrix_matrix_solve, a, b, FALSE) } ## Provide also for pkg MatrixModels .solve.dgC.chol <- function(x, y) .Call(dgCMatrix_cholsol, as(x, "CsparseMatrix"), y) .solve.dgC.qr <- function(x, y, order = 1L) { cld <- getClass(class(x)) .Call(dgCMatrix_qrsol, # has AS_CSP(): must be dgC or dtC: if(extends(cld, "dgCMatrix") || extends(cld, "dtCMatrix")) x else as(x, "dgCMatrix"), y, order) } setMethod("solve", signature(a = "dgCMatrix", b = "matrix"), .solve.dgC.mat) setMethod("solve", signature(a = "dgCMatrix", b = "ddenseMatrix"), .solve.dgC.mat) setMethod("solve", signature(a = "dgCMatrix", b = "dsparseMatrix"), function(a, b, sparse=NA, tol = .Machine$double.eps, ...) { chk.s(..., which.call=-2) if(is.na(sparse)) { if(isSymmetric(a)) ## TODO: fast cholmod_symmetric() for Cholesky return(solve(forceCspSymmetric(a, isTri=FALSE), b, tol=tol)) #-> sparse result ## else sparse <- FALSE # (old default) } ## FIXME: be better when sparse=TRUE (?) .solve.dgC(a, as(b, "denseMatrix"), tol=tol, sparse=sparse) }) ## This is a really dumb method but some people apparently want it ## (MM: a bit less dumb now with possibility of staying sparse) setMethod("solve", signature(a = "dgCMatrix", b = "missing"), function(a, b, sparse=NA, tol = .Machine$double.eps, ...) { chk.s(..., which.call=-2) if(is.na(sparse)) { if(isSymmetric(a)) ## TODO: fast cholmod_symmetric() for Cholesky return(solve(forceCspSymmetric(a, isTri=FALSE), b = Diagonal(nrow(a)))) #-> sparse result ## else sparse <- FALSE # (old default) } if(sparse) .solve.dgC.lu(a, tol=tol) # -> "smart" diagonal b else .Call(dgCMatrix_matrix_solve, a, b=diag(nrow(a)), FALSE) }) Matrix/R/bandSparse.R0000644000176200001440000000656312755625027014151 0ustar liggesusersbandSparse <- function(n, m = n, k, diagonals, symmetric = FALSE, giveCsparse = TRUE) { ## Purpose: Compute a band-matrix by speciyfying its (sub-)diagonal(s) ## ---------------------------------------------------------------------- ## Arguments: (n,m) : Matrix dimension ## k : integer vector of "diagonal numbers", with identical ## meaning as in band(*, k) ## diagonals: (optional!) list of (sub/super)diagonals ## symmetric: if TRUE, specify only upper or lower triangle; ## ---------------------------------------------------------------------- ## Author: Martin Maechler, Date: 20 Feb 2009, 22:42 if(use.x <- !missing(diagonals)) # when specified, must be matrix or list diag.isMat <- is.matrix(diagonals) len.k <- length(k) stopifnot(!use.x || is.list(diagonals) || diag.isMat, k == as.integer(k), n == as.integer(n), m == as.integer(m)) k <- as.integer(k) n <- as.integer(n) m <- as.integer(m) stopifnot(n >= 0, m >= 0, -n+1 <= (mik <- min(k)), (mak <- max(k)) <= m - 1) if(use.x) { if(diag.isMat) { if(ncol(diagonals) != len.k) stop(gettextf("'diagonals' matrix must have %d columns (= length(k) )", len.k), domain=NA) getD <- function(j) diagonals[,j] } else { ## is.list(diagonals): if(length(diagonals) != len.k) stop(gettextf("'diagonals' must have the same length (%d) as 'k'", len.k), domain=NA) getD <- function(j) diagonals[[j]] } } sqr <- n == m if(symmetric) { if(!sqr) stop("matrix can only be symmetric if square, but n != m") if(mik < 0 && mak > 0) stop("for symmetric band matrix, only specify upper or lower triangle\n hence, all k must have the same sign") } else tri <- sqr && sign(mik)*sign(mak) >= 0 # triangular result dims <- c(n,m) k.lengths <- ## This is a bit "ugly"; I got the cases "by inspection" if(n >= m) { ifelse(k >= m-n, m - pmax(0,k), n+k) } else { ## n < m (?? k >= -n+1 always !!) ifelse(k >= -n+1, n + pmin(0,k), m-k) } i <- j <- integer(sum(k.lengths)) if(use.x) x <- if(len.k > 0) # carefully getting correct type/mode rep.int(getD(1)[1], length(i)) off.i <- 0L for(s in seq_len(len.k)) { kk <- k[s] ## *is* integer l.kk <- k.lengths[s] ## == length of (sub-)diagonal kk ii1 <- seq_len(l.kk) ind <- ii1 + off.i if(kk >= 0) { i[ind] <- ii1 j[ind] <- ii1 + kk } else { ## k < 0 i[ind] <- ii1 - kk j[ind] <- ii1 } if(use.x) { xx <- getD(s) if(length(xx) < l.kk) warning(gettextf("the %d-th (sub)-diagonal (k = %d) is too short; filling with NA's", s, kk), domain=NA) x[ind] <- xx[ii1] } off.i <- off.i + l.kk } if(symmetric) { ## we should have smarter sparseMatrix() UpLo <- if(min(k) >= 0) "U" else "L" T <- if(use.x) { if(is.integer(x)) x <- as.double(x) cc <- paste0(.M.kind(x), "sTMatrix") new(cc, i= i-1L, j= j-1L, x = x, Dim= dims, uplo=UpLo) } else new("nsTMatrix", i= i-1L, j= j-1L, Dim= dims, uplo=UpLo) if(giveCsparse) as(T, "CsparseMatrix") else T } else { ## not symmetric, possibly triangular if(use.x) sparseMatrix(i=i, j=j, x=x, dims=dims, triangular=tri, giveCsparse=giveCsparse) else sparseMatrix(i=i, j=j, dims=dims, triangular=tri, giveCsparse=giveCsparse) } } Matrix/R/MatrixFactorization.R0000644000176200001440000000241710772211561016051 0ustar liggesusers#### The "mother" of all Matrix factorizations ## use a "fits all" bail-out method -- eventually this should not happen anymore setMethod("expand", "MatrixFactorization", function(x, ...) .bail.out.1(.Generic, class(x))) setMethod("show", "MatrixFactorization", function(object) { ## cheap one -- can have better for sub-classes ## cl <- class(object) ## cat(sprintf("'MatrixFactorization' of class \"%s\"\n", cl)) cat("'MatrixFactorization' of ") str(object) }) setMethod("show", "BunchKaufman", function(object) { cat("'Bunch-Kaufman' factorization of ") str(object) }) setMethod("show", "pBunchKaufman", function(object) { cat("packed 'Bunch-Kaufman' factorization of ") str(object) }) setMethod("dim", "MatrixFactorization", function(x) x@Dim) ## e.g., for (CHMfactor, ): setMethod("solve", signature(a = "MatrixFactorization", b = "numeric"), function(a, b, ...) callGeneric(a, Matrix(b))) ## catch others, otherwise base::solve is. setMethod("solve", signature(a = "MatrixFactorization", b = "ANY"), function(a, b, ...) .bail.out.2("solve", class(a), class(b))) setMethod("solve", signature(a = "MatrixFactorization", b = "missing"), function(a, b, ...) .bail.out.1("solve", class(a))) Matrix/R/dtpMatrix.R0000644000176200001440000000537613047113565014036 0ustar liggesusers#### Triangular Packed Matrices -- Coercion and Methods setAs("dtpMatrix", "dtrMatrix", dtp2dtr <- function(from) .Call(dtpMatrix_as_dtrMatrix, from)) ## Is this needed? already have coercion to "TsparseMatrix" {FIXME} setAs("dtpMatrix", "dtTMatrix", function(from) { x <- as(from, "TsparseMatrix") cld <- getClassDef(class(x)) if(extends(cld, "dtTMatrix")) x else { ## triangularity lost: should not have happened warning("inefficient coercion (lost triangularity); please report") gT2tT(as(x, "dgTMatrix"), uplo = from@uplo, diag = from@diag, toClass = "dtTMatrix", do.n = FALSE) } }) setAs("dtpMatrix", "matrix", function(from) as(dtp2dtr(from), "matrix")) setAs("matrix", "dtpMatrix", function(from) as(as(from, "dtrMatrix"), "dtpMatrix")) setAs("pCholesky", "lMatrix", function(from) as(as(from, "dtpMatrix"), "lMatrix")) setAs("pBunchKaufman", "lMatrix", function(from) as(as(from, "dtpMatrix"), "lMatrix")) setMethod("determinant", signature(x = "dtpMatrix", logarithm = "missing"), function(x, logarithm, ...) determinant(x, TRUE)) setMethod("determinant", signature(x = "dtpMatrix", logarithm = "logical"), function(x, logarithm, ...) mkDet(diag(x), logarithm)) setMethod("diag", signature(x = "dtpMatrix"), function(x, nrow, ncol) .Call(dtpMatrix_getDiag, x), valueClass = "numeric") setMethod("diag<-", signature(x = "dtpMatrix"), function(x, value) { .Call(dtpMatrix_setDiag, if(x@diag == "U") .dense.diagU2N(x, "d", isPacked=TRUE) else x, value) }) setMethod("norm", signature(x = "dtpMatrix", type = "character"), function(x, type, ...) if(identical("2", type)) norm2(x) else .Call(dtpMatrix_norm, x, type), valueClass = "numeric") setMethod("norm", signature(x = "dtpMatrix", type = "missing"), function(x, type, ...) .Call(dtpMatrix_norm, x, "O"), valueClass = "numeric") setMethod("rcond", signature(x = "dtpMatrix", norm = "character"), function(x, norm, ...) .Call(dtpMatrix_rcond, x, norm), valueClass = "numeric") setMethod("rcond", signature(x = "dtpMatrix", norm = "missing"), function(x, norm, ...) .Call(dtpMatrix_rcond, x, "O"), valueClass = "numeric") setMethod("solve", signature(a = "dtpMatrix", b="missing"), function(a, b, ...) .Call(dtpMatrix_solve, a), valueClass = "dtpMatrix") setMethod("solve", signature(a = "dtpMatrix", b="ddenseMatrix"), function(a, b, ...) .Call(dtpMatrix_matrix_solve, a, b), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dtpMatrix", b="matrix"), function(a, b, ...) .Call(dtpMatrix_matrix_solve, a, b), valueClass = "dgeMatrix") ## FIXME: speed up setMethod("t", "dtpMatrix", function(x) dtr2dtp(t(dtp2dtr(x))), valueClass = "dtpMatrix") Matrix/R/lsTMatrix.R0000644000176200001440000000163512501023016013764 0ustar liggesusers#### Logical Sparse Symmetric Matrices in Triplet format ### contains = "lsparseMatrix" setAs("lsTMatrix", "matrix", function(from) as(as(from, "lgTMatrix"), "matrix")) setAs("lsTMatrix", "lgCMatrix", # for diag function(from) as(as(from, "lsCMatrix"), "lgCMatrix")) setAs("lsTMatrix", "lgTMatrix", function(from) .Call(lsTMatrix_as_lgTMatrix, from)) if(FALSE) # should use as(., "dMatrix") setAs("lsTMatrix", "dsTMatrix", function(from) new("dsTMatrix", i = from@i, j = from@j, uplo = from@uplo, x = as.double(from@x), # *not* just 1; from@x *can* have FALSE Dim = from@Dim, Dimnames = from@Dimnames)) setAs("lsTMatrix", "lsyMatrix", function(from) .Call(lsTMatrix_as_lsyMatrix, from)) setMethod("t", "lsTMatrix", function(x) new("lsTMatrix", Dim = x@Dim, Dimnames = x@Dimnames[2:1], i = x@j, j = x@i, x = x@x, uplo = if (x@uplo == "U") "L" else "U")) Matrix/R/ntCMatrix.R0000644000176200001440000000211012507003275013746 0ustar liggesusers#### Logical Sparse Triangular Matrices in Compressed column-oriented format setAs("ntCMatrix", "matrix", function(from) as(copyClass(diagU2N(from), "ngCMatrix"), "matrix")) setAs("matrix", "ntCMatrix", function(from) as(as(from, "dtCMatrix"), "ntCMatrix")) setAs("ntCMatrix", "TsparseMatrix", function(from) .Call(Csparse_to_Tsparse, from, TRUE)) setAs("ntCMatrix", "ngCMatrix", function(from) copyClass(diagU2N(from), "ngCMatrix")) ## "FIXME": Not needed, once we use "nCsparseMatrix" (-> ./ngCMatrix.R ): setAs("ntCMatrix", "dMatrix", .nC2d) setAs("ntCMatrix", "dsparseMatrix", .nC2d) setAs("ntCMatrix", "dtCMatrix", .nC2d) ## setAs("ntCMatrix", "lMatrix", .nC2l) setAs("ntCMatrix", "lsparseMatrix", .nC2l) setAs("ntCMatrix", "ltCMatrix", .nC2l) setAs("ngCMatrix", "ntCMatrix", # to triangular, needed for triu,.. function(from) as(as(as(from, "TsparseMatrix"), "ntTMatrix"), "ntCMatrix")) ## setMethod("t", signature(x = "ntCMatrix"), ## function(x) .Call(ntCMatrix_trans, x), ## valueClass = "ntCMatrix") Matrix/R/nsparseMatrix.R0000644000176200001440000000117312524132306014702 0ustar liggesusers#### Superclass Methods for all sparse nonzero-pattern matrices .C2nC <- function(from, isTri = is(from, "triangularMatrix")) .Call(Csparse_to_nz_pattern, from, isTri) setAs("CsparseMatrix", "nsparseMatrix", function(from) .C2nC(from)) setAs("CsparseMatrix", "nMatrix", function(from) .C2nC(from)) setAs("nsparseMatrix", "dsparseMatrix", function(from) as(from, "dMatrix")) setMethod("is.na", signature(x = "nsparseMatrix"), is.na_nsp) if(getRversion() >= "3.1.0") setMethod("anyNA", signature(x = "nsparseMatrix"), function(x) FALSE) setMethod("image", "nsparseMatrix", function(x, ...) image(as(x,"dMatrix"), ...)) Matrix/R/pMatrix.R0000644000176200001440000000666012470400545013477 0ustar liggesusers#### Permutation Matrices -- Coercion and Methods ### NB "pMatrix" extends "indMatrix" and inherits methods --> indMatrix.R ## The typical 'constructor' : coerce from 'index' setAs("integer", "pMatrix", function(from) { nn <- names(from) new("pMatrix", Dim = rep.int(length(from), 2L), Dimnames = list(nn,nn), perm = from) }) setAs("numeric", "pMatrix", function(from) if(all(from == (i <- as.integer(from)))) as(i, "pMatrix") else stop("coercion to \"pMatrix\" only works from integer numeric")) setAs("nMatrix", "pMatrix", function(from) { from <- as(as(from, "TsparseMatrix"), "ngTMatrix") n <- (d <- from@Dim)[1] if(n != d[2]) stop("not a square matrix") if(length(i <- from@i) != n) stop("the number of non-zero entries differs from nrow(.)") if((need.sort <- is.unsorted(i))) { ii <- sort.list(i) i <- i[ii] } if(n >= 1 && !identical(i, 0:(n - 1))) stop("must have exactly one non-zero entry per row") new("pMatrix", ## validity checking checks the 'perm' slot: perm = 1L + if(need.sort) from@j[ii] else from@j, Dim = d, Dimnames = from@Dimnames) }) setAs("matrix", "pMatrix", function(from) as(as(from, "nMatrix"), "pMatrix")) setMethod("solve", signature(a = "pMatrix", b = "missing"), function(a, b, ...) { a@perm <- invPerm(a@perm) a@Dimnames <- a@Dimnames[2:1] a }) setMethod("solve", signature(a = "pMatrix", b = "Matrix"), function(a, b, ...) crossprod(a, b)) setMethod("solve", signature(a = "pMatrix", b = "matrix"), function(a, b, ...) crossprod(a, b)) setMethod("solve", signature(a = "Matrix", b = "pMatrix"), function(a, b, ...) ## Or alternatively solve(a, as(b, "CsparseMatrix")) solve(a)[, invPerm(b@perm)]) setMethod("determinant", signature(x = "pMatrix", logarithm = "logical"), function(x, logarithm, ...) { if(any(x@Dim == 0)) mkDet(numeric(0)) else mkDet(logarithm=logarithm, ldet = 0, sig = signPerm(x@perm)) }) ## t(pM) is == the inverse pM^(-1): setMethod("t", signature(x = "pMatrix"), function(x) solve(x)) setMethod("%*%", signature(x = "matrix", y = "pMatrix"), function(x, y) { mmultCheck(x,y); x[, invPerm(y@perm)] }) setMethod("%*%", signature(x = "Matrix", y = "pMatrix"), function(x, y) { mmultCheck(x,y); x[, invPerm(y@perm)] }) setMethod("%*%", signature(x = "pMatrix", y = "pMatrix"), function(x, y) { stopifnot(identical(x@Dim, y@Dim)) ## FIXME: dimnames dealing: as with S3 matrix's %*% x@perm <- x@perm[y@perm] x }) setMethod("crossprod", signature(x = "pMatrix", y = "matrix"), function(x, y) { mmultCheck(x,y, 2L); y[invPerm(x@perm) ,]}) setMethod("crossprod", signature(x = "pMatrix", y = "Matrix"), function(x, y) { mmultCheck(x,y, 2L); y[invPerm(x@perm) ,]}) setMethod("crossprod", signature(x = "pMatrix", y = "pMatrix"), function(x, y) { stopifnot(identical(x@Dim, y@Dim)) x@perm <- invPerm(x@perm)[y@perm] x }) setMethod("tcrossprod", signature(x = "pMatrix", y = "pMatrix"), function(x, y) { stopifnot(identical(x@Dim, y@Dim)) x@perm <- x@perm[invPerm(y@perm)] x }) setMethod("crossprod", signature(x = "pMatrix", y = "missing"), function(x, y=NULL) Diagonal(nrow(x))) setMethod("tcrossprod", signature(x = "pMatrix", y = "missing"), function(x, y=NULL) Diagonal(nrow(x))) Matrix/R/dppMatrix.R0000644000176200001440000000564513141330160014014 0ustar liggesusers#### Positive-definite Symmetric Packed Matrices -- Coercion and Methods setAs("dppMatrix", "dpoMatrix", function(from) copyClass(.Call(dspMatrix_as_dsyMatrix, from), "dpoMatrix", sNames = c("x", "Dim", "Dimnames", "uplo", "factors")))#FIXME , check=FALSE dpp2sC <- function(from) as(.Call(dspMatrix_as_dsyMatrix, from), "dsCMatrix") ## setAs("dppMatrix", "dsCMatrix", dpp2sC) setAs("dppMatrix", "CsparseMatrix", dpp2sC) setAs("dppMatrix", "sparseMatrix", dpp2sC) setAs("dppMatrix", "lMatrix", function(from) as(as(from, "dsyMatrix"), "lMatrix")) setAs("dppMatrix", "nMatrix", function(from) as(as(from, "dsyMatrix"), "nMatrix")) to_dpp <- function(from) as(as(as(as(from, "symmetricMatrix"), "dMatrix"), "dpoMatrix"), "dppMatrix") setAs("Matrix", "dppMatrix", to_dpp)# some may fail, but this tries setAs("matrix", "dppMatrix", to_dpp) setAs("dspMatrix", "dppMatrix", function(from){ if(is.null(tryCatch(.Call(dppMatrix_chol, from), error = function(e) NULL))) stop("not a positive definite matrix") ## else copyClass(from, "dppMatrix", sNames = c("x", "Dim", "Dimnames", "uplo", "factors"))#FIXME , check=FALSE }) setMethod("chol", signature(x = "dppMatrix"), function(x, pivot, LINPACK) .Call(dppMatrix_chol, x)) setMethod("determinant", signature(x = "dppMatrix", logarithm = "logical"), mkDet.via.chol) setMethod("determinant", signature(x = "dppMatrix", logarithm = "missing"), function(x, logarithm, ...) mkDet.via.chol(x, logarithm=TRUE)) setMethod("rcond", signature(x = "dppMatrix", norm = "character"), function(x, norm, ...) .Call(dppMatrix_rcond, x, norm), valueClass = "numeric") setMethod("rcond", signature(x = "dppMatrix", norm = "missing"), function(x, norm, ...) .Call(dppMatrix_rcond, x, "O"), valueClass = "numeric") setMethod("solve", signature(a = "dppMatrix", b = "missing"), function(a, b, ...) .Call(dppMatrix_solve, a), valueClass = "dppMatrix") setMethod("solve", signature(a = "dppMatrix", b = "dgeMatrix"), function(a, b, ...) .Call(dppMatrix_matrix_solve, a, b), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dppMatrix", b = "matrix"), function(a, b, ...) .Call(dppMatrix_matrix_solve, a, b), valueClass = "dgeMatrix") ##setMethod("solve", signature(a = "dppMatrix", b = "numeric"), ## function(a, b, ...) ## .Call(dppMatrix_matrix_solve, a, as.matrix(b)), ## valueClass = "dgeMatrix") setMethod("solve", signature(a = "dppMatrix", b = "integer"), function(a, b, ...) { storage.mode(b) <- "double" .Call(dppMatrix_matrix_solve, a, cbind(b, deparse.level=0L)) }, valueClass = "dgeMatrix") setMethod("t", signature(x = "dppMatrix"), function(x) as(t(as(x, "dspMatrix")), "dppMatrix"), valueClass = "dppMatrix") Matrix/R/diagMatrix.R0000644000176200001440000014063713142363760014153 0ustar liggesusers#### All methods for "diagonalMatrix" and its subclasses, #### currently "ddiMatrix", "ldiMatrix" ## Purpose: Constructor of diagonal matrices -- ~= diag() , ## but *not* diag() extractor! Diagonal <- function(n, x = NULL) { ## Allow Diagonal(4), Diagonal(x=1:5), and Diagonal(4, TRUE) n <- if(missing(n)) length(x) else { stopifnot(length(n) == 1, n == as.integer(n), n >= 0) as.integer(n) } if(missing(x)) ## unit diagonal matrix new("ddiMatrix", Dim = c(n,n), diag = "U") else { lx <- length(x) lx.1 <- lx == 1L stopifnot(lx.1 || lx == n) # but keep 'x' short for now if(is.logical(x)) cl <- "ldiMatrix" else if(is.numeric(x)) { cl <- "ddiMatrix" x <- as.numeric(x) } else if(is.complex(x)) { cl <- "zdiMatrix" # will not yet work } else stop("'x' has invalid data type") if(lx.1 && !is.na(x) && x == 1) # cheap check for uni-diagonal.. new(cl, Dim = c(n,n), diag = "U") else new(cl, Dim = c(n,n), diag = "N", x = if(lx.1) rep.int(x,n) else x) } } .sparseDiagonal <- function(n, x = 1, uplo = "U", shape = if(missing(cols)) "t" else "g", unitri, kind, cols = if(n) 0:(n - 1L) else integer(0)) { stopifnot(n == (n. <- as.integer(n)), (n <- n.) >= 0) if(!(mcols <- missing(cols))) stopifnot(0 <= (cols <- as.integer(cols)), cols < n) m <- length(cols) if(missing(kind)) kind <- if(is.double(x)) "d" else if(is.logical(x)) "l" else { ## for now storage.mode(x) <- "double" "d" } else stopifnot(any(kind == c("d","l","n"))) stopifnot(is.character(shape), nchar(shape) == 1, any(shape == c("t","s","g"))) # triangular / symmetric / general if((missing(unitri) || unitri) && shape == "t" && (mcols || cols == 0:(n-1L)) && ((any(kind == c("l", "n")) && allTrue(x)) || ( kind == "d" && allTrue(x == 1)))) { ## uni-triangular new(paste0(kind,"tCMatrix"), Dim = c(n,n), uplo = uplo, diag = "U", p = rep.int(0L, n+1L)) } else if(kind == "n") { if(shape == "g") new("ngCMatrix", Dim = c(n,m), i = cols, p = 0:m) else new(paste0("n", shape, "CMatrix"), Dim = c(n,m), uplo = uplo, i = cols, p = 0:m) } else { ## kind != "n" -- have x slot : if((lx <- length(x)) == 1) x <- rep.int(x, m) else if(lx != m) stop("length(x) must be either 1 or #{cols}") if(shape == "g") new(paste0(kind, "gCMatrix"), Dim = c(n,m), x = x, i = cols, p = 0:m) else new(paste0(kind, shape, "CMatrix"), Dim = c(n,m), uplo = uplo, x = x, i = cols, p = 0:m) } } ## Pkg 'spdep' had (relatively slow) versions of this as_dsCMatrix_I() .symDiagonal <- function(n, x = rep.int(1,n), uplo = "U", kind = if(is.logical(x)) "l" else "d") .sparseDiagonal(n, x, uplo, shape = "s", kind = kind) ## NOTA BENE: .triDiagonal() would be misleading (<=> banded tri-diagonal matrix !) # instead of diagU2N(as(Diagonal(n), "CsparseMatrix")), diag = "N" in any case: .trDiagonal <- function(n, x = 1, uplo = "U", unitri=TRUE, kind = if(is.logical(x)) "l" else "d") .sparseDiagonal(n, x, uplo, shape = "t", unitri=unitri, kind=kind) ## This is modified from a post of Bert Gunter to R-help on 1 Sep 2005. ## Bert's code built on a post by Andy Liaw who most probably was influenced ## by earlier posts, notably one by Scott Chasalow on S-news, 16 Jan 2002 ## who posted his bdiag() function written in December 1995. if(FALSE)##--- no longer used: .bdiag <- function(lst) { ## block-diagonal matrix [a dgTMatrix] from list of matrices stopifnot(is.list(lst), length(lst) >= 1) dims <- vapply(lst, dim, 1L, USE.NAMES=FALSE) ## make sure we had all matrices: if(!(is.matrix(dims) && nrow(dims) == 2)) stop("some arguments are not matrices") csdim <- rbind(rep.int(0L, 2), apply(dims, 1, cumsum)) r <- new("dgTMatrix") r@Dim <- as.integer(csdim[nrow(csdim),]) add1 <- matrix(1:0, 2,2) for(i in seq_along(lst)) { indx <- apply(csdim[i:(i+1),] + add1, 2, function(n) n[1]:n[2]) if(is.null(dim(indx))) ## non-square matrix r[indx[[1]],indx[[2]]] <- lst[[i]] else ## square matrix r[indx[,1], indx[,2]] <- lst[[i]] } r } ## expand() needed something like bdiag() for lower-triangular ## (Tsparse) Matrices; hence Doug Bates provided a much more efficient ## implementation for those; now extended and generalized: .bdiag <- function(lst) { ## block-diagonal matrix [a dgTMatrix] from list of matrices stopifnot(is.list(lst), (nl <- length(lst)) >= 1) ### FIXME: next line is *slow* when lst = list of 75'000 dense 3x3 matrices Tlst <- lapply(lapply(lst, as_Csp2), # includes "diagU2N" as, "TsparseMatrix") if(nl == 1) return(Tlst[[1]]) ## else i_off <- c(0L, cumsum(vapply(Tlst, nrow, 1L))) j_off <- c(0L, cumsum(vapply(Tlst, ncol, 1L))) clss <- vapply(Tlst, class, "") ## NB ("FIXME"): this requires the component classes to be *called* ## -- "dgTMatrix" | "dnTMatrix" etc (and not just *extend* those)! typ <- substr(clss, 2, 2) knd <- substr(clss, 1, 1) sym <- typ == "s" # symmetric ones tri <- typ == "t" # triangular ones use.n <- any(is.n <- knd == "n") if(use.n && !(use.n <- all(is.n))) { Tlst[is.n] <- lapply(Tlst[is.n], as, "lMatrix") knd [is.n] <- "l" } use.l <- !use.n && all(knd == "l") if(all(sym)) { ## result should be *symmetric* uplos <- vapply(Tlst, slot, ".", "uplo") ## either "U" or "L" tLU <- table(uplos)# of length 1 or 2 .. if(length(tLU) == 1) { ## all "U" or all "L" useU <- uplos[1] == "U" } else { ## length(tLU) == 2, counting "L" and "U" useU <- diff(tLU) >= 0 if(useU && (hasL <- tLU[1] > 0)) Tlst[hasL] <- lapply(Tlst[hasL], t) else if(!useU && (hasU <- tLU[2] > 0)) Tlst[hasU] <- lapply(Tlst[hasU], t) } if(use.n) { ## return nsparseMatrix : r <- new("nsTMatrix") } else { r <- new(paste0(if(use.l) "l" else "d", "sTMatrix")) r@x <- unlist(lapply(Tlst, slot, "x")) } r@uplo <- if(useU) "U" else "L" } else if(all(tri) && { ULs <- vapply(Tlst, slot, ".", "uplo")## "U" or "L" all(ULs[1L] == ULs[-1L]) } ## all upper or all lower ){ ## *triangular* result if(use.n) { ## return nsparseMatrix : r <- new("ntTMatrix") } else { r <- new(paste0(if(use.l) "l" else "d", "tTMatrix")) r@x <- unlist(lapply(Tlst, slot, "x")) } r@uplo <- ULs[1L] } else { if(any(sym)) Tlst[sym] <- lapply(Tlst[sym], as, "generalMatrix") if(use.n) { ## return nsparseMatrix : r <- new("ngTMatrix") } else { r <- new(paste0(if(use.l) "l" else "d", "gTMatrix")) r@x <- unlist(lapply(Tlst, slot, "x")) } } r@Dim <- c(i_off[nl+1], j_off[nl + 1]) r@i <- unlist(lapply(1:nl, function(k) Tlst[[k]]@i + i_off[k])) r@j <- unlist(lapply(1:nl, function(k) Tlst[[k]]@j + j_off[k])) r } bdiag <- function(...) { if((nA <- nargs()) == 0) return(new("dgCMatrix")) if(nA == 1 && !is.list(...)) return(as(..., "CsparseMatrix")) alis <- if(nA == 1 && is.list(..1)) ..1 else list(...) if(length(alis) == 1) return(as(alis[[1]], "CsparseMatrix")) ## else : two or more arguments as(.bdiag(alis), "CsparseMatrix") } setMethod("tril", "diagonalMatrix", function(x, k = 0, ...) if(k >= 0) x else .setZero(x, paste0(.M.kind(x), "tCMatrix"))) setMethod("triu", "diagonalMatrix", function(x, k = 0, ...) if(k <= 0) x else .setZero(x, paste0(.M.kind(x), "tCMatrix"))) .diag2tT <- function(from, uplo = "U", kind = .M.kind(from)) { ## to triangular Tsparse i <- if(from@diag == "U") integer(0) else seq_len(from@Dim[1]) - 1L new(paste0(kind, "tTMatrix"), diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames, uplo = uplo, x = from@x, # <- ok for diag = "U" and "N" (!) i = i, j = i) } .diag2sT <- function(from, uplo = "U", kind = .M.kind(from)) { ## to symmetric Tsparse n <- from@Dim[1] i <- seq_len(n) - 1L new(paste0(kind, "sTMatrix"), Dim = from@Dim, Dimnames = from@Dimnames, i = i, j = i, uplo = uplo, x = if(from@diag == "N") from@x else ## "U"-diag rep.int(switch(kind, "d" = 1., "l" =, "n" = TRUE, ## otherwise stop(gettextf("%s kind not yet implemented", sQuote(kind)), domain=NA)), n)) } ## diagonal -> triangular, upper / lower depending on "partner" 'x': diag2tT.u <- function(d, x, kind = .M.kind(d)) .diag2tT(d, uplo = if(is(x,"triangularMatrix")) x@uplo else "U", kind) ## diagonal -> sparse {triangular OR symmetric} (upper / lower) depending on "partner": diag2Tsmart <- function(d, x, kind = .M.kind(d)) { clx <- getClassDef(class(x)) if(extends(clx, "symmetricMatrix")) .diag2sT(d, uplo = x@uplo, kind) else .diag2tT(d, uplo = if(extends(clx,"triangularMatrix")) x@uplo else "U", kind) } ## FIXME: should not be needed {when ddi* is dsparse* etc}: setMethod("is.finite", signature(x = "diagonalMatrix"), function(x) is.finite(.diag2tT(x))) setMethod("is.infinite", signature(x = "diagonalMatrix"), function(x) is.infinite(.diag2tT(x))) ## In order to evade method dispatch ambiguity warnings, ## and because we can save a .M.kind() call, we use this explicit ## "hack" instead of signature x = "diagonalMatrix" : ## ## ddi*: di2tT <- function(from) .diag2tT(from, "U", "d") setAs("ddiMatrix", "triangularMatrix", di2tT) ##_no_longer_ setAs("ddiMatrix", "sparseMatrix", di2tT) ## needed too (otherwise -> Tsparse is taken): setAs("ddiMatrix", "TsparseMatrix", di2tT) setAs("ddiMatrix", "dsparseMatrix", di2tT) setAs("ddiMatrix", "CsparseMatrix", function(from) as(.diag2tT(from, "U", "d"), "CsparseMatrix")) setAs("ddiMatrix", "symmetricMatrix", function(from) .diag2sT(from, "U", "d")) ## ## ldi*: di2tT <- function(from) .diag2tT(from, "U", "l") setAs("ldiMatrix", "triangularMatrix", di2tT) ##_no_longer_ setAs("ldiMatrix", "sparseMatrix", di2tT) ## needed too (otherwise -> Tsparse is taken): setAs("ldiMatrix", "TsparseMatrix", di2tT) setAs("ldiMatrix", "lsparseMatrix", di2tT) setAs("ldiMatrix", "CsparseMatrix", function(from) as(.diag2tT(from, "U", "l"), "CsparseMatrix")) setAs("ldiMatrix", "symmetricMatrix", function(from) .diag2sT(from, "U", "l")) rm(di2tT) setAs("diagonalMatrix", "nMatrix", di2nMat <- function(from) { i <- if(from@diag == "U") integer(0) else which(isN0(from@x)) - 1L new("ntTMatrix", i = i, j = i, diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames) }) setAs("diagonalMatrix", "nsparseMatrix", function(from) as(from, "nMatrix")) ##' A version of diag(x,n) which *does* preserve the mode of x, where diag() "fails" mkDiag <- function(x, n) { y <- matrix(as0(mod=mode(x)), n,n) if (n > 0) y[1L + 0:(n - 1L) * (n + 1)] <- x y } ## NB: diag(x,n) is really faster for n >= 20, and even more for large n ## --> using diag() where possible, ==> .ddi2mat() .diag2mat <- function(from) ## want "ldiMatrix" -> "matrix" (but integer -> for now) mkDiag(if(from@diag == "U") as1(from@x) else from@x, n = from@Dim[1]) .ddi2mat <- function(from) base::diag(if(from@diag == "U") as1(from@x) else from@x, nrow = from@Dim[1]) setAs("ddiMatrix", "matrix", .ddi2mat) ## the non-ddi diagonalMatrix -- only "ldiMatrix" currently: setAs("diagonalMatrix", "matrix", .diag2mat) setMethod("as.vector", "diagonalMatrix", function(x, mode) { n <- x@Dim[1] mod.x <- mode(x@x) r <- vector(mod.x, length = n^2) if(n) r[1 + 0:(n - 1L) * (n + 1)] <- if(x@diag == "U") as1(mod=mod.x) else x@x as.vector(r, mode) }) setAs("diagonalMatrix", "generalMatrix", # prefer sparse: function(from) as(as(from, "CsparseMatrix"), "generalMatrix")) setAs("diagonalMatrix", "denseMatrix", function(from) as(as(from, "CsparseMatrix"), "denseMatrix")) ..diag.x <- function(m) rep.int(as1(m@x), m@Dim[1]) .diag.x <- function(m) if(m@diag == "U") rep.int(as1(m@x), m@Dim[1]) else m@x .diag.2N <- function(m) { if(m@diag == "U") m@diag <- "N" m } setAs("ddiMatrix", "dgeMatrix", ..2dge) setAs("ddiMatrix", "ddenseMatrix", #-> "dtr" function(from) as(as(from, "triangularMatrix"),"denseMatrix")) setAs("ldiMatrix", "ldenseMatrix", #-> "ltr" function(from) as(as(from, "triangularMatrix"),"denseMatrix")) setAs("matrix", "diagonalMatrix", function(from) { d <- dim(from) if(d[1] != (n <- d[2])) stop("non-square matrix") if(any(from[row(from) != col(from)] != 0)) stop("matrix with non-zero off-diagonals cannot be coerced to \"diagonalMatrix\"") x <- diag(from); names(x) <- NULL # don't want them in 'x' slot if(is.logical(x)) { cl <- "ldiMatrix" uni <- allTrue(x) ## uni := {is it unit-diagonal ?} } else { cl <- "ddiMatrix" uni <- allTrue(x == 1) storage.mode(x) <- "double" } ## TODO: complex new(cl, Dim = c(n,n), diag = if(uni) "U" else "N", x = if(uni) x[FALSE] else x, Dimnames = .M.DN(from)) }) ## ``generic'' coercion to diagonalMatrix : build on isDiagonal() and diag() setAs("Matrix", "diagonalMatrix", function(from) { d <- dim(from) if(d[1] != (n <- d[2])) stop("non-square matrix") if(!isDiagonal(from)) stop("matrix is not diagonal") ## else: x <- diag(from); names(x) <- NULL # don't want them in 'x' slot if(is.logical(x)) { cl <- "ldiMatrix" uni <- allTrue(x) } else { cl <- "ddiMatrix" uni <- allTrue(x == 1) storage.mode(x) <- "double" } ## TODO: complex new(cl, Dim = c(n,n), diag = if(uni) "U" else "N", x = if(uni) x[FALSE] else x, Dimnames = from@Dimnames) }) setMethod("diag", signature(x = "diagonalMatrix"), function(x = 1, nrow, ncol) .diag.x(x)) subDiag <- function(x, i, j, ..., drop) { x <- as(x, "CsparseMatrix") ## << was "TsparseMatrix" (Csparse is faster now) x <- if(missing(i)) x[, j, drop=drop] else if(missing(j)) if(nargs() == 4) x[i, , drop=drop] else x[i, drop=drop] else x[i,j, drop=drop] if(isS4(x) && isDiagonal(x)) as(x, "diagonalMatrix") else x } setMethod("[", signature(x = "diagonalMatrix", i = "index", j = "index", drop = "logical"), subDiag) setMethod("[", signature(x = "diagonalMatrix", i = "index", j = "missing", drop = "logical"), function(x, i, j, ..., drop) { na <- nargs() Matrix.msg("diag[i,m,l] : nargs()=", na, .M.level = 2) if(na == 4) subDiag(x, i=i, , drop=drop) else subDiag(x, i=i, drop=drop) }) setMethod("[", signature(x = "diagonalMatrix", i = "missing", j = "index", drop = "logical"), function(x, i, j, ..., drop) subDiag(x, j=j, drop=drop)) ## When you assign to a diagonalMatrix, the result should be ## diagonal or sparse --- ## FIXME: this now fails because the "denseMatrix" methods come first in dispatch ## Only(?) current bug: x[i] <- value is wrong when i is *vector* replDiag <- function(x, i, j, ..., value) { x <- as(x, "CsparseMatrix")# was "Tsparse.." till 2012-07 if(missing(i)) x[, j] <- value else if(missing(j)) { ## x[i , ] <- v *OR* x[i] <- v na <- nargs() ## message("diagnosing replDiag() -- nargs()= ", na) if(na == 4) x[i, ] <- value else if(na == 3) x[i] <- value else stop(gettextf("Internal bug: nargs()=%d; please report", na), domain=NA) } else x[i,j] <- value if(isDiagonal(x)) as(x, "diagonalMatrix") else x } setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "index", value = "replValue"), replDiag) setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "missing", value = "replValue"), function(x,i,j, ..., value) { ## message("before replDiag() -- nargs()= ", nargs()) if(nargs() == 3) replDiag(x, i=i, value=value) else ## nargs() == 4 : replDiag(x, i=i, , value=value) }) setReplaceMethod("[", signature(x = "diagonalMatrix", i = "missing", j = "index", value = "replValue"), function(x,i,j, ..., value) replDiag(x, j=j, value=value)) ## x[] <- value : setReplaceMethod("[", signature(x = "diagonalMatrix", i = "missing", j = "missing", value = "ANY"), function(x,i,j, ..., value) { if(all0(value)) { # be faster r <- new(paste0(.M.kindC(getClassDef(class(x))),"tTMatrix"))# of all "0" r@Dim <- x@Dim r@Dimnames <- x@Dimnames r } else { ## typically non-sense: assigning to full sparseMatrix x[TRUE] <- value x } }) setReplaceMethod("[", signature(x = "diagonalMatrix", i = "matrix", # 2-col.matrix j = "missing", value = "replValue"), function(x,i,j, ..., value) { if(ncol(i) == 2) { if(all((ii <- i[,1]) == i[,2])) { # replace in diagonal only if(x@diag == "U") { one <- as1(x@x) if(any(value != one | is.na(value))) { x@diag <- "N" x@x <- rep.int(one, x@Dim[1]) } else return(x) } x@x[ii] <- value x } else { ## no longer diagonal, but remain sparse: x <- as(x, "TsparseMatrix") x[i] <- value x } } else { # behave as "base R": use as if vector x <- as(x, "matrix") x[i] <- value Matrix(x) } }) ## value = "sparseMatrix": setReplaceMethod("[", signature(x = "diagonalMatrix", i = "missing", j = "index", value = "sparseMatrix"), function (x, i, j, ..., value) callGeneric(x=x, , j=j, value = as(value, "sparseVector"))) setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "missing", value = "sparseMatrix"), function (x, i, j, ..., value) callGeneric(x=x, i=i, , value = as(value, "sparseVector"))) setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "index", value = "sparseMatrix"), function (x, i, j, ..., value) callGeneric(x=x, i=i, j=j, value = as(value, "sparseVector"))) ## value = "sparseVector": setReplaceMethod("[", signature(x = "diagonalMatrix", i = "missing", j = "index", value = "sparseVector"), replDiag) setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "missing", value = "sparseVector"), replDiag) setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "index", value = "sparseVector"), replDiag) setMethod("t", signature(x = "diagonalMatrix"), function(x) { x@Dimnames <- x@Dimnames[2:1] ; x }) setMethod("isDiagonal", "diagonalMatrix", function(object) TRUE) setMethod("isTriangular", "diagonalMatrix", function(object, upper=NA, ...) TRUE) setMethod("isSymmetric", "diagonalMatrix", function(object, ...) TRUE) setMethod("symmpart", signature(x = "diagonalMatrix"), function(x) x) setMethod("skewpart", signature(x = "diagonalMatrix"), function(x) .setZero(x)) setMethod("chol", signature(x = "ddiMatrix"), function(x, pivot, ...) { if(x@diag == "U") return(x) ## else if(any(x@x < 0)) stop("chol() is undefined for diagonal matrix with negative entries") x@x <- sqrt(x@x) x }) ## chol(L) is L for logical diagonal: setMethod("chol", signature(x = "ldiMatrix"), function(x, pivot, ...) x) setMethod("determinant", signature(x = "diagonalMatrix", logarithm = "logical"), function(x, logarithm, ...) mkDet(.diag.x(x), logarithm)) setMethod("norm", signature(x = "diagonalMatrix", type = "character"), function(x, type, ...) { if((n <- x@Dim[1]) == 0) return(0) # as for "sparseMatrix" type <- toupper(substr(type[1], 1, 1)) isU <- (x@diag == "U") # unit-diagonal if(type == "F") sqrt(if(isU) n else sum(x@x^2)) else { ## norm == "I","1","O","M","2" : if(isU) 1 else max(abs(x@x)) } }) ## Basic Matrix Multiplication {many more to add} ## --------------------- ## Note that "ldi" logical are treated as numeric diagdiagprod <- function(x, y) { dimCheck(x,y) if(x@diag != "U") { if(y@diag != "U") { nx <- x@x * y@x if(is.numeric(nx) && !is.numeric(x@x)) x <- as(x, "dMatrix") x@x <- as.numeric(nx) } x } else ## x is unit diagonal y } ##' Boolean Algebra/Arithmetic Product of Diagonal Matrices ##' %&% diagdiagprodBool <- function(x, y) { dimCheck(x,y) if(x@diag != "U") { if(!is.logical(x@x)) x <- as(x, "lMatrix") if(y@diag != "U") { nx <- x@x & y@x x@x <- as.logical(nx) } x } else { ## x is unit diagonal: return y if(!is.logical(y@x)) y <- as(y, "lMatrix") y } } setMethod("%*%", signature(x = "diagonalMatrix", y = "diagonalMatrix"), diagdiagprod, valueClass = "ddiMatrix") setMethod("%&%", signature(x = "diagonalMatrix", y = "diagonalMatrix"), diagdiagprodBool, valueClass = "ldiMatrix")# do *not* have "ndiMatrix" ! ##' Both Numeric or Boolean Algebra/Arithmetic Product of Diagonal Matrices diagdiagprodFlexi <- function(x, y=NULL, boolArith = NA, ...) { dimCheck(x,y) bool <- isTRUE(boolArith) if(x@diag != "U") { if(bool && !is.logical(x@x)) x <- as(x, "lMatrix") if(y@diag != "U") { if(bool) { nx <- x@x & y@x x@x <- as.logical(nx) } else { ## boolArith is NA or FALSE: ==> numeric, as have *no* "diagMatrix" patter[n]: nx <- x@x * y@x if(is.numeric(nx) && !is.numeric(x@x)) x <- as(x, "dMatrix") x@x <- as.numeric(nx) } } x } else { ## x is unit diagonal: return y if(bool && !is.logical(y@x)) y <- as(y, "lMatrix") y } } setMethod("crossprod", signature(x = "diagonalMatrix", y = "diagonalMatrix"), diagdiagprodFlexi) setMethod("tcrossprod", signature(x = "diagonalMatrix", y = "diagonalMatrix"), diagdiagprodFlexi) ##' crossprod(x) := x'x diagprod <- function(x, y = NULL, boolArith = NA, ...) { bool <- isTRUE(boolArith) if(bool && !is.logical(x@x)) x <- as(x, "lMatrix") if(x@diag != "U") { if(bool) { nx <- x@x & y@x x@x <- as.logical(nx) } else { ## boolArith is NA or FALSE: ==> numeric, as have *no* "diagMatrix" patter[n]: nx <- x@x * x@x if(is.numeric(nx) && !is.numeric(x@x)) x <- as(x, "dMatrix") x@x <- as.numeric(nx) } } x } setMethod( "crossprod", signature(x = "diagonalMatrix", y = "missing"), diagprod) setMethod("tcrossprod", signature(x = "diagonalMatrix", y = "missing"), diagprod) ## analogous to matdiagprod() below: diagmatprod <- function(x, y) { ## x is diagonalMatrix dy <- dim(y) if(x@Dim[2L] != dy[1L]) stop("non-matching dimensions") if(prod(dy)) Matrix(if(x@diag == "U") y else x@x * y) else Matrix(if(x@diag == "U") y else x@x * y, nrow=dy[1L], ncol=dy[2L]) } setMethod("%*%", signature(x = "diagonalMatrix", y = "matrix"), diagmatprod) ##formals(diagmatprod) <- alist(x=, y=NULL, boolArith = NA, ...=) ## FIXME boolArith diagmatprod2 <- function(x, y=NULL, boolArith = NA, ...) { ## x is diagonalMatrix dy <- dim(y) if(x@Dim[2L] != dy[1L]) stop("non-matching dimensions") if(prod(dy)) Matrix(if(x@diag == "U") y else x@x * y) else Matrix(if(x@diag == "U") y else x@x * y, nrow=dy[1L], ncol=dy[2L]) } setMethod("crossprod", signature(x = "diagonalMatrix", y = "matrix"), diagmatprod2) diagGeprod <- function(x, y) { if(x@Dim[2L] != y@Dim[1L]) stop("non-matching dimensions") if(x@diag != "U") { if(!is.numeric(y@x)) y <- as(y, "dMatrix") y@x <- x@x * y@x } y } setMethod("%*%", signature(x= "diagonalMatrix", y= "dgeMatrix"), diagGeprod) setMethod("%*%", signature(x= "diagonalMatrix", y= "lgeMatrix"), diagGeprod) diagGeprodBool <- function(x, y) { if(x@Dim[2L] != y@Dim[1L]) stop("non-matching dimensions") if(!is.logical(y@x)) y <- as(y, "lMatrix") if(x@diag != "U") y@x <- x@x & y@x y } setMethod("%&%", signature(x= "diagonalMatrix", y= "geMatrix"), diagGeprodBool) diagGeprod2 <- function(x, y=NULL, boolArith = NA, ...) { if(x@Dim[2L] != y@Dim[1L]) stop("non-matching dimensions") bool <- isTRUE(boolArith) if(bool && !is.logical(y@x)) y <- as(y, "lMatrix") else if(!bool && !is.numeric(y@x)) y <- as(y, "dMatrix") if(x@diag != "U") y@x <- if(bool) x@x & y@x else x@x * y@x y } setMethod("crossprod", signature(x = "diagonalMatrix", y = "dgeMatrix"), diagGeprod2) setMethod("crossprod", signature(x = "diagonalMatrix", y = "lgeMatrix"), diagGeprod2) ## analogous to diagmatprod() above: matdiagprod <- function(x, y) { dx <- dim(x) if(dx[2L] != y@Dim[1L]) stop("non-matching dimensions") Matrix(if(y@diag == "U") x else x * rep(y@x, each = dx[1L])) } setMethod("%*%", signature(x = "matrix", y = "diagonalMatrix"), matdiagprod) gediagprod <- function(x, y) { dx <- dim(x) if(dx[2L] != y@Dim[1L]) stop("non-matching dimensions") if(y@diag == "N") { if(!is.numeric(x@x)) x <- as(x, "dMatrix") x@x <- x@x * rep(y@x, each = dx[1L]) } x } setMethod("%*%", signature(x= "dgeMatrix", y= "diagonalMatrix"), gediagprod) setMethod("%*%", signature(x= "lgeMatrix", y= "diagonalMatrix"), gediagprod) gediagprodBool <- function(x, y) { dx <- dim(x) if(dx[2L] != y@Dim[1L]) stop("non-matching dimensions") if(!is.logical(x@x)) x <- as(x, "lMatrix") if(y@diag == "N") x@x <- x@x & rep(y@x, each = dx[1L]) x } setMethod("%&%", signature(x= "geMatrix", y= "diagonalMatrix"), gediagprodBool) setMethod("tcrossprod",signature(x = "matrix", y = "diagonalMatrix"), function(x, y=NULL, boolArith = NA, ...) { dx <- dim(x) if(dx[2L] != y@Dim[1L]) stop("non-matching dimensions") bool <- isTRUE(boolArith) if(bool && !is.logical(y@x)) y <- as(y, "lMatrix") Matrix(if(y@diag == "U") x else if(bool) x & rep(y@x, each = dx[1L]) else x * rep(y@x, each = dx[1L])) }) setMethod("crossprod", signature(x = "matrix", y = "diagonalMatrix"), function(x, y=NULL, boolArith = NA, ...) { dx <- dim(x) if(dx[1L] != y@Dim[1L]) stop("non-matching dimensions") bool <- isTRUE(boolArith) if(bool && !is.logical(y@x)) y <- as(y, "lMatrix") Matrix(if(y@diag == "U") t(x) else if(bool) t(rep.int(y@x, dx[2L]) & x) else t(rep.int(y@x, dx[2L]) * x)) }) gediagprod2 <- function(x, y=NULL, boolArith = NA, ...) { dx <- dim(x) if(dx[2L] != y@Dim[1L]) stop("non-matching dimensions") bool <- isTRUE(boolArith) if(bool && !is.logical(x@x)) x <- as(x, "lMatrix") else if(!bool && !is.numeric(x@x)) x <- as(x, "dMatrix") if(y@diag == "N") x@x <- if(bool) x@x & rep(y@x, each = dx[1L]) else x@x * rep(y@x, each = dx[1L]) x } setMethod("tcrossprod", signature(x = "dgeMatrix", y = "diagonalMatrix"), gediagprod2) setMethod("tcrossprod", signature(x = "lgeMatrix", y = "diagonalMatrix"), gediagprod2) ## crossprod {more of these} ## tcrossprod --- all are not yet there: do the dense ones here: setMethod("%*%", signature(x = "diagonalMatrix", y = "denseMatrix"), function(x, y) if(x@diag == "U") y else x %*% as(y, "generalMatrix")) setMethod("%*%", signature(x = "denseMatrix", y = "diagonalMatrix"), function(x, y) if(y@diag == "U") x else as(x, "generalMatrix") %*% y) ## FIXME: ## setMethod("tcrossprod", signature(x = "diagonalMatrix", y = "denseMatrix"), ## function(x, y = NULL) { ## }) ##' @param x CsparseMatrix ##' @param y diagonalMatrix ##' @return x %*% y Cspdiagprod <- function(x, y, boolArith = NA, ...) { if((m <- ncol(x)) != y@Dim[1L]) stop("non-matching dimensions") if(y@diag == "N") { ## otherwise: y == Diagonal(n) : multiplication is identity x <- .Call(Csparse_diagU2N, x) cx <- getClass(class(x)) if(!all(y@x[1L] == y@x[-1L]) && extends(cx, "symmetricMatrix")) x <- as(x, "generalMatrix") ind <- rep.int(seq_len(m), x@p[-1] - x@p[-m-1L]) if(isTRUE(boolArith)) { if(extends(cx, "nMatrix")) x <- as(x, "lMatrix") # so, has y@x x@x <- r <- x@x & y@x[x@i + 1L] if(!anyNA(r) && !extends(cx, "diagonalMatrix")) x <- as(drop0(x), "nMatrix") } else { if(!extends(cx, "dMatrix")) x <- as(x, "dMatrix") # <- FIXME if we have zMatrix x@x <- x@x * y@x[ind] } if(.hasSlot(x, "factors") && length(x@factors)) {# drop cashed ones ## instead of dropping all factors, be smart about some ## TODO ...... x@factors <- list() } x } else { # y is unit-diagonal ==> "return x" cx <- getClass(class(x)) if(isTRUE(boolArith)) { is.l <- if(extends(cx, "dMatrix")) { ## <- FIXME: extend once we have iMatrix, zMatrix x <- as(x, "lMatrix"); TRUE } else extends(cx, "lMatrix") if(is.l && !anyNA(x@x)) as(drop0(x), "nMatrix") else if(is.l) x else # defensive: as(x, "lMatrix") } else { ## else boolArith is NA or FALSE {which are equivalent here, das diagonal = "numLike"} if(extends(cx, "nMatrix") || extends(cx, "lMatrix")) as(x, "dMatrix") else x } } } ##' @param x diagonalMatrix ##' @param y CsparseMatrix ##' @return x %*% y diagCspprod <- function(x, y, boolArith = NA, ...) { if(x@Dim[2L] != y@Dim[1L]) stop("non-matching dimensions") if(x@diag == "N") { y <- .Call(Csparse_diagU2N, y) cy <- getClass(class(y)) if(!all(x@x[1L] == x@x[-1L]) && extends(cy, "symmetricMatrix")) y <- as(y, "generalMatrix") if(isTRUE(boolArith)) { if(extends(cy, "nMatrix")) y <- as(y, "lMatrix") # so, has y@x y@x <- r <- y@x & x@x[y@i + 1L] if(!anyNA(r) && !extends(cy, "diagonalMatrix")) y <- as(drop0(y), "nMatrix") } else { if(!extends(cy, "dMatrix")) y <- as(y, "dMatrix") # <- FIXME if we have zMatrix y@x <- y@x * x@x[y@i + 1L] } if(.hasSlot(y, "factors") && length(y@factors)) { ## if(.hasSlot(y, "factors") && length(yf <- y@factors)) { ## -- TODO? -- ## instead of dropping all factors, be smart about some ## keep <- character() ## if(any(names(yf) == "LU")) { ## <- not easy: y = P'LUQ, x y = xP'LUQ => LU ??? ## keep <- "LU" ## } ## y@factors <- yf[keep] y@factors <- list() } y } else { ## x @ diag == "U" cy <- getClass(class(y)) if(isTRUE(boolArith)) { is.l <- if(extends(cy, "dMatrix")) { ## <- FIXME: extend once we have iMatrix, zMatrix y <- as(y, "lMatrix"); TRUE } else extends(cy, "lMatrix") if(is.l && !anyNA(y@x)) as(drop0(y), "nMatrix") else if(is.l) y else # defensive: as(y, "lMatrix") } else { ## else boolArith is NA or FALSE {which are equivalent here, das diagonal = "numLike"} if(extends(cy, "nMatrix") || extends(cy, "lMatrix")) as(y, "dMatrix") else y } } } ## + 'boolArith' argument { ==> .local() is used in any case; keep formals simple :} setMethod("crossprod", signature(x = "diagonalMatrix", y = "CsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) diagCspprod(x, y, boolArith=boolArith)) setMethod("crossprod", signature(x = "diagonalMatrix", y = "sparseMatrix"), function(x, y=NULL, boolArith=NA, ...) diagCspprod(x, as(y, "CsparseMatrix"), boolArith=boolArith)) ## Prefer calling diagCspprod to Cspdiagprod if going to transpose anyway ## x'y == (y'x)' setMethod("crossprod", signature(x = "CsparseMatrix", y = "diagonalMatrix"), function(x, y=NULL, boolArith=NA, ...) t(diagCspprod(y, x, boolArith=boolArith))) setMethod("crossprod", signature(x = "sparseMatrix", y = "diagonalMatrix"), function(x, y=NULL, boolArith=NA, ...) t(diagCspprod(y, as(x, "Csparsematrix"), boolArith=boolArith))) setMethod("tcrossprod", signature(x = "diagonalMatrix", y = "CsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) diagCspprod(x, t(y), boolArith=boolArith)) setMethod("tcrossprod", signature(x = "diagonalMatrix", y = "sparseMatrix"), function(x, y=NULL, boolArith=NA, ...) diagCspprod(x, t(as(y, "CsparseMatrix")), boolArith=boolArith)) setMethod("tcrossprod", signature(x = "CsparseMatrix", y = "diagonalMatrix"), function(x, y=NULL, boolArith=NA, ...) Cspdiagprod(x, y, boolArith=boolArith)) setMethod("tcrossprod", signature(x = "sparseMatrix", y = "diagonalMatrix"), function(x, y=NULL, boolArith=NA, ...) Cspdiagprod(as(x, "CsparseMatrix"), y, boolArith=boolArith)) setMethod("%*%", signature(x = "diagonalMatrix", y = "CsparseMatrix"), function(x, y) diagCspprod(x, y, boolArith=NA)) setMethod("%&%", signature(x = "diagonalMatrix", y = "CsparseMatrix"), function(x, y) diagCspprod(x, y, boolArith=TRUE)) ## instead of "sparseMatrix", use: [RT]sparse.. ("closer" in method dispatch) for(cl in c("TsparseMatrix", "RsparseMatrix")) { setMethod("%*%", signature(x = "diagonalMatrix", y = "sparseMatrix"), function(x, y) diagCspprod(as(x, "CsparseMatrix"), y, boolArith=NA)) setMethod("%*%", signature(x = "sparseMatrix", y = "diagonalMatrix"), function(x, y) Cspdiagprod(as(x, "CsparseMatrix"), y, boolArith=NA)) setMethod("%&%", signature(x = "diagonalMatrix", y = "sparseMatrix"), function(x, y) diagCspprod(as(x, "CsparseMatrix"), y, boolArith=TRUE)) setMethod("%&%", signature(x = "sparseMatrix", y = "diagonalMatrix"), function(x, y) Cspdiagprod(as(x, "CsparseMatrix"), y, boolArith=TRUE)) } setMethod("%*%", signature(x = "CsparseMatrix", y = "diagonalMatrix"), function(x, y) Cspdiagprod(x, y, boolArith=NA)) setMethod("%&%", signature(x = "CsparseMatrix", y = "diagonalMatrix"), function(x, y) Cspdiagprod(x, y, boolArith=TRUE)) ## TODO: Write tests in ./tests/ which ensure that many "ops" with diagonal* ## do indeed work by going through sparse (and *not* ddense)! setMethod("solve", signature(a = "diagonalMatrix", b = "missing"), function(a, b, ...) { a@x <- 1/ a@x a@Dimnames <- a@Dimnames[2:1] a }) solveDiag <- function(a, b, ...) { if(a@Dim[1L] != nrow(b)) stop("incompatible matrix dimensions") ## trivially invert a 'in place' and multiply: a@x <- 1/ a@x a@Dimnames <- a@Dimnames[2:1] a %*% b } setMethod("solve", signature(a = "diagonalMatrix", b = "matrix"), solveDiag) setMethod("solve", signature(a = "diagonalMatrix", b = "Matrix"), solveDiag) ## Schur() ---> ./eigen.R ###---------------- (, , ) ---------------------- ## Use function for several signatures, in order to evade diagOdiag <- function(e1,e2) { ## result should also be diagonal _ if possible _ r <- callGeneric(.diag.x(e1), .diag.x(e2)) # error if not "compatible" ## Check what happens with non-diagonals, i.e. (0 o 0), (FALSE o 0), ...: r00 <- callGeneric(if(is.numeric(e1@x)) 0 else FALSE, if(is.numeric(e2@x)) 0 else FALSE) if(is0(r00)) { ## r00 == 0 or FALSE --- result *is* diagonal if(is.numeric(r)) { # "double" *or* "integer" if(is.numeric(e2@x)) { e2@x <- r; return(.diag.2N(e2)) } if(!is.numeric(e1@x)) ## e.g. e1, e2 are logical; e1 <- as(e1, "dMatrix") if(!is.double(r)) r <- as.double(r) } else if(is.logical(r)) e1 <- as(e1, "lMatrix") else stop(gettextf("intermediate 'r' is of type %s", typeof(r)), domain=NA) e1@x <- r .diag.2N(e1) } else { ## result not diagonal, but at least symmetric: ## e.g., m == m isNum <- (is.numeric(r) || is.numeric(r00)) isLog <- (is.logical(r) || is.logical(r00)) Matrix.msg("exploding o into dense matrix", .M.level = 2) d <- e1@Dim n <- d[1L] stopifnot(length(r) == n) if(isNum && !is.double(r)) r <- as.double(r) xx <- as.vector(matrix(rbind(r, matrix(r00,n,n)), n,n)) newcl <- paste0(if(isNum) "d" else if(isLog) { if(!anyNA(r) && !anyNA(r00)) "n" else "l" } else stop("not yet implemented .. please report"), "syMatrix") new(newcl, Dim = e1@Dim, Dimnames = e1@Dimnames, x = xx) } } ### This would be *the* way, but we get tons of "ambiguous method dispatch" ## we use this hack instead of signature x = "diagonalMatrix" : diCls <- names(getClass("diagonalMatrix")@subclasses) if(FALSE) { setMethod("Ops", signature(e1 = "diagonalMatrix", e2 = "diagonalMatrix"), diagOdiag) } else { ## These are just for method disambiguation: for(c1 in diCls) for(c2 in diCls) setMethod("Ops", signature(e1 = c1, e2 = c2), diagOdiag) } ## diagonal o triangular |--> triangular ## diagonal o symmetric |--> symmetric ## {also when other is sparse: do these "here" -- ## before conversion to sparse, since that loses "diagonality"} diagOtri <- function(e1,e2) { ## result must be triangular r <- callGeneric(d1 <- .diag.x(e1), diag(e2)) # error if not "compatible" ## Check what happens with non-diagonals, i.e. (0 o 0), (FALSE o 0), ...: e1.0 <- if(is.numeric(d1)) 0 else FALSE r00 <- callGeneric(e1.0, if(.n2 <- is.numeric(e2[0L])) 0 else FALSE) if(is0(r00)) { ## r00 == 0 or FALSE --- result *is* triangular diag(e2) <- r ## check what happens "in the triangle" e2.2 <- if(.n2) 2 else TRUE if(!callGeneric(e1.0, e2.2) == e2.2) { # values "in triangle" can change: n <- dim(e2)[1L] it <- indTri(n, upper = (e2@uplo == "U")) e2[it] <- callGeneric(e1.0, e2[it]) } e2 } else { ## result not triangular ---> general rr <- as(e2, "generalMatrix") diag(rr) <- r rr } } setMethod("Ops", signature(e1 = "diagonalMatrix", e2 = "triangularMatrix"), diagOtri) ## For the reverse, Ops == "Arith" | "Compare" | "Logic" ## 'Arith' := '"+"', '"-"', '"*"', '"^"', '"%%"', '"%/%"', '"/"' setMethod("Arith", signature(e1 = "triangularMatrix", e2 = "diagonalMatrix"), function(e1,e2) { ## this must only trigger for *dense* e1 switch(.Generic, "+" = .Call(dtrMatrix_addDiag, as(e1,"dtrMatrix"), .diag.x(e2)), "-" = .Call(dtrMatrix_addDiag, as(e1,"dtrMatrix"), - .diag.x(e2)), "*" = { n <- e2@Dim[1L] d2 <- if(e2@diag == "U") { # unit-diagonal d <- rep.int(as1(e2@x), n) e2@x <- d e2@diag <- "N" d } else e2@x e2@x <- diag(e1) * d2 e2 }, "^" = { ## will be dense ( as ^ 0 == 1 ): e1 ^ as(e2, "denseMatrix") }, ## otherwise: callGeneric(e1, diag2Tsmart(e2,e1))) }) ## Compare --> 'swap' (e.g. e1 < e2 <==> e2 > e1 ): setMethod("Compare", signature(e1 = "triangularMatrix", e2 = "diagonalMatrix"), .Cmp.swap) ## '&' and "|' are commutative: setMethod("Logic", signature(e1 = "triangularMatrix", e2 = "diagonalMatrix"), function(e1,e2) callGeneric(e2, e1)) ## For almost everything else, diag* shall be treated "as sparse" : ## These are cheap implementations via coercion ## For disambiguation --- define this for "sparseMatrix" , then for "ANY"; ## and because we can save an .M.kind() call, we use this explicit ## "hack" for all diagonalMatrix *subclasses* instead of just "diagonalMatrix" : ## ## ddi*: setMethod("Ops", signature(e1 = "ddiMatrix", e2 = "sparseMatrix"), function(e1,e2) callGeneric(diag2Tsmart(e1,e2, "d"), e2)) setMethod("Ops", signature(e1 = "sparseMatrix", e2 = "ddiMatrix"), function(e1,e2) callGeneric(e1, diag2Tsmart(e2,e1, "d"))) ## ldi* setMethod("Ops", signature(e1 = "ldiMatrix", e2 = "sparseMatrix"), function(e1,e2) callGeneric(diag2Tsmart(e1,e2, "l"), e2)) setMethod("Ops", signature(e1 = "sparseMatrix", e2 = "ldiMatrix"), function(e1,e2) callGeneric(e1, diag2Tsmart(e2,e1, "l"))) ## Ops: Arith --> numeric : "dMatrix" ## Compare --> logical ## Logic --> logical: "lMatrix" ## Other = "numeric" : stay diagonal if possible ## ddi*: Arith: result numeric, potentially ddiMatrix for(arg2 in c("numeric","logical")) setMethod("Arith", signature(e1 = "ddiMatrix", e2 = arg2), function(e1,e2) { n <- e1@Dim[1L] f0 <- callGeneric(0, e2) if(all0(f0)) { # remain diagonal L1 <- (le <- length(e2)) == 1L if(e1@diag == "U") { if(any((r <- callGeneric(1, e2)) != 1)) { e1@diag <- "N" e1@x[seq_len(n)] <- r # possibly recycling r } ## else: result = e1 (is "U" diag) } else { r <- callGeneric(e1@x, e2) ## "future fixme": if we have idiMatrix, and r is 'integer', use idiMatrix e1@x[] <- if(L1) r else r[1L + ((n+1)*(0:(n-1L))) %% le] } e1 } else callGeneric(diag2tT.u(e1,e2, "d"), e2) }) for(arg1 in c("numeric","logical")) setMethod("Arith", signature(e1 = arg1, e2 = "ddiMatrix"), function(e1,e2) { n <- e2@Dim[1L] f0 <- callGeneric(e1, 0) if(all0(f0)) { # remain diagonal L1 <- (le <- length(e1)) == 1L if(e2@diag == "U") { if(any((r <- callGeneric(e1, 1)) != 1)) { e2@diag <- "N" e2@x[seq_len(n)] <- r # possibly recycling r } ## else: result = e2 (is "U" diag) } else { r <- callGeneric(e1, e2@x) ## "future fixme": if we have idiMatrix, and r is 'integer', use idiMatrix e2@x[] <- if(L1) r else r[1L + ((n+1)*(0:(n-1L))) %% le] } e2 } else callGeneric(e1, diag2tT.u(e2,e1, "d")) }) ## ldi* Arith --> result numeric, potentially ddiMatrix for(arg2 in c("numeric","logical")) setMethod("Arith", signature(e1 = "ldiMatrix", e2 = arg2), function(e1,e2) { n <- e1@Dim[1L] f0 <- callGeneric(0, e2) if(all0(f0)) { # remain diagonal L1 <- (le <- length(e2)) == 1L E <- copyClass(e1, "ddiMatrix", c("diag", "Dim", "Dimnames"), check=FALSE) ## storage.mode(E@x) <- "double" if(e1@diag == "U") { if(any((r <- callGeneric(1, e2)) != 1)) { E@diag <- "N" E@x[seq_len(n)] <- r # possibly recycling r } ## else: result = E (is "U" diag) } else { r <- callGeneric(e1@x, e2) ## "future fixme": if we have idiMatrix, and r is 'integer', use idiMatrix E@x[seq_len(n)] <- if(L1) r else r[1L + ((n+1)*(0:(n-1L))) %% le] } E } else callGeneric(diag2tT.u(e1,e2, "l"), e2) }) for(arg1 in c("numeric","logical")) setMethod("Arith", signature(e1 = arg1, e2 = "ldiMatrix"), function(e1,e2) { n <- e2@Dim[1L] f0 <- callGeneric(e1, 0) if(all0(f0)) { # remain diagonal L1 <- (le <- length(e1)) == 1L E <- copyClass(e2, "ddiMatrix", c("diag", "Dim", "Dimnames"), check=FALSE) ## storage.mode(E@x) <- "double" if(e2@diag == "U") { if(any((r <- callGeneric(e1, 1)) != 1)) { E@diag <- "N" E@x[seq_len(n)] <- r # possibly recycling r } ## else: result = E (is "U" diag) } else { r <- callGeneric(e1, e2@x) ## "future fixme": if we have idiMatrix, and r is 'integer', use idiMatrix E@x[seq_len(n)] <- if(L1) r else r[1L + ((n+1)*(0:(n-1L))) %% le] } E } else callGeneric(e1, diag2tT.u(e2,e1, "l")) }) ## ddi*: for "Ops" without "Arith": or --> result logical, potentially ldi ## ## Note that ("numeric", "ddiMatrix") is simply swapped, e.g., if(FALSE) { selectMethod("<", c("numeric","lMatrix"))# Compare selectMethod("&", c("numeric","lMatrix"))# Logic } ## so we don't need to define a method here : for(arg2 in c("numeric","logical")) setMethod("Ops", signature(e1 = "ddiMatrix", e2 = arg2), function(e1,e2) { n <- e1@Dim[1L] f0 <- callGeneric(0, e2) if(all0(f0)) { # remain diagonal L1 <- (le <- length(e2)) == 1L E <- copyClass(e1, "ldiMatrix", c("diag", "Dim", "Dimnames"), check=FALSE) ## storage.mode(E@x) <- "logical" if(e1@diag == "U") { if(any((r <- callGeneric(1, e2)) != 1)) { E@diag <- "N" E@x[seq_len(n)] <- r # possibly recycling r } ## else: result = E (is "U" diag) } else { r <- callGeneric(e1@x, e2) ## "future fixme": if we have idiMatrix, and r is 'integer', use idiMatrix E@x[seq_len(n)] <- if(L1) r else r[1L + ((n+1)*(0:(n-1L))) %% le] } E } else callGeneric(diag2tT.u(e1,e2, "d"), e2) }) ## ldi*: for "Ops" without "Arith": or --> result logical, potentially ldi for(arg2 in c("numeric","logical")) setMethod("Ops", signature(e1 = "ldiMatrix", e2 = arg2), function(e1,e2) { n <- e1@Dim[1L] f0 <- callGeneric(FALSE, e2) if(all0(f0)) { # remain diagonal L1 <- (le <- length(e2)) == 1L if(e1@diag == "U") { if(any((r <- callGeneric(TRUE, e2)) != 1)) { e1@diag <- "N" e1@x[seq_len(n)] <- r # possibly recycling r } ## else: result = e1 (is "U" diag) } else { r <- callGeneric(e1@x, e2) ## "future fixme": if we have idiMatrix, and r is 'integer', use idiMatrix e1@x[] <- if(L1) r else r[1L + ((n+1)*(0:(n-1L))) %% le] } e1 } else callGeneric(diag2tT.u(e1,e2, "l"), e2) }) ## Not {"sparseMatrix", "numeric} : {"denseMatrix", "matrix", ... } for(other in c("ANY", "Matrix", "dMatrix")) { ## ddi*: setMethod("Ops", signature(e1 = "ddiMatrix", e2 = other), function(e1,e2) callGeneric(diag2Tsmart(e1,e2, "d"), e2)) setMethod("Ops", signature(e1 = other, e2 = "ddiMatrix"), function(e1,e2) callGeneric(e1, diag2Tsmart(e2,e1, "d"))) ## ldi*: setMethod("Ops", signature(e1 = "ldiMatrix", e2 = other), function(e1,e2) callGeneric(diag2Tsmart(e1,e2, "l"), e2)) setMethod("Ops", signature(e1 = other, e2 = "ldiMatrix"), function(e1,e2) callGeneric(e1, diag2Tsmart(e2,e1, "l"))) } ## Direct subclasses of "denseMatrix": currently ddenseMatrix, ldense... : if(FALSE) # now also contains "geMatrix" dense.subCl <- local({ dM.scl <- getClass("denseMatrix")@subclasses names(dM.scl)[vapply(dM.scl, slot, 0, "distance") == 1] }) dense.subCl <- paste0(c("d","l","n"), "denseMatrix") for(DI in diCls) { dMeth <- if(extends(DI, "dMatrix")) function(e1,e2) callGeneric(diag2Tsmart(e1,e2, "d"), e2) else # "lMatrix", the only other kind for now function(e1,e2) callGeneric(diag2Tsmart(e1,e2, "l"), e2) for(c2 in c(dense.subCl, "Matrix")) { for(Fun in c("*", "&")) { setMethod(Fun, signature(e1 = DI, e2 = c2), function(e1,e2) callGeneric(e1, Diagonal(x = diag(e2)))) setMethod(Fun, signature(e1 = c2, e2 = DI), function(e1,e2) callGeneric(Diagonal(x = diag(e1)), e2)) } setMethod("^", signature(e1 = c2, e2 = DI), function(e1,e2) callGeneric(Diagonal(x = diag(e1)), e2)) for(Fun in c("%%", "%/%", "/")) ## 0 0 |--> NaN for these. setMethod(Fun, signature(e1 = DI, e2 = c2), dMeth) } } ## Group methods "Math", "Math2" in --> ./Math.R ### "Summary" : "max" "min" "range" "prod" "sum" "any" "all" ### ---------- the last 4: separately here for(cl in diCls) { setMethod("any", cl, function (x, ..., na.rm) { if(any(x@Dim == 0)) FALSE else if(x@diag == "U") TRUE else any(x@x, ..., na.rm = na.rm) }) setMethod("all", cl, function (x, ..., na.rm) { n <- x@Dim[1L] if(n >= 2) FALSE else if(n == 0 || x@diag == "U") TRUE else all(x@x, ..., na.rm = na.rm) }) setMethod("prod", cl, function (x, ..., na.rm) { n <- x@Dim[1L] if(n >= 2) 0 else if(n == 0 || x@diag == "U") 1 else ## n == 1, diag = "N" : prod(x@x, ..., na.rm = na.rm) }) setMethod("sum", cl, function(x, ..., na.rm) { r <- sum(x@x, ..., na.rm = na.rm)# double or integer, correctly if(x@diag == "U" && !is.na(r)) r + x@Dim[1L] else r }) } ## The remaining ones are max, min, range : setMethod("Summary", "ddiMatrix", function(x, ..., na.rm) { if(any(x@Dim == 0)) callGeneric(numeric(0), ..., na.rm=na.rm) else if(x@diag == "U") callGeneric(x@x, 0, 1, ..., na.rm=na.rm) else callGeneric(x@x, 0, ..., na.rm=na.rm) }) setMethod("Summary", "ldiMatrix", function(x, ..., na.rm) { if(any(x@Dim == 0)) callGeneric(logical(0), ..., na.rm=na.rm) else if(x@diag == "U") callGeneric(x@x, FALSE, TRUE, ..., na.rm=na.rm) else callGeneric(x@x, FALSE, ..., na.rm=na.rm) }) ## similar to prTriang() in ./Auxiliaries.R : prDiag <- function(x, digits = getOption("digits"), justify = "none", right = TRUE) { cf <- array(".", dim = x@Dim, dimnames = x@Dimnames) cf[row(cf) == col(cf)] <- vapply(diag(x), format, "", digits = digits, justify = justify) print(cf, quote = FALSE, right = right) invisible(x) } ## somewhat consistent with "print" for sparseMatrix : setMethod("print", signature(x = "diagonalMatrix"), prDiag) setMethod("show", signature(object = "diagonalMatrix"), function(object) { d <- dim(object) cl <- class(object) cat(sprintf('%d x %d diagonal matrix of class "%s"', d[1L], d[2L], cl)) if(d[1L] < 50) { cat("\n") prDiag(object) } else { cat(", with diagonal entries\n") show(diag(object)) invisible(object) } }) rm(arg1, arg2, other, DI, Fun, cl, c1, c2, dense.subCl, diCls)# not used elsewhere setMethod("summary", signature(object = "diagonalMatrix"), function(object, ...) { d <- dim(object) r <- summary(object@x, ...) attr(r, "header") <- sprintf('%d x %d diagonal Matrix of class "%s"', d[1L], d[2L], class(object)) ## use ole' S3 technology for such a simple case class(r) <- c("diagSummary", class(r)) r }) print.diagSummary <- function (x, ...) { cat(attr(x, "header"),"\n") class(x) <- class(x)[-1] print(x, ...) invisible(x) } Matrix/R/AllClass.R0000644000176200001440000010401413044130534013535 0ustar liggesusers## --- New "logic" class -- currently using "raw" instead of "logical" ## LOGIC setClass("logic", contains = "raw") ##' To be used in initialize method or other Matrix constructors ##' ##' TODO: via .Call(..) .fixupDimnames <- function(dnms) { N.N <- list(NULL, NULL) if(is.null(dnms) || identical(dnms, N.N)) return(N.N) ## else if(any(i0 <- lengths(dnms) == 0) && !all(vapply(dnms[i0], is.null, NA))) ## replace character(0) etc, by NULL : dnms[i0] <- list(NULL) ## coerce, e.g. integer dimnames to character: -- as R's matrix(..): if(any(i0 <- vapply(dnms, function(d) !is.null(d) && !is.character(d), NA))) dnms[i0] <- lapply(dnms[i0], as.character) dnms } ## ------------- Virtual Classes ---------------------------------------- ## Mother class of all Matrix objects setClass("Matrix", contains = "VIRTUAL", slots = c(Dim = "integer", Dimnames = "list"), prototype = prototype(Dim = integer(2), Dimnames = list(NULL,NULL)), validity = function(object) { if(!isTRUE(r <- .Call(Dim_validate, object, "Matrix"))) r else .Call(dimNames_validate, object) }) if(FALSE)## Allowing 'Dimnames' to define 'Dim' --> would require changes in ## ../src/Mutils.c dimNames_validate() and how it is used in validity above setMethod("initialize", "Matrix", function(.Object, ...) { .Object <- callNextMethod() if(length(args <- list(...)) && any(nzchar(snames <- names(args))) && "Dimnames" %in% snames) { .Object@Dimnames <- DN <- .fixupDimnames(.Object@Dimnames) if(is.na(match("Dim", snames)) && !any(vapply(DN, is.null, NA))) ## take 'Dim' from 'Dimnames' dimensions .Object@Dim <- lengths(DN, use.names=FALSE) } .Object }) if(getRversion() >= "3.2.0") { setMethod("initialize", "Matrix", function(.Object, ...) { .Object <- callNextMethod() if(length(args <- list(...)) && any(nzchar(snames <- names(args))) && "Dimnames" %in% snames) .Object@Dimnames <- .fixupDimnames(.Object@Dimnames) .Object }) } else { ## R < 3.2.0 setMethod("initialize", "Matrix", function(.Object, ...) { .Object <- callNextMethod(.Object, ...) if(length(args <- list(...)) && any(nzchar(snames <- names(args))) && "Dimnames" %in% snames) .Object@Dimnames <- .fixupDimnames(.Object@Dimnames) .Object }) } ## The class of composite matrices - i.e. those for which it makes sense to ## create a factorization setClass("compMatrix", contains = c("Matrix", "VIRTUAL"), slots = c(factors = "list")) ## Virtual classes of Matrices determined by above/below diagonal relationships setClass("generalMatrix", contains = c("compMatrix", "VIRTUAL")) setClass("symmetricMatrix", contains = c("compMatrix", "VIRTUAL"), slots = c(uplo = "character"), prototype = prototype(uplo = "U"), validity = function(object) .Call(symmetricMatrix_validate, object)) setClass("triangularMatrix", contains = c("Matrix", "VIRTUAL"), slots = c(uplo = "character", diag = "character"), prototype = prototype(uplo = "U", diag = "N"), validity = function(object) .Call(triangularMatrix_validate, object)) ## Virtual class of numeric matrices setClass("dMatrix", contains = c("Matrix", "VIRTUAL"), slots = c(x = "numeric"), validity = function(object) .Call(dMatrix_validate, object)) ## Virtual class of integer matrices setClass("iMatrix", contains = c("Matrix", "VIRTUAL"), slots = c(x = "integer")) ## Virtual class of logical matrices setClass("lMatrix", contains = c("Matrix", "VIRTUAL"), slots = c(x = "logical")) ## Virtual class of nonzero pattern matrices setClass("nMatrix", contains = c("Matrix", "VIRTUAL")) ## aka 'pattern' matrices -- have no x slot ## Virtual class of complex matrices - 'z' as in the names of Lapack routines setClass("zMatrix", contains = c("Matrix", "VIRTUAL"), slots = c(x = "complex")) ## Virtual class of dense matrices (including "packed") setClass("denseMatrix", contains = c("Matrix", "VIRTUAL")) ## Virtual class of dense, numeric matrices setClass("ddenseMatrix", contains = c("dMatrix", "denseMatrix", "VIRTUAL")) ## Virtual class of dense, logical matrices setClass("ldenseMatrix", contains = c("lMatrix", "denseMatrix", "VIRTUAL")) if(FALSE) { ##--not yet-- setClass("idenseMatrix", contains = c("iMatrix", "denseMatrix", "VIRTUAL")) } ## Virtual class of dense, nonzero pattern matrices - rarely used, for completeness setClass("ndenseMatrix", contains = c("nMatrix", "denseMatrix", "VIRTUAL"), slots = c(x = "logical")) ## virtual SPARSE ------------ setClass("sparseMatrix", contains = c("Matrix", "VIRTUAL")) ## diagonal: has 'diag' slot; diag = "U" <--> have identity matrix setClass("diagonalMatrix", contains = c("sparseMatrix", "VIRTUAL"), ## NOTE: ^^^^^^ was dense Matrix, until 0.999375-11 (2008-07) slots = c(diag = "character"), validity = function(object) { d <- object@Dim if(d[1] != (n <- d[2])) return("matrix is not square") lx <- length(object@x) if(object@diag == "U") { if(lx != 0) return("diag = \"U\" (identity matrix) requires empty 'x' slot") } else if(object@diag == "N") { if(lx != n) return("diagonal matrix has 'x' slot of length != 'n'") } else return("diagonal matrix 'diag' slot must be \"U\" or \"N\"") TRUE }, prototype = prototype(diag = "N") ) ## sparse matrices in Triplet representation (dgT, lgT, ..): setClass("TsparseMatrix", contains = c("sparseMatrix", "VIRTUAL"), slots = c(i = "integer", j = "integer"), validity = function(object) .Call(Tsparse_validate, object) ) setClass("CsparseMatrix", contains = c("sparseMatrix", "VIRTUAL"), slots = c(i = "integer", p = "integer"), prototype = prototype(p = 0L),# to be valid validity = function(object) .Call(Csparse_validate, object) ) setClass("RsparseMatrix", contains = c("sparseMatrix", "VIRTUAL"), slots = c(p = "integer", j = "integer"), prototype = prototype(p = 0L),# to be valid validity = function(object) .Call(Rsparse_validate, object) ) setClass("dsparseMatrix", contains = c("dMatrix", "sparseMatrix", "VIRTUAL")) setClass("lsparseMatrix", contains = c("lMatrix", "sparseMatrix", "VIRTUAL")) if(FALSE) { ##--not yet-- setClass("isparseMatrix", contains = c("iMatrix", "sparseMatrix", "VIRTUAL")) } ## these are the "pattern" matrices for "symbolic analysis" of sparse OPs: setClass("nsparseMatrix", contains = c("nMatrix", "sparseMatrix", "VIRTUAL")) ## More Class Intersections {for method dispatch}: if(FALSE) { ## this is "natural" but gives WARNINGs when other packages use "it" setClass("dCsparseMatrix", contains = c("CsparseMatrix", "dsparseMatrix", "VIRTUAL")) setClass("lCsparseMatrix", contains = c("CsparseMatrix", "lsparseMatrix", "VIRTUAL")) setClass("nCsparseMatrix", contains = c("CsparseMatrix", "nsparseMatrix", "VIRTUAL")) ## dense general setClass("geMatrix", contains = c("denseMatrix", "generalMatrix", "VIRTUAL")) } else { ## ----------- a version that maybe works better for other pkgs --------- ##--> setClassUnion() ... below } ## ------------------ Proper (non-virtual) Classes ---------------------------- ##---------------------- DENSE ----------------------------------------- ## numeric, dense, general matrices setClass("dgeMatrix", contains = c("ddenseMatrix", "generalMatrix"), ## checks that length( @ x) == prod( @ Dim): validity = function(object) .Call(dgeMatrix_validate, object)) ## i.e. "dgeMatrix" cannot be packed, but "ddenseMatrix" can .. ## numeric, dense, non-packed, triangular matrices setClass("dtrMatrix", contains = c("ddenseMatrix", "triangularMatrix"), validity = function(object) .Call(dense_nonpacked_validate, object)) ## numeric, dense, packed, triangular matrices setClass("dtpMatrix", contains = c("ddenseMatrix", "triangularMatrix"), validity = function(object) .Call(dtpMatrix_validate, object)) ## numeric, dense, non-packed symmetric matrices setClass("dsyMatrix", contains = c("ddenseMatrix", "symmetricMatrix"), validity = function(object) .Call(dense_nonpacked_validate, object)) ## numeric, dense, packed symmetric matrices setClass("dspMatrix", contains = c("ddenseMatrix", "symmetricMatrix"), validity = function(object) .Call(dspMatrix_validate, object)) ## numeric, dense, non-packed, positive-definite, symmetric matrices setClass("dpoMatrix", contains = "dsyMatrix", validity = function(object) .Call(dpoMatrix_validate, object) ) ## numeric, dense, packed, positive-definite, symmetric matrices setClass("dppMatrix", contains = "dspMatrix", validity = function(object) .Call(dppMatrix_validate, object) ) ##----- logical dense Matrices -- e.g. as result of COMPARISON ## logical, dense, general matrices setClass("lgeMatrix", contains = c("ldenseMatrix", "generalMatrix"), ## since "lge" inherits from "ldenseMatrix", only need this: ## checks that length( @ x) == prod( @ Dim): validity = function(object) .Call(dense_nonpacked_validate, object)) ## i.e. "lgeMatrix" cannot be packed, but "ldenseMatrix" can .. ## logical, dense, non-packed, triangular matrices setClass("ltrMatrix", validity = function(object) .Call(dense_nonpacked_validate, object), contains = c("ldenseMatrix", "triangularMatrix")) ## logical, dense, packed, triangular matrices setClass("ltpMatrix", contains = c("ldenseMatrix", "triangularMatrix")) ## logical, dense, non-packed symmetric matrices setClass("lsyMatrix", validity = function(object) .Call(dense_nonpacked_validate, object), contains = c("ldenseMatrix", "symmetricMatrix")) ## logical, dense, packed symmetric matrices setClass("lspMatrix", contains = c("ldenseMatrix", "symmetricMatrix"), validity = function(object) .Call(dspMatrix_validate, object) ## "dsp", "lsp" and "nsp" have the same validate ) ##----- nonzero pattern dense Matrices -- "for completeness" ## logical, dense, general matrices setClass("ngeMatrix", contains = c("ndenseMatrix", "generalMatrix"), validity = function(object) .Call(dense_nonpacked_validate, object)) ## i.e. "ngeMatrix" cannot be packed, but "ndenseMatrix" can .. ## logical, dense, non-packed, triangular matrices setClass("ntrMatrix", validity = function(object) .Call(dense_nonpacked_validate, object), contains = c("ndenseMatrix", "triangularMatrix")) ## logical, dense, packed, triangular matrices setClass("ntpMatrix", contains = c("ndenseMatrix", "triangularMatrix")) ## logical, dense, non-packed symmetric matrices setClass("nsyMatrix", validity = function(object) .Call(dense_nonpacked_validate, object), contains = c("ndenseMatrix", "symmetricMatrix")) ## logical, dense, packed symmetric matrices setClass("nspMatrix", contains = c("ndenseMatrix", "symmetricMatrix"), validity = function(object) .Call(dspMatrix_validate, object) ## "dsp", "lsp" and "nsp" have the same validate ) ## 'diagonalMatrix' already has validity checking ## diagonal, numeric matrices; "dMatrix" has 'x' slot : setClass("ddiMatrix", contains = c("diagonalMatrix", "dMatrix"))# or "dMatrix" ## diagonal, logical matrices; "lMatrix" has 'x' slot : setClass("ldiMatrix", contains = c("diagonalMatrix", "lMatrix")) setClass("corMatrix", slots = c(sd = "numeric"), contains = "dpoMatrix", validity = function(object) { ## assuming that 'dpoMatrix' validity check has already happened: n <- object@Dim[2] if(length(sd <- object@sd) != n) return("'sd' slot must be of length 'dim(.)[1]'") if(any(!is.finite(sd)))# including NA return("'sd' slot has non-finite entries") if(any(sd < 0)) return("'sd' slot has negative entries") TRUE }) ##-------------------- S P A R S E (non-virtual) -------------------------- ##---------- numeric sparse matrix classes -------------------------------- ## numeric, sparse, triplet general matrices setClass("dgTMatrix", contains = c("TsparseMatrix", "dsparseMatrix", "generalMatrix"), validity = function(object) .Call(xTMatrix_validate, object) ) ## Should not have dtTMatrix inherit from dgTMatrix because a dtTMatrix could ## be less than fully stored if diag = "U". Methods for the dgTMatrix ## class would not produce correct results even though all the slots ## are present. ## numeric, sparse, triplet triangular matrices setClass("dtTMatrix", contains = c("TsparseMatrix", "dsparseMatrix", "triangularMatrix"), validity = function(object) .Call(tTMatrix_validate, object) ) ## numeric, sparse, triplet symmetric matrices(also only store one triangle) setClass("dsTMatrix", contains = c("TsparseMatrix", "dsparseMatrix", "symmetricMatrix"), validity = function(object) .Call(tTMatrix_validate, object) ) ## numeric, sparse, sorted compressed sparse column-oriented general matrices setClass("dgCMatrix", contains = c("CsparseMatrix", "dsparseMatrix", "generalMatrix"), validity = function(object) .Call(xCMatrix_validate, object) ) ## special case: indicator rows for a factor - needs more careful definition ##setClass("indicators", contains = "dgCMatrix", slots = c(levels = "character")) ## see comments for dtTMatrix above ## numeric, sparse, sorted compressed sparse column-oriented triangular matrices setClass("dtCMatrix", contains = c("CsparseMatrix", "dsparseMatrix", "triangularMatrix"), validity = function(object) .Call(tCMatrix_validate, object) ) ## see comments for dsTMatrix above ## numeric, sparse, sorted compressed sparse column-oriented symmetric matrices setClass("dsCMatrix", contains = c("CsparseMatrix", "dsparseMatrix", "symmetricMatrix"), validity = function(object) .Call(tCMatrix_validate, object) ) if(FALSE) ## TODO ??? Class of positive definite (Csparse symmetric) Matrices: setClass("dpCMatrix", contains = "dsCMatrix", validity = function(object) TODO("test for pos.definite ??")) ## numeric, sparse, sorted compressed sparse row-oriented general matrices setClass("dgRMatrix", contains = c("RsparseMatrix", "dsparseMatrix", "generalMatrix"), validity = function(object) .Call(xRMatrix_validate, object) ) ## numeric, sparse, sorted compressed sparse row-oriented triangular matrices setClass("dtRMatrix", contains = c("RsparseMatrix", "dsparseMatrix", "triangularMatrix"), validity = function(object) .Call(tRMatrix_validate, object) ) ## numeric, sparse, sorted compressed sparse row-oriented symmetric matrices setClass("dsRMatrix", contains = c("RsparseMatrix", "dsparseMatrix", "symmetricMatrix"), validity = function(object) .Call(tRMatrix_validate, object) ) ##---------- logical sparse matrix classes -------------------------------- ## these classes are typically result of Matrix comparisons, e.g., ## <..Matrix> >= v (and hence can have NA's) ## logical, sparse, triplet general matrices setClass("lgTMatrix", contains = c("TsparseMatrix", "lsparseMatrix", "generalMatrix"), validity = function(object) .Call(xTMatrix_validate, object) ) ## logical, sparse, triplet triangular matrices setClass("ltTMatrix", contains = c("TsparseMatrix", "lsparseMatrix", "triangularMatrix"), validity = function(object) .Call(tTMatrix_validate, object) ) ## logical, sparse, triplet symmetric matrices setClass("lsTMatrix", contains = c("TsparseMatrix", "lsparseMatrix", "symmetricMatrix"), validity = function(object) .Call(tTMatrix_validate, object) ) ## logical, sparse, sorted compressed sparse column-oriented general matrices setClass("lgCMatrix", contains = c("CsparseMatrix", "lsparseMatrix", "generalMatrix"), validity = function(object) .Call(xCMatrix_validate, object) ) ## logical, sparse, sorted compressed sparse column-oriented triangular matrices setClass("ltCMatrix", contains = c("CsparseMatrix", "lsparseMatrix", "triangularMatrix"), validity = function(object) .Call(xCMatrix_validate, object) ) ## logical, sparse, sorted compressed sparse column-oriented symmetric matrices setClass("lsCMatrix", contains = c("CsparseMatrix", "lsparseMatrix", "symmetricMatrix"), validity = function(object) .Call(xCMatrix_validate, object) ) ## logical, sparse, sorted compressed sparse row-oriented general matrices setClass("lgRMatrix", contains = c("RsparseMatrix", "lsparseMatrix", "generalMatrix"), validity = function(object) .Call(xRMatrix_validate, object) ) ## logical, sparse, sorted compressed sparse row-oriented triangular matrices setClass("ltRMatrix", contains = c("RsparseMatrix", "lsparseMatrix", "triangularMatrix"), validity = function(object) .Call(tRMatrix_validate, object) ) ## logical, sparse, sorted compressed sparse row-oriented symmetric matrices setClass("lsRMatrix", contains = c("RsparseMatrix", "lsparseMatrix", "symmetricMatrix"), validity = function(object) .Call(tRMatrix_validate, object) ) ##---------- nonzero pattern sparse matrix classes --------------------------- ## these classes are used in symbolic analysis to determine the ## locations of non-zero entries ## nonzero pattern, sparse, triplet general matrices setClass("ngTMatrix", contains = c("TsparseMatrix", "nsparseMatrix", "generalMatrix") ## validity: Tsparse_validate should be enough ) ## nonzero pattern, sparse, triplet triangular matrices setClass("ntTMatrix", contains = c("TsparseMatrix", "nsparseMatrix", "triangularMatrix"), ## validity: Tsparse_ and triangular*_validate should be enough ) ## nonzero pattern, sparse, triplet symmetric matrices setClass("nsTMatrix", contains = c("TsparseMatrix", "nsparseMatrix", "symmetricMatrix"), ## validity: Tsparse_ and symmetric*_validate should be enough ) ## nonzero pattern, sparse, sorted compressed column-oriented matrices setClass("ngCMatrix", contains = c("CsparseMatrix", "nsparseMatrix", "generalMatrix"), ## validity: Csparse_validate should be enough ) setClass("ngCMatrix", contains = c("CsparseMatrix", "nsparseMatrix", "generalMatrix"), ## validity: Csparse_validate should be enough ) ## nonzero pattern, sparse, sorted compressed column-oriented triangular matrices setClass("ntCMatrix", contains = c("CsparseMatrix", "nsparseMatrix", "triangularMatrix"), ## validity: Csparse_ and triangular*_validate should be enough ) ## nonzero pattern, sparse, sorted compressed column-oriented symmetric matrices setClass("nsCMatrix", contains = c("CsparseMatrix", "nsparseMatrix", "symmetricMatrix"), ## validity: Csparse_ and symmetric*_validate should be enough ) ## nonzero pattern, sparse, sorted compressed row-oriented general matrices setClass("ngRMatrix", contains = c("RsparseMatrix", "nsparseMatrix", "generalMatrix"), ) ## nonzero pattern, sparse, sorted compressed row-oriented triangular matrices setClass("ntRMatrix", contains = c("RsparseMatrix", "nsparseMatrix", "triangularMatrix"), ) ## nonzero pattern, sparse, sorted compressed row-oriented symmetric matrices setClass("nsRMatrix", contains = c("RsparseMatrix", "nsparseMatrix", "symmetricMatrix"), ) if(FALSE) { ##--not yet-- ##---------- integer sparse matrix classes -------------------------------- ## integer, sparse, triplet general matrices setClass("igTMatrix", contains = c("TsparseMatrix", "isparseMatrix", "generalMatrix"), validity = function(object) .Call(xTMatrix_validate, object) ) ## integer, sparse, triplet triangular matrices setClass("itTMatrix", contains = c("TsparseMatrix", "isparseMatrix", "triangularMatrix"), validity = function(object) .Call(tTMatrix_validate, object) ) ## integer, sparse, triplet symmetric matrices setClass("isTMatrix", contains = c("TsparseMatrix", "isparseMatrix", "symmetricMatrix"), validity = function(object) .Call(tTMatrix_validate, object) ) ## integer, sparse, sorted compressed sparse column-oriented general matrices setClass("igCMatrix", contains = c("CsparseMatrix", "isparseMatrix", "generalMatrix"), validity = function(object) .Call(xCMatrix_validate, object) ) ## integer, sparse, sorted compressed sparse column-oriented triangular matrices setClass("itCMatrix", contains = c("CsparseMatrix", "isparseMatrix", "triangularMatrix"), validity = function(object) .Call(xCMatrix_validate, object) ) ## integer, sparse, sorted compressed sparse column-oriented symmetric matrices setClass("isCMatrix", contains = c("CsparseMatrix", "isparseMatrix", "symmetricMatrix"), validity = function(object) .Call(xCMatrix_validate, object) ) ## integer, sparse, sorted compressed sparse row-oriented general matrices setClass("igRMatrix", contains = c("RsparseMatrix", "isparseMatrix", "generalMatrix"), validity = function(object) .Call(xRMatrix_validate, object) ) ## integer, sparse, sorted compressed sparse row-oriented triangular matrices setClass("itRMatrix", contains = c("RsparseMatrix", "isparseMatrix", "triangularMatrix"), validity = function(object) .Call(tRMatrix_validate, object) ) ## integer, sparse, sorted compressed sparse row-oriented symmetric matrices setClass("isRMatrix", contains = c("RsparseMatrix", "isparseMatrix", "symmetricMatrix"), validity = function(object) .Call(tRMatrix_validate, object) ) }##--not yet-- ##-------------------- index and permutation matrices-------------------------- setClass("indMatrix", slots = c(perm = "integer"), contains = c("sparseMatrix", "generalMatrix"), validity = function(object) { n <- object@Dim[1] d <- object@Dim[2] perm <- object@perm if (length(perm) != n) return(paste("length of 'perm' slot must be", n)) if(n > 0 && (any(perm > d) || any(perm < 1))) return("'perm' slot is not a valid index") TRUE }) setClass("pMatrix", slots = c(perm = "integer"), contains = c("indMatrix"), validity = function(object) { d <- object@Dim if (d[2] != (n <- d[1])) return("pMatrix must be square") perm <- object@perm if (length(perm) != n) return(paste("length of 'perm' slot must be", n)) if(n > 0 && !(all(range(perm) == c(1, n)) && length(unique(perm)) == n)) return("'perm' slot is not a valid permutation") TRUE }) ### Factorization classes --------------------------------------------- ## Mother class: setClass("MatrixFactorization", slots = c(Dim = "integer"), contains = "VIRTUAL", validity = function(object) .Call(MatrixFactorization_validate, object)) setClass("CholeskyFactorization", contains = "MatrixFactorization", "VIRTUAL") ## -- Those (exceptions) inheriting from "Matrix" : --- setClass("Cholesky", contains = c("dtrMatrix", "CholeskyFactorization")) #unUsed: setClass("LDL", contains = c("dtrMatrix", "CholeskyFactorization")) setClass("pCholesky", contains = c("dtpMatrix", "CholeskyFactorization")) ## These are currently only produced implicitly from *solve() setClass("BunchKaufman", contains = c("dtrMatrix", "MatrixFactorization"), slots = c(perm = "integer"), validity = function(object) .Call(BunchKaufman_validate, object)) setClass("pBunchKaufman", contains = c("dtpMatrix", "MatrixFactorization"), slots = c(perm = "integer"), validity = function(object) .Call(pBunchKaufman_validate, object)) ## -- the usual ``non-Matrix'' factorizations : --------- setClass("CHMfactor", # cholmod_factor struct as S4 object contains = c("CholeskyFactorization", "VIRTUAL"), slots = c(colcount = "integer", perm = "integer", type = "integer"), validity = function(object) .Call(CHMfactor_validate, object)) setClass("CHMsuper", # supernodal cholmod_factor contains = c("CHMfactor", "VIRTUAL"), slots = c(super = "integer", pi = "integer", px = "integer", s = "integer"), validity = function(object) .Call(CHMsuper_validate, object)) setClass("CHMsimpl", # simplicial cholmod_factor contains = c("CHMfactor", "VIRTUAL"), slots = c(p = "integer", i = "integer", nz = "integer", nxt = "integer", prv = "integer"), validity = function(object) .Call(CHMsimpl_validate, object)) setClass("dCHMsuper", contains = "CHMsuper", slots = c(x = "numeric")) setClass("nCHMsuper", contains = "CHMsuper") setClass("dCHMsimpl", contains = "CHMsimpl", slots = c(x = "numeric")) setClass("nCHMsimpl", contains = "CHMsimpl") ##--- LU --- setClass("LU", contains = c("MatrixFactorization", "VIRTUAL")) setClass("denseLU", contains = "LU", slots = c(x = "numeric", perm = "integer", Dimnames = "list"), validity = function(object) .Call(LU_validate, object)) setClass("sparseLU", contains = "LU", slots = c(L = "dtCMatrix", U = "dtCMatrix", p = "integer", q = "integer")) ##--- QR --- setClass("sparseQR", contains = "MatrixFactorization", slots = c(V = "dgCMatrix", beta = "numeric", p = "integer", R = "dgCMatrix", q = "integer"), validity = function(object) .Call(sparseQR_validate, object)) ##-- "SPQR" ---> ./spqr.R for now ## "denseQR" -- ? (``a version of'' S3 class "qr") if (FALSE) { ## unused classes setClass("csn_QR", slots = c(U = "dgCMatrix", L = "dgCMatrix", beta = "numeric")) setClass("csn_LU", slots = c(U = "dgCMatrix", L = "dgCMatrix", Pinv = "integer")) setClass("css_QR", slots = c(Pinv = "integer", Q = "integer", parent = "integer", cp = "integer", nz = "integer")) setClass("css_LU", slots = c(Q = "integer", nz = "integer")) } ##-- Schur --- ## non-"Matrix" Class 1 --- For Eigen values: setClassUnion("number", members = c("numeric", "complex")) setClass("Schur", contains = "MatrixFactorization", slots = c(T = "Matrix", # <- "block-triangular"; maybe triangular Q = "Matrix", EValues = "number"), validity = function(object) { dim <- object@Dim if((n <- dim[1]) != dim[2]) "'Dim' slot is not (n,n)" else if(any(dim(object@T) != n)) "'dim(T)' is incorrect" else if(any(dim(object@Q) != n)) "'dim(Q)' is incorrect" else if(length(object@EValues) != n) "'EValues' is not of correct length" else TRUE }) ### Class Union : no inheritance, but is(*, ) : setClassUnion("mMatrix", members = c("matrix", "Matrix")) if(FALSE) ## to be used in setMethod("c", "numM...") -- once that works setClassUnion("numMatrixLike", members = c("logical", "integer", "numeric", "mMatrix")) ## CARE: Sometimes we'd want all those for which 'x' contains all the data. ## e.g. Diagonal() is "ddiMatrix" with 'x' slot of length 0, does *not* contain 1 setClassUnion("xMatrix", ## those Matrix classes with an 'x' slot c("dMatrix", "iMatrix", "lMatrix", "ndenseMatrix", "zMatrix")) if(TRUE) { ##--- variant of setClass("dCsparse..." ..) etc working better for other pkgs ----- setClassUnion("dCsparseMatrix", members = c("dgCMatrix", "dtCMatrix", "dsCMatrix")) setClassUnion("lCsparseMatrix", members = c("lgCMatrix", "ltCMatrix", "lsCMatrix")) setClassUnion("nCsparseMatrix", members = c("ngCMatrix", "ntCMatrix", "nsCMatrix")) ## dense general setClassUnion("geMatrix", members = c("dgeMatrix", "lgeMatrix", "ngeMatrix")) } ## Definition Packed := dense with length( . @x) < prod( . @Dim) ## ~~~~~~ ## REPLACED the following with isPacked() in ./Auxiliaries.R : ## setClassUnion("packedMatrix", ## members = c("dspMatrix", "dppMatrix", "dtpMatrix", ## "lspMatrix", "ltpMatrix", "diagonalMatrix")) ## --------------------- non-"Matrix" Classes -------------------------------- ## --- "General" (not Matrix at all) ---- ## e.g. for "Arith" methods: setClassUnion("numLike", members = c("numeric", "logical")) ##setClassUnion("numIndex", members = "numeric") ## Note "rle" is a sealed oldClass (and "virtual" as w/o prototype) setClass("rleDiff", slots = c(first = "numLike", rle = "rle"), prototype = prototype(first = integer(), rle = rle(integer())), validity = function(object) { if(length(object@first) != 1) return("'first' must be of length one") rl <- object@rle if(!is.list(rl) || length(rl) != 2 || !identical(sort(names(rl)), c("lengths", "values"))) return("'rle' must be a list (lengths = *, values = *)") if(length(lens <- rl$lengths) != length(vals <- rl$values)) return("'lengths' and 'values' differ in length") if(any(lens <= 0)) return("'lengths' must be positive") TRUE }) ### 2010-03-04 -- thinking about *implementing* some 'abIndex' methodology, ### I conclude that the following structure would probably be even more ### efficient than the "rleDiff" one : ### IDEA: Store subsequences in a numeric matrix of three rows, where ### ----- one column = [from, to, by] defining a sub seq()ence ## for now, at least use it, and [TODO!] define "seqMat" <--> "abIndex" coercions: setClass("seqMat", contains = "matrix", prototype = prototype(matrix(0, nrow = 3, ncol=0)), validity = function(object) { if(!is.numeric(object)) return("is not numeric") d <- dim(object) if(length(d) != 3 || d[1] != 3) return("not a 3 x n matrix") if(any(object != floor(object))) return("some entries are not integer valued") TRUE }) setClass("abIndex", # 'ABSTRact Index' slots = c(kind = "character", ## one of ("int32", "double", "rleDiff") # i.e., numeric or "rleDiff" x = "numLike", # for numeric [length 0 otherwise] rleD = "rleDiff"), # "rleDiff" result prototype = prototype(kind = "int32", x = integer(0)),# rleD = ... etc validity = function(object) { switch(object@kind, "int32" = if(!is.integer(object@x)) return("'x' slot must be integer when kind is 'int32'") , "double" = if(!is.double(object@x)) return("'x' slot must be double when kind is 'double'") , "rleDiff" = { if(length(object@x)) return("'x' slot must be empty when kind is 'rleDiff'") }, ## otherwise return("'kind' must be one of (\"int32\", \"double\", \"rleDiff\")") ) TRUE }) ## for 'i' in x[i] or A[i,] : (numeric = {double, integer}) ## TODO: allow "abIndex" as well ! setClassUnion("index", members = c("numeric", "logical", "character")) ## "atomic vectors" (-> ?is.atomic ) -- but note that is.atomic() ! ## --------------- those that we want to convert from old-style "matrix" setClassUnion("atomicVector", ## "double" is not needed, and not liked by some members = c("logical", "integer", "numeric", "complex", "raw", "character")) setClassUnion("numericVector", members = c("logical", "integer", "numeric")) setClassUnion("Mnumeric", members = c("numericVector", "Matrix")) ## not "matrix" as that extends "vector" and contains "character", "structure" ... setValidity("Mnumeric", function(object) { if(is.numeric(object) || is.logical(object) || inherits(object, "Matrix")) return(TRUE) ## else "Not a valid 'Mnumeric' class object" }) ## --- Matrix - related (but not "Matrix" nor "Decomposition/Factorization): ### Sparse Vectors ---- here use 1-based indexing ! ----------- ## 'longindex' should allow sparseVectors of "length" > 2^32, ## which is necessary e.g. when converted from large sparse matrices ## setClass("longindex", contains = "numeric") ## but we use "numeric" instead, for simplicity (efficiency?) setClass("sparseVector", slots = c(length = "numeric", i = "numeric"), contains = "VIRTUAL", ## "longindex" "longindex" ## note that "numeric" contains "integer" (if I like it or not..) prototype = prototype(length = 0), validity = function(object) { n <- object@length if(anyNA(i <- object@i)) "'i' slot has NAs" else if(any(!is.finite(i))) "'i' slot is not all finite" else if(any(i < 1)) "'i' must be >= 1" else if(n == 0 && length(i))"'i' must be empty when the object length is zero" else if(any(i > n)) sprintf("'i' must be in 1:%d", n) else if(is.unsorted(i, strictly=TRUE)) "'i' must be sorted strictly increasingly" else TRUE }) ##' initialization -- ensuring that 'i' is sorted (and 'x' alongside) if(getRversion() >= "3.2.0") { setMethod("initialize", "sparseVector", function(.Object, i, x, ...) { has.x <- !missing(x) if(!missing(i)) { i <- ## (be careful to assign in all cases) if(is.unsorted(i, strictly=TRUE)) { if(is(.Object, "xsparseVector") && has.x) { si <- sort.int(i, index.return=TRUE) x <- x[si$ix] si$x } else sort.int(i, method = "quick") } else i } if(has.x) x <- x callNextMethod() }) } else { ## R < 3.2.0 setMethod("initialize", "sparseVector", function(.Object, i, x, ...) { has.x <- !missing(x) if(!missing(i)) { .Object@i <- ## (be careful to assign in all cases) if(is.unsorted(i, strictly=TRUE)) { if(is(.Object, "xsparseVector") && has.x) { si <- sort.int(i, index.return=TRUE) x <- x[si$ix] si$x } else sort.int(i, method = "quick") } else i } if(has.x) .Object@x <- x callNextMethod(.Object, ...) }) } .validXspVec <- function(object) { ## n <- object@length if(length(object@i) != length(object@x)) "'i' and 'x' differ in length" else TRUE } setClass("dsparseVector", slots = c(x = "numeric"), contains = "sparseVector", validity = .validXspVec) setClass("isparseVector", slots = c(x = "integer"), contains = "sparseVector", validity = .validXspVec) setClass("lsparseVector", slots = c(x = "logical"), contains = "sparseVector", validity = .validXspVec) setClass("zsparseVector", slots = c(x = "complex"), contains = "sparseVector", validity = .validXspVec) ## nsparse has no new slot: 'i' just contains the locations! setClass("nsparseVector", contains = "sparseVector") setClassUnion("xsparseVector", ## those sparseVector's with an 'x' slot c("dsparseVector", "isparseVector", "lsparseVector", "zsparseVector")) ## for 'value' in x[..] <- value hence for all "contents" of our Matrices: setClassUnion("replValue", members = c("numeric", "logical", "complex", "raw")) setClassUnion("replValueSp", members = c("replValue", "sparseVector", "Matrix")) setClass("determinant", slots = c(modulus = "numeric", logarithm = "logical", sign = "integer", call = "call")) Matrix/R/sparseMatrix.R0000644000176200001440000011464113141330160014523 0ustar liggesusers### Define Methods that can be inherited for all subclasses ### Idea: Coercion between *VIRTUAL* classes -- as() chooses "closest" classes ### ---- should also work e.g. for dense-triangular --> sparse-triangular ! ##-> see als ./dMatrix.R, ./ddenseMatrix.R and ./lMatrix.R setAs("ANY", "sparseMatrix", function(from) as(from, "CsparseMatrix")) ## If people did not use xtabs(), but table(): setAs("table", "sparseMatrix", function(from) { if(length(dim(from)) != 2L) stop("only 2-dimensional tables can be directly coerced to sparse matrices") as(unclass(from), "CsparseMatrix") }) setAs("sparseMatrix", "generalMatrix", as_gSparse) setAs("sparseMatrix", "symmetricMatrix", as_sSparse) setAs("sparseMatrix", "triangularMatrix", as_tSparse) spMatrix <- function(nrow, ncol, i = integer(), j = integer(), x = numeric()) { dim <- c(as.integer(nrow), as.integer(ncol)) ## The conformability of (i,j,x) with itself and with 'dim' ## is checked automatically by internal "validObject()" inside new(.): kind <- .M.kind(x) new(paste0(kind, "gTMatrix"), Dim = dim, x = if(kind == "d") as.double(x) else x, ## our "Tsparse" Matrices use 0-based indices : i = as.integer(i - 1L), j = as.integer(j - 1L)) } sparseMatrix <- function(i = ep, j = ep, p, x, dims, dimnames, symmetric = FALSE, triangular = FALSE, index1 = TRUE, giveCsparse = TRUE, check = TRUE, use.last.ij = FALSE) { ## Purpose: user-level substitute for most new(, ..) calls ## Author: Douglas Bates, Date: 12 Jan 2009, based on Martin's version if((m.i <- missing(i)) + (m.j <- missing(j)) + (m.p <- missing(p)) != 1) stop("exactly one of 'i', 'j', or 'p' must be missing from call") if(!m.p) { p <- as.integer(p) if((lp <- length(p)) < 1 || p[1] != 0 || any((dp <- p[-1] - p[-lp]) < 0)) stop("'p' must be a non-decreasing vector (0, ...)") ep <- rep.int(seq_along(dp), dp) } ## i and j are now both defined (via default = ep). Make them 1-based indices. i1 <- as.logical(index1)[1] i <- as.integer(i + !(m.i || i1)) j <- as.integer(j + !(m.j || i1)) ## "minimal dimensions" from (i,j,p); no warnings from empty i or j : dims.min <- suppressWarnings(c(max(i), max(j))) if(anyNA(dims.min)) stop("NA's in (i,j) are not allowed") if(missing(dims)) { dims <- if(symmetric || triangular) rep(max(dims.min), 2) else dims.min } else { ## check dims stopifnot(all(dims >= dims.min)) dims <- as.integer(dims) } if(symmetric && triangular) stop("Both 'symmetric' and 'triangular', i.e. asking for diagonal matrix. Use 'Diagonal()' instead") sx <- if(symmetric) { if(dims[1] != dims[2]) stop("symmetric matrix must be square") "s" } else if(triangular) { if(dims[1] != dims[2]) stop("triangular matrix must be square") "t" } else "g" isPat <- missing(x) ## <-> patter"n" Matrix kx <- if(isPat) "n" else .M.kind(x) r <- new(paste0(kx, sx, "TMatrix")) r@Dim <- dims if(symmetric && all(i >= j)) r@uplo <- "L" # else "U", the default else if(triangular) { r@uplo <- if(all(i >= j)) "L" else if(all(i <= j)) "U" else stop("triangular matrix must have all i >= j or i <= j") } if(!isPat) { if(kx == "d" && !is.double(x)) x <- as.double(x) if(length(x) != (n <- length(i))) { ## recycle if(length(x) != 1 && n %% length(x) != 0) warning("length(i) is not a multiple of length(x)") x <- rep_len(x, n) } if(use.last.ij && (id <- anyDuplicated(cbind(i,j), fromLast=TRUE))) { i <- i[-id] j <- j[-id] x <- x[-id] if(any(idup <- duplicated(cbind(i,j), fromLast=TRUE))) { ndup <- -which(idup) i <- i[ndup] j <- j[ndup] x <- x[ndup] } } r@x <- x } r@i <- i - 1L r@j <- j - 1L if(!missing(dimnames)) r@Dimnames <- .fixupDimnames(dimnames) if(check) validObject(r) if(giveCsparse) as(r, "CsparseMatrix") else r } ## "graph" coercions -- this needs the graph package which is currently ## ----- *not* required on purpose ## Note: 'undirected' graph <==> 'symmetric' matrix ## Use 'graph::' as it is not impoted into Matrix, and may only be loaded, not attached: ## Add some utils that may no longer be needed in future versions of the 'graph' package graph.has.weights <- function(g) "weight" %in% names(graph::edgeDataDefaults(g)) graph.non.1.weights <- function(g) any(unlist(graph::edgeData(g, attr = "weight")) != 1) graph.wgtMatrix <- function(g) { ## Purpose: work around "graph" package's as(g, "matrix") bug ## ---------------------------------------------------------------------- ## Arguments: g: an object inheriting from (S4) class "graph" ## ---------------------------------------------------------------------- ## Author: Martin Maechler, based on Seth Falcon's code; Date: 12 May 2006 ## MM: another buglet for the case of "no edges": if(graph::numEdges(g) == 0) { p <- length(nd <- graph::nodes(g)) return( matrix(0, p,p, dimnames = list(nd, nd)) ) } ## Usual case, when there are edges: if(has.w <- graph.has.weights(g)) { ## graph.non.1.weights(g) : w <- unlist(graph::edgeData(g, attr = "weight")) has.w <- any(w != 1) } ## now 'has.w' is TRUE iff there are weights != 1 ## now 'has.w' is TRUE iff there are weights != 1 m <- as(g, "matrix") ## now is a 0/1 - matrix (instead of 0/wgts) with the 'graph' bug if(has.w) { ## fix it if needed tm <- t(m) tm[tm != 0] <- w t(tm) } else m } setAs("graphAM", "sparseMatrix", function(from) { symm <- graph::edgemode(from) == "undirected" && isSymmetric(from@adjMat) ## This is only ok if there are no weights... if(graph.has.weights(from)) { as(graph.wgtMatrix(from), if(symm) "dsTMatrix" else "dgTMatrix") } else { ## no weights: 0/1 matrix -> logical as(as(from, "matrix"), if(symm) "nsTMatrix" else "ngTMatrix") } }) setAs("graph", "CsparseMatrix", function(from) as(as(from, "graphNEL"), "CsparseMatrix")) setAs("graph", "Matrix", function(from) as(from, "CsparseMatrix")) setAs("graphNEL", "CsparseMatrix", function(from) as(as(from, "TsparseMatrix"), "CsparseMatrix")) graph2T <- function(from, use.weights = graph.has.weights(from) && graph.non.1.weights(from)) { nd <- graph::nodes(from); dnms <- list(nd,nd) dm <- rep.int(length(nd), 2) edge2i <- function(e) { ## return (0-based) row indices 'i' rep.int(0:(dm[1]-1L), lengths(e)) } if(use.weights) { eWts <- graph::edgeWeights(from); names(eWts) <- NULL i <- edge2i(eWts) To <- unlist(lapply(eWts, names)) j <- as.integer(match(To,nd)) - 1L # columns indices (0-based) ## symm <- symm && : improbable ## if(symm) new("dsTMatrix", .....) else new("dgTMatrix", i = i, j = j, x = unlist(eWts), Dim = dm, Dimnames = dnms) } else { ## no weights: 0/1 matrix -> logical edges <- lapply(from@edgeL[nd], "[[", "edges") symm <- graph::edgemode(from) == "undirected" if(symm)# each edge appears twice; keep upper triangle only edges <- lapply(seq_along(edges), function(i) {e <- edges[[i]]; e[e >= i]}) i <- edge2i(edges) j <- as.integer(unlist(edges)) - 1L # column indices (0-based) ## if(symm) { # symmetric: ensure upper triangle ## tmp <- i ## flip <- i > j ## i[flip] <- j[flip] ## j[flip] <- tmp[flip] ## new("nsTMatrix", i = i, j = j, Dim = dm, Dimnames = dnms, uplo = "U") ## } else { ## new("ngTMatrix", i = i, j = j, Dim = dm, Dimnames = dnms) ## } new(if(symm) "nsTMatrix" else "ngTMatrix", i = i, j = j, Dim = dm, Dimnames = dnms)# uplo = "U" is default } } setAs("graphNEL", "TsparseMatrix", function(from) graph2T(from)) setAs("sparseMatrix", "graph", function(from) as(from, "graphNEL")) setAs("sparseMatrix", "graphNEL", ## since have specific method for Tsparse below, 'from' is *not*, ## i.e. do not need to "uniquify" the T* matrix: function(from) T2graph(as(from, "TsparseMatrix"), need.uniq=FALSE)) setAs("TsparseMatrix", "graphNEL", function(from) T2graph(from)) T2graph <- function(from, need.uniq = is_not_uniqT(from), edgemode = NULL) { d <- dim(from) if(d[1] != d[2]) stop("only square matrices can be used as incidence matrices for graphs") n <- d[1] if(n == 0) return(new("graphNEL")) if(is.null(rn <- dimnames(from)[[1]])) rn <- as.character(1:n) if(need.uniq) ## Need to 'uniquify' the triplets! from <- uniqTsparse(from) if(is.null(edgemode)) edgemode <- if(isSymmetric(from)) { # either "symmetricMatrix" or otherwise ##-> undirected graph: every edge only once! if(!is(from, "symmetricMatrix")) { ## a general matrix which happens to be symmetric ## ==> remove the double indices from <- tril(from) } "undirected" } else { "directed" } ## every edge is there only once, either upper or lower triangle ft1 <- cbind(rn[from@i + 1L], rn[from@j + 1L]) graph::ftM2graphNEL(ft1, W = if(.hasSlot(from,"x")) as.numeric(from@x), ## else NULL V = rn, edgemode=edgemode) } ### Subsetting -- basic things (drop = "missing") are done in ./Matrix.R ### FIXME : we defer to the "*gT" -- conveniently, but not efficient for gC ! ## [dl]sparse -> [dl]gT -- treat both in one via superclass ## -- more useful when have "z" (complex) and even more setMethod("[", signature(x = "sparseMatrix", i = "index", j = "missing", drop = "logical"), function (x, i,j, ..., drop) { Matrix.msg("sp[i,m,l] : nargs()=",nargs(), .M.level = 2) cld <- getClassDef(class(x)) na <- nargs() x <- if(na == 4) as(x, "TsparseMatrix")[i, , drop=drop] else if(na == 3) as(x, "TsparseMatrix")[i, drop=drop] else ## should not happen stop("Matrix-internal error in [i,,d]; please report") ## ## try_as(x, c(cl, sub("T","C", viaCl))) if(is(x, "Matrix") && extends(cld, "CsparseMatrix")) as(x, "CsparseMatrix") else x }) setMethod("[", signature(x = "sparseMatrix", i = "missing", j = "index", drop = "logical"), function (x,i,j, ..., drop) { Matrix.msg("sp[m,i,l] : nargs()=",nargs(), .M.level = 2) cld <- getClassDef(class(x)) ##> why should this be needed; can still happen in [..]: ##> if(!extends(cld, "generalMatrix")) x <- as(x, "generalMatrix") ## viaCl <- paste0(.M.kind(x, cld), "gTMatrix") x <- as(x, "TsparseMatrix")[, j, drop=drop] ##simpler than x <- callGeneric(x = as(x, "TsparseMatrix"), j=j, drop=drop) if(is(x, "Matrix") && extends(cld, "CsparseMatrix")) as(x, "CsparseMatrix") else x }) setMethod("[", signature(x = "sparseMatrix", i = "index", j = "index", drop = "logical"), function (x, i, j, ..., drop) { Matrix.msg("sp[i,i,l] : nargs()=",nargs(), .M.level = 2) cld <- getClassDef(class(x)) ## be smart to keep symmetric indexing of symmetric: ##> doSym <- (extends(cld, "symmetricMatrix") && ##> length(i) == length(j) && all(i == j)) ##> why should this be needed; can still happen in [..]: ##> if(!doSym && !extends(cld, "generalMatrix")) ##> x <- as(x, "generalMatrix") ## viaCl <- paste0(.M.kind(x, cld), ## if(doSym) "sTMatrix" else "gTMatrix") x <- as(x, "TsparseMatrix")[i, j, drop=drop] if(is(x, "Matrix") && extends(cld, "CsparseMatrix")) as(x, "CsparseMatrix") else x }) ### "[<-" : ----------------- ## setReplaceMethod("[", .........) ## -> ./Tsparse.R ## & ./Csparse.R & ./Rsparse.R {those go via Tsparse} ## x[] <- value : setReplaceMethod("[", signature(x = "sparseMatrix", i = "missing", j = "missing", value = "ANY"),## double/logical/... function (x, i,j,..., value) { if(all0(value)) { # be faster cld <- getClassDef(class(x)) x <- diagU2N(x, cl = cld) for(nm in intersect(nsl <- names(cld@slots), c("x", "i","j", "factors"))) length(slot(x, nm)) <- 0L if("p" %in% nsl) x@p <- rep.int(0L, ncol(x)+1L) } else { ## typically non-sense: assigning to full sparseMatrix x[TRUE] <- value } x }) ## Do not use as.vector() (see ./Matrix.R ) for sparse matrices : setReplaceMethod("[", signature(x = "sparseMatrix", i = "missing", j = "ANY", value = "sparseMatrix"), function (x, i, j, ..., value) callGeneric(x=x, , j=j, value = as(value, "sparseVector"))) setReplaceMethod("[", signature(x = "sparseMatrix", i = "ANY", j = "missing", value = "sparseMatrix"), function (x, i, j, ..., value) if(nargs() == 3) callGeneric(x=x, i=i, value = as(value, "sparseVector")) else callGeneric(x=x, i=i, , value = as(value, "sparseVector"))) setReplaceMethod("[", signature(x = "sparseMatrix", i = "ANY", j = "ANY", value = "sparseMatrix"), function (x, i, j, ..., value) callGeneric(x=x, i=i, j=j, value = as(value, "sparseVector"))) ### --- print() and show() methods --- .formatSparseSimple <- function(m, asLogical=FALSE, digits=NULL, col.names, note.dropping.colnames = TRUE, dn=dimnames(m)) { stopifnot(is.logical(asLogical)) if(asLogical) cx <- array("N", dim(m), dimnames=dn) else { ## numeric (or --not yet implemented-- complex): cx <- apply(m, 2, format, digits=digits) if(is.null(dim(cx))) {# e.g. in 1 x 1 case dim(cx) <- dim(m) dimnames(cx) <- dn } else ## workaround bug in apply() which has lost row names: if(getRversion() < "3.2" && !is.null(names(dn))) { if(is.null(dimnames(cx))) dimnames(cx) <- dn else names(dimnames(cx)) <- names(dn) } } if (missing(col.names)) col.names <- { if(!is.null(cc <- getOption("sparse.colnames"))) cc else if(is.null(dn[[2]])) FALSE else { # has column names == dn[[2]] ncol(m) < 10 } } if(identical(col.names, FALSE)) cx <- emptyColnames(cx, msg.if.not.empty = note.dropping.colnames) else if(is.character(col.names)) { stopifnot(length(col.names) == 1) cn <- col.names switch(substr(cn, 1,3), "abb" = { iarg <- as.integer(sub("^[^0-9]*", '', cn)) colnames(cx) <- abbreviate(colnames(cx), minlength = iarg) }, "sub" = { iarg <- as.integer(sub("^[^0-9]*", '', cn)) colnames(cx) <- substr(colnames(cx), 1, iarg) }, stop(gettextf("invalid 'col.names' string: %s", cn), domain=NA)) } ## else: nothing to do for col.names == TRUE cx }## .formatSparseSimple ### NB: Want this to work also for logical or numeric traditional matrix 'x': formatSparseM <- function(x, zero.print = ".", align = c("fancy", "right"), m = as(x,"matrix"), asLogical=NULL, uniDiag=NULL, digits=NULL, cx, iN0, dn = dimnames(m)) { cld <- getClassDef(class(x)) if(is.null(asLogical)) { binary <- extends(cld,"nsparseMatrix") || extends(cld, "indMatrix")# -> simple T / F asLogical <- { binary || extends(cld,"lsparseMatrix") || extends(cld,"matrix") && is.logical(x) } # has NA and (non-)structural FALSE } if(missing(cx)) cx <- .formatSparseSimple(m, asLogical=asLogical, digits=digits, dn=dn) if(is.null(d <- dim(cx))) {# e.g. in 1 x 1 case d <- dim(cx) <- dim(m) dimnames(cx) <- dn } if(missing(iN0)) iN0 <- 1L + .Call(m_encodeInd, non0ind(x, cld), di = d, FALSE, FALSE) ## ne <- length(iN0) if(asLogical) { cx[m] <- "|" if(!extends(cld, "sparseMatrix")) x <- as(x,"sparseMatrix") if(anyFalse(x@x)) { ## any (x@x == FALSE) ## Careful for *non-sorted* Tsparse, e.g. from U-diag if(extends(cld, "TsparseMatrix")) { ## have no "fast uniqTsparse(): x <- as(x, "CsparseMatrix") cld <- getClassDef(class(x)) } F. <- is0(x@x) # the 'FALSE' ones ### FIXME: have iN0 already above -- *really* need the following ??? --FIXME-- ij <- non0.i(x, cld, uniqT=FALSE) if(extends(cld, "symmetricMatrix")) { ## also get "other" triangle notdiag <- ij[,1] != ij[,2] # but not the diagonals again ij <- rbind(ij, ij[notdiag, 2:1], deparse.level=0) F. <- c(F., F.[notdiag]) } iN0 <- 1L + .Call(m_encodeInd, ij, di = d, FALSE, FALSE) cx[iN0[F.]] <- ":" # non-structural FALSE (or "o", "," , "-" or "f")? } } else if(match.arg(align) == "fancy" && !is.integer(m)) { fi <- apply(m, 2, format.info) ## fi[3,] == 0 <==> not expo. ## now 'format' the zero.print by padding it with ' ' on the right: ## case 1: non-exponent: fi[2,] + as.logical(fi[2,] > 0) ## the column numbers of all 'zero' entries -- (*large*) cols <- 1L + (0:(prod(d)-1L))[-iN0] %/% d[1] pad <- ifelse(fi[3,] == 0, fi[2,] + as.logical(fi[2,] > 0), ## exponential: fi[2,] + fi[3,] + 4) ## now be efficient ; sprintf() is relatively slow ## and pad is much smaller than 'cols'; instead of "simply" ## zero.print <- sprintf("%-*s", pad[cols] + 1, zero.print) if(any(doP <- pad > 0)) { # ## only pad those that need padding - *before* expanding z.p.pad <- rep.int(zero.print, length(pad)) z.p.pad[doP] <- sprintf("%-*s", pad[doP] + 1, zero.print) zero.print <- z.p.pad[cols] } else zero.print <- rep.int(zero.print, length(cols)) } ## else "right" : nothing to do if(!asLogical && isTRUE(uniDiag)) { ## use "I" in diagonal -- pad correctly if(any(diag(x) != 1)) stop("uniDiag=TRUE, but not all diagonal entries are 1") D <- diag(cx) # use if(any((ir <- regexpr("1", D)) < 0)) { warning("uniDiag=TRUE, not all entries in diagonal coded as 1") } else { ir <- as.vector(ir) nD <- nchar(D, "bytes") ## replace "1..." by "I " (I plus blanks) substr(D, ir, nD) <- sprintf("I%*s", nD - ir, "") diag(cx) <- D } } cx[-iN0] <- zero.print cx }## formatSparseM() ## utility used inside sparseMatrix print()ing which might be useful ## outside the Matrix package: formatSpMatrix <- function(x, digits = NULL, # getOption("digits"), maxp = 1e9, # ~ 1/2 * .Machine$integer.max, ## getOption("max.print"), cld = getClassDef(class(x)), zero.print = ".", col.names, note.dropping.colnames = TRUE, uniDiag = TRUE, align = c("fancy", "right")) { stopifnot(extends(cld, "sparseMatrix")) validObject(x) # have seen seg.faults for invalid objects d <- dim(x) unitD <- extends(cld, "triangularMatrix") && x@diag == "U" ## Will note it is *unit*-diagonal by using "I" instead of "1" if(unitD) { if(extends(cld, "CsparseMatrix")) x <- .Call(Csparse_diagU2N, x) else if(extends(cld, "TsparseMatrix")) x <- .Call(Tsparse_diagU2N, x) else { kind <- .M.kind(x, cld) x <- .Call(Tsparse_diagU2N, as(as(x, paste0(kind, "Matrix")), "TsparseMatrix")) cld <- getClassDef(class(x)) } } if(prod(d) > maxp) { # "Large" => will be "cut" ## only coerce to dense that part which won't be cut : nr <- maxp %/% d[2] m <- as(x[1:max(1, nr), ,drop=FALSE], "matrix") } else { m <- as(x, "matrix") } dn <- dimnames(m) ## will be === dimnames(cx) binary <- extends(cld,"nsparseMatrix") || extends(cld, "indMatrix") # -> simple T / F logi <- binary || extends(cld,"lsparseMatrix") # has NA and (non-)structural FALSE cx <- .formatSparseSimple(m, asLogical = logi, digits=digits, col.names=col.names, note.dropping.colnames=note.dropping.colnames, dn=dn) if(is.logical(zero.print)) zero.print <- if(zero.print) "0" else " " if(binary) { cx[!m] <- zero.print cx[m] <- "|" } else { # non-binary ==> has 'x' slot ## show only "structural" zeros as 'zero.print', not all of them.. ## -> cannot use 'm' alone d <- dim(cx) ne <- length(iN0 <- 1L + .Call(m_encodeInd, non0ind(x, cld), di = d, FALSE, FALSE)) if(0 < ne && (logi || ne < prod(d))) { cx <- formatSparseM(x, zero.print, align, m=m, asLogical = logi, uniDiag = unitD & uniDiag, digits=digits, cx=cx, iN0=iN0, dn=dn) } else if (ne == 0)# all zeroes cx[] <- zero.print } cx }## formatSpMatrix() ## FIXME(?) -- ``merge this'' (at least ``synchronize'') with ## - - - prMatrix() from ./Auxiliaries.R ## FIXME: prTriang() in ./Auxiliaries.R should also get align = "fancy" ## printSpMatrix <- function(x, digits = NULL, # getOption("digits"), maxp = getOption("max.print"), cld = getClassDef(class(x)), zero.print = ".", col.names, note.dropping.colnames = TRUE, uniDiag = TRUE, col.trailer = '', align = c("fancy", "right")) { stopifnot(extends(cld, "sparseMatrix")) cx <- formatSpMatrix(x, digits=digits, maxp=maxp, cld=cld, zero.print=zero.print, col.names=col.names, note.dropping.colnames=note.dropping.colnames, uniDiag=uniDiag, align=align) if(col.trailer != '') cx <- cbind(cx, col.trailer, deparse.level = 0) ## right = TRUE : cheap attempt to get better "." alignment print(cx, quote = FALSE, right = TRUE, max = maxp) invisible(x) } ## printSpMatrix() ##' The "real" show() / print() method, calling the above printSpMatrix(): printSpMatrix2 <- function(x, digits = NULL, # getOption("digits"), maxp = getOption("max.print"), zero.print = ".", col.names, note.dropping.colnames = TRUE, uniDiag = TRUE, suppRows = NULL, suppCols = NULL, col.trailer = if(suppCols) "......" else "", align = c("fancy", "right"), width = getOption("width"), fitWidth = TRUE) { d <- dim(x) cl <- class(x) cld <- getClassDef(cl) xtra <- if(extends(cld, "triangularMatrix") && x@diag == "U") " (unitriangular)" else "" cat(sprintf('%d x %d sparse Matrix of class "%s"%s\n', d[1], d[2], cl, xtra)) setW <- !missing(width) && width > getOption("width") if(setW) { op <- options(width = width) ; on.exit( options(op) ) } if((identical(suppRows,FALSE) && identical(suppCols, FALSE)) || (!isTRUE(suppRows) && !isTRUE(suppCols) && prod(d) <= maxp)) { ## "small matrix" and supp* not TRUE : no rows or columns are suppressed if(missing(col.trailer) && is.null(suppCols)) suppCols <- FALSE # for 'col.trailer' printSpMatrix(x, cld=cld, digits=digits, maxp=maxp, zero.print=zero.print, col.names=col.names, note.dropping.colnames=note.dropping.colnames, uniDiag=uniDiag, col.trailer=col.trailer, align=align) } else { ## d[1] > maxp / d[2] >= nr : -- this needs [,] working: validObject(x) sTxt <- c(" ", gettext( "in show(); maybe adjust 'options(max.print= *, width = *)'"), "\n ..............................\n") useW <- width - (format.info(d[1], digits=digits)[1] + 3+1) ## == width - space for the largest row label : "[,] " ## Suppress rows and/or columns in printing ... ## ---------------------------------------- but which exactly depends on format ## Determining number of columns - first assuming all zeros : ". . "..: 2 chars/column ## i.e., we get the *maximal* numbers of columns to keep, nc : if(is.null(suppCols)) # i.e., "it depends" .. suppCols <- (d[2] * 2 > useW) # used in 'col.trailer' default nCc <- 1 + nchar(col.trailer, "width") if(suppCols) { nc <- (useW - nCc) %/% 2 x <- x[ , 1:nc, drop = FALSE] } else nc <- d[2] nr <- maxp %/% nc # if nc becomes smaller, nr will become larger (!) if(is.null(suppRows)) suppRows <- (nr < d[1]) if(suppRows) { n2 <- ceiling(nr / 2) if(fitWidth) { ## one iteration of improving the width, by "fake printing" : cM <- formatSpMatrix(x[seq_len(min(d[1], max(1, n2))), , drop = FALSE], digits=digits, maxp=maxp, zero.print=zero.print, col.names=col.names, align=align, note.dropping.colnames=note.dropping.colnames, uniDiag=FALSE) ## width needed (without the 'col.trailer's 'nCc'): matW <- nchar(capture.output(print(cM, quote=FALSE, right=FALSE))[[1]]) needW <- matW + (if(suppCols) nCc else 0) if(needW > useW) { ## need more width op <- options(width = width+(needW-useW)) if(!setW) on.exit( options(op) ) } } printSpMatrix(x[seq_len(min(d[1], max(1, n2))), , drop=FALSE], digits=digits, maxp=maxp, zero.print=zero.print, col.names=col.names, note.dropping.colnames=note.dropping.colnames, uniDiag=uniDiag, col.trailer = col.trailer, align=align) suppTxt <- gettext(if(suppCols) "suppressing columns and rows" else "suppressing rows") cat("\n ..............................", "\n ........", suppTxt, sTxt, "\n", sep='') ## tail() automagically uses "[..,]" rownames: printSpMatrix(tail(x, max(1, nr-n2)), digits=digits, maxp=maxp, zero.print=zero.print, col.names=col.names, note.dropping.colnames=note.dropping.colnames, uniDiag=FALSE, col.trailer = col.trailer, align=align) } else if(suppCols) { printSpMatrix(x[ , 1:nc , drop = FALSE], digits=digits, maxp=maxp, zero.print=zero.print, col.names=col.names, note.dropping.colnames=note.dropping.colnames, uniDiag=uniDiag, col.trailer = col.trailer, align=align) cat("\n .....", gettext("suppressing columns"), sTxt, sep='') } else stop("logic programming error in printSpMatrix2(), please report") invisible(x) } } ## printSpMatrix2 () setMethod("format", signature(x = "sparseMatrix"), formatSpMatrix) setMethod("print", signature(x = "sparseMatrix"), printSpMatrix2) setMethod("show", signature(object = "sparseMatrix"), function(object) printSpMatrix2(object)) ## For very large and very sparse matrices, the above show() ## is not really helpful; Use summary() as an alternative: setMethod("summary", signature(object = "sparseMatrix"), function(object, ...) { d <- dim(object) T <- as(object, "TsparseMatrix") ## return a data frame (int, int, {double|logical|...}) : r <- if(is(object,"nsparseMatrix")) data.frame(i = T@i + 1L, j = T@j + 1L) else data.frame(i = T@i + 1L, j = T@j + 1L, x = T@x) attr(r, "header") <- sprintf('%d x %d sparse Matrix of class "%s", with %d entries', d[1], d[2], class(object), length(T@i)) ## use ole' S3 technology for such a simple case class(r) <- c("sparseSummary", class(r)) r }) print.sparseSummary <- function (x, ...) { cat(attr(x, "header"),"\n") print.data.frame(x, ...) invisible(x) } ### FIXME [from ../TODO ]: Use cholmod_symmetry() -- ## Possibly even use 'option' as argument here for fast check to use sparse solve !! ##' This case should be particularly fast setMethod("isSymmetric", signature(object = "dgCMatrix"), function(object, tol = 100*.Machine$double.eps, ...) isTRUE(all.equal(.dgC.0.factors(object), t(object), tolerance = tol, ...))) setMethod("isSymmetric", signature(object = "sparseMatrix"), function(object, tol = 100*.Machine$double.eps, ...) { ## pretest: is it square? d <- dim(object) if(d[1] != d[2]) return(FALSE) ## else slower test using t() -- ## FIXME (for tol = 0): use cholmod_symmetry(A, 1, ...) ## for tol > 0 should modify cholmod_symmetry(..) to work with tol ## or slightly simpler, rename and export is_sym() in ../src/cs_utils.c if (is(object, "dMatrix")) ## use gC; "T" (triplet) is *not* unique! isTRUE(all.equal(.as.dgC.0.factors( object), .as.dgC.0.factors(t(object)), tolerance = tol, ...)) else if (is(object, "lMatrix")) ## test for exact equality; FIXME(?): identical() too strict? identical(as( object, "lgCMatrix"), as(t(object), "lgCMatrix")) else if (is(object, "nMatrix")) ## test for exact equality; FIXME(?): identical() too strict? identical(as( object, "ngCMatrix"), as(t(object), "ngCMatrix")) else stop("not yet implemented") }) setMethod("isTriangular", signature(object = "CsparseMatrix"), isTriC) setMethod("isTriangular", signature(object = "TsparseMatrix"), isTriT) setMethod("isDiagonal", signature(object = "sparseMatrix"), function(object) { d <- dim(object) if(d[1] != d[2]) return(FALSE) ## else gT <- as(object, "TsparseMatrix") all(gT@i == gT@j) }) setMethod("determinant", signature(x = "sparseMatrix", logarithm = "missing"), function(x, logarithm, ...) determinant(x, logarithm = TRUE, ...)) setMethod("determinant", signature(x = "sparseMatrix", logarithm = "logical"), function(x, logarithm = TRUE, ...) determinant(as(x,"dsparseMatrix"), logarithm, ...)) setMethod("Cholesky", signature(A = "sparseMatrix"), function(A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, ...) Cholesky(as(A, "CsparseMatrix"), perm=perm, LDL=LDL, super=super, Imult=Imult, ...)) setMethod("diag", signature(x = "sparseMatrix"), function(x, nrow, ncol) diag(as(x, "CsparseMatrix"))) setMethod("dim<-", signature(x = "sparseMatrix", value = "ANY"), function(x, value) { if(!is.numeric(value) || length(value) != 2) stop("dim(.) value must be numeric of length 2") if(prod(dim(x)) != prod(value <- round(value))) # *not* as.integer ! stop("dimensions don't match the number of cells") ## be careful to keep things sparse r <- spV2M(as(x, "sparseVector"), nrow=value[1], ncol=value[2]) ## r now is "dgTMatrix" if(is(x, "CsparseMatrix")) as(r, "CsparseMatrix") else r }) setMethod("rep", "sparseMatrix", function(x, ...) rep(as(x, "sparseVector"), ...)) setMethod("norm", signature(x = "sparseMatrix", type = "character"), function(x, type, ...) { type <- toupper(substr(type[1], 1, 1)) switch(type, ## max(, 0) |--> 0 "O" = , "1" = max(colSums(abs(x)), 0), ## One-norm (L_1) "I" = max(rowSums(abs(x)), 0), ## L_Infinity "F" = sqrt(sum(x^2)), ## Frobenius "M" = max(abs(x), 0), ## Maximum modulus of all "2" = norm2(x), # maximal singular value ## otherwise: stop("invalid 'type'")) }) ## FIXME: need a version of LAPACK's rcond() algorithm, using sparse-arithmetic setMethod("rcond", signature(x = "sparseMatrix", norm = "character"), function(x, norm, useInv=FALSE, ...) { ## as workaround, allow use of 1/(norm(A) * norm(solve(A))) if(!identical(FALSE,useInv)) { Ix <- if(isTRUE(useInv)) solve(x) else if(is(useInv, "Matrix")) useInv return( 1/(norm(x, type=norm) * norm(Ix, type=norm)) ) } ## else d <- dim(x) ## FIXME: qr.R(qr(.)) warns about differing R (permutation!) ## really fix qr.R() *or* go via dense even in those cases rcond(if(d[1] == d[2]) { warning("rcond(.) via sparse -> dense coercion") as(x, "denseMatrix") } else if(d[1] > d[2]) qr.R(qr(x)) else qr.R(qr(t(x))), norm = norm, ...) }) setMethod("cov2cor", signature(V = "sparseMatrix"), function(V) { ## like stats::cov2cor() but making sure all matrices stay sparse p <- (d <- dim(V))[1] if (p != d[2]) stop("'V' is not a *square* matrix") if(!is(V, "dMatrix")) V <- as(V, "dMatrix")# actually "dsparseMatrix" Is <- sqrt(1/diag(V)) if (any(!is.finite(Is))) ## original had 0 or NA warning("diag(.) had 0 or NA entries; non-finite result is doubtful") Is <- Diagonal(x = Is) r <- Is %*% V %*% Is r[cbind(1:p,1:p)] <- 1 # exact in diagonal as(r, "symmetricMatrix") }) setMethod("is.na", signature(x = "sparseMatrix"),## NB: nsparse* have own method! function(x) { if(any((inax <- is.na(x@x)))) { cld <- getClassDef(class(x)) if(extends(cld, "triangularMatrix") && x@diag == "U") inax <- is.na((x <- .diagU2N(x, cld))@x) r <- as(x, "lMatrix") # will be "lsparseMatrix" - *has* x slot r@x <- if(length(inax) == length(r@x)) inax else is.na(r@x) if(!extends(cld, "CsparseMatrix")) r <- as(r, "CsparseMatrix") as(.Call(Csparse_drop, r, 0), "nMatrix") # a 'pattern matrix } else is.na_nsp(x) }) ## all.equal(): similar to all.equal_Mat() in ./Matrix.R ; ## ----------- eventually defer to "sparseVector" methods: setMethod("all.equal", c(target = "sparseMatrix", current = "sparseMatrix"), function(target, current, check.attributes = TRUE, ...) { msg <- attr.all_Mat(target, current, check.attributes=check.attributes, ...) if(is.list(msg)) msg[[1]] else .a.e.comb(msg, all.equal(as(target, "sparseVector"), as(current, "sparseVector"), check.attributes=check.attributes, ...)) }) setMethod("all.equal", c(target = "sparseMatrix", current = "ANY"), function(target, current, check.attributes = TRUE, ...) { msg <- attr.all_Mat(target, current, check.attributes=check.attributes, ...) if(is.list(msg)) msg[[1]] else .a.e.comb(msg, all.equal(as(target, "sparseVector"), current, check.attributes=check.attributes, ...)) }) setMethod("all.equal", c(target = "ANY", current = "sparseMatrix"), function(target, current, check.attributes = TRUE, ...) { msg <- attr.all_Mat(target, current, check.attributes=check.attributes, ...) if(is.list(msg)) msg[[1]] else .a.e.comb(msg, all.equal(target, as(current, "sparseVector"), check.attributes=check.attributes, ...)) }) setMethod("writeMM", "sparseMatrix", function(obj, file, ...) writeMM(as(obj, "CsparseMatrix"), as.character(file), ...)) ### --- sparse model matrix, fac2sparse, etc ----> ./spModels.R ### xtabs(*, sparse = TRUE) ---> part of standard package 'stats' since R 2.10.0 ##' @title Random Sparse Matrix ##' @param nrow, ##' @param ncol number of rows and columns, i.e., the matrix dimension ##' @param nnz number of non-zero entries ##' @param rand.x random number generator for 'x' slot ##' @param ... optionally further arguments passed to sparseMatrix() ##' @return a sparseMatrix of dimension (nrow, ncol) ##' @author Martin Maechler ##' @examples M1 <- rsparsematrix(1000, 20, nnz = 200) ##' summary(M1) if(FALSE) ## better version below rsparsematrix <- function(nrow, ncol, nnz, rand.x = function(n) signif(rnorm(nnz), 2), warn.nnz = TRUE, ...) { maxi.sample <- 2^31 # maximum n+1 for which sample(n) returns integer stopifnot((nnz <- as.integer(nnz)) >= 0, nrow >= 0, ncol >= 0, nnz <= nrow * ncol, nrow < maxi.sample, ncol < maxi.sample) ## to ensure that nnz is strictly followed, must act on duplicated (i,j): i <- sample.int(nrow, nnz, replace = TRUE) j <- sample.int(ncol, nnz, replace = TRUE) dim <- c(nrow, ncol) it <- 0 while((it <- it+1) < 100 && anyDuplicated(n.ij <- encodeInd2(i, j, dim, checkBnds=FALSE))) { m <- length(k.dup <- which(duplicated(n.ij))) Matrix.msg(sprintf("%3g duplicated (i,j) pairs", m), .M.level = 2) if(runif(1) <= 1/2) i[k.dup] <- sample.int(nrow, m, replace = TRUE) else j[k.dup] <- sample.int(ncol, m, replace = TRUE) } if(warn.nnz && it == 100 && anyDuplicated(encodeInd2(i, j, dim, checkBnds=FALSE))) warning("number of non zeros is smaller than 'nnz' because of duplicated (i,j)s") sparseMatrix(i = i, j = j, x = rand.x(nnz), dims = dim, ...) } ## No warn.nnz needed, as we sample the encoded (i,j) with*out* replacement: rsparsematrix <- function(nrow, ncol, density, nnz = round(density * maxE), symmetric = FALSE, rand.x = function(n) signif(rnorm(nnz), 2), ...) { maxE <- if(symmetric) nrow*(nrow+1)/2 else nrow*ncol stopifnot((nnz <- as.integer(nnz)) >= 0, nrow >= 0, ncol >= 0, nnz <= maxE) ## sampling with*out* replacement (replace=FALSE !): ijI <- -1L + if(symmetric) sample(indTri(nrow, diag=TRUE), nnz) else sample.int(maxE, nnz) ## i,j below correspond to ij <- decodeInd(code, nr) : if(is.null(rand.x)) sparseMatrix(i = ijI %% nrow, j = ijI %/% nrow, index1 = FALSE, symmetric = symmetric, dims = c(nrow, ncol), ...) else sparseMatrix(i = ijI %% nrow, j = ijI %/% nrow, index1 = FALSE, symmetric = symmetric, x = rand.x(nnz), dims = c(nrow, ncol), ...) } if(FALSE) ### FIXME: This would *NOT* be needed, if as.matrix() was a no-op ; ### ----- and then, base::scale() -> base::scale.default() would work "magically" already.. ## scale() is S3 generic in base scale.sparseMatrix <- function(x, center = FALSE, scale = TRUE) { if(center) warning("a sparseMatrix should rarely be centered: will not be sparse anymore") ## x <- as.matrix(x) ## This rest is *identically* == base :: scale.default : nc <- ncol(x) if (is.logical(center)) { if (center) { center <- colMeans(x, na.rm=TRUE) x <- sweep(x, 2L, center, check.margin=FALSE) } } else if (is.numeric(center) && (length(center) == nc)) x <- sweep(x, 2L, center, check.margin=FALSE) else stop("length of 'center' must equal the number of columns of 'x'") if (is.logical(scale)) { if (scale) { f <- function(v) { v <- v[!is.na(v)] sqrt(sum(v^2) / max(1, length(v) - 1L)) } scale <- apply(x, 2L, f) x <- sweep(x, 2L, scale, "/", check.margin=FALSE) } } else if (is.numeric(scale) && length(scale) == nc) x <- sweep(x, 2L, scale, "/", check.margin=FALSE) else stop("length of 'scale' must equal the number of columns of 'x'") if(is.numeric(center)) attr(x, "scaled:center") <- center if(is.numeric(scale)) attr(x, "scaled:scale") <- scale x } Matrix/R/corMatrix.R0000644000176200001440000000124211004063753014010 0ustar liggesusers#### "corMatrix" (was "correlation" in 2005) --- #### ----------- correlation matrices, inheriting from "dpoMatrix" ## dpo* -> cor* is in ./dpoMatrix.R .M.2cor <- function(from) as(as(from, "dpoMatrix"), "corMatrix") setAs("Matrix", "corMatrix", .M.2cor) setAs("matrix", "corMatrix", .M.2cor) ## This is necessary : setAs("dsyMatrix", "corMatrix", .M.2cor) ## BUT only because __ MM thinks __ ## the *automatical* (by inheritance) coercion ### dsyMatrix -> corMatrix coercion is wrong: ## selectMethod(coerce, c("dsyMatrix","corMatrix")) # gives ## function (from, to) ## { ## obj <- new("corMatrix") ## as(obj, "dsyMatrix") <- from ## obj ## } rm(.M.2cor) Matrix/R/spModels.R0000644000176200001440000003633713101157370013642 0ustar liggesusers#### Utilities for Sparse Model Matrices ## The "first" version {no longer used}: fac2sparse <- function(from, to = c("d","i","l","n","z"), drop.unused.levels = FALSE) { ## factor(-like) --> sparseMatrix {also works for integer, character} fact <- if (drop.unused.levels) factor(from) else as.factor(from) levs <- levels(fact) n <- length(fact) to <- match.arg(to) ## MM: using new() and then assigning slots has efficiency "advantage" ## of *not* validity checking res <- new(paste0(to, "gCMatrix")) res@i <- as.integer(fact) - 1L # 0-based res@p <- 0:n res@Dim <- c(length(levs), n) res@Dimnames <- list(levs, NULL) if(to != "n") res@x <- rep.int(switch(to, "d" = 1., "i" = 1L, "l" = TRUE, "z" = 1+0i), n) res } ## This version can deal with NA's [maybe slightly less efficient (how much?)] : fac2sparse <- function(from, to = c("d","i","l","n","z"), drop.unused.levels = TRUE, giveCsparse = TRUE) { ## factor(-like) --> sparseMatrix {also works for integer, character} fact <- if (drop.unused.levels) factor(from) else as.factor(from) levs <- levels(fact) n <- length(fact) to <- match.arg(to) i <- as.integer(fact) - 1L ## 0-based indices df <- data.frame(i = i, j = if(n) 0:(n-1L) else integer())[!is.na(i),] if(to != "n") df$x <- rep.int(switch(to, "d" = 1., "i" = 1L, "l" = TRUE, "z" = 1+0i), nrow(df)) T <- do.call("new", c(list(Class = paste0(to, "gTMatrix"), Dim = c(length(levs), n), Dimnames = list(levs, names(fact))), df)) if(giveCsparse) .Call(Tsparse_to_Csparse, T, FALSE) else T } setAs("factor", "sparseMatrix", function(from) fac2sparse(from, to = "d")) ##' fac2Sparse() := fac2sparse w/ contrasts ##' ##' @param from factor of which we want the "contrasted" (indicator) ##' design matrix ##' @param to character string specifying the response type ##' @param drop.unused.level logical indicating if non-present factor ##' levels should be dropped, via factor(from) ##' @param factorPatt12 logical vector fp[] of length 2 ##' fp[1] : give contrasted t(X); fp[2] : give "dummy" t(X) [=fac2sparse()] ##' @param contrasts.arg character string or NULL or (coercable to) ##' sparseMatrix, specifying the contrast ##' ##' @return a list of length two, each with the corresponding t(model matrix), ##' when the corresponding factorPatt12 is true. fac2Sparse <- function(from, to = c("d","i","l","n","z"), drop.unused.levels = TRUE, giveCsparse = TRUE, factorPatt12, contrasts.arg = NULL) { stopifnot(is.logical(factorPatt12), length(factorPatt12) == 2) if(any(factorPatt12)) m <- fac2sparse(from, to=to, drop.unused.levels=drop.unused.levels, giveCsparse=giveCsparse) ## ## code '2' : keep dummy, i.e. no contrasts : ans <- list(NULL, if(factorPatt12[2]) m) ## if(factorPatt12[1]) { ## *do* use contrasts.arg if(is.null(contrasts.arg)) contrasts.arg <- getOption("contrasts")[if(is.ordered(from)) "ordered" else "unordered"] ans[[1]] <- crossprod(if(is.character(contrasts.arg)) { stopifnot(is.function(FUN <- get(contrasts.arg))) ## calling contr.*() with correct level names directly : FUN(rownames(m), sparse = TRUE) } else as(contrasts.arg, "sparseMatrix"), m) } ans } ## "Sparse model.matrix()" ## model.matrix(object, data = environment(object), ## contrasts.arg = NULL, xlev = NULL, ...) ## ## Originally: Cut'n'paste from model.matrix() ... just replacing small part at end: sparse.model.matrix <- function(object, data = environment(object), contrasts.arg = NULL, xlev = NULL, transpose = FALSE, drop.unused.levels = FALSE, row.names=TRUE, verbose=FALSE, ...) { t <- if(missing(data)) terms(object) else terms(object, data=data) if (is.null(attr(data, "terms"))) data <- model.frame(object, data, xlev=xlev) else { reorder <- match(sapply(attr(t,"variables"),deparse, width.cutoff=500)[-1L], names(data)) if (anyNA(reorder)) stop("model frame and formula mismatch in model.matrix()") if(!isSeq(reorder, ncol(data), Ostart=FALSE)) data <- data[,reorder, drop=FALSE] } int <- attr(t, "response") if(length(data)) { # otherwise no rhs terms, so skip all this contr.funs <- as.character(getOption("contrasts")) namD <- names(data) ## turn any character columns into factors for(i in namD) if(is.character(data[[i]])) data[[i]] <- factor(data[[i]]) isF <- vapply(data, function(x) is.factor(x) || is.logical(x), NA) isF[int] <- FALSE isOF <- vapply(data, is.ordered, NA) for(nn in namD[isF]) # drop response if(is.null(attr(data[[nn]], "contrasts"))) contrasts(data[[nn]]) <- contr.funs[1 + isOF[nn]] ## it might be safer to have numerical contrasts: ## get(contr.funs[1 + isOF[nn]])(nlevels(data[[nn]])) if (!is.null(contrasts.arg) && is.list(contrasts.arg)) { if (is.null(namC <- names(contrasts.arg))) stop("invalid 'contrasts.arg' argument") for (nn in namC) { if (is.na(ni <- match(nn, namD))) warning(gettextf("variable '%s' is absent, its contrast will be ignored", nn), domain = NA) else { ca <- contrasts.arg[[nn]] ## FIXME: work for *sparse* ca if(is.matrix(ca)) contrasts(data[[ni]], ncol(ca)) <- ca else contrasts(data[[ni]]) <- contrasts.arg[[nn]] } } } } else { # internal model.matrix needs some variable isF <- FALSE data <- cbind(data, x = 0) } ## src/library/stats/R/models.R has ## ans <- .Internal(model.matrix(t, data)) if(verbose) { cat("model.spmatrix(t, data, ..) with t =\n"); str(t,give.attr=FALSE) } ans <- model.spmatrix(t, data, transpose=transpose, ## ============== drop.unused.levels=drop.unused.levels, row.names=row.names, verbose=verbose) ## attr(ans, "contrasts") <- lapply(data[isF], function(x) attr(x, "contrasts")) ans } ## {sparse.model.matrix} ##' Produce the t(Z); Z = "design matrix" of (X : Y), where ##' --- t(Z) : aka rowwise -version : "r" ##' ##' @title sparse model matrix for 2-way interaction ##' @param X and Y either are numeric matrices {maybe 1-column} ##' @param Y or "as(, sparseM)" ##' @param do.names logical ##' @param forceSparse logical ##' @return ##' @author Martin Maechler sparse2int <- function(X, Y, do.names = TRUE, forceSparse = FALSE, verbose = FALSE) { if(do.names) { dnx <- dimnames(X) dny <- dimnames(Y) } dimnames(Y) <- dimnames(X) <- list(NULL,NULL) nx <- nrow(X) ny <- nrow(Y) r <- if((nX <- is.numeric(X)) | (nY <- is.numeric(Y))) { if(nX) { if (nY || nx > 1) { # both numeric, or X >=2 "columns" F <- if(forceSparse) function(m) .Call(dense_to_Csparse, m) else identity F((if(ny == 1) X else X[rep.int(seq_len(nx), ny) , ]) * (if(nx == 1) Y else Y[rep (seq_len(ny),each=nx), ])) } else { ## numeric X (1 "column"), sparseMatrix Y r <- Y dp <- Y@p[-1] - Y@p[-(Y@Dim[2]+1L)] ## stopifnot(all(dp %in% 0:1)) # just for now ## if(nx == 1) ## FIXME: similar trick would be applicable for nx > 2 r@x <- X[dp == 1L] * Y@x r } } else { ## sparseMatrix X, numeric Y if(ny == 1) { ## FIXME: similar trick would be applicable for ny > 2 r <- X dp <- X@p[-1] - X@p[-(X@Dim[2]+1L)] ## stopifnot(all(dp %in% 0:1)) # just for now - drop! - FIXME r@x <- Y[dp == 1L] * X@x r } else { ## ny > 1 -- *larger* matrix X[rep.int(seq_len(nx), ny) , ] * (if(nx == 1) Y else Y[rep(seq_len(ny),each=nx), ]) } } } else { ## X & Y are both sparseMatrix (if(ny == 1) X else X[rep.int(seq_len(nx), ny) , ]) * (if(nx == 1) Y else Y[rep (seq_len(ny),each=nx) , ]) } if(verbose) cat(sprintf(" sp..2int(%s[%d],%s[%d]) ", if(nX)"" else "", nx, if(nY)"" else "", ny)) if(do.names) { ## FIXME: This names business needs a good solution.. ## but maybe "up in the caller" if(!is.null(dim(r)) && !is.null(nX <- dnx[[1]]) && !is.null(nY <- dny[[1]])) rownames(r) <- outer(nX, nY, paste, sep = ":") } r } ##' Sparse Model Matrix for a (high order) interaction term A:B:x:C ##' ##' @param rList list(.) of (transposed) single-factor model matrices, ##' belonging to, say, factors a, b, c,... ##' @param do.names ##' @param forceSparse ##' @param verbose ##' @return the model matrix corresponding to a:b:... sparseInt.r <- function(rList, do.names = TRUE, forceSparse = FALSE, verbose=FALSE) { nl <- length(rList) if(forceSparse) F <- function(m) if(is.matrix(m)) .Call(dense_to_Csparse, m) else m if(verbose) cat("sparseInt.r([1:",nl,"], f.Sp=",forceSparse,"): is.mat()= (", paste(symnum(vapply(rList, is.matrix, NA)), collapse=""), ")\n", sep="") if(nl == 1) { if(forceSparse) F(rList[[1]]) else rList[[1]] } else { ## 'recursion' free: r <- rList[[1]] for(j in 2:nl) r <- sparse2int(r, rList[[j]], do.names=do.names, verbose=verbose) if(forceSparse) F(r) else r } } ## not used currently is.model.frame <- function(x) { ## Purpose: check if x is a "valid" model.frame ## ------------------------------------------------------------ ## Author: Martin Maechler, Date: 3 Jul 2009 is.data.frame(x) && !is.null(tms <- attr(x, "terms")) && inherits(tms, "terms") && ## is.terms() would be better inherits(tms, "formula") && is.matrix(attr(tms, "factors")) && is.language(vv <- attr(tms, "variables")) && vv[[1]] == as.symbol("list") && all(vapply(as.list(vv[-1]), as.character, "") %in% colnames(x)) ## all((vars <- sapply(as.list(vv[-1]), as.character)) %in% colnames(x)) ## and we could go on testing vars } ##' Create a sparse model matrix from a model frame. ##' -- This version uses 'rBind' and returns X' i.e. t(X) : ##' ##' @title Sparse Model Matrix from Model Frame ##' @param trms a "terms" object ##' @param mf a data frame, typically resulting from model.frame() ##' @param transpose logical indicating if X' = t(X) {is faster!} ##' or X should be returned ##' @param drop.unused.levels logical indicating if unused factor ##' levels should be dropped ##' @param row.names ##' @return sparse matrix (class "dgCMatrix") ##' @author Martin Maechler model.spmatrix <- function(trms, mf, transpose=FALSE, drop.unused.levels = FALSE, row.names=TRUE, verbose=FALSE) { ## Author: Martin Maechler, Date: 7 Jul 2009 ## mf is a model frame or a "simple" data.frame [after reorder !] stopifnot(is.data.frame(mf)) n <- nrow(mf) if(row.names) rnames <- row.names(mf) ## mf: make into list, dropping all attributes (but the names) ### FIXME: for poly(., 5) mf has a 5-column matrix as "one column" => looses names here fnames <- names(mf <- unclass(mf)) attributes(mf) <- list(names = fnames) if(length(factorPattern <- attr(trms, "factors"))) { d <- dim(factorPattern) nVar <- d[1] nTrm <- d[2] n.fP <- dimnames(factorPattern) fnames <- n.fP[[1]] # == names of variables {incl. "F(var)"} in the model Names <- n.fP[[2]] # == colnames == names of terms: "a", "b:c", ... } else { ## degenerate, e.g. 'Y ~ 1' nVar <- nTrm <- 0L fnames <- Names <- character(0) } ## all the "variables in the model" are also in "mf", including "sin(x)"; ## actually, ..../src/main/model.c even assumes stopifnot((m <- length(mf)) >= nVar) if(verbose) cat(sprintf("model.spm..(): (n=%d, nVar=%d (m=%d), nTrm=%d)\n", n, nVar,m, nTrm)) if(m > nVar) mf <- mf[seq_len(nVar)] stopifnot(fnames == names(mf)) noVar <- nVar == 0 ##>> this seems wrong; we use 1:nVar for indexing mf[] below .. ##>> if(noVar) nVar <- 1L # (as in ~/R/D/r-devel/R/src/main/model.c) ## Note: "character" variables have been changed to factor in the caller; ## hence: both factor and *logical* should be dealt as factor : is.f <- if(noVar) logical(0) else vapply(mf, function(.) is.factor(.) | is.logical(.), NA) indF <- which(is.f) if(verbose) { cat(" --> indF =\n"); print(indF) } hasInt <- attr(trms, "intercept") == 1 ## the degree of interaction: ## intOrder <- attr(trms, "order") ## if(!hasInt && length(indF)) { ## change the '1' of the first factor into a '2' : if(any(i1 <- factorPattern[indF, ] == 1)) ## replace at the first '1' location: factorPattern[indF,][which.max(i1)] <- 2L else {} ## nothing to do } ## Convert "factors" to "Rowwise- sparseMatrix ("dummy"-matrix) ----------- ## Result: a list of sparse model matrices for the "factor"s : f.matr <- structure(vector("list", length = length(indF)), names = fnames[indF]) i.f <- 0 ## ---- For each variable in the model ------------------- for(i in seq_len(nVar)) { nam <- fnames[i] f <- mf[[i]] if(is.f[i]) { fp <- factorPattern[i,] ## == factorPattern[nam,] contr <- attr(f, "contrasts") f.matr[[(i.f <- i.f + 1)]] <- # a list of 2 lapply(fac2Sparse(f, to = "d", drop.unused.levels=drop.unused.levels, factorPatt12 = 1:2 %in% fp, contrasts.arg = contr), function(s) { if(is.null(s)) return(s) ## else rownames(s) <- paste0(nam, if(is.null(rownames(s))) ## for some contr.*(), have lost rownames; hmm.. seq_len(nrow(s)) else rownames(s)) s }) } else { ## continuous variable --> "matrix" - for all of them if(any(iA <- (cl <- class(f)) == "AsIs")) # drop "AsIs" class class(f) <- if(length(cl) > 1L) cl[!iA] nr <- if(is.matrix(f)) nrow(f <- t(f)) else (dim(f) <- c(1L, length(f)))[1] if(is.null(rownames(f))) rownames(f) <- if(nr == 1) nam else paste0(nam, seq_len(nr)) mf[[i]] <- f } } if(verbose) { cat(" ---> f.matr list :\n") str(f.matr, max = as.integer(verbose)) fNms <- format(dQuote(Names)) dim.string <- gsub('5', as.character(floor(1+log10(n))), " -- concatenating (r, rj): dim = (%5d,%5d) | (%5d,%5d)\n") } ## FIXME: do all this in C -- getR <- function(N) # using 'nm' if(!is.null(r <- f.matr[[N]])) r[[factorPattern[N, nm]]] else mf[[N]] vNms <- "(Intercept)"[hasInt] counts <- integer(nTrm) r <- if(hasInt) ## column of 1's - as sparse new("dgCMatrix", i = 0:(n-1L), p = c(0L, n), Dim = c(n, 1L), x = rep.int(1, n)) else new("dgCMatrix", Dim = c(n, 0L)) if(transpose) r <- t(r) iTrm <- seq_len(nTrm) for(j in iTrm) { ## j-th term nm <- Names[j] if(verbose) cat(sprintf("term[%2d] %s .. ", j, fNms[j])) nmSplits <- strsplit(nm, ":", fixed=TRUE)[[1]] ## NOTA BENE: This can be very slow when many terms are involved ## FIXME ??? why does it use *much* memory in those cases ?? rj <- sparseInt.r(lapply(nmSplits, getR), do.names=TRUE, forceSparse = TRUE, verbose=verbose)# or just (verbose >= 2)) if(verbose) cat(sprintf(dim.string, nrow(r), ncol(r), nrow(rj),ncol(rj))) ## fast version of cbind2() / rbind2(), w/o checks, dimnames, etc r <- if(transpose) .Call(Csparse_vertcat, r, rj) else .Call(Csparse_horzcat, r, t(rj)) ## if(verbose) cat(" [Ok]\n") vNms <- c(vNms, dimnames(rj)[[1]]) counts[j] <- nrow(rj) } rns <- if(row.names) rnames dimnames(r) <- if(transpose) list(vNms, rns) else list(rns, vNms) attr(r, "assign") <- c(if(hasInt) 0L, rep(iTrm, counts)) r } ## model.spmatrix() Matrix/R/kronecker.R0000644000176200001440000001230212621355273014031 0ustar liggesusers#### Collect methods for kronecker() here. #### =========== ### ... all but the ``fall back methods'' which are in ./Matrix.R ... ## ~~~~~~~~~~ ### Request: Should be *fast* particularly when used with Diagonal() ! tmp <- function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { kronecker(as(X, "TsparseMatrix"), Y, FUN = FUN, make.dimnames = make.dimnames, ...) } setMethod("kronecker", signature(X="diagonalMatrix", Y="ANY" ), tmp) setMethod("kronecker", signature(X="diagonalMatrix", Y="Matrix" ), tmp) setMethod("kronecker", signature(X="ANY", Y="sparseMatrix" ), tmp) ## the above could recurse infinitely : setMethod("kronecker", signature(X="sparseMatrix", Y="TsparseMatrix"), tmp) tmp <- function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { kronecker(X, as(Y, "TsparseMatrix"), FUN = FUN, make.dimnames = make.dimnames, ...) } setMethod("kronecker", signature(X="ANY", Y="diagonalMatrix"), tmp) setMethod("kronecker", signature(X="Matrix", Y="diagonalMatrix"), tmp) setMethod("kronecker", signature(X="sparseMatrix", Y="ANY" ), tmp) setMethod("kronecker", signature(X="TsparseMatrix", Y="sparseMatrix"), tmp) rm(tmp) ## from ./dgTMatrix.R : setMethod("kronecker", signature(X = "dgTMatrix", Y = "dgTMatrix"), function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { if (FUN != "*") stop("kronecker method must use default 'FUN'") ## otherwise we don't know that many results will be zero ydim <- Y@Dim xi <- X@i xnnz <- length(xi) yi <- Y@i ynnz <- length(yi) new("dgTMatrix", Dim = X@Dim * ydim, i = rep.int(yi, xnnz) + ydim[1] * rep.int(xi, rep.int(ynnz, xnnz)), j = rep.int(Y@j, xnnz) + ydim[2] * rep.int(X@j, rep.int(ynnz, xnnz)), ## faster than x = as.vector(outer(Y@x, X@x, FUN = FUN) x = as.vector(Y@x %*% t(X@x))) }) ## triangularity -- should be preserved "when obvious": setMethod("kronecker", signature(X = "dtTMatrix", Y = "dtTMatrix"), function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { if (FUN != "*") stop("kronecker method must use default 'FUN'") ## otherwise we don't know that many results will be zero if(X@uplo != Y@uplo) { ## result not triangular X <- as(X, "dgTMatrix") Y <- as(Y, "dgTMatrix") return(callGeneric()) } ## else: both 'uplo' are the same -- result *is* triangular ## d.U <- (dX <- X@diag == "U") && (dY <- Y@diag == "U") if(Y@diag == "U") Y <- .diagU2N(Y, "dtTMatrix") ydim <- Y@Dim if(X@diag != "U") { xi <- X@i xj <- X@j xx <- X@x } else { ## X@diag == "U" nx <- X@Dim[1] # triangular matrices are square ii <- seq_len(nx) - 1L xi <- c(X@i, ii) xj <- c(X@j, ii) xx <- c(X@x, rep.int(1, nx)) } xnnz <- length(xi) yi <- Y@i ynnz <- length(yi) new("dtTMatrix", Dim = X@Dim * ydim, i = rep.int(yi, xnnz) + ydim[1] * rep.int(xi, rep.int(ynnz, xnnz)), j = rep.int(Y@j, xnnz) + ydim[2] * rep.int(xj, rep.int(ynnz, xnnz)), ## faster than x = as.vector(outer(Y@x, X@x, FUN = FUN) x = as.vector(Y@x %*% t(xx)), uplo = X@uplo, diag = "N" # if(d.U) { "U" , but drop the entries} else "N" ) }) setMethod("kronecker", signature(X = "dtTMatrix", Y = "dgTMatrix"), function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { if(trY <- isTriangular(Y)) { Y <- gT2tT(Y, uplo = attr(trY, "kind") %||% "U", diag = "N", ## improve: also test for unit diagonal toClass = "dtTMatrix", do.n= FALSE) } else { X <- as(X, "dgTMatrix") } callGeneric() #-> dtT o dtT or dgT o dgT }) setMethod("kronecker", signature(X = "dgTMatrix", Y = "dtTMatrix"), function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { if(trX <- isTriangular(X)) { X <- gT2tT(X, uplo = attr(trX, "kind") %||% "U", diag = "N", ## improve: also test for unit diagonal toClass = "dtTMatrix", do.n= FALSE) } else { Y <- as(Y, "dgTMatrix") } callGeneric() #-> dtT o dtT or dgT o dgT }) setMethod("kronecker", signature(X = "TsparseMatrix", Y = "TsparseMatrix"), function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { if(!is(X, "dMatrix")) X <- as(X, "dMatrix") if(!is(Y, "dMatrix")) Y <- as(Y, "dMatrix") if(is(X, "symmetricMatrix")) X <- as(X, "generalMatrix") if(is(Y, "symmetricMatrix")) Y <- as(Y, "generalMatrix") callGeneric() }) if(FALSE) # probably not needed setMethod("kronecker", signature(X = "dgTMatrix", Y = "TsparseMatrix"), function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { ## a case where Y is neither "dgT" nor "dtT" : if(!is(Y, "dMatrix")) Y <- as(Y, "dMatrix") if(is(Y, "symmetricMatrix")) Y <- as(Y, "generalMatrix") callGeneric() }) ## from ./dsparseMatrix.R : setMethod("kronecker", signature(X = "dsparseMatrix", Y = "dsparseMatrix"), function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { if(is(X, "symmetricMatrix")) X <- as(X, "generalMatrix") if(is(Y, "symmetricMatrix")) Y <- as(Y, "generalMatrix") kronecker(as(X, "TsparseMatrix"), as(Y, "TsparseMatrix"), FUN = FUN, make.dimnames = make.dimnames, ...) }) Matrix/R/nnzero.R0000644000176200001440000000577612501612602013367 0ustar liggesusers#### Number of "structural" non-zeros --- this is nnzmax() in Matlab #### of effectively non-zero values = nnz() " " ## Our nnzero() is like Matlab's nnz() -- but more sophisticated because of NAs ## New: generic function instead of if(..) ... else if(..) ...... ## ## na.counted: TRUE : NA's are counted, they are not 0 ## NA : NA's are not known (0 or not) ==> result := NA ## FALSE: NA's are omitted before counting ## "Default" : for non-"Matrix" (e.g. classical matrices): setMethod("nnzero", "ANY", function(x, na.counted = NA) sum(nz.NA(x, na.counted))) setMethod("nnzero", "diagonalMatrix", function(x, na.counted = NA) sum(nz.NA(diag(x), na.counted))) setMethod("nnzero", "indMatrix", function(x, na.counted = NA) x@Dim[1]) ## other (not "indMatrix", not "diagonalMatrix") "sparseMatrix": setMethod("nnzero", "sparseMatrix", function(x, na.counted = NA) { d <- x@Dim if(any(d == 0)) return(0L) cl <- class(x) ## speedup: cld <- getClassDef(cl) n <- d[1] iSym <- extends(cld, "symmetricMatrix") iTri <- if(iSym) FALSE else extends(cld, "triangularMatrix") nn <- switch(.sp.class(cl), "CsparseMatrix" = x@p[d[2]+1L],# == length(x@i) only if not over-alloc. "TsparseMatrix" = { if(anyDuplicatedT(x, di = d)) x <- .Call(Tsparse_to_Csparse, x, iTri) length(x@i) }, "RsparseMatrix" = x@p[n+1L]) if(!extends(cld, "nMatrix")) # <==> has 'x' slot : consider NAs in it: nn <- sum(nz.NA(if(nn < length(x@x)) x@x[seq_len(nn)] else x@x, na.counted)) if(iSym) nn+nn - sum(nz.NA(diag(x), na.counted)) else if(iTri && x@diag == "U") nn + n else nn }) setMethod("nnzero", "denseMatrix", function(x, na.counted = NA) { d <- x@Dim if(any(d == 0)) return(0L) cl <- class(x) ## speedup: cld <- getClassDef(cl) n <- d[1] iSym <- extends(cld, "symmetricMatrix") ## dense, not diagonal: Can use 'x' slot; if(iSym || extends(cld, "triangularMatrix")) { ## now !iSym <==> "triangularMatrix" upper <- (x@uplo == "U") if(length(x@x) < n*n) { ## packed symmetric | triangular if(iSym) { ## indices of *diagonal* entries for packed : iDiag <- cumsum(if(upper) 1:n else c(1L, if(n > 1)n:2)) ## symmetric packed: count off-diagonals *twice* 2L* sum(nz.NA(x@x[-iDiag], na.counted)) + sum(nz.NA(x@x[ iDiag], na.counted)) } else ## triangular packed sum(nz.NA(x@x, na.counted)) } else { ## not packed, but may have "arbitrary" ## entries in the non-relevant upper/lower triangle s <- sum(nz.NA(x@x[indTri(n, upper=upper)], na.counted)) (if(iSym) 2L * s else s) + (if(!iSym && x@diag == "U") n else sum(nz.NA(x@x[indDiag(n)], na.counted))) } } else { ## dense general <--> .geMatrix sum(nz.NA(x@x, na.counted)) } }) ## Working via sparse*: setMethod("nnzero", "CHMfactor", function(x, na.counted = NA) nnzero(as(x,"sparseMatrix"), na.counted=na.counted)) Matrix/R/lMatrix.R0000644000176200001440000001152713057762217013502 0ustar liggesuserssetAs("matrix", "lMatrix", function(from) { storage.mode(from) <- "logical" ; Matrix(from) }) ## NOTE: This is *VERY* parallel to ("dMatrix" -> "nMatrix") in ./dMatrix.R : setAs("lMatrix", "nMatrix", function(from) { if(anyNA(from@x) && ((.w <- isTRUE(getOption("Matrix.warn"))) || isTRUE(getOption("Matrix.verbose")))) { (if(.w) warning else message)( "\"lMatrix\" object with NAs coerced to \"nMatrix\": NA |-> TRUE") from@x[is.na(from@x)] <- TRUE } ## ==> from@x are in {TRUE, FALSE} cld <- getClassDef(cl <- MatrixClass(class(from))) if(extends(cld, "diagonalMatrix")) # no "ndi*" class ## should not happen, setAs(diagonalMatrix -> nMatrix) in ./diagMatrix.R: return(di2nMat(from)) ## else isSp <- extends(cld, "sparseMatrix") if(isSp && !all(from@x)) { from <- drop0(from) # was drop0(from, cld) if(cl != (c. <- class(from))) cld <- getClassDef(cl <- c.) } sNams <- slotNames(cld) copyClass(from, sub("^l", "n", cl), if(isSp) sNams[sNams != "x"] else sNams) }) ## and the reverse as well : setAs("nMatrix", "lMatrix", function(from) { cld <- getClassDef(cl <- MatrixClass(class(from))) r <- copyClass(from, sub("^n", "l", cl), slotNames(cld)) if(extends(cld, "sparseMatrix")) r@x <- rep.int(TRUE, length(if(!extends(cld, "RsparseMatrix")) from@i else from@j)) r }) setAs("dMatrix", "lMatrix", function(from) { cld <- getClassDef(newCl <- class2(class(from), "l")) sNams <- slotNames(cld) r <- copyClass(from, newCl, sNames = sNams[sNams != "x"]) r@x <- as.logical(from@x) r }) setAs("lMatrix", "dMatrix", function(from) { cld <- getClassDef(cl <- MatrixClass(class(from))) sNams <- slotNames(cld) r <- copyClass(from, newCl = sub("^l", "d", cl), sNames = sNams[sNams != "x"]) r@x <- as.double(from@x) r }) ## needed at least for lsparse* : setAs("lMatrix", "dgCMatrix", function(from) as(as(from, "lgCMatrix"), "dgCMatrix")) ###-------------- which( ) ----------------------------------------------------- ## "ldi: is both "sparseMatrix" and "lMatrix" but not "lsparseMatrix" setMethod("which", "ldiMatrix", function(x, arr.ind, useNames) { n <- x@Dim[1L] i <- if(x@diag == "U") seq_len(n) else which(x@x) if(arr.ind) arrayInd(i, x@Dim, x@Dimnames, useNames=useNames) else i + n*(i - 1L) }) whichDense <- function(x, arr.ind = FALSE, useNames = TRUE) { wh <- which(x@x) ## faster but "forbidden": .Internal(which(x@x)) if (arr.ind && !is.null(d <- dim(x))) arrayInd(wh, d, dimnames(x), useNames=useNames) else wh } setMethod("which", "ndenseMatrix", function(x, arr.ind, useNames) whichDense(as(x, "ngeMatrix"), arr.ind=arr.ind, useNames=useNames)) setMethod("which", "ldenseMatrix", function(x, arr.ind, useNames) whichDense(as(x, "lgeMatrix"), arr.ind=arr.ind, useNames=useNames)) setMethod("which", "nsparseMatrix", function(x, arr.ind, useNames = TRUE) { if(arr.ind) which(as(x, "TsparseMatrix"), arr.ind=TRUE, useNames=useNames) else as(x, "sparseVector")@i }) setMethod("which", "lsparseMatrix", function(x, arr.ind, useNames = TRUE) { if(arr.ind) which(as(x, "TsparseMatrix"), arr.ind=TRUE, useNames=useNames) else which(as(x, "sparseVector")) }) ##' construct dimnames as in arrayInd(*, useNames=TRUE) arrDimnames <- function(i, .dimnames) list(.dimnames[[1L]][i], if(any(nzchar(nd <- names(.dimnames)))) nd else c("row", "col")) which.ngT <- function(x, arr.ind, useNames = TRUE) if(arr.ind) { ij <- cbind(x@i, x@j) + 1L if (useNames) dimnames(ij) <- arrDimnames(ij[,1L], x@Dimnames) ij } else as(x, "sparseVector")@i setMethod("which", "ngTMatrix", which.ngT) setMethod("which", "ntTMatrix", function(x, arr.ind, useNames = TRUE) which.ngT(.Call(Tsparse_diagU2N, x), arr.ind, useNames)) setMethod("which", "nsTMatrix", function(x, arr.ind, useNames = TRUE) which.ngT(as(x, "generalMatrix"), arr.ind, useNames)) which.lgT <- function(x, arr.ind, useNames = TRUE) { if(arr.ind) { iT <- is1(x@x) ij <- cbind(x@i[iT], x@j[iT]) + 1L if (useNames) dimnames(ij) <- arrDimnames(ij[,1L], x@Dimnames) ij } else which(as(x, "sparseVector")) } setMethod("which", "lgTMatrix", which.lgT) setMethod("which", "ltTMatrix", function(x, arr.ind, useNames = TRUE) which.lgT(.Call(Tsparse_diagU2N, x), arr.ind, useNames)) setMethod("which", "lsTMatrix", function(x, arr.ind, useNames = TRUE) which.lgT(as(x, "generalMatrix"), arr.ind, useNames)) setMethod("is.finite", signature(x = "lMatrix"), function(x) !is.na(x)) setMethod("is.finite", signature(x = "nMatrix"), allTrueMatrix) setMethod("is.infinite", signature(x = "lMatrix"), is.na_nsp)# all FALSE setMethod("is.infinite", signature(x = "nMatrix"), is.na_nsp)# all FALSE Matrix/R/dsTMatrix.R0000644000176200001440000000234312501023016013751 0ustar liggesusers### Coercion and Methods for Symmetric Triplet Matrices ## Now in ./Tsparse.R ## setAs("dsTMatrix", "dsCMatrix", ## function(from) .Call(Tsparse_to_Csparse, from, FALSE)) setAs("dsTMatrix", "dgTMatrix", function(from) .Call(dsTMatrix_as_dgTMatrix, from)) setAs("dsTMatrix", "lsTMatrix", function(from) new("lsTMatrix", i = from@i, j = from@j, uplo = from@uplo, Dim = from@Dim, Dimnames = from@Dimnames)) ## Conversion <--> dense storage is via dsyMatrix : setAs("dsTMatrix", "dsyMatrix", function(from) .Call(dsTMatrix_as_dsyMatrix, from)) setAs("dsTMatrix", "dgeMatrix", function(from) as(as(from, "dsyMatrix"), "dgeMatrix")) setAs("dsTMatrix", "matrix", function(from) as(as(from, "dsyMatrix"), "matrix")) to_dsT <- function(from) as(as(from, "dsyMatrix"), "dsTMatrix") setAs("dgeMatrix", "dsTMatrix", to_dsT) setAs("matrix", "dsTMatrix", to_dsT) setMethod("t", "dsTMatrix", function(x) new("dsTMatrix", Dim = x@Dim, Dimnames = x@Dimnames[2:1], i = x@j, j = x@i, x = x@x, uplo = if (x@uplo == "U") "L" else "U")) ## setMethod("writeHB", signature(obj = "dsTMatrix"), ## function(obj, file, ...) callGeneric(as(obj, "CsparseMatrix"), file, ...)) Matrix/R/colSums.R0000644000176200001440000002306112533262160013471 0ustar liggesusers#### Collect methods for colSums(), rowSums(), colMeans(), rowMeans() here. #### ======= ------- -------- -------- ## Utilities: ## .as.dgC.Fun <- function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) { ## x <- as(x, "dgCMatrix") ## callGeneric() ## } ## .as.dgT.Fun <- function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) { ## x <- as(x, "dgTMatrix") ## callGeneric() ## } .as.d.Fun <- function(x, na.rm = FALSE, dims = 1) { x <- as(x, "dMatrix") callGeneric() } .as.dge.Fun <- function(x, na.rm = FALSE, dims = 1) { x <- as(x, "dgeMatrix") callGeneric() } .as.gC.Fun <- function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) { x <- as_gCsimpl(x) callGeneric() } .as.C.Fun <- function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) { x <- as(x, "CsparseMatrix") ## or if necessary as_Csparse(.) callGeneric() } ### Dense Matrices: ------------------------------------------------- setMethod("colSums", signature(x = "denseMatrix"), .as.d.Fun) setMethod("colMeans", signature(x = "denseMatrix"), .as.d.Fun) setMethod("rowSums", signature(x = "denseMatrix"), .as.d.Fun) setMethod("rowMeans", signature(x = "denseMatrix"), .as.d.Fun) ## FIXME: "works" but not optimally for triangular/symmetric(packed)/.. setMethod("colSums", signature(x = "ddenseMatrix"), .as.dge.Fun) setMethod("colMeans", signature(x = "ddenseMatrix"), .as.dge.Fun) setMethod("rowSums", signature(x = "ddenseMatrix"), .as.dge.Fun) setMethod("rowMeans", signature(x = "ddenseMatrix"), .as.dge.Fun) setMethod("colSums", signature(x = "dgeMatrix"), function(x, na.rm = FALSE, dims = 1) .Call(dgeMatrix_colsums, x, na.rm, TRUE, FALSE), valueClass = "numeric") setMethod("colMeans", signature(x = "dgeMatrix"), function(x, na.rm = FALSE, dims = 1) .Call(dgeMatrix_colsums, x, na.rm, TRUE, TRUE), valueClass = "numeric") setMethod("rowSums", signature(x = "dgeMatrix"), function(x, na.rm = FALSE, dims = 1) .Call(dgeMatrix_colsums, x, na.rm, FALSE, FALSE), valueClass = "numeric") setMethod("rowMeans", signature(x = "dgeMatrix"), function(x, na.rm = FALSE, dims = 1) .Call(dgeMatrix_colsums, x, na.rm, FALSE, TRUE), valueClass = "numeric") ### Sparse Matrices: ------------------------------------------------- ## Diagonal ones: .diag.Sum <- function(x, na.rm = FALSE, dims = 1) if(x@diag == "U") rep(1, x@Dim[1]) else as.numeric(x@x) .diag.Mean <- function(x, na.rm = FALSE, dims = 1) { n <- x@Dim[1L] if(x@diag == "U") rep(1/n, n) else as.numeric(x@x)/n } setMethod("colSums", signature(x = "diagonalMatrix"), .diag.Sum) setMethod("rowSums", signature(x = "diagonalMatrix"), .diag.Sum) setMethod("colMeans", signature(x = "diagonalMatrix"), .diag.Mean) setMethod("rowMeans", signature(x = "diagonalMatrix"), .diag.Mean) rm(.diag.Sum, .diag.Mean) ### Csparse --- the fast workhorse ones ### 1) those with .Call(.), {d, i, l, n} gCMatrix x {col|row}{Sums|Means} : ## the last two arguments to .gCMatrix_(col|col)(Sums|Means) are 'trans' and 'means' setMethod("colSums", signature(x = "dgCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(dgCMatrix_colSums, x, na.rm, sparseResult, FALSE, FALSE)) setMethod("rowSums", signature(x = "dgCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(dgCMatrix_colSums, x, na.rm, sparseResult, TRUE, FALSE)) setMethod("colMeans", signature(x = "dgCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(dgCMatrix_colSums, x, na.rm, sparseResult, FALSE, TRUE)) setMethod("rowMeans", signature(x = "dgCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(dgCMatrix_colSums, x, na.rm, sparseResult, TRUE, TRUE)) setMethod("colSums", signature(x = "igCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(igCMatrix_colSums, x, na.rm, sparseResult, FALSE, FALSE)) setMethod("rowSums", signature(x = "igCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(igCMatrix_colSums, x, na.rm, sparseResult, TRUE, FALSE)) setMethod("colMeans", signature(x = "igCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(igCMatrix_colSums, x, na.rm, sparseResult, FALSE, TRUE)) setMethod("rowMeans", signature(x = "igCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(igCMatrix_colSums, x, na.rm, sparseResult, TRUE, TRUE)) setMethod("colSums", signature(x = "lgCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(lgCMatrix_colSums, x, na.rm, sparseResult, FALSE, FALSE)) setMethod("rowSums", signature(x = "lgCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(lgCMatrix_colSums, x, na.rm, sparseResult, TRUE, FALSE)) setMethod("colMeans", signature(x = "lgCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(lgCMatrix_colSums, x, na.rm, sparseResult, FALSE, TRUE)) setMethod("rowMeans", signature(x = "lgCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(lgCMatrix_colSums, x, na.rm, sparseResult, TRUE, TRUE)) setMethod("colSums", signature(x = "ngCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(ngCMatrix_colSums, x, na.rm, sparseResult, FALSE, FALSE)) setMethod("rowSums", signature(x = "ngCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(ngCMatrix_colSums, x, na.rm, sparseResult, TRUE, FALSE)) setMethod("colMeans", signature(x = "ngCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(ngCMatrix_colSums, x, na.rm, sparseResult, FALSE, TRUE)) setMethod("rowMeans", signature(x = "ngCMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) .Call(ngCMatrix_colSums, x, na.rm, sparseResult, TRUE, TRUE)) ### 2) the other Csparse ones are "just" coerced to a *gCMatrix : setMethod("colSums", signature(x = "CsparseMatrix"), .as.gC.Fun) setMethod("colMeans", signature(x = "CsparseMatrix"), .as.gC.Fun) setMethod("rowSums", signature(x = "CsparseMatrix"), .as.gC.Fun) setMethod("rowMeans", signature(x = "CsparseMatrix"), .as.gC.Fun) ##setMethod("rowSums", signature(x = "dgCMatrix"), ## function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) ## sparsapply(x, 1, sum, sparseResult = sparseResult, na.rm = na.rm)) ##setMethod("rowMeans", signature(x = "dgCMatrix"), sp.rowMeans) ## --- Tsparse ---- ## .as.C.Fun -- since there's now C code for dgCMatrix_colSums setMethod("colSums", signature(x = "TsparseMatrix"), .as.C.Fun) setMethod("colMeans", signature(x = "TsparseMatrix"), .as.C.Fun) setMethod("rowSums", signature(x = "TsparseMatrix"), .as.C.Fun) setMethod("rowMeans", signature(x = "TsparseMatrix"), .as.C.Fun) ## setMethod("colSums", signature(x = "TsparseMatrix"), .as.dgT.Fun, ## valueClass = "numeric") ## setMethod("colMeans", signature(x = "TsparseMatrix"), .as.dgT.Fun, ## valueClass = "numeric") ## ## setMethod("rowSums", signature(x = "TsparseMatrix"), .as.dgT.Fun, ## valueClass = "numeric") ## setMethod("rowMeans", signature(x = "TsparseMatrix"), .as.dgT.Fun, ## valueClass = "numeric") ## setMethod("colSums", signature(x = "dgTMatrix"), ## function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) ## sparsapply(x, 2, sum, sparseResult = sparseResult, na.rm = na.rm)) ## setMethod("rowSums", signature(x = "dgTMatrix"), ## function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) ## sparsapply(x, 1, sum, sparseResult = sparseResult, na.rm = na.rm)) ## setMethod("colMeans", signature(x = "dgTMatrix"), sp.colMeans) ## setMethod("rowMeans", signature(x = "dgTMatrix"), sp.rowMeans) ## --- Rsparse ---- ## row <-> col of the "transposed, seen as C" : setMethod("rowSums", signature(x = "RsparseMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) colSums(.tR.2.C(x), na.rm=na.rm, dims=dims, sparseResult=sparseResult)) setMethod("rowMeans", signature(x = "RsparseMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) colMeans(.tR.2.C(x), na.rm=na.rm, dims=dims, sparseResult=sparseResult)) setMethod("colSums", signature(x = "RsparseMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) rowSums(.tR.2.C(x), na.rm=na.rm, dims=dims, sparseResult=sparseResult)) setMethod("colMeans", signature(x = "RsparseMatrix"), function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) rowMeans(.tR.2.C(x), na.rm=na.rm, dims=dims, sparseResult=sparseResult)) ## ## These two are obviously more efficient than going through Tsparse: ## setMethod("colSums", signature(x = "dgRMatrix"), ## function(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) ## sparsapply(x, 2, sum, sparseResult = sparseResult, na.rm = na.rm)) ## setMethod("colMeans", signature(x = "dgRMatrix"), sp.colMeans) ## --- indMatrix [incl pMatrix ] --- setMethod("colSums", signature(x = "indMatrix"), function(x, na.rm = FALSE, dims = 1) tabulate(x@perm, nbins=x@Dim[2])) setMethod("colMeans", signature(x = "indMatrix"), function(x, na.rm = FALSE, dims = 1) tabulate(x@perm, nbins=x@Dim[2])/x@Dim[1]) ## for completeness: setMethod("rowSums", signature(x = "indMatrix"), function(x, na.rm = FALSE, dims = 1) rep.int(1, x@Dim[1])) setMethod("rowMeans", signature(x = "indMatrix"), function(x, na.rm = FALSE, dims = 1) rep.int(1/x@Dim[2], x@Dim[1])) Matrix/R/not.R0000644000176200001440000000671112470400545012650 0ustar liggesusers#### --- All method definitions for "!" (not) --- ## Divert everything to "lMatrix" and its subclasses : setMethod("!", "Matrix", function(x) !as(x, "lMatrix")) ## -- diag --- setMethod("!", "ldiMatrix", function(x) { r <- copyClass(x, "lsyMatrix", c("Dim","Dimnames")) n <- x@Dim[1] if (n > 0) { ## off-diagonal: assign all and then reassign diagonals: rx <- rep.int(TRUE, n * n) ## diagonal entries: rx[1L + 0:(n - 1L) * (n + 1L)] <- { if(x@diag == "N") !x@x else FALSE ## "U" } r@x <- rx } r }) ## -- lsparse -- setMethod("!", "lsparseMatrix", ## turns FALSE to TRUE --> dense matrix function(x) !as(x, "denseMatrix"))# was "lgeMatrix" ## Use "Matrix" method !as(. , "lMatrix") ## setMethod("!", "nsparseMatrix", ## ## turns FALSE to TRUE --> dense matrix ## function(x) !as(x, "ngeMatrix")) ## -- ldense --- setMethod("!", "ltrMatrix", function(x) { x@x <- !x@x ## And now fill one triangle with '!FALSE' results : ## TODO: the following should be .Call using ## a variation of make_array_triangular: r <- as(x, "lgeMatrix") n <- x@Dim[1] if(x@diag == "U") r@x[indDiag(n)] <- FALSE ## result has diagonal all FALSE r@x[indTri(n, upper=x@uplo != "U")] <- TRUE r }) setMethod("!", "ltpMatrix", function(x) !as(x, "ltrMatrix")) ## for the other ldense* ones setMethod("!", "lgeMatrix", function(x) { x@x <- !x@x ; x }) setMethod("!", "ldenseMatrix", function(x) { if(is(x, "symmetricMatrix")) { # lsy | lsp x@x <- !x@x x } else ## triangular are dealt with above already : "general" here: !as(x, "lgeMatrix") }) ## -- ndense --- setMethod("!", "ntrMatrix", function(x) { x@x <- !x@x ## And now we must fill one triangle with '!FALSE' results : ## TODO: the following should be .Call using ## a variation of make_array_triangular: r <- as(x, "ngeMatrix") n <- x@Dim[1] coli <- rep(1:n, each=n) rowi <- rep(1:n, n) Udiag <- x@diag == "U" log.i <- if(x@uplo == "U") { if(Udiag) rowi >= coli else rowi > coli } else { if(Udiag) rowi <= coli else rowi < coli } r@x[log.i] <- TRUE r }) setMethod("!", "ntpMatrix", function(x) !as(x, "ntrMatrix")) ## for the other ldense* ones setMethod("!", "ngeMatrix", function(x) { x@x <- !x@x ; x }) setMethod("!", "ndenseMatrix", function(x) { if(is(x, "symmetricMatrix")) { # lsy | lsp x@x <- !x@x x } else ## triangular are dealt with above already : "general" here: !as(x, "ngeMatrix") }) ### ---- sparseVector ----- setMethod("!", "sparseVector", function(x) { n <- x@length if(2 * length(x@i) <= n) !sp2vec(x) else { ## sparse result ii <- seq_len(n)[-x@i] if((has.x <- !is(x, "nsparseVector"))) { xx <- rep.int(TRUE, length(ii)) if((.na <- any(x.na <- is.na(x@x))) | (.fa <- any(x.f <- !x.na & !x@x))) { ## deal with 'FALSE' and 'NA' in x slot if(.na) { ii <- c(ii, x@i[x.na]) xx <- c(xx, x@x[x.na]) } if(.fa) { ## any(x.f) x.f <- x.f & !x.na ii <- c(ii, x@i[x.f]) xx <- c(xx, rep.int(TRUE, sum(x.f))) } ## sort increasing in index: i.s <- sort.list(ii) ii <- ii[i.s] xx <- xx[i.s] } } if(has.x) newSpV("lsparseVector", x = xx, i = ii, length = n) else new("nsparseVector", i = ii, length = n) } }) Matrix/R/KhatriRao.R0000644000176200001440000000410412760263240013727 0ustar liggesusers# Efficient Khatri-Rao product for large sparse matrices # Assumes two matrices in CsparseMatrix format # Written by Michael Cysouw ## MM: there's a "public" Matlab version, at ## http://www.mathworks.com/matlabcentral/fileexchange/28872-khatri-rao-product/content/kr.m ## with documentation ## ## % Khatri-Rao product. ## ## % kr(A,B) returns the Khatri-Rao product of two matrices A and B, of ## % dimensions I-by-K and J-by-K respectively. The result is an I*J-by-K ## % matrix formed by the matching columnwise Kronecker products, i.e. ## % the k-th column of the Khatri-Rao product is defined as ## % kron(A(:,k),B(:,k)). KhatriRao <- function(X, Y = X, FUN = "*", make.dimnames = FALSE) { stopifnot((p <- ncol(X)) == ncol(Y)) X <- as(X,"CsparseMatrix") Y <- as(Y,"CsparseMatrix") is.n <- (nX <- is(X, "nMatrix")) & (nY <- is(Y, "nMatrix")) xn <- diff( X@p) yn <- diff(yp <- Y@p) ## both of length p newp <- as.integer(diffinv(xn*yn)) rep.yn <- rep.int(yn,xn) xn.yp <- xn[ as.logical(yn) ] # xn "where" Y is present non0 <- length(xn.yp) > 0L && any(xn.yp != 0L) i1 <- rep.int(X@i, rep.yn) i2 <- if(non0) { yj <- .Call(Matrix_expand_pointers, yp)## as(Y,"TsparseMatrix")@j yj <- factor(yj) # for 2x split() below unlist(rep(split.default(Y@i,yj), xn.yp)) } else integer() n1 <- nrow(X); n2 <- nrow(Y) newi <- i1*n2 + i2 dim <- as.integer(c(n1*n2, p)) dns <- if (make.dimnames) { ## this is not good enough: dnx, dny may be NULL list(as.vector(outer(rownames(Y),rownames(X), FUN = "paste", sep = ":")), colnames(X)) } else list(NULL,NULL) if(is.n) new("ngCMatrix", Dim=dim, Dimnames=dns, i = newi, p = newp) else { ## at least one of 'X' and 'Y' has an "x" slot: if(nX) X <- as(X, "lgCMatrix") x1 <- rep.int(X@x, rep.yn) x2 <- if(non0) { if(nY) Y <- as(Y, "lgCMatrix") unlist(rep(split.default(Y@x,yj), xn.yp)) } else if(nY) logical() else Y@x[0] new("dgCMatrix", Dim=dim, Dimnames=dns, i = newi, p = newp, x = match.fun(FUN) (x1,x2)) } } Matrix/R/products.R0000644000176200001440000012346513141330160013710 0ustar liggesusers#### All %*%, crossprod() and tcrossprod() methods of the Matrix package #### ^^^ ---------------------------------------------------------- ### with EXCEPTIONS: ./diagMatrix.R ./indMatrix.R ./pMatrix.R ### ~~~~~~~~~~ ------------ ----------- --------- ### NOTA BENE: vector %*% Matrix _and_ Matrix %*% vector ### --------- The k-vector is treated as (1,k)-matrix *or* (k,1)-matrix ### on both sides when ever it "helps fit" the matrix dimensions: ##--- ./products.Rout ## ~~~~~~~~~~~~~~~ ## ========> in a M.v or v.M operation , ## you *must* look at dim(M) to see how to treat v !!!!!!!!!!!!!!!! ## For %*% (M = Matrix; v = vector (double, integer,.. or "sparsevector"): ## Drawback / bug: for (dense)vectors, the *names* are lost [sparsevectors have no names!] .M.v <- function(x, y) { # dim(y) <- if(ncol(x) == (n <- length(y))) c(n, 1L) else c(1L, n) ## which works when m == 1, otherwise errors x %*% y } ## For %*% : .v.M <- function(x, y) { dim(x) <- if(nrow(y) == (n <- length(x))) c(1L, n) else c(n, 1L) x %*% y } ## For tcrossprod() : .v.Mt <- function(x, y=NULL, boolArith=NA, ...) { ##_ Not needed: y is never "missing", when used: ##_ if(is.null(y)) y <- x dim(x) <- if(ncol(y) == (n <- length(x))) c(1L, n) else c(n, 1L) tcrossprod(x, y, boolArith=boolArith, ...) } ## tcrossprod(, ) .M.vt <- function(x, y=NULL, boolArith=NA, ...) tcrossprod(x, if(nrow(x) == 1L) spV2M(y, nrow=1L, ncol=y@length, check=FALSE) else spV2M(y, nrow=y@length, ncol=1L, check=FALSE), boolArith=boolArith, ...) ###-- I --- %*% ------------------------------------------------------ ## General method for dense matrix multiplication in case specific methods ## have not been defined. for ( c.x in paste0(c("d", "l", "n"), "denseMatrix")) { for(c.y in c("matrix", paste0(c("d", "l", "n"), "denseMatrix"))) setMethod("%*%", signature(x = c.x, y = c.y), function(x, y) .Call(geMatrix_matrix_mm, x, y, FALSE), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "matrix", y = c.x), function(x, y) .Call(geMatrix_matrix_mm, y, x, TRUE), valueClass = "dgeMatrix") } setMethod("%*%", signature(x = "dgeMatrix", y = "dgeMatrix"), function(x, y) .Call(dgeMatrix_matrix_mm, x, y, FALSE), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "dgeMatrix", y = "matrix"), function(x, y) .Call(dgeMatrix_matrix_mm, x, y, FALSE), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "matrix", y = "dgeMatrix"), function(x, y) .Call(dgeMatrix_matrix_mm, y, x, TRUE), valueClass = "dgeMatrix") .dsy_m_mm <- function(x, y) .Call(dsyMatrix_matrix_mm, x, y, FALSE) setMethod("%*%", signature(x = "dsyMatrix", y = "matrix"), .dsy_m_mm) setMethod("%*%", signature(x = "dsyMatrix", y = "ddenseMatrix"), .dsy_m_mm) ## for disambiguity : setMethod("%*%", signature(x = "dsyMatrix", y = "dsyMatrix"), .dsy_m_mm) ## or even ## for(yCl in .directSubClasses(getClass("ddenseMatrix"))) ## setMethod("%*%", signature(x = "dsyMatrix", y = yCl), .dsy_m_mm) setMethod("%*%", signature(x = "ddenseMatrix", y = "dsyMatrix"), function(x, y) .Call(dsyMatrix_matrix_mm, y, x, TRUE)) setMethod("%*%", signature(x = "matrix", y = "dsyMatrix"), function(x, y) .Call(dsyMatrix_matrix_mm, y, x, TRUE)) setMethod("%*%", signature(x = "dspMatrix", y = "ddenseMatrix"), function(x, y) .Call(dspMatrix_matrix_mm, x, y), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "dspMatrix", y = "matrix"), function(x, y) .Call(dspMatrix_matrix_mm, x, y), valueClass = "dgeMatrix") ## Not needed because of c("numeric", "Matrix") method ##setMethod("%*%", signature(x = "numeric", y = "CsparseMatrix"), ## function(x, y) .Call(Csparse_dense_crossprod, y, x, "B"), ## valueClass = "dgeMatrix") ## FIXME -- do the "same" for "dtpMatrix" {also, with [t]crossprod()} ## all just like these "%*%" : setMethod("%*%", signature(x = "dtrMatrix", y = "dtrMatrix"), function(x, y) .Call(dtrMatrix_dtrMatrix_mm, x, y, FALSE, FALSE)) setMethod("%*%", signature(x = "dtrMatrix", y = "ddenseMatrix"), function(x, y) .Call(dtrMatrix_matrix_mm, x, y, FALSE, FALSE), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "dtrMatrix", y = "matrix"), function(x, y) .Call(dtrMatrix_matrix_mm, x, y, FALSE, FALSE), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "ddenseMatrix", y = "dtrMatrix"), function(x, y) .Call(dtrMatrix_matrix_mm, y, x, TRUE, FALSE), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "matrix", y = "dtrMatrix"), function(x, y) .Call(dtrMatrix_matrix_mm, y, x, TRUE, FALSE), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "dtpMatrix", y = "ddenseMatrix"), function(x, y) .Call(dtpMatrix_matrix_mm, x, y, FALSE, FALSE)) setMethod("%*%", signature(x = "dgeMatrix", y = "dtpMatrix"), function(x, y) .Call(dgeMatrix_dtpMatrix_mm, x, y)) ## dtpMatrix <-> matrix : will be used by the "numeric" one setMethod("%*%", signature(x = "dtpMatrix", y = "matrix"), function(x, y) .Call(dtpMatrix_matrix_mm, x, y, FALSE, FALSE)) setMethod("%*%", signature(x = "matrix", y = "dtpMatrix"), function(x, y) ..2dge(x) %*% y) ## dtpMatrix <-> numeric : the auxiliary functions are R version specific! ##setMethod("%*%", signature(x = "dtpMatrix", y = "numeric"), .M.v) ##setMethod("%*%", signature(x = "numeric", y = "dtpMatrix"), .v.M) ## For multiplication operations, sparseMatrix overrides other method ## selections. Coerce a ddensematrix argument to a lsparseMatrix. setMethod("%*%", signature(x = "lsparseMatrix", y = "ldenseMatrix"), function(x, y) x %*% as(y, "sparseMatrix")) setMethod("%*%", signature(x = "ldenseMatrix", y = "lsparseMatrix"), function(x, y) as(x, "sparseMatrix") %*% y) ## and coerce lsparse* to lgC* setMethod("%*%", signature(x = "lsparseMatrix", y = "lsparseMatrix"), function(x, y) as(x, "lgCMatrix") %*% as(y, "lgCMatrix")) for(c.x in c("lMatrix", "nMatrix")) { setMethod("%*%", signature(x = c.x, y = "dMatrix"), function(x, y) as(x, "dMatrix") %*% y) setMethod("%*%", signature(x = "dMatrix", y = c.x), function(x, y) x %*% as(y, "dMatrix")) for(c.y in c("lMatrix", "nMatrix")) setMethod("%*%", signature(x = c.x, y = c.y), function(x, y) as(x, "dMatrix") %*% as(y, "dMatrix")) }; rm(c.x, c.y) setMethod("%*%", signature(x = "CsparseMatrix", y = "CsparseMatrix"), function(x, y) .Call(Csparse_Csparse_prod, x, y, boolArith=NA)) setMethod("%*%", signature(x = "CsparseMatrix", y = "ddenseMatrix"), function(x, y) .Call(Csparse_dense_prod, x, y, " ")) setMethod("%*%", signature(x = "CsparseMatrix", y = "matrix"), function(x, y) .Call(Csparse_dense_prod, x, y, " ")) # was x %*% Matrix(y) setMethod("%*%", signature(x = "CsparseMatrix", y = "numLike"), function(x, y) .Call(Csparse_dense_prod, x, y, " ")) setMethod("%*%", signature(x = "sparseMatrix", y = "matrix"), function(x, y) .Call(Csparse_dense_prod, as(x,"CsparseMatrix"), y, " ")) ## Not yet. Don't have methods for y = "CsparseMatrix" and general x #setMethod("%*%", signature(x = "ANY", y = "TsparseMatrix"), # function(x, y) callGeneric(x, as(y, "CsparseMatrix"))) setMethod("%*%", signature(x = "TsparseMatrix", y = "ANY"), function(x, y) .T.2.C(x) %*% y) setMethod("%*%", signature(x = "ANY", y = "TsparseMatrix"), function(x, y) x %*% .T.2.C(y)) setMethod("%*%", signature(x = "TsparseMatrix", y = "Matrix"), function(x, y) .T.2.C(x) %*% y) setMethod("%*%", signature(x = "Matrix", y = "TsparseMatrix"), function(x, y) x %*% .T.2.C(y)) setMethod("%*%", signature(x = "TsparseMatrix", y = "TsparseMatrix"), function(x, y) .T.2.C(x) %*% .T.2.C(y)) ##-------- Work via as(*, lgC) : ------------ ## For multiplication operations, sparseMatrix overrides other method ## selections. Coerce a ddensematrix argument to a nsparseMatrix. setMethod("%*%", signature(x = "nsparseMatrix", y = "ndenseMatrix"), function(x, y) x %*% as(y, "nsparseMatrix")) setMethod("%*%", signature(x = "ndenseMatrix", y = "nsparseMatrix"), function(x, y) as(x, "nsparseMatrix") %*% y) ## and coerce nsparse* to lgC* setMethod("%*%", signature(x = "nsparseMatrix", y = "nsparseMatrix"), function(x, y) as(x, "ngCMatrix") %*% as(y, "ngCMatrix")) ## x %*% y = t(crossprod(y, t(x))) unless when x is vector setMethod("%*%", signature(x = "ddenseMatrix", y = "CsparseMatrix"), function(x, y) .Call(Csparse_dense_crossprod, y, x, "B"), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "matrix", y = "CsparseMatrix"), function(x, y) .Call(Csparse_dense_crossprod, y, x, "B"), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "matrix", y = "sparseMatrix"), function(x, y) .Call(Csparse_dense_crossprod, as(y, "CsparseMatrix"), x, "B"), valueClass = "dgeMatrix") setMethod("%*%", signature(x = "numLike", y = "CsparseMatrix"), function(x, y) .Call(Csparse_dense_crossprod, y, x, "c"), valueClass = "dgeMatrix") ## "Matrix" ## Methods for operations where one argument is numeric setMethod("%*%", signature(x = "Matrix", y = "numLike"), .M.v) setMethod("%*%", signature(x = "numLike", y = "Matrix"), .v.M) setMethod("%*%", signature(x = "Matrix", y = "matrix"), function(x, y) x %*% Matrix(y)) setMethod("%*%", signature(x = "matrix", y = "Matrix"), function(x, y) Matrix(x) %*% y) ## bail-out methods in order to get better error messages .local.bail.out <- function (x, y) stop(gettextf('not-yet-implemented method for <%s> %%*%% <%s>', class(x), class(y)), domain=NA) setMethod("%*%", signature(x = "ANY", y = "Matrix"), .local.bail.out) setMethod("%*%", signature(x = "Matrix", y = "ANY"), .local.bail.out) ### sparseVector sp.x.sp <- function(x, y) Matrix(sum(x * y), 1L, 1L, sparse=FALSE) ## inner product -- no sense to return sparse! sp.X.sp <- function(x, y) { if((n <- length(x)) == length(y)) sp.x.sp(x,y) else if(n == 1L) spV2M(x, nrow = 1L, ncol = 1L, check = FALSE) %*% y else stop("non-conformable arguments") } v.X.sp <- function(x, y) { if((n <- length(x)) == length(y)) sp.x.sp(x,y) else if(n == 1L) matrix(x, nrow = 1L, ncol = 1L) %*% y else stop("non-conformable arguments") } setMethod("%*%", signature(x = "mMatrix", y = "sparseVector"), .M.v) setMethod("%*%", signature(x = "sparseVector", y = "mMatrix"), .v.M) setMethod("%*%", signature(x = "sparseVector", y = "sparseVector"), sp.X.sp) setMethod("%*%", signature(x = "sparseVector", y = "numLike"), sp.X.sp) setMethod("%*%", signature(x = "numLike", y = "sparseVector"), v.X.sp) ## setMethod("%*%", signature(x = "sparseMatrix", y = "sparseVector"), ## function(x, y) x %*% .sparseV2Mat(y)) ###--- II --- crossprod ----------------------------------------------------- setMethod("crossprod", signature(x = "dgeMatrix", y = "missing"), function(x, y = NULL, boolArith=NA, ...) { if(isTRUE(boolArith)) ## FIXME: very inefficient crossprod(as(x,"sparseMatrix"), boolArith=TRUE) else .Call(dgeMatrix_crossprod, x, FALSE) }) ## crossprod (x,y) setMethod("crossprod", signature(x = "dgeMatrix", y = "dgeMatrix"), function(x, y=NULL, boolArith=NA, ...) { if(isTRUE(boolArith)) ## FIXME: very inefficient crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dgeMatrix_dgeMatrix_crossprod, x, y, FALSE) }) setMethod("crossprod", signature(x = "dgeMatrix", y = "matrix"), function(x, y=NULL, boolArith=NA, ...) { if(isTRUE(boolArith)) ## FIXME: very inefficient crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dgeMatrix_matrix_crossprod, x, y, FALSE) }) setMethod("crossprod", signature(x = "dgeMatrix", y = "numLike"), function(x, y=NULL, boolArith=NA, ...) { if(isTRUE(boolArith)) crossprod(as(x,"sparseMatrix"), as(y,"sparseVector"), boolArith=TRUE) else .Call(dgeMatrix_matrix_crossprod, x, y, FALSE) }) setMethod("crossprod", signature(x = "matrix", y = "dgeMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(..2dge(x), y, boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "numLike", y = "dgeMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(cbind(as.double(x), deparse.level=0L), y, boolArith=boolArith, ...)) for(c.x in paste0(c("d", "l", "n"), "denseMatrix")) { setMethod("crossprod", signature(x = c.x, y = "missing"), function(x, y = NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient crossprod(as(x,"sparseMatrix"), boolArith=TRUE) else .Call(geMatrix_crossprod, x, FALSE)) for(c.y in c("matrix", paste0(c("d", "l", "n"), "denseMatrix"))) { setMethod("crossprod", signature(x = c.x, y = c.y), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(geMatrix_geMatrix_crossprod, x, y, FALSE)) } } ## setMethod("crossprod", signature(x = "dtrMatrix", y = "missing"), ## function(x, y = NULL, boolArith=NA, ...) ## crossprod(..2dge(x), boolArith=boolArith, ...)) ## "dtrMatrix" - remaining (uni)triangular if possible setMethod("crossprod", signature(x = "dtrMatrix", y = "dtrMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtrMatrix_dtrMatrix_mm, x, y, FALSE, TRUE)) setMethod("crossprod", signature(x = "dtrMatrix", y = "ddenseMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtrMatrix_matrix_mm, x, y, FALSE, TRUE)) setMethod("crossprod", signature(x = "dtrMatrix", y = "matrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtrMatrix_matrix_mm, x, y, FALSE, TRUE)) ## Not quite optimal, have unnecessary t(x) below: _FIXME_ setMethod("crossprod", signature(x = "matrix", y = "dtrMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtrMatrix_matrix_mm, y, t(x), TRUE, FALSE)) ## "dtpMatrix" if(FALSE) ## not yet in C setMethod("crossprod", signature(x = "dtpMatrix", y = "dtpMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtpMatrix_dtpMatrix_mm, x, y, FALSE, TRUE)) setMethod("crossprod", signature(x = "dtpMatrix", y = "ddenseMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtpMatrix_matrix_mm, x, y, FALSE, TRUE)) setMethod("crossprod", signature(x = "dtpMatrix", y = "matrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtpMatrix_matrix_mm, x, y, FALSE, TRUE)) ## "crossprod" methods too ... ## setMethod("crossprod", signature(x = "dgTMatrix", y = "missing"), ## function(x, y=NULL, boolArith=NA, ...) ## .Call(csc_crossprod, as(x, "dgCMatrix"))) ## setMethod("crossprod", signature(x = "dgTMatrix", y = "matrix"), ## function(x, y) ## .Call(csc_matrix_crossprod, as(x, "dgCMatrix"), y)) ##setMethod("crossprod", signature(x = "dgTMatrix", y = "numeric"), ## function(x, y) ## .Call(csc_matrix_crossprod, as(x, "dgCMatrix"), as.matrix(y))) ## setMethod("tcrossprod", signature(x = "dgTMatrix", y = "missing"), ## function(x, y=NULL, boolArith=NA, ...) ## .Call(csc_tcrossprod, as(x, "dgCMatrix"))) setMethod("crossprod", signature(x = "CsparseMatrix", y = "missing"), function(x, y = NULL, boolArith=NA, ...) .Call(Csparse_crossprod, x, trans = FALSE, triplet = FALSE, boolArith=boolArith)) setMethod("crossprod", signature(x = "CsparseMatrix", y = "CsparseMatrix"), function(x, y = NULL, boolArith = NA, ...) .Call(Csparse_Csparse_crossprod, x, y, trans = FALSE, boolArith=boolArith)) ## FIXME: Generalize the class of y. (?? still ??) setMethod("crossprod", signature(x = "CsparseMatrix", y = "ddenseMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(x, as(y,"sparseMatrix"), boolArith=TRUE) else .Call(Csparse_dense_crossprod, x, y, " ")) setMethod("crossprod", signature(x = "CsparseMatrix", y = "matrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(x, as(y,"sparseMatrix"), boolArith=TRUE) else .Call(Csparse_dense_crossprod, x, y, " ")) setMethod("crossprod", signature(x = "CsparseMatrix", y = "numLike"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(x, as(y,"sparseVector"), boolArith=TRUE) else .Call(Csparse_dense_crossprod, x, y, " ")) setMethod("crossprod", signature(x = "TsparseMatrix", y = "missing"), function(x, y = NULL, boolArith = NA, ...) .Call(Csparse_crossprod, x, trans = FALSE, triplet = TRUE, boolArith=boolArith)) setMethod("crossprod", signature(x = "TsparseMatrix", y = "ANY"), function(x, y = NULL, boolArith = NA, ...) crossprod(.T.2.C(x), y, boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "ANY", y = "TsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(x, .T.2.C(y), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "TsparseMatrix", y = "Matrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(.T.2.C(x), y, boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "Matrix", y = "TsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(x, .T.2.C(y), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "TsparseMatrix", y = "TsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(.T.2.C(x), .T.2.C(y), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "dsparseMatrix", y = "ddenseMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x, "CsparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(Csparse_dense_crossprod, as(x, "CsparseMatrix"), y, " ")) setMethod("crossprod", signature(x = "ddenseMatrix", y = "dgCMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x, "sparseMatrix"), y, boolArith=TRUE) else .Call(Csparse_dense_crossprod, y, x, "c")) setMethod("crossprod", signature(x = "ddenseMatrix", y = "dsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x, "sparseMatrix"), as(y, "CsparseMatrix"), boolArith=TRUE) else .Call(Csparse_dense_crossprod, as(y, "CsparseMatrix"), x, "c")) setMethod("crossprod", signature(x = "dgCMatrix", y = "dgeMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(x, as(y, "CsparseMatrix"), boolArith=TRUE) else .Call(Csparse_dense_crossprod, x, y, " ")) setMethod("crossprod", signature(x = "dsparseMatrix", y = "dgeMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x, "CsparseMatrix"), as(y, "CsparseMatrix"), boolArith=TRUE) else .Call(Csparse_dense_crossprod, as(x, "CsparseMatrix"), y, " ")) ## NB: there's already ## ("CsparseMatrix", "missing") and ("TsparseMatrix", "missing") methods ## infinite recursion: ## setMethod("crossprod", signature(x = "dgeMatrix", y = "dsparseMatrix"), ## function(x, y) crossprod(x, as(y, "dgCMatrix"))) setMethod("crossprod", signature(x = "lsparseMatrix", y = "ldenseMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(x, as(y, "sparseMatrix"), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "ldenseMatrix", y = "lsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(as(x, "sparseMatrix"), y, boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "lsparseMatrix", y = "lsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(as(x, "lgCMatrix"), as(y, "lgCMatrix"), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "nsparseMatrix", y = "ndenseMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(x, as(y, "sparseMatrix"), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "ndenseMatrix", y = "nsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(as(x, "sparseMatrix"), y, boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "nsparseMatrix", y = "nsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(as(x, "ngCMatrix"), as(y, "ngCMatrix"), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "ddenseMatrix", y = "CsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x, "CsparseMatrix"), y, boolArith=TRUE) else .Call(Csparse_dense_crossprod, y, x, "c")) setMethod("crossprod", signature(x = "matrix", y = "CsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x, "CsparseMatrix"), y, boolArith=TRUE) else .Call(Csparse_dense_crossprod, y, x, "c")) setMethod("crossprod", signature(x = "numLike", y = "CsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) crossprod(as(x, "sparseVector"), y, boolArith=TRUE) else .Call(Csparse_dense_crossprod, y, x, "c")) ## "Matrix" : cbind(), rbind() do names -> dimnames setMethod("crossprod", signature(x = "Matrix", y = "numLike"), function(x, y=NULL, boolArith=NA, ...) crossprod(x, cbind(y, deparse.level=0), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "numLike", y = "Matrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(cbind(x, deparse.level=0), y, boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "Matrix", y = "matrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(x, Matrix(y), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "matrix", y = "Matrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(Matrix(x), y, boolArith=boolArith, ...)) ## sparseVector setMethod("crossprod", signature(x = "mMatrix", y = "sparseVector"), function(x, y=NULL, boolArith=NA, ...) crossprod(x, if(nrow(x) == 1L) spV2M(y, nrow=1L, ncol=y@length, check=FALSE) else spV2M(y, nrow=y@length, ncol=1L, check=FALSE), boolArith=boolArith, ...)) setMethod("crossprod", signature(x = "sparseVector", y = "mMatrix"), function(x, y=NULL, boolArith=NA, ...) crossprod(spV2M(x, nrow = length(x), ncol = 1L, check = FALSE), y, boolArith=boolArith, ...)) sp.t.sp <- function(x, y=NULL, boolArith=NA, ...) Matrix(if(isTRUE(boolArith)) any(x & y) else sum(x * y), 1L, 1L, sparse=FALSE) ## inner product -- no sense to return sparse! sp.T.sp <- function(x, y=NULL, boolArith=NA, ...) { if((n <- length(x)) == length(y)) sp.t.sp(x,y, boolArith=boolArith, ...) else if(n == 1L) (if(isTRUE(boolArith)) `%&%` else `%*%`)( spV2M(x, nrow = 1L, ncol = 1L, check = FALSE), y) else stop("non-conformable arguments") } v.T.sp <- function(x, y=NULL, boolArith=NA, ...) { if((n <- length(x)) == length(y)) sp.t.sp(x,y, boolArith=boolArith, ...) else if(n == 1L) (if(isTRUE(boolArith)) `%&%` else `%*%`)(matrix(x, nrow = 1L, ncol = 1L), y) else stop("non-conformable arguments") } setMethod("crossprod", signature(x = "sparseVector", y = "sparseVector"), sp.T.sp) setMethod("crossprod", signature(x = "sparseVector", y = "numLike"), sp.T.sp) setMethod("crossprod", signature(x = "numLike", y = "sparseVector"), v.T.sp) setMethod("crossprod", signature(x = "sparseVector", y = "missing"), function(x, y=NULL, boolArith=NA, ...) sp.t.sp(x,x, boolArith=boolArith, ...)) ## Fallbacks -- symmetric LHS --> saving a t(.): ## {FIXME: want the method to be `%*%` -- but primitives are not allowed as methods} setMethod("crossprod", signature(x = "symmetricMatrix", y = "missing"), function(x,y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) x %&% x else x %*% x) setMethod("crossprod", signature(x = "symmetricMatrix", y = "Matrix"), function(x,y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) x %&% y else x %*% y) setMethod("crossprod", signature(x = "symmetricMatrix", y = "ANY"), function(x,y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) x %&% y else x %*% y) ## ## cheap fallbacks setMethod("crossprod", signature(x = "Matrix", y = "Matrix"), function(x, y=NULL, boolArith=NA, ...) { Matrix.msg(sprintf( "potentially suboptimal crossprod(\"%s\",\"%s\") as t(.) %s y", class(x), class(y), "%*%")) if(isTRUE(boolArith)) t(x) %&% y else t(x) %*% y }) setMethod("crossprod", signature(x = "Matrix", y = "missing"), function(x, y=NULL, boolArith=NA, ...) { Matrix.msg(paste0( "potentially suboptimal crossprod(<",class(x),">) as t(.) %*% . ")) if(isTRUE(boolArith)) t(x) %&% x else t(x) %*% x }) setMethod("crossprod", signature(x = "Matrix", y = "ANY"), function(x, y=NULL, boolArith=NA, ...) { Matrix.msg(sprintf( "potentially suboptimal crossprod(\"%s\", <%s>[=]) as t(.) %s y", class(x), class(y), "%*%")) if(isTRUE(boolArith)) t(x) %&% y else t(x) %*% y }) setMethod("crossprod", signature(x = "ANY", y = "Matrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) t(x) %&% y else t(x) %*% y) ###--- III --- tcrossprod --------------------------------------------------- setMethod("tcrossprod", signature(x = "dgeMatrix", y = "dgeMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dgeMatrix_dgeMatrix_crossprod, x, y, TRUE)) setMethod("tcrossprod", signature(x = "dgeMatrix", y = "matrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dgeMatrix_matrix_crossprod, x, y, TRUE)) setMethod("tcrossprod", signature(x = "dgeMatrix", y = "numLike"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), as(y,"sparseVector"), boolArith=TRUE) else .Call(dgeMatrix_matrix_crossprod, x, y, TRUE)) setMethod("tcrossprod", signature(x = "matrix", y = "dgeMatrix"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(..2dge(x), y, boolArith=boolArith, ...)) setMethod("tcrossprod", signature(x = "numLike", y = "dgeMatrix"), .v.Mt) setMethod("tcrossprod", signature(x = "dgeMatrix", y = "missing"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), boolArith=TRUE) else .Call(dgeMatrix_crossprod, x, TRUE)) for(c.x in paste0(c("d", "l", "n"), "denseMatrix")) { setMethod("tcrossprod", signature(x = c.x, y = "missing"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), boolArith=TRUE) else .Call(geMatrix_crossprod, x, TRUE)) for(c.y in c("matrix", paste0(c("d", "l", "n"), "denseMatrix"))) { setMethod("tcrossprod", signature(x = c.x, y = c.y), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x,"sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(geMatrix_geMatrix_crossprod, x, y, TRUE)) } } if(FALSE) { ## this would mask 'base::tcrossprod' setMethod("tcrossprod", signature(x = "matrix", y = "missing"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), boolArith=TRUE) else .Call(dgeMatrix_crossprod, ..2dge(x), TRUE)) setMethod("tcrossprod", signature(x = "numLike", y = "missing"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(cbind(as.double(x), deparse.level=0L), boolArith=boolArith, ...)) }# FALSE setMethod("tcrossprod", signature(x = "ddenseMatrix", y = "missing"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(as(x, "dgeMatrix"), boolArith=boolArith, ...)) setMethod("tcrossprod", signature(x = "dtrMatrix", y = "dtrMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtrMatrix_dtrMatrix_mm, y, x, TRUE, TRUE)) ## Must have 1st arg. = "dtrMatrix" in dtrMatrix_matrix_mm (): ## would need another way, to define tcrossprod() --- TODO? --- ## ## setMethod("tcrossprod", signature(x = "dtrMatrix", y = "ddenseMatrix"), ## function(x, y=NULL, boolArith=NA, ...) .Call(dtrMatrix_matrix_mm, y, x, TRUE, TRUE)) ###__ FIXME __ currently goes via geMatrix and loses triangularity !! ## setMethod("tcrossprod", signature(x = "dtrMatrix", y = "matrix"), ## function(x, y=NULL, boolArith=NA, ...) .Call(dtrMatrix_matrix_mm, y, x, TRUE, TRUE)) setMethod("tcrossprod", signature(x = "ddenseMatrix", y = "dtrMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtrMatrix_matrix_mm, y, x, TRUE, TRUE)) setMethod("tcrossprod", signature(x = "matrix", y = "dtrMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtrMatrix_matrix_mm, y, x, TRUE, TRUE)) if(FALSE) { ## TODO in C setMethod("tcrossprod", signature(x = "ddenseMatrix", y = "dtpMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtpMatrix_matrix_mm, y, x, TRUE, TRUE)) setMethod("tcrossprod", signature(x = "matrix", y = "dtpMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x, "sparseMatrix"), as(y,"sparseMatrix"), boolArith=TRUE) else .Call(dtpMatrix_matrix_mm, y, x, TRUE, TRUE)) }# FALSE setMethod("tcrossprod", signature(x = "CsparseMatrix", y = "CsparseMatrix"), function(x, y = NULL, boolArith = NA, ...) .Call(Csparse_Csparse_crossprod, x, y, trans = TRUE, boolArith=boolArith)) setMethod("tcrossprod", signature(x = "CsparseMatrix", y = "missing"), function(x, y = NULL, boolArith = NA, ...) .Call(Csparse_crossprod, x, trans = TRUE, triplet = FALSE, boolArith=boolArith)) for(dmat in c("ddenseMatrix", "matrix")) { setMethod("tcrossprod", signature(x = "CsparseMatrix", y = dmat), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(x, as(y,"CsparseMatrix"), boolArith=TRUE) else .Call(Csparse_dense_prod, x, y, "2")) setMethod("tcrossprod", signature(x = dmat, y = "CsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x,"CsparseMatrix"), y, boolArith=TRUE) else .Call(Csparse_dense_prod, y, x, "B")) } setMethod("tcrossprod", signature(x = "CsparseMatrix", y = "numLike"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(x, as(y,"sparseVector"), boolArith=TRUE) else .Call(Csparse_dense_prod, x, y, "2")) setMethod("tcrossprod", signature(x = "numLike", y = "CsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) ## ~== .v.Mt : if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x,"sparseVector"), y, boolArith=TRUE) else ## x or t(x) depending on dimension of y [checked inside C]: .Call(Csparse_dense_prod, y, x, "B")) ### -- xy' = (yx')' -------------------- tcr.dd.sC <- function(x, y=NULL, boolArith=NA, ...) { if(isTRUE(boolArith)) ## FIXME: very inefficient tcrossprod(as(x,"CsparseMatrix"), y, boolArith=TRUE) else .Call(Csparse_dense_prod, y, x, "c") } for(.sCMatrix in paste0(c("d", "l", "n"), "sCMatrix")) { ## speedup for *symmetric* RHS setMethod("tcrossprod", signature(x = "ddenseMatrix", y = .sCMatrix), tcr.dd.sC) setMethod("tcrossprod", signature(x = "matrix", y = .sCMatrix), tcr.dd.sC) } rm(dmat, .sCMatrix) setMethod("tcrossprod", signature(x = "TsparseMatrix", y = "missing"), function(x, y = NULL, boolArith = NA, ...) .Call(Csparse_crossprod, x, trans = TRUE, triplet = TRUE, boolArith=boolArith)) setMethod("tcrossprod", signature(x = "ANY", y = "TsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(x, .T.2.C(y), boolArith=boolArith, ...)) setMethod("tcrossprod", signature(x = "TsparseMatrix", y = "ANY"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(.T.2.C(x), y, boolArith=boolArith, ...)) setMethod("tcrossprod", signature(x = "Matrix", y = "TsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(x, .T.2.C(y), boolArith=boolArith, ...)) setMethod("tcrossprod", signature(x = "TsparseMatrix", y = "Matrix"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(.T.2.C(x), y, boolArith=boolArith, ...)) setMethod("tcrossprod", signature(x = "TsparseMatrix", y = "TsparseMatrix"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(.T.2.C(x), .T.2.C(y), boolArith=boolArith, ...)) ## "Matrix" setMethod("tcrossprod", signature(x = "Matrix", y = "numLike"), function(x, y=NULL, boolArith=NA, ...) (if(isTRUE(boolArith)) `%&%` else `%*%`)(x, rbind(y, deparse.level=0))) setMethod("tcrossprod", signature(x = "numLike", y = "Matrix"), .v.Mt) setMethod("tcrossprod", signature(x = "Matrix", y = "matrix"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(x, Matrix(y), boolArith=boolArith, ...)) setMethod("tcrossprod", signature(x = "matrix", y = "Matrix"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(Matrix(x), y, boolArith=boolArith, ...)) ## sparseVector ## NB: the two "sparseMatrix" are "unneeded", only used to avoid ambiguity warning setMethod("tcrossprod", signature(x = "sparseMatrix", y = "sparseVector"), .M.vt) setMethod("tcrossprod", signature(x = "mMatrix", y = "sparseVector"), .M.vt) setMethod("tcrossprod", signature(x = "sparseVector", y = "sparseMatrix"), .v.Mt) setMethod("tcrossprod", signature(x = "sparseVector", y = "mMatrix"), .v.Mt) setMethod("tcrossprod", signature(x = "sparseVector", y = "sparseVector"), function(x, y=NULL, boolArith=NA, ...) { if(isTRUE(boolArith)) .sparseV2Mat(x) %&% spV2M(y, nrow=1L, ncol=length(y), check=FALSE) else { if(!is.na(boolArith)) warning(gettextf("'boolArith = %d' not yet implemented", boolArith), domain=NA) .sparseV2Mat(x) %*% spV2M(y, nrow=1L, ncol=length(y), check=FALSE) } }) setMethod("tcrossprod", signature(x = "sparseVector", y = "missing"), ## could be speeded: spV2M(x, *) called twice with different ncol/nrow function(x, y=NULL, boolArith=NA, ...) { if(isTRUE(boolArith)) .sparseV2Mat(x) %&% spV2M(x, nrow=1L, ncol=length(x), check=FALSE) else { if(!is.na(boolArith)) warning(gettextf("'boolArith = %d' not yet implemented", boolArith), domain=NA) .sparseV2Mat(x) %*% spV2M(x, nrow=1L, ncol=length(x), check=FALSE) } }) setMethod("tcrossprod", signature(x = "numLike", y = "sparseVector"), function(x, y=NULL, boolArith=NA, ...) tcrossprod(x, .sparseV2Mat(y), boolArith=boolArith, ...)) setMethod("tcrossprod", signature(x = "sparseVector", y = "numLike"), function(x, y=NULL, boolArith=NA, ...) { if(isTRUE(boolArith)) .sparseV2Mat(x) %&% t(x) else { if(!is.na(boolArith)) warning(gettextf("'boolArith = %d' not yet implemented", boolArith), domain=NA) .sparseV2Mat(x) %*% t(x) } }) ## Fallbacks -- symmetric RHS --> saving a t(.): ## {FIXME: want the method to be `%*%` -- but primitives are not allowed as methods} setMethod("tcrossprod", signature(x = "Matrix", y = "symmetricMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) x %&% y else x %*% y) setMethod("tcrossprod", signature(x = "ANY", y = "symmetricMatrix"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) x %&% y else x %*% y) ## ## cheap fallbacks setMethod("tcrossprod", signature(x = "Matrix", y = "Matrix"), function(x, y=NULL, boolArith=NA, ...) { Matrix.msg(sprintf( "potentially suboptimal tcrossprod(\"%s\",\"%s\") as x %s t(y)", class(x), class(y), "%*%")) if(isTRUE(boolArith)) x %&% t(y) else x %*% t(y) }) setMethod("tcrossprod", signature(x = "Matrix", y = "missing"), function(x, y=NULL, boolArith=NA, ...) { Matrix.msg(paste0( "potentially suboptimal tcrossprod(<",class(x), ">) as . %*% t(.)")) if(isTRUE(boolArith)) x %&% t(x) else x %*% t(x) }) setMethod("tcrossprod", signature(x = "Matrix", y = "ANY"), function(x, y=NULL, boolArith=NA, ...) if(isTRUE(boolArith)) x %&% t(y) else x %*% t(y)) setMethod("tcrossprod", signature(x = "ANY", y = "Matrix"), function(x, y=NULL, boolArith=NA, ...) { Matrix.msg(sprintf( "potentially suboptimal tcrossprod(<%s>[=], \"%s\") as x %s t(y)", class(x), class(y), "%*%")) if(isTRUE(boolArith)) x %&% t(y) else x %*% t(y) }) ###--- IV --- %&% Boolean Matrix Products ---------------------------------- ## Goal: crossprod / tcrossprod with a 'boolArith' option: ## ---- boolArith = NA [default now] <==> boolean arithmetic if *both* matrices ## are pattern matrices ## boolArith = TRUE <==> boolean arithmetic: return n.CMatrix ## boolArith = FALSE [default later?] <==> numeric arithmetic even for pattern ## ## A %&% B <==> prod(..... boolArith = TRUE) ## A %*% B <==> now: prod(..... boolArith = NA) ## but later: prod(..... boolArith = FALSE) # <==> always numeric ## RFC: Should we introduce matprod(x, y, boolArith) as generalized "%*%" ## which also has all three boolArith options ? ## since %*% does not allow 'boolArith = FALSE' now, or 'boolArith = NA' later setMethod("%&%", signature(x = "ANY", y = "ANY"), function(x, y) as.matrix(x) %&% as.matrix(y)) setMethod("%&%", signature(x = "matrix", y = "ANY"), function(x, y) x %&% as.matrix(y)) setMethod("%&%", signature(x = "ANY", y = "matrix"), function(x, y) as.matrix(x) %&% y) setMethod("%&%", signature(x = "Matrix", y = "ANY"), function(x, y) x %&% as(y, "Matrix")) setMethod("%&%", signature(x = "ANY", y = "Matrix"), function(x, y) as(x, "Matrix") %&% y) ## catch all setMethod("%&%", signature(x = "mMatrix", y = "mMatrix"), function(x, y) as(x, "nMatrix") %&% as(y, "nMatrix")) setMethod("%&%", signature(x = "Matrix", y = "Matrix"), function(x, y) as(x, "nMatrix") %&% as(y, "nMatrix")) setMethod("%&%", signature(x = "mMatrix", y = "nMatrix"), function(x, y) as(x, "nMatrix") %&% y) setMethod("%&%", signature(x = "nMatrix", y = "mMatrix"), function(x, y) x %&% as(y, "nMatrix")) ## sparseVectors : sp.bx.sp <- function(x, y) Matrix(any(x & y), 1L, 1L, sparse=FALSE) sp.bX.sp <- function(x, y) { if((n <- length(x)) == length(y)) sp.bx.sp(x,y) else if(n == 1L) spV2M(x, nrow = 1L, ncol = 1L, check = FALSE) %&% y else stop("non-conformable arguments") } v.bX.sp <- function(x, y) { if((n <- length(x)) == length(y)) sp.bx.sp(x,y) else if(n == 1L) matrix(x, nrow = 1L, ncol = 1L) %&% y else stop("non-conformable arguments") } setMethod("%&%", signature(x = "mMatrix", y = "sparseVector"), function(x, y) x %&% `dim<-`(y, if(ncol(x) == (n <- length(y))) c(n, 1L) else c(1L, n))) setMethod("%&%", signature(x = "sparseVector", y = "mMatrix"), function(x, y) `dim<-`(x, if(nrow(y) == (n <- length(x))) c(1L, n) else c(n, 1L)) %&% y) setMethod("%&%", signature(x = "sparseVector", y = "sparseVector"), sp.bX.sp) setMethod("%&%", signature(x = "sparseVector", y = "numLike"), sp.bX.sp) setMethod("%&%", signature(x = "numLike", y = "sparseVector"), v.bX.sp) ## For now --- suboptimally!!! --- we coerce to nsparseMatrix always: setMethod("%&%", signature(x = "nMatrix", y = "nsparseMatrix"), function(x, y) as(x, "nsparseMatrix") %&% y) setMethod("%&%", signature(x = "nsparseMatrix", y = "nMatrix"), function(x, y) x %&% as(y, "nsparseMatrix")) setMethod("%&%", signature(x = "nMatrix", y = "nMatrix"), function(x, y) as(x, "nsparseMatrix") %&% as(y, "nsparseMatrix")) setMethod("%&%", signature(x = "nsparseMatrix", y = "nsparseMatrix"), function(x, y) .Call(Csparse_Csparse_prod, as(x,"CsparseMatrix"), as(y,"CsparseMatrix"), boolArith=TRUE)) setMethod("%&%", signature(x = "nsparseMatrix", y = "nCsparseMatrix"), function(x, y) .Call(Csparse_Csparse_prod, as(x,"CsparseMatrix"), y, boolArith=TRUE)) setMethod("%&%", signature(x = "nCsparseMatrix", y = "nsparseMatrix"), function(x, y) .Call(Csparse_Csparse_prod, x, as(y,"CsparseMatrix"), boolArith=TRUE)) setMethod("%&%", signature(x = "nCsparseMatrix", y = "nCsparseMatrix"), function(x, y) .Call(Csparse_Csparse_prod, x, y, boolArith=TRUE)) ## Local variables: ## mode: R ## page-delimiter: "^###---" ## End: Matrix/R/indMatrix.R0000644000176200001440000001702513153267746014024 0ustar liggesusers#### Index Matrices -- Coercion and Methods (--> ../man/indMatrix-class.Rd ) ## The typical 'constructor' : coerce from 'perm' setAs("integer", "indMatrix", function(from) new("indMatrix", Dim = c(length(from), max(from)), Dimnames = list(names(from), NULL), perm = from)) setAs("numeric", "indMatrix", function(from) if(all(from == (i <- as.integer(from)))) as(i, "indMatrix") else stop("coercion to \"indMatrix\" only works from integer numeric")) ## A constructor from a list giving the index ('perm') and the number of columns ## (need this for cases in which the value(s) represented by the last ## column(s) has no observations): .list2indMatrix <- function(from) { if(length(from) == 2 && all(from[[1]] == (i <- as.integer(from[[1]]))) && from[[2]] == (d <- as.integer(from[[2]])) && length(d) == 1 && d >= max(i)) { new("indMatrix", perm = i, Dim = c(length(i), d)) } else stop("coercion from list(i1,...,ik, d) to \"indMatrix\" failed. All entries must be integer valued and the number of columns, d, not smaller than the maximal index i*.") } setAs("list", "indMatrix", .list2indMatrix) setAs("indMatrix", "matrix", function(from) { fp <- from@perm r <- ldiag(n = from@Dim[2])[fp,] if(.has.DN(from)) dimnames(r) <- from@Dimnames r }) ## coerce to 0/1 sparse matrix, i.e. sparse pattern .ind2ngT <- function(from) { d <- from@Dim new("ngTMatrix", i = seq_len(d[1]) - 1L, j = from@perm - 1L, Dim = d, Dimnames = from@Dimnames) } setAs("indMatrix", "ngTMatrix", .ind2ngT) setAs("indMatrix", "TsparseMatrix", .ind2ngT) setAs("indMatrix", "nMatrix", .ind2ngT) setAs("indMatrix", "lMatrix", function(from) as(.ind2ngT(from), "lMatrix")) setAs("indMatrix", "dMatrix", function(from) as(.ind2ngT(from), "dMatrix")) setAs("indMatrix", "dsparseMatrix", function(from) as(from, "dMatrix")) setAs("indMatrix", "lsparseMatrix", function(from) as(from, "lMatrix")) setAs("indMatrix", "nsparseMatrix", .ind2ngT) setAs("indMatrix", "CsparseMatrix", function(from) as(.ind2ngT(from), "CsparseMatrix")) setAs("indMatrix", "ngeMatrix", function(from) as(.ind2ngT(from),"ngeMatrix")) setAs("nMatrix", "indMatrix", function(from) { from <- as(as(from, "TsparseMatrix"), "ngTMatrix") n <- (d <- from@Dim)[1] if(length(i <- from@i) != n) stop("the number of non-zero entries differs from nrow(.)") if((need.sort <- is.unsorted(i))) { ii <- sort.list(i) i <- i[ii] } if(n >= 1 && !identical(i, 0:(n - 1))) stop("must have exactly one non-zero entry per row") new("indMatrix", ## validity checking checks the 'perm' slot: perm = 1L + if(need.sort) from@j[ii] else from@j, Dim = d, Dimnames = from@Dimnames) }) setAs("matrix", "indMatrix", function(from) as(as(from, "nMatrix"), "indMatrix")) setAs("indMatrix", "matrix", function(from) as(.ind2ngT(from), "matrix")) setAs("sparseMatrix", "indMatrix", function(from) as(as(from, "nsparseMatrix"), "indMatrix")) setMethod("is.na", signature(x = "indMatrix"), is.na_nsp) setMethod("is.infinite", signature(x = "indMatrix"), is.na_nsp) setMethod("is.finite", signature(x = "indMatrix"), allTrueMatrix) setMethod("t", signature(x = "indMatrix"), function(x) t(.ind2ngT(x))) setMethod("isSymmetric", signature(object = "indMatrix"), function(object, ...) { d <- dim(object) if(d[1L] != d[2L]) FALSE else ## using "!=" (instead of "==") as the former is typically sparse !any(object != t(object)) }) setMethod("%*%", signature(x = "matrix", y = "indMatrix"), function(x, y) x %*% as(y, "lMatrix")) setMethod("%*%", signature(x = "Matrix", y = "indMatrix"), function(x, y) x %*% as(y, "lMatrix")) setMethod("%*%", signature(x = "indMatrix", y = "matrix"), function(x, y) { mmultCheck(x,y); y[x@perm ,] }) setMethod("%*%", signature(x = "indMatrix", y = "Matrix"), function(x, y) { mmultCheck(x,y); y[x@perm ,] }) setMethod("crossprod", signature(x = "indMatrix", y = "matrix"), function(x, y) as(t(x), "lMatrix") %*% y) setMethod("crossprod", signature(x = "indMatrix", y = "Matrix"), function(x, y) as(t(x), "lMatrix") %*% y) setMethod("crossprod", signature(x = "indMatrix", y = "indMatrix"), function(x, y) { mmultCheck(x,y, 2L) ## xy <- interaction(x@perm, y@perm) ## this is wrong if any of the columns in X or Y are empty because interaction() ## drops non-occuring levels from a non-factor. Explicitly defining a factor with ## levels 1:ncol() avoids that. nx <- x@Dim[2L] ny <- y@Dim[2L] ## xy <- interaction(factor(x@perm, levels=seq_len(nx)), ## factor(y@perm, levels=seq_len(ny))) ## much faster (notably for large x,y): xy <- x@perm + nx*as.double(y@perm-1L) Matrix(tabulate(xy, nbins = nx*ny), nrow = nx, ncol = ny, dimnames = list(x@Dimnames[[2L]], y@Dimnames[[2L]])) }) setMethod("tcrossprod", signature(x = "matrix", y = "indMatrix"), function(x, y) { mmultCheck(x,y, 3L); x[, y@perm] }) setMethod("tcrossprod", signature(x = "Matrix", y = "indMatrix"), function(x, y) { mmultCheck(x,y, 3L); x[, y@perm] }) setMethod("tcrossprod", signature(x = "indMatrix", y = "indMatrix"), function(x, y) { mmultCheck(x,y, 3L); x[, y@perm] }) setMethod("crossprod", signature(x = "indMatrix", y = "missing"), function(x, y=NULL) Diagonal(x = tabulate(x@perm, nbins=x@Dim[2L]))) setMethod("tcrossprod", signature(x = "indMatrix", y = "missing"), function(x, y=NULL) x[,x@perm]) setMethod("kronecker", signature(X = "indMatrix", Y = "indMatrix"), function (X, Y, FUN = "*", make.dimnames = FALSE, ...) { if (FUN != "*") stop("kronecker method must use default 'FUN'") if(any(as.double(X@Dim)*Y@Dim >= .Machine$integer.max)) stop("resulting matrix dimension would be too large") ## Explicitly defining a factor with levels 1:ncol(.) avoids that ## interaction() drops non-occuring levels when any of the ## columns in X or Y are empty: ## perm <- as.integer(interaction(factor(rep(X@perm, each =Y@Dim[1]), ## levels=seq_len(X@Dim[2])), ## factor(rep.int(Y@perm, times=X@Dim[1]), ## levels=seq_len(Y@Dim[2])), ## lex.order=TRUE)) ## much faster (notably for large X, Y): fX <- rep (X@perm-1L, each = Y@Dim[1]) fY <- rep.int(Y@perm-1L, times = X@Dim[1]) new("indMatrix", perm = 1L + fY + Y@Dim[2] * fX, Dim = X@Dim*Y@Dim) }) setMethod("[", signature(x = "indMatrix", i = "index", j = "missing", drop = "logical"), function (x, i, j, ..., drop) { n <- length(newperm <- x@perm[i]) if(drop && n == 1) { ## -> logical unit vector newperm == seq_len(x@Dim[2]) } else { ## stay matrix if(!is.null((DN <- x@Dimnames)[[1]])) DN[[1]] <- DN[[1]][i] new("indMatrix", perm = newperm, Dim = c(n, x@Dim[2]), Dimnames = DN) } }) .indMat.nosense <- function (x, i, j, ..., value) stop('replacing "indMatrix" entries is not allowed, as rarely sensible') setReplaceMethod("[", signature(x = "indMatrix", i = "index"), .indMat.nosense) setReplaceMethod("[", signature(x = "indMatrix", i = "missing", j = "index"), .indMat.nosense) ## explicit ^^^^^^^^^^^^ for disambiguation setReplaceMethod("[", signature(x = "indMatrix", i = "missing", j = "missing"), .indMat.nosense) ### rbind2() method: --> bind2.R Matrix/R/abIndex.R0000644000176200001440000005666012622367447013446 0ustar liggesusers#### Methods for the "abIndex" := ``abstract Index'' class ### Note: this partly builds on ideas and code from Jens Oehlschlaegel, ### ---- as implemented (in the GPL'ed part of) package 'ff'. ## Basic idea: a vector x of integer indices often has long stretches ## i, i+1, i+2, ... such that diff(x) has stretches of '1'. ## Now keep x[1] =: first and diff(x) =: d, ## and use rle() to encode d. Here, use a C version for rle() rleMaybe <- function(i, force = FALSE) { ## TODO: move all this to a new C fnc., still keeping the *_i() and *_d() if(is.na(force <- as.logical(force))) stop("'force' must be (coercable to) TRUE or FALSE") int <- is.integer(i) || is.logical(i) || { i. <- suppressWarnings(as.integer(i)) if(r <- isTRUE(all(is.na(i) | i. == i))) i <- i. r } ## if(int), 'i' will be coerced to integer on C level ##N R-devel codetools get FP again: ##N Matrix.rle <- if(int) Matrix_rle_i else Matrix_rle_d ##N .Call(Matrix.rle, i, force) if(int) Matrix_rle_d <- Matrix_rle_i .Call(Matrix_rle_d, i, force) } .rle <- function(lengths, values) structure(list(lengths = lengths, values = values), class = "rle") ##' @param x ##' ##' @return diff(x), giving '0' for 'Inf - Inf' or similar .diff <- function(x) { ## TODO: considerably faster in C if((n <- length(x)) <= 1) return(x[0]) r <- (x1 <- x[-1]) - (x2 <- x[-n]) if(any(ina <- is.na(r))) r[ina & (x1 == x2 | (is.na(x1) & is.na(x2)))] <- 0 r } ##' @param from: logical or numeric vector ##' ##' @return an "abIndex" vector, "semantically equivalent" to 'from' vec2abI <- function(from, force = FALSE) { ans <- new("abIndex") r <- rleMaybe(.diff(from), force=force)## .diff(): also work for rep(Inf, *) if(is.null(r)) { ## no "compression" ans@kind <- if(is.integer(from)) "int32" else "double" ans@x <- from } else { ans@kind <- "rleDiff" ## ans@x <- integer(0) # <- prototype does that ans@rleD <- new("rleDiff", first = from[1], rle = r) } ans } ## "abIndex" version of indDiag(n) === which(diag(n) == 1) -> ./Auxiliaries.R abIindDiag <- function(n) { ## cumsum(c(1L, rep.int(n+1L, n-1))) stopifnot((n <- as.integer(n)) >= 1) rl <- if(n == 1) .rle(n[0],n[0]) else .rle(n-1L, n+1L) new("abIndex", kind = "rleDiff", rleD = new("rleDiff", first = 1, rle = rl)) } ## "abIndex" version of indTri(n) ... --> ./Auxiliaries.R abIindTri <- function(n, upper = TRUE, diag = FALSE) { ## Indices of strict upper/lower triangular part ## == which(upper.tri(diag(n), diag=diag) or ## which(lower.tri(diag(n), diag=diag) -- but as abIndex stopifnot(length(n) == 1, n == (n. <- as.integer(n)), (n <- n.) >= 0) if(n <= 2) { vec2abI( if(n == 0) integer(0) else if(n == 1) { if(diag) 1L else integer(0) } else { ## n == 2 v <- if(upper) 3L else 2L if(diag) c(1L, v, 4L) else v }) } else { ## n >= 3 [also for n == 2 && diag (==TRUE)] : ## First, compute the 'diff(.)' of the result [fast, using integers] n. <- if(diag) n else n - 1L n1 <- n. - 1L tt <- if(diag) 2L else 3L mk1s <- function(n,m) as.vector(rbind(1L, n:m)) mks1 <- function(n,m) as.vector(rbind(n:m, 1L)) rl <- .rle(lengths= if(upper) mk1s(1L,n1) else mks1(n1,1L), values = if(upper) mks1(n, tt) else mk1s(tt, n)) frst <- if(diag) 1L else if(upper) n+1L else 2L new("abIndex", kind = "rleDiff", rleD = new("rleDiff", first = frst, rle = rl)) } } setAs("numeric", "abIndex", function(from) vec2abI(from)) setAs("logical", "abIndex", function(from) vec2abI(from)) setMethod("show", "rleDiff", function(object) { cat(sprintf(## first can be 'NULL' --> cannot use %g " RLE difference (class 'rleDiff'): first = %s, \"rle\":%s", format(object@first), if(length(rl <- object@rle)) "\n" else " ")) print(rl, prefix = " ") invisible(object) }) setMethod("show", "abIndex", function(object) { knd <- object@kind cat(sprintf( "Abstract Index vector (class 'abIndex') of length %.0f, kind \"%s\"\n", length(object), knd)) if(knd == "rleDiff") { ### FIXME: show something like this is equivalent to c(2:10, 13:34, ...) cat(" and slot \"rleD\":\n") show(object@rleD) } else { cat(" and \"x\" slot\n") show(object@x) } invisible(object) }) ##' Constructor of "abIndex" version of n:m ##' @param from ##' @param to ##' ##' @return an "abIndex" object semantically equivalent to from:to abIseq1 <- function(from = 1, to = 1) { stopifnot(length(from) == 1L, length(to) == 1L) to <- to - from new("abIndex", kind="rleDiff", rleD = new("rleDiff", first = as.integer(from), rle = .rle(lengths = abs(to),# <- double : maybe > .Machine$integer.max values = as.integer(sign(to))))) } ## an "abIndex" version of seq(), i.e. seq.default(): abIseq <- function(from = 1, to = 1, by = ((to - from)/(length.out - 1)), length.out = NULL, along.with = NULL) { if((One <- nargs() == 1L) && !missing(from)) { lf <- length(from) return(if(mode(from) == "numeric" && lf == 1L) abIseq1(1L, from) else if(lf) abIseq1(1L, lf) else new("abIndex")) } if(!missing(along.with)) { length.out <- length(along.with) if(One) return(if(length.out) abIseq1(1L, length.out) else new("abIndex")) } else if(!missing(length.out)) length.out <- ceiling(length.out) if(is.null(length.out)) if(missing(by)) abIseq1(from,to) else { # dealing with 'by' del <- to - from if(del == 0 && to == 0) return(as(to, "abIndex")) n <- del/by if(!(length(n) && is.finite(n))) { if(length(by) && by == 0 && length(del) && del == 0) return(as(from, "abIndex")) stop("invalid (to - from)/by in seq(.)") } if(n < 0L) stop("wrong sign in 'by' argument") if(n > .Machine$integer.max) stop("'by' argument is much too small") dd <- abs(del)/max(abs(to), abs(from)) if (dd < 100*.Machine$double.eps) return(from) n <- as.integer(n + 1e-7) x <- from + abIseq1(0L,n) * by ## correct for overshot because of fuzz -- FIXME: need pmin() for "abIndex": if(by > 0) pmin(x, to) else pmax(x, to) } else if(!is.finite(length.out) || length.out < 0L) stop("length must be non-negative number") else if(length.out == 0L) new("abIndex") else if (One) abIseq1(1L, length.out) else if(missing(by)) { # if(from == to || length.out < 2) by <- 1 if(missing(to)) to <- from + length.out - 1L if(missing(from)) from <- to - length.out + 1L if(length.out > 2L) if(from == to) rep2abI(from, length.out) ## rep.int(from, length.out) else c(as(from,"abIndex"), from + abIseq1(1L, length.out - 2L) * by, to) else as(c(from, to)[seq_len(length.out)],"abIndex") } else if(missing(to)) from + abIseq1(0L, length.out - 1L) * by else if(missing(from)) to - abIseq1(length.out - 1L, 0L) * by else stop("too many arguments") } ##' rep.int(x, times) " as abIndex " ##' @param x numeric vector ##' @param times integer (valued) scalar: the number of repetitions ##' ##' @return an "abIndex" vector rep2abI <- function(x, times) { r <- new("abIndex") if((n <- length(x)) == 0) return(r) if(n == 1) { # clear case for compression r@kind <- "rleDiff" rD <- new("rleDiff") rD@first <- x[1L] rD@rle <- .rle(lengths = times - 1L, values = 0L) r@rleD <- rD } else { ## n >= 2 .. check if compression is worth it: ## .. say if compression of x itself is worth {FIXME? optimal cutoff} rr <- rleMaybe(.diff(x)) if(is.null(rr)) { r@kind <- if(is.integer(x)) "int32" else "double" r@x <- rep.int(x, times) } else { r@kind <- "rleDiff" rD <- new("rleDiff") rD@first <- x[1L] Dx <- x[1L] - x[length(x)] N <- (length(rr$lengths) + 1L)*times rD@rle <- .rle(lengths = rep.int(c(rr$lengths, 1L), times)[-N], values = rep.int(c(rr$values, Dx), times)[-N]) r@rleD <- rD } } r } combine_rleD <- function(rleList, m = length(rleList)) { ## Combine list of "rleDiff"s into a new one -- for c(..) ## auxiliary (and main working horse) for c.abIndex() ### TODO: really should do this in C i1 <- unlist(lapply(rleList, slot, "first")) rles <- lapply(rleList, slot, "rle") ## the list of vectors of 'lengths' and 'values' : lens <- lapply(rles, `[[`, "lengths") vals <- lapply(rles, `[[`, "values") ## the 'ends' are needed for the "jump sizes" in between: ends2 <- function(x) # related to ends.rleD() above x@first + c(0, with(x@rle, sum(lengths*values))) ends <- unlist(lapply(rleList, ends2))[-c(1, 2*m)] ii <- 2L*seq_len(m - 1) d.ends <- ends[ii] - ends[ii-1L] ## llen1 <- unlist(lapply(lens, length)) + 1L ## n <- sum(llen1) n <- m + sum(lengths(lens, use.names=FALSE)) ## comb(): intersperse x2[[j]] between lis[[j] & lis[[j+1]] : comb <- function(lis, x2) unlist(mapply(c, lis, x2, SIMPLIFY=FALSE, USE.NAMES=FALSE)) n.len <- comb(lens, 1L)[-n] n.val <- comb(vals, c(d.ends,NA))[-n] new("rleDiff", first = i1[1], rle = .rle(lengths = n.len, values = n.val)) } ## {combine_rleD} ## For now -- S4 method on c(), i.e., setMethod("c", ...) ## seems "difficult", and this works "magically" ## when the first argument is an abIndex : c.abIndex <- function(...) { m <- length(list(...)) if(m <= 1) return(if(m == 0) new("abIndex") else as(..1, "abIndex")) ## else: have length m >= 2 labi <- lapply(list(...), as, Class = "abIndex") knd <- unlist(lapply(labi, slot, "kind")) ## Convention: Result kind should be the 'kind' of the first neq.k <- knd != (k1 <- knd[1]) if(any(neq.k)) { if(all(not.rD <- knd != "rleDiff")) { ## either "double" or "int32" .. using 'x' k1 <- "double" ## and it will just work to c(.) the 'x' slots } else { warning("c(,..) of different kinds, coercing all to 'rleDiff'") labi[not.rD] <- lapply(labi[not.rD], function(av) vec2abI(av@x, force=TRUE)) k1 <- "rleDiff" } } switch(k1, "rleDiff" = { new("abIndex", kind="rleDiff", rleD = combine_rleD(lapply(labi, slot, "rleD"), m)) }, "double" =, "int32" = { new("abIndex", kind = k1, x = do.call(c, lapply(labi, slot, "x"))) }) } setMethod("length", "abIndex", function(x) if(identical(x@kind, "rleDiff")) sum(x@rleD@rle$lengths)+ 1L else length(x@x)) abI2num <- function(from) { switch(from@kind, "rleDiff" = { x <- from@rleD ## as inverse.rle(): cumsum(c(x@first, rep.int(x@rle$values, x@rle$lengths))) }, "int32" =, "double" = from@x) } setAs("abIndex", "numeric", abI2num) setAs("abIndex", "vector", abI2num) setAs("abIndex", "integer", function(from) as.integer(abI2num(from))) ## for S3 lovers and back-compatibility: setMethod(as.integer, "abIndex", function(x) as.integer(abI2num(x))) setMethod(as.numeric, "abIndex", function(x) abI2num(x)) setMethod("as.vector", "abIndex", function(x, mode) as.vector(abI2num(x), mode)) ## Need max(), min(), all( == ) any( == ) ## ---> Groups "Summary" and "Compare" (maybe all "Ops") ## For that, we really need "[" and/or "rep"() methods -- TODO -- ## setMethod("[", signature(x = "abIndex", i = "index"), function (x, i, j, ..., drop) { switch(x@kind, "rleDiff" = { ## FIXME ## intIv() in ./sparseVector.R -- not memory-efficient (??) ## n <- length(x) ## ii <- intIv(i, n) ## ii : 1-based integer indices ## d <- x@rleD ## Now work with the equivalent of ## cumsum(c(d@first, rep.int(d@rle$values, d@rle$lengths))) stop("[i] is not yet implemented") }, "int32" =, "double" = ## as it's not rle-packed, can remain simple: x@x[i]) }) ##' Endpoints of all linear stretches -- auxiliary for range(.) ##' @param x an "rleDiff" object ##' ##' @return numeric vector of end points of all linear stretches of x. ends.rleD <- function(x) { rl <- x@rle stopifnot(length(lens <- rl$lengths) == length(vals <- rl$values)) cumsum(c(x@first, lens*vals)) } ##' Collapse or "uniquify" an 'rle' object, i.e., ##' 1) drop 'lengths' 0 parts ##' 2) *merge* adjacent parts where 'values' are the same ##' ##' @param x an "rle" object ##' ##' @return an "rle" object, a "unique" version of the input 'x' rleCollapse <- function(x) { ## TODO: faster (and simpler!) in C ## TODO(2): move this to 'R base' L <- x$lengths V <- x$values chng <- FALSE if((chng <- any(i0 <- L == 0))) { ## drop 0 'lengths' parts L <- L[!i0] ; V <- V[!i0] } ## FIXME: This is not elegant nor efficient: while(any(i0 <- diff(V) == 0)) { ## merge adjacent parts with same values if(!chng) chng <- TRUE ## fix one stretch (and repeat), starting at ii0 and total length 1+ li0 ii0 <- which.max(i0)# index of first TRUE li0 <- if((l0 <- length(i0)) <= ii0) 1 else which.min(!i0[ii0:l0]) stopifnot(li0 >= 1)## <- for now L[ii0] <- sum(L[ii0+(0:li0)]) ii <- -(ii0 + seq_len(li0)) L <- L[ii] V <- V[ii] } if(chng) { x$lengths <- L ; x$values <- V } x } ## {rleCollapse} setMethod("drop", "abIndex", function(x) { if(x@kind == "rleDiff") x@rleD@rle <- rleCollapse(x@rleD@rle) x }) ## Summary: { max, min, range, prod, sum, any, all } : ## have 'summGener1' := those without prod, sum setMethod("Summary", signature(x = "abIndex", na.rm = "ANY"), function(x, ..., na.rm) { switch(x@kind, "rleDiff" = { d <- x@rleD if(.Generic %in% c("range","min","max")) { callGeneric(ends.rleD(d), ..., na.rm=na.rm) } else { ## "sum", "prod" : switch(.Generic, "all" = { ## these often, but *not* always come in pairs ## en <- ends.rleD(d) ## so maybe it does not really help! stop("all() is not yet implemented") ## all(c(d@first, d@rle$values), ..., na.rm=na.rm) }, "any" = any(c(d@first, d@rle$values), ..., na.rm=na.rm), "sum" = { stop("sum() is not yet implemented") }, "prod"= { stop("prod() is not yet implemented") }) } }, "int32" =, "double" = callGeneric(x@x, ..., na.rm = na.rm) ) }) ### "Ops" := sub-groups "Arith", "Compare", and "Logic" ## ## For now (*), only "Arith" does make sense ## --> keep "Ops" undefined and define "Arith" : ## ---- ## (*) : TODO: logical <-> abIndex --> "Compare" etc as well setMethod("Ops", signature(e1 = "abIndex", e2 = "abIndex"), function(e1, e2) { .bail.out.2(.Generic, class(e1), class(e2)) }) setMethod("Ops", signature(e1 = "abIndex", e2 = "ANY"), function(e1, e2) { .bail.out.2(.Generic, class(e1), class(e2)) }) setMethod("Ops", signature(e1 = "ANY", e2 = "abIndex"), function(e1, e2) { .bail.out.2(.Generic, class(e1), class(e2)) }) setMethod("Arith", signature(e1 = "abIndex", e2 = "abIndex"), function(e1, e2) { l1 <- length(e1) l2 <- length(e2) mM <- range(l1,l2) stop("not yet implemented") ## FIXME ------------------ if(mM[1] != mM[2]) { ## lengths differ if(mM[1] %% mM[2] != 0) ## identical warning as in main/arithmetic.c warning("longer object length\n\tis not a multiple of shorter object length") if(l1 < l2) { } else { ## l1 > l2 } } switch(e1@kind, "rleDiff" = { }, "int32" =, "double" = { }) }) ## numLike = {numeric, logical}: setMethod("Arith", signature(e1 = "abIndex", e2 = "numLike"), function(e1, e2) { if(!length(e1)) return(e1) if(e1@kind != "rleDiff") { # no compression e1@x <- callGeneric(e1@x, e2) if(e1@kind != "double" && is.double(e1@x)) e1@kind <- "double" return(e1) } if(length(e2) == 1) { ## scalar if(is.na(e2)) return(rep2abI(e2, length(e1))) ## else 'e2' is not NA and scalar switch(.Generic, "+" =, "-" = { e1@rleD@first <- callGeneric(e1@rleD@first, e2) e1 }, "*" = { e1@rleD@first <- e1@rleD@first * e2 r <- e1@rleD@rle$values * e2 if(is0(e2) && all0(r)) { ## result all 0: collapse e1@rleD@rle$values <- r[1L] e1@rleD@rle$lengths <- sum(e1@rleD@rle$lengths) } else ## normal case e1@rleD@rle$values <- r e1 }, "/" = { if(is0(e2) ## division by 0 && length(unique(sign(ends.rleD(e1@rleD)))) > 1) { ## at least one subsequence contains 0, i.e., changes sign: warning("x / 0 for an x with sign-change\n no longer representable as 'rleDiff'") return(vec2abI(abI2num(e1) / 0)) } e1@rleD@first <- e1@rleD@first / e2 e1@rleD@rle$values <- e1@rleD@rle$values / e2 e1 }, "^" = { if(e2 == 1) e1 else vec2abI(abI2num(e1) ^ e2) }, "%%" = , "%/%" = vec2abI(callGeneric(abI2num(e1), e2))) } else ## length(e2) != 1 callGeneric(e1, as(e2, "abIndex")) }) setMethod("Arith", signature(e1 = "numLike", e2 = "abIndex"), function(e1, e2) { if(!length(e2)) return(e2) if(e2@kind != "rleDiff") { # no compression e2@x <- callGeneric(e1, e2@x) if(e2@kind != "double" && is.double(e2@x)) e2@kind <- "double" return(e2) } if(length(e1) == 1) { ## scalar if(is.na(e1)) return(rep2abI(e1, length(e2))) ## else 'e1' is not NA and scalar switch(.Generic, "+" = { e2@rleD@first <- e1 + e2@rleD@first e2 }, "-" = { e2@rleD@first <- e1 - e2@rleD@first e2@rleD@rle$values <- -e2@rleD@rle$values e2 }, "*" = { e2@rleD@first <- e1 * e2@rleD@first r <- e1 * e2@rleD@rle$values if(is0(e1) && all0(r)) { ## result all 0: collapse e2@rleD@rle$values <- r[1L] e2@rleD@rle$lengths <- sum(e2@rleD@rle$lengths) } else ## normal case e2@rleD@rle$values <- r e2 }, "/" = , "^" =, "%%" = , "%/%" = vec2abI(callGeneric(e1, abI2num(e2)))) } else ## length(e1) != 1 callGeneric(as(e1, "abIndex"), e2) }) setMethod("is.na", signature(x = "abIndex"), function(x) { if(x@kind != "rleDiff") is.na(x@x) else { rd <- x@rleD rl <- rd@rle len <- 1+ sum(L <- rl$lengths) if(is.na(rd@first)) rep.int(TRUE, len) else { ## interesting case V <- rl$values if(!any(ina <- is.na(V))) rep.int(FALSE, len) else { ## at least one V is NA --> "x" is NA from then on: k <- match(TRUE,ina) # the first one l1 <- 1+ sum(L[seq_len(k-1)]) c(rep.int(FALSE, l1), rep.int(TRUE, len - l1)) } } } }) ## TODO ?? "is.nan" analogously ?? ## setMethod("is.finite", signature(x = "abIndex"), function(x) { if(x@kind != "rleDiff") is.finite(x@x) else { rd <- x@rleD rl <- rd@rle len <- 1+ sum(L <- rl$lengths) if(!is.finite(rd@first)) rep.int(FALSE, len) else { ## interesting case V <- rl$values if(all(iFin <- is.finite(V))) rep.int(TRUE, len) else { ## at least one V is +- Inf --> "x" is Inf/NaN from there k <- match(FALSE,iFin) # the first non-finite one l1 <- 1+ sum(L[seq_len(k-1)]) c(rep.int(TRUE, l1), rep.int(FALSE, len - l1)) } } } }) setMethod("is.infinite", signature(x = "abIndex"), function(x) { if(x@kind != "rleDiff") is.infinite(x@x) else { rd <- x@rleD rl <- rd@rle len <- 1+ sum(L <- rl$lengths) if(is.infinite(rd@first)) rep.int(TRUE, len) else { ## interesting case V <- rl$values if(!any(iInf <- is.infinite(V))) rep.int(FALSE, len) else { ## at least one V is +- Inf --> "x" is Inf/NaN from there k <- match(TRUE,iInf) # the first one l1 <- 1+ sum(L[seq_len(k-1)]) ## FIXME? do *not* consider 'NaN' (changing TRUE to FALSE): c(rep.int(FALSE, l1), rep.int(TRUE, len - l1)) } } } }) all.equal.abI <- function(target, current, ...) { if(!is(target, "abIndex") || !is(current, "abIndex")) return(paste0("target is ", data.class(target), ", current is ", data.class(current))) lt <- length(target) lc <- length(current) if(lt != lc) paste0("abIndex", ": lengths (", lt, ", ", lc, ") differ") else if(target@kind == current@kind) { all.equal.default(target, current, ...) } else ## different 'kinds' -- take "easy" exit: all.equal(abI2num(target), abI2num(current), ...) } ## {all.equal.abI} setMethod("all.equal", c(target = "abIndex", current = "abIndex"), all.equal.abI) setMethod("all.equal", c(target = "abIndex", current = "numLike"), function(target, current, ...) all.equal.abI(target, as(current, "abIndex"), ...)) setMethod("all.equal", c(target = "numLike", current = "abIndex"), function(target, current, ...) all.equal.abI(as(target, "abIndex"), current, ...)) ## Then I want something like get.ind.sel(.) [ ./Tsparse.R ] working, ## i.e. possibly match(i, , nomatch = 0) setAs("seqMat", "numeric", function(from) { do.call(c, lapply(seq_len(ncol(from)), function(j) seq(from=from[1L,j], to = from[2L,j]))) }) setAs("numeric", "seqMat", function(from) as(as(from, "abIndex"), "seqMat")) setAs("abIndex", "seqMat", function(from) { n <- length(from) d <- from@rleD va <- d@rle$values le <- d@rle$lengths m <- length(le) ## Now work the 'ends' are cumsum(c(d@first, le * va)) ## we need to care for the "length 1" stretches: if(any(nonPair <- le[2* seq_len(m2 <- m %/% 2)] != 1)) { m2 + n + va + nonPair # <- "dummy" using "unused" ## an "easy" (but not so efficient when 'm' is "large") ## way would be to "make these" into pairs, then work for that case... } ## use ~/R/MM/Pkg-ex/Matrix/abIndex-experi.R for trying things ... stop(" --> is not yet implemented") }) setAs("seqMat", "abIndex", function(from) { stop(" --> is not yet implemented") }) Matrix/R/dgTMatrix.R0000644000176200001440000001641012445374135013757 0ustar liggesusers## Now in ./Tsparse.R ## setAs("dgTMatrix", "dgCMatrix", ## function(from) .Call(Tsparse_to_Csparse, from, FALSE) ## ) setAs("dgTMatrix", "dgeMatrix", function(from) .Call(dgTMatrix_to_dgeMatrix, from)) setAs("dgTMatrix", "matrix", function(from) .Call(dgTMatrix_to_matrix, from)) setAs("dgeMatrix", "dgTMatrix", function(from) as(as(from, "dgCMatrix"), "dgTMatrix")) if(FALSE) ## special case, relatively ugly, needed ?? setAs("dgTMatrix", "dsCMatrix", function(from) { if (!isSymmetric(from)) stop("cannot coerce non-symmetric \"dgTMatrix\" to \"dsCMatrix\" class") upper <- from@i <= from@j uC <- as(new("dgTMatrix", Dim = from@Dim, Dimnames = from@Dimnames, i = from@i[upper], j = from@j[upper], x = from@x[upper]), "dgCMatrix") new("dsCMatrix", Dim = uC@Dim, p = uC@p, i = uC@i, x = uC@x, uplo = "U") }) ## This is faster: setAs("dgTMatrix", "dtCMatrix", function(from) { if(!(iTri <- isTriangular(from))) stop("the matrix is not triangular") ## else stopifnot(is.character(uplo <- attr(iTri, "kind"))) .Call(Tsparse_to_tCsparse, from, uplo, "N") }) setAs("dgTMatrix", "dtTMatrix", function(from) check.gT2tT(from, toClass = "dtTMatrix", do.n=FALSE)) setAs("dgTMatrix", "triangularMatrix", function(from) check.gT2tT(from, toClass = "dtTMatrix", do.n=FALSE)) setAs("dgTMatrix", "dsTMatrix", function(from) check.gT2sT(from, toClass = "dsTMatrix", do.n=FALSE)) setAs("dgTMatrix", "symmetricMatrix", function(from) check.gT2sT(from, toClass = "dsTMatrix", do.n=FALSE)) mat2dgT <- function(from) { x <- as.double(from) nz <- isN0(x) new("dgTMatrix", Dim = dim(from), i = row(from)[nz] - 1L, j = col(from)[nz] - 1L, x = x[nz]) } setAs("matrix", "dgTMatrix", mat2dgT) ## "[" methods are now in ./Tsparse.R ## "[<-" methods { setReplaceMethod()s } too ... setMethod("image", "dgTMatrix", ## *The* real one function(x, xlim = c(1, di[2]), ylim = c(di[1], 1), aspect = "iso", sub = sprintf("Dimensions: %d x %d", di[1], di[2]), xlab = "Column", ylab = "Row", cuts = 15, useRaster = FALSE, useAbs = NULL, colorkey = !useAbs, col.regions = NULL, lwd = NULL, ...) { ## 'at' can remain missing and be passed to levelplot di <- x@Dim xx <- x@x if(missing(useAbs)) ## use abs() when all values are non-neg useAbs <- min(xx, na.rm=TRUE) >= 0 else if(useAbs) xx <- abs(xx) rx <- range(xx, finite=TRUE) ## FIXME: make use of 'cuts' now ## and call levelplot() with 'at = ', making sure 0 is included and matching ## *exactly* - rather than approximately if(is.null(col.regions)) col.regions <- if(useAbs) { grey(seq(from = 0.7, to = 0, length = 100)) } else { ## no abs(.), rx[1] < 0 nn <- 100 n0 <- min(nn, max(0, round((0 - rx[1])/(rx[2]-rx[1]) * nn))) col.regions <- c(colorRampPalette(c("blue3", "gray80"))(n0), colorRampPalette(c("gray75","red3"))(nn - n0)) } if(!is.null(lwd) && !(is.numeric(lwd) && all(lwd >= 0))) # allow lwd=0 stop("'lwd' must be NULL or non-negative numeric") stopifnot(length(xlim) == 2, length(ylim) == 2) ## ylim: the rows count from top to bottom: ylim <- sort(ylim, decreasing=TRUE) if(all(xlim == round(xlim))) xlim <- xlim+ c(-.5, +.5) if(all(ylim == round(ylim))) ylim <- ylim+ c(+.5, -.5) # decreasing! levelplot(x@x ~ (x@j + 1L) * (x@i + 1L), sub = sub, xlab = xlab, ylab = ylab, xlim = xlim, ylim = ylim, aspect = aspect, colorkey = colorkey, col.regions = col.regions, cuts = cuts, par.settings = list(background = list(col = "transparent")), panel = if(useRaster) panel.levelplot.raster else function(x, y, z, subscripts, at, ..., col.regions) { ## a trimmed down version of lattice::panel.levelplot x <- as.numeric(x[subscripts]) y <- as.numeric(y[subscripts]) ## FIXME: use level.colors() here and 'at' from above -- ## ----- look at 'zcol' in panel.levelplot() numcol <- length(at) - 1 num.r <- length(col.regions) col.regions <- if (num.r <= numcol) rep_len(col.regions, numcol) else col.regions[1+ ((1:numcol-1)*(num.r-1)) %/% (numcol-1)] zcol <- rep.int(NA_integer_, length(z)) for (i in seq_along(col.regions)) zcol[!is.na(x) & !is.na(y) & !is.na(z) & at[i] <= z & z < at[i+1]] <- i zcol <- zcol[subscripts] if (any(subscripts)) { ## the line-width used in grid.rect() inside ## levelplot()'s panel for the *border* of the ## rectangles: levelplot()panel has lwd=1e-5: ## Here: use smart default ! if(is.null(lwd)) { wh <- grid::current.viewport()[c("width", "height")] ## wh : current viewport dimension in pixel wh <- c(grid::convertWidth(wh$width, "inches", valueOnly=TRUE), grid::convertHeight(wh$height, "inches", valueOnly=TRUE)) * par("cra") / par("cin") pSize <- wh/di ## size of one matrix-entry in pixels pA <- prod(pSize) # the "area" p1 <- min(pSize) lwd <- ## crude for now if(p1 < 2 || pA < 6) 0.01 # effectively 0 else if(p1 >= 4) 1 else if(p1 > 3) 0.5 else 0.2 ## browser() Matrix.msg("rectangle size ", paste(round(pSize,1), collapse=" x "), " [pixels]; --> lwd :", formatC(lwd)) } else stopifnot(is.numeric(lwd), all(lwd >= 0)) # allow 0 grid.rect(x = x, y = y, width = 1, height = 1, default.units = "native", gp = gpar(fill = col.regions[zcol], lwd = lwd, col = if(lwd < .01) NA)) } }, ...) }) ## Uses the triplet convention of *adding* entries with same (i,j): setMethod("+", signature(e1 = "dgTMatrix", e2 = "dgTMatrix"), function(e1, e2) { dimCheck(e1, e2) new("dgTMatrix", i = c(e1@i, e2@i), j = c(e1@j, e2@j), x = c(e1@x, e2@x), Dim = e1@Dim) }) ## setMethod("writeHB", signature(obj = "dgTMatrix"), ## function(obj, file, ...) callGeneric(as(obj, "CsparseMatrix"), file, ...)) Matrix/R/ngTMatrix.R0000644000176200001440000000537012507220173013763 0ustar liggesusers#### Nonzero Pattern Sparse Matrices in triplet format ### contains = "nsparseMatrix" ### ============= ---> superclass methods in ./nsparseMatrix.R setAs("ngTMatrix", "lgeMatrix", function(from) .Call(lgTMatrix_to_lgeMatrix, as(from,"lgTMatrix"))) setAs("ngTMatrix", "ngeMatrix", function(from) as(as(from, "lgeMatrix"), "nMatrix")) setAs("ngTMatrix", "generalMatrix", function(from) as(from, "ngeMatrix")) setAs("ngTMatrix", "matrix", function(from) .Call(lgTMatrix_to_matrix, as(from, "lgTMatrix"))) ## setAs("ngTMatrix", "matrix", # go via fast C code: ## function(from) as(as(from, "ngCMatrix"), "matrix")) setAs("matrix", "ngTMatrix", function(from) { if(!is.logical(from)) storage.mode(from) <- "logical" if(anyNA(from)) stop("cannot coerce 'NA's to \"nsparseMatrix\"") dn <- dimnames(from) if(is.null.DN(dn)) dn <- list(NULL,NULL) else dimnames(from) <- NULL # such that which(.) does not see any: ij <- which(from, arr.ind = TRUE, useNames = FALSE) - 1L if(length(ij) == 0) ij <- matrix(ij, 0, 2) new("ngTMatrix", i = ij[,1], j = ij[,2], Dim = as.integer(dim(from)), Dimnames = dn) }) setAs("matrix", "nMatrix", function(from) as(from, "ngTMatrix")) setAs("ngTMatrix", "dgTMatrix", function(from) ## more efficient than ## as(as(as(sM, "ngCMatrix"), "dgCMatrix"), "dgTMatrix") new("dgTMatrix", i = from@i, j = from@j, x = rep.int(1, length(from@i)), ## cannot copy factors, but can we use them? Dim = from@Dim, Dimnames= from@Dimnames)) setAs("ngTMatrix", "dMatrix", function(from) as(from, "dgTMatrix")) setAs("ngTMatrix", "dsparseMatrix", function(from) as(from, "dgTMatrix")) setAs("ngTMatrix", "lgTMatrix", function(from) new("lgTMatrix", i = from@i, j = from@j, x = rep.int(TRUE, length(from@i)), ## cannot copy factors, but can we use them? Dim = from@Dim, Dimnames= from@Dimnames)) setAs("ngTMatrix", "lMatrix", function(from) as(from, "lgTMatrix")) setAs("ngTMatrix", "triangularMatrix", function(from) check.gT2tT(from, toClass = "ntTMatrix", do.n=TRUE)) setAs("ngTMatrix", "ntTMatrix", function(from) check.gT2tT(from, toClass = "ntTMatrix", do.n=TRUE)) setAs("ngTMatrix", "symmetricMatrix", function(from) check.gT2sT(from, toClass = "nsTMatrix", do.n=TRUE)) ## We favor coercion to super-classes, here, "symmetricMatrix" ## setAs("ngTMatrix", "nsTMatrix", ## function(from) check.gT2sT(from, toClass = "nsTMatrix", do.n=TRUE)) if(FALSE) ## unneeded: use t. setMethod("t", signature(x = "ngTMatrix"), function(x) new("ngTMatrix", i = x@j, j = x@i, Dim = x@Dim[2:1], Dimnames= x@Dimnames[2:1]), valueClass = "ngTMatrix") Matrix/R/condest.R0000644000176200001440000003234112070371667013515 0ustar liggesusers#### This is a "translation" of GNU octave's #### ~/src/octave-3.2.4/scripts/linear-algebra/condest.m #### and ~/src/octave-3.2.4/scripts/linear-algebra/onenormest.m #### which have identical copyright and references (see below): #### ##__\begin{copyright clause}______________________________________________ ## Copyright (C) 2007, 2008, 2009 Regents of the University of California ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or (at ## your option) any later version. ## ## Octave is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, see ## . ## Code originally licensed under ## ## Copyright (c) 2007, Regents of the University of California ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions ## are met: ## ## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. ## ## * Redistributions in binary form must reproduce the above ## copyright notice, this list of conditions and the following ## disclaimer in the documentation and/or other materials provided ## with the distribution. ## ## * Neither the name of the University of California, Berkeley nor ## the names of its contributors may be used to endorse or promote ## products derived from this software without specific prior ## written permission. ## ## THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' ## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ## PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## Author: Jason Riedy ## Keywords: linear-algebra norm estimation ## Version: 0.2 ##__\end{copyright clause}________________________________________________ condest <- function(A, t = min (n, 5), normA = norm(A, "1"), silent = FALSE, quiet = TRUE) { ## Octave has further optional args and "calling sequences" ## may be implement at a later time point ## if(length(d <- dim(A)) != 2 || (n <- d[1]) != d[2]) stop("'A' must be a square matrix") luA <- lu(A) i.n <- seq_len(n) isSparse <- is(A, "sparseMatrix") if(isSparse) { ### FIXME: if A is not a Matrix, but already a "CHMfactor" as resulting from ### Cholesky() , then we can procede more efficiently , notably ### because of the solve(A, b, system = ".*") options ! ## luA = "sparseLU": slots (L, U, p,q, Dim); ## expand(luA) == list(P, L, U, Q) <----> A = P' L U Q ## where P A == A[p +1,] and A Q' == A[, q +1] ## <==> A^(-1) x = Q' U^-1 L^-1 P x = Q'y ## and A^(-T) x =(Q' U^-1 L^-1 P)' x = P' L^-T U^-T Q x = P'z q. <- q.i <- luA@q + 1L; q.i[q.i] <- i.n p. <- p.i <- luA@p + 1L; p.i[p.i] <- i.n ## q.i := inv(q.) & p.i := inv(p.), the inverse permutations Ut <- t(luA@U) Lt <- t(luA@L) f.solve <- function(x) solve(luA@U, solve(luA@L, x[p.,]))[q.i,] f.solve_t <- function(x) solve(Lt, solve(Ut, x[q.,]))[p.i,] ##Oct [L, U, P, Pc] = lu (A); ##Oct solve = @(x) Pc' * (U \ (L \ (P * x))); ##Oct solve_t = @(x) P' * (L' \ (U' \ (Pc * x))); } else { ## luA is "denseLU" : e.A <- expand(luA) ## == list(L, U, P), where A = PLU p. <- p.i <- luA@perm; p.i[p.i] <- i.n ## p.i := inv(p.), the inverse permutation Ut <- t(e.A$U) Lt <- t(e.A$L) ## A = PLU <--> A^{-1} x = U^-1 L^-1 P x ## A^{-T} x = (U^-1 L^-1 P)' x = P' L^-T U^-T x = P'z f.solve <- function(x) solve(e.A$U, solve(e.A$L, x[p.,])) f.solve_t <- function(x) solve(Lt, solve(Ut, x))[p.i,] ##Oct [L, U, P] = lu (A); ##Oct solve = @(x) U \ (L \ (P*x)); ##Oct solve_t = @(x) P' * (L' \ (U' \ x)); } n1.res <- ## onenormest (A^{-1}, t=t) -- of course,that's *NOT* what we want onenormest (A.x = f.solve, At.x = f.solve_t, t=t, n=n, quiet=quiet, silent=silent) ## [Ainv_norm, v, w] = onenormest (solve, solve_t, n, t); w <- n1.res[["w"]] list(est = normA * n1.res[["est"]], v = w / sum(abs(w))) # sum(|w|) = norm(w, "1") } ## %!demo ## %! N = 100; ## %! A = randn (N) + eye (N); ## %! condest (A) ## %! [L,U,P] = lu (A); ## %! condest (A, @(x) U\ (L\ (P*x)), @(x) P'*(L'\ (U'\x))) ## %! condest (@(x) A*x, @(x) A'*x, @(x) U\ (L\ (P*x)), @(x) P'*(L'\ (U'\x)), N) ## %! norm (inv (A), 1) * norm (A, 1) ### Yes, these test bounds are really loose. There's ### enough randomization to trigger odd cases with hilb(). ## %!test ## %! N = 6; ## %! A = hilb (N); ## %! cA = condest (A); ## %! cA_test = norm (inv (A), 1) * norm (A, 1); ## %! assert (cA, cA_test, -2^-8); ## %!test ## %! N = 6; ## %! A = hilb (N); ## %! solve = @(x) A\x; solve_t = @(x) A'\x; ## %! cA = condest (A, solve, solve_t); ## %! cA_test = norm (inv (A), 1) * norm (A, 1); ## %! assert (cA, cA_test, -2^-8); ## %!test ## %! N = 6; ## %! A = hilb (N); ## %! apply = @(x) A*x; apply_t = @(x) A'*x; ## %! solve = @(x) A\x; solve_t = @(x) A'\x; ## %! cA = condest (apply, apply_t, solve, solve_t, N); ## %! cA_test = norm (inv (A), 1) * norm (A, 1); ## %! assert (cA, cA_test, -2^-6); ## %!test ## %! N = 12; ## %! A = hilb (N); ## %! [rcondA, v] = condest (A); ## %! x = A*v; ## %! assert (norm(x, inf), 0, eps); ##------------ onenormest ------------------------------------------ onenormest <- function(A, t = min(n, 5), A.x, At.x, n, silent = FALSE, quiet = silent, iter.max = 10, eps = 4* .Machine$double.eps) { mi.A <- missing(A) mi.A.x <- missing(A.x) mi.At.x <- missing(At.x) no.A.x <- mi.A.x || !is.function(A.x) no.At.x <- mi.At.x || !is.function(At.x) if(mi.A && (no.A.x || no.At.x)) stop("must either specify 'A' or the functions 'A.x' and 'At.x'") if(!mi.A && (!mi.A.x || !mi.At.x)) warning("when 'A' is specified, 'A.x' and 'At.x' are disregarded") if(mi.A) { stopifnot(is.numeric(n), length(n) == 1, n == round(n), n >= 0) } else { ## using 'A' if(length(d <- dim(A)) != 2 || (n <- d[1]) != d[2]) stop("'A' must be a square matrix") rm(d) } stopifnot(is.numeric(t), length(t) == 1, t >= 1, iter.max >= 1) ## Initial test vectors X. X <- matrix(runif(n*t), n,t) # X = rand (n, t); ## scale X to have column sums == 1 : X <- X / rep(colSums(X), each=n) ## Track if a vertex has been visited. been_there <- logical(n) # zeros (n, 1); I.t <- diag(nrow = t) ## To check if the estimate has increased. est_old <- 0 ## Normalized vector of signs. S <- matrix(0, n, t) for(iter in 1:(iter.max + 1)) { Y <- if(mi.A) A.x(X) else A %*% X ## is n x t ## Find the initial estimate as the largest A*x. ## [est, imax] = max (sum (abs (Y), 1)) imax <- which.max(cY <- colSums(abs(Y))) est <- cY[imax] if (est > est_old || iter == 2) w <- Y[, imax] if (iter >= 2 && est < est_old) { ## No improvement, so stop. est <- est_old break } est_old <- est S_old <- S if (iter > iter.max) { ## Gone too far. Stop. if(!silent) warning(gettextf("not converged in %d iterations", iter.max), domain = NA) break } S <- sign (Y) ## n x t ## Test if any of S are approximately parallel to previous S ## vectors or current S vectors. If everything is parallel, ## stop. Otherwise, replace any parallel vectors with ## rand{-1,+1}. partest <- apply(abs(crossprod(S_old, S) - n) < eps*n, 2, any) if (all(partest)) { ## All the current vectors are parallel to old vectors. ## We've hit a cycle, so stop. if(!quiet) message("hit a cycle (1) -- stop iterations") break } if (any(partest)) { ## Some vectors are parallel to old ones and are cycling, ## but not all of them. Replace the parallel vectors with ## rand{-1,+1}. numpar <- sum (partest) replacements <- matrix(sample(c(-1,1), n*numpar,replace=TRUE), n, numpar) S[,partest] <- replacements } ## Now test for parallel vectors within S. partest <- apply(crossprod(S) - I.t == n, 2, any) if (any(partest)) { numpar <- sum(partest) replacements <- matrix(sample(c(-1,1), n*numpar,replace=TRUE), n, numpar) S[,partest] <- replacements } Z <- if(mi.A) At.x(S) else crossprod(A, S) ## -- n x t ## Now find the largest non-previously-visted index per vector. ## h = max(2, abs(Z)) ## -- n x t h <- pmax.int(2, as(abs(Z),"matrix")); dim(h) <- dim(Z) ## -- n x t ## [mh, mhi] = max (h) : for each column h[,j]: ## mh[j] = max(h[,j]); mhi = argmax(..) mhi <- apply(h, 2, which.max) ## mh <- h[cbind(mhi,1:t)] if (iter >= 2 && all(mhi == imax)) { ## (mhi == imax) : in octave this is only true when it's for all() ## Hit a cycle, stop. if(!quiet) message("hit a cycle (2) -- stop iterations") break } ## [h, ind] = sort (h, 'descend'): r <- apply(h, 2, sort.int, decreasing=TRUE, index.return=TRUE) #-> list h <- sapply(r, `[[`, "x") ind <- sapply(r, `[[`, "ix") #-> n x t {each column = permutation of 1:n} if (t > 1) { firstind <- ind[1:t] if (all (been_there[firstind])) { ## Visited all these before, so stop. break } ind <- ind[!been_there[ind]] ##-> now ind is a simple vector if(length(ind) < t) { ## There aren't enough new vectors, so we're practically ## in a cycle. Stop. if(!quiet) message("not enough new vecs -- stop iterations") break } } ## Visit the new indices. X <- matrix(0, n, t) X[cbind(ind[1:t], 1:t)] <- 1 ## for(zz in 1:t) X[ind[zz],zz] <- 1 been_there [ind[1:t]] <- TRUE } ## for(iter ...) ## The estimate est and vector w are set in the loop above. The ## vector v selects the imax column of A. v <- integer(n) v[imax] <- 1L list(est=est, v=v, w=w, iter=iter) }## {onenormest} ## %!demo ## %! N = 100; ## %! A = randn(N) + eye(N); ## %! [L,U,P] = lu(A); ## %! nm1inv = onenormest(@(x) U\(L\(P*x)), @(x) P'*(L'\(U'\x)), N, 30) ## %! norm(inv(A), 1) ## %!test ## %! N = 10; ## %! A = ones (N); ## %! [nm1, v1, w1] = onenormest (A); ## %! [nminf, vinf, winf] = onenormest (A', 6); ## %! assert (nm1, N, -2*eps); ## %! assert (nminf, N, -2*eps); ## %! assert (norm (w1, 1), nm1 * norm (v1, 1), -2*eps) ## %! assert (norm (winf, 1), nminf * norm (vinf, 1), -2*eps) ## %!test ## %! N = 10; ## %! A = ones (N); ## %! [nm1, v1, w1] = onenormest (@(x) A*x, @(x) A'*x, N, 3); ## %! [nminf, vinf, winf] = onenormest (@(x) A'*x, @(x) A*x, N, 3); ## %! assert (nm1, N, -2*eps); ## %! assert (nminf, N, -2*eps); ## %! assert (norm (w1, 1), nm1 * norm (v1, 1), -2*eps) ## %! assert (norm (winf, 1), nminf * norm (vinf, 1), -2*eps) ## %!test ## %! N = 5; ## %! A = hilb (N); ## %! [nm1, v1, w1] = onenormest (A); ## %! [nminf, vinf, winf] = onenormest (A', 6); ## %! assert (nm1, norm (A, 1), -2*eps); ## %! assert (nminf, norm (A, inf), -2*eps); ## %! assert (norm (w1, 1), nm1 * norm (v1, 1), -2*eps) ## %! assert (norm (winf, 1), nminf * norm (vinf, 1), -2*eps) ## ## Only likely to be within a factor of 10. ## %!test ## %! N = 100; ## %! A = rand (N); ## %! [nm1, v1, w1] = onenormest (A); ## %! [nminf, vinf, winf] = onenormest (A', 6); ## %! assert (nm1, norm (A, 1), -.1); ## %! assert (nminf, norm (A, inf), -.1); ## %! assert (norm (w1, 1), nm1 * norm (v1, 1), -2*eps) ## %! assert (norm (winf, 1), nminf * norm (vinf, 1), -2*eps) Matrix/R/CHMfactor.R0000644000176200001440000001653012524132306013653 0ustar liggesusers ### TODO: We really want the separate parts (P,L,D) of A = P' L D L' P ### --- --> ~/R/MM/Pkg-ex/Matrix/chol-ex.R --------------- ## but we currently only get A = P' L L' P --- now documented in ../man/Cholesky.Rd setAs("CHMfactor", "sparseMatrix", function(from) .Call(CHMfactor_to_sparse, from)) setAs("CHMfactor", "triangularMatrix", function(from) .Call(CHMfactor_to_sparse, from)) setAs("CHMfactor", "Matrix", function(from) .Call(CHMfactor_to_sparse, from)) setAs("CHMfactor", "pMatrix", function(from) as(from@perm + 1L, "pMatrix")) setMethod("expand", signature(x = "CHMfactor"), function(x, ...) list(P = as(x, "pMatrix"), L = as(x, "sparseMatrix"))) ##' Determine if a CHMfactor object is LDL or LL ##' @param x - a CHMfactor object ##' @return TRUE if x is LDL, otherwise FALSE isLDL <- function(x) { stopifnot(is(x, "CHMfactor")) as.logical(! x@type[2])# "!" = not as type[2] := (cholmod_factor)->is_ll } .isLDL <- function(x) as.logical(! x@type[2])# "!" = not as type[2] := (cholmod_factor)->is_ll setMethod("image", "CHMfactor", function(x, ...) image(as(as(x, "sparseMatrix"), "dgTMatrix"), ...)) .CHM_solve <- function(a, b, system = c("A", "LDLt", "LD", "DLt", "L", "Lt", "D", "P", "Pt"), ...) { chk.s(..., which.call=-2) sysDef <- eval(formals()$system) .Call(CHMfactor_solve, ##-> cholmod_solve() in ../src/CHOLMOD/Cholesky/cholmod_solve.c a, b, ## integer in 1 ("A"), 2 ("LDLt"), ..., 9 ("Pt") : match(match.arg(system, sysDef), sysDef, nomatch = 0L)) } setMethod("solve", signature(a = "CHMfactor", b = "ddenseMatrix"), .CHM_solve, valueClass = "dgeMatrix") setMethod("solve", signature(a = "CHMfactor", b = "matrix"), .CHM_solve, valueClass = "dgeMatrix") setMethod("solve", signature(a = "CHMfactor", b = "numeric"), function(a, b, ...) .CHM_solve(a, matrix(if(is.double(b)) b else as.double(b), length(b), 1L), ...), valueClass = "dgeMatrix") setMethod("solve", signature(a = "CHMfactor", b = "dsparseMatrix"), function(a, b, system = c("A", "LDLt", "LD", "DLt", "L", "Lt", "D", "P", "Pt"), ...) { chk.s(..., which.call=-2) sysDef <- eval(formals()$system) .Call(CHMfactor_spsolve, #--> cholmod_spsolve() in ../src/CHOLMOD/Cholesky/cholmod_spsolve.c a, as(as(b, "CsparseMatrix"), "dgCMatrix"), match(match.arg(system, sysDef), sysDef, nomatch = 0L)) }, valueClass = "CsparseMatrix")# < virtual value ? setMethod("solve", signature(a = "CHMfactor", b = "diagonalMatrix"), function(a, b, ...) solve(a, as(b, "dsparseMatrix"), ...)) setMethod("solve", signature(a = "CHMfactor", b = "missing"), ## <--> b = Diagonal(.) function(a, b, system = c("A", "LDLt", "LD","DLt", "L","Lt", "D", "P","Pt"), ...) { chk.s(..., which.call=-2) sysDef <- eval(formals()$system) system <- match.arg(system, sysDef) i.sys <- match(system, sysDef, nomatch = 0L) as(.Call(CHMfactor_spsolve, a, .sparseDiagonal(a@Dim[1], shape="g"), i.sys), switch(system, A=, LDLt = "symmetricMatrix",# was "dsCMatrix" LD=, DLt=, L=, Lt =, D = "dtCMatrix", # < diagonal: still as "Csparse.." P=, Pt = "pMatrix")) }) ## Catch-all the rest : make sure 'system' is not lost setMethod("solve", signature(a = "CHMfactor", b = "ANY"), function(a, b, system = c("A", "LDLt", "LD","DLt", "L","Lt", "D", "P","Pt"), ...) solve(a, as(b, "dMatrix"), system, ...)) setMethod("chol2inv", signature(x = "CHMfactor"), function (x, ...) { chk.s(..., which.call=-2) solve(x, system = "A") }) setMethod("determinant", signature(x = "CHMfactor", logarithm = "missing"), function(x, logarithm, ...) determinant(x, TRUE)) setMethod("determinant", signature(x = "CHMfactor", logarithm = "logical"), function(x, logarithm, ...) { ldet <- .Call(CHMfactor_ldetL2, x) / 2 mkDet(logarithm=logarithm, ldet=ldet, sig = 1L) }) setMethod("update", signature(object = "CHMfactor"), function(object, parent, mult = 0, ...) { stopifnot(extends(clp <- class(parent), "sparseMatrix")) d <- dim(parent) if(!extends(clp, "dsparseMatrix")) clp <- class(parent <- as(parent, "dsparseMatrix")) if(!extends(clp, "CsparseMatrix")) clp <- class(parent <- as(parent, "CsparseMatrix")) if(d[1] == d[2] && !extends(clp, "dsCMatrix") && !is.null(v <- getOption("Matrix.verbose")) && v >= 1) message(gettextf("Quadratic matrix '%s' (=: A) is not formally\n symmetric. Will be treated as A A' ", "parent"), domain=NA) chk.s(..., which.call=-2) .Call(CHMfactor_update, object, parent, mult) }) ##' fast version, somewhat hidden; here parent *must* be 'd[sg]CMatrix' .updateCHMfactor <- function(object, parent, mult) .Call(CHMfactor_update, object, parent, mult) setMethod("updown", signature(update="ANY", C="ANY", L="ANY"), ## fallback method -- give a "good" error message: function(update,C,L) stop("'update' must be logical or '+' or '-'; 'C' a matrix, and 'L' a \"CHMfactor\"")) setMethod("updown", signature(update="logical", C="mMatrix", L="CHMfactor"), function(update,C,L){ bnew <- as(L,'pMatrix') %*% C .Call(CHMfactor_updown,update, as(bnew,'sparseMatrix'), L) }) setMethod("updown", signature(update="character", C="mMatrix", L="CHMfactor"), function(update,C,L){ if(! update %in% c("+","-")) stop("update must be TRUE/FALSE or '+' or '-'") update <- update=="+" bnew <- as(L,'pMatrix') %*% C .Call(CHMfactor_updown,update, as(bnew,'sparseMatrix'), L) }) ## Currently hidden: ldetL2up <- function(x, parent, Imult) { ## Purpose: compute log Det |A + m*I| for many values of m ## ---------------------------------------------------------------------- ## Arguments: x: CHMfactor to be updated ## parent : CsparseMatrix M; for symmetric M, A = M, otherwise A = MM' ## Imult : a numeric *vector* of 'm's (= I multipliers) ## ---------------------------------------------------------------------- ## Author: Doug Bates, Date: 19 Mar 2008 stopifnot(is(x, "CHMfactor"), is(parent, "CsparseMatrix"), nrow(x) == nrow(parent)) .Call(CHMfactor_ldetL2up, x, parent, as.double(Imult)) } ##' Update a sparse Cholesky factorization in place ##' @param L A sparse Cholesky factor that inherits from CHMfactor ##' @param parent a sparse matrix for updating the factor. Either a ##' dsCMatrix, in which case L is updated to the Cholesky ##' factorization of parent, or a dgCMatrix, in which case L is ##' updated to the Cholesky factorization of tcrossprod(parent) ##' @param Imult an optional positive scalar to be added to the ##' diagonal before factorization, ##' @return NULL. This function always returns NULL. It is called ##' for its side-effect of updating L in place. ##' @note This function violates the functional language semantics of ##' R in that it updates its argument L in place (i.e. without copying). ##' This is intentional but it means the function should be used ##' with caution. If the preceding sentences do not make sense to ##' you, you should not use this function,. destructive_Chol_update <- function(L, parent, Imult = 1) { stopifnot(is(L, "CHMfactor"), is(parent, "sparseMatrix")) .Call(destructive_CHM_update, L, parent, Imult) } Matrix/R/dtTMatrix.R0000644000176200001440000000304011003616106013751 0ustar liggesusers### Coercion and Methods for Triangular Triplet Matrices setAs("dtTMatrix", "dgTMatrix", function(from) tT2gT(from, cl = "dtTMatrix", toClass = "dgTMatrix")) setAs("dtTMatrix", "generalMatrix", function(from) tT2gT(from, cl = "dtTMatrix", toClass = "dgTMatrix")) if(FALSE) ## needed in ../tests/Class+Meth.R -- replaced by .T.2.l() in ./Tsparse.R setAs("dtTMatrix", "ltTMatrix", function(from) new("ltTMatrix", i = from@i, j = from@j, x = as.logical(from@x), uplo = from@uplo, diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames)) if(FALSE) ## needed in ../tests/Class+Meth.R -- replaced by .T.2.n() in ./Tsparse.R setAs("dtTMatrix", "ntTMatrix", function(from) new("ntTMatrix", i = from@i, j = from@j, uplo = from@uplo, diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames)) ## Conversion to dense storage is first to a dtrMatrix setAs("dtTMatrix", "dtrMatrix", function(from) .Call(dtTMatrix_as_dtrMatrix, from)) setAs("dtTMatrix", "matrix", function(from) as(as(from, "dtrMatrix"), "matrix")) setAs("dtTMatrix", "dgeMatrix", function(from) as(as(from, "dtrMatrix"), "dgeMatrix")) setAs("matrix", "dtTMatrix", function(from) as(as(from, "dtpMatrix"), "dtTMatrix")) setMethod("t", "dtTMatrix", function(x) new("dtTMatrix", Dim = x@Dim[2:1], Dimnames = x@Dimnames[2:1], i = x@j, j = x@i, x = x@x, diag = x@diag, uplo = if (x@uplo == "U") "L" else "U")) Matrix/R/Tsparse.R0000644000176200001440000007762713141330160013476 0ustar liggesusers#### "TsparseMatrix" : Virtual class of sparse matrices in triplet-format ## more efficient than going via Csparse: setAs("matrix", "TsparseMatrix", function(from) if(is.numeric(from)) mat2dgT(from) else if(is.logical(from)) as(Matrix(from, sparse=TRUE), "TsparseMatrix") else stop("not-yet-implemented coercion to \"TsparseMatrix\"")) setAs("numeric", "TsparseMatrix", function(from) as(as.matrix(from), "TsparseMatrix")) setAs("TsparseMatrix", "matrix", function(from) .Call(dgTMatrix_to_matrix, as(from, "dgTMatrix"))) ## in ../src/Tsparse.c : |-> cholmod_T -> cholmod_C -> chm_sparse_to_SEXP ## adjusted for triangular matrices not represented in cholmod .T.2.C <- function(from) .Call(Tsparse_to_Csparse, from, ## is(from, "triangularMatrix")) ## fast, exported for power users .T2Cmat <- function(from, isTri = is(from, "triangularMatrix")) .Call(Tsparse_to_Csparse, from, isTri) setAs("TsparseMatrix", "CsparseMatrix", .T.2.C) .T.2.n <- function(from) { ## No: coercing to n(sparse)Matrix gives the "full" pattern including 0's ## if(any(is0(from@x))) ## 0 or FALSE -- the following should have drop0Tsp(.) ## from <- as(drop0(from), "TsparseMatrix") if(is(from, "triangularMatrix")) # i.e. ?tTMatrix new("ntTMatrix", i = from@i, j = from@j, uplo = from@uplo, diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames) else if(is(from, "symmetricMatrix")) # i.e. ?sTMatrix new("nsTMatrix", i = from@i, j = from@j, uplo = from@uplo, Dim = from@Dim, Dimnames = from@Dimnames) else new("ngTMatrix", i = from@i, j = from@j, Dim = from@Dim, Dimnames = from@Dimnames) } setAs("TsparseMatrix", "nsparseMatrix", .T.2.n) setAs("TsparseMatrix", "nMatrix", .T.2.n) .T.2.l <- function(from) { cld <- getClassDef(class(from)) xx <- if(extends(cld, "nMatrix")) rep.int(TRUE, length(from@i)) else as.logical(from@x) if(extends(cld, "triangularMatrix")) # i.e. ?tTMatrix new("ltTMatrix", i = from@i, j = from@j, x = xx, uplo = from@uplo, diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames) else if(extends(cld, "symmetricMatrix")) # i.e. ?sTMatrix new("lsTMatrix", i = from@i, j = from@j, x = xx, uplo = from@uplo, Dim = from@Dim, Dimnames = from@Dimnames) else new("lgTMatrix", i = from@i, j = from@j, x = xx, Dim = from@Dim, Dimnames = from@Dimnames) } setAs("TsparseMatrix", "lsparseMatrix", .T.2.l) setAs("TsparseMatrix", "lMatrix", .T.2.l) ## Special cases ("d", "l", "n") %o% ("g", "s", "t") : ## used e.g. in triu() setAs("dgTMatrix", "dgCMatrix", function(from) .Call(Tsparse_to_Csparse, from, FALSE)) setAs("dsTMatrix", "dsCMatrix", function(from) .Call(Tsparse_to_Csparse, from, FALSE)) setAs("dtTMatrix", "dtCMatrix", function(from) .Call(Tsparse_to_Csparse, from, TRUE)) setAs("lgTMatrix", "lgCMatrix", function(from) .Call(Tsparse_to_Csparse, from, FALSE)) setAs("lsTMatrix", "lsCMatrix", function(from) .Call(Tsparse_to_Csparse, from, FALSE)) setAs("ltTMatrix", "ltCMatrix", function(from) .Call(Tsparse_to_Csparse, from, TRUE)) setAs("ngTMatrix", "ngCMatrix", function(from) .Call(Tsparse_to_Csparse, from, FALSE)) setAs("nsTMatrix", "nsCMatrix", function(from) .Call(Tsparse_to_Csparse, from, FALSE)) setAs("ntTMatrix", "ntCMatrix", function(from) .Call(Tsparse_to_Csparse, from, TRUE)) ### "[" : ### ----- ## Test for numeric/logical/character ## method-*internally* ; this is not strictly OO, but allows to use ## the following utility and hence much more compact code. ## Otherwise have to write methods for all possible combinations of ## (i , j) \in ## (numeric, logical, character, missing) x (numeric, log., char., miss.) ##' a simplified "subset" of intI() below int2i <- function(i, n) { if(any(i < 0L)) { if(any(i > 0L)) stop("you cannot mix negative and positive indices") seq_len(n)[i] } else { if(length(i) && max(i, na.rm=TRUE) > n) stop(gettextf("index larger than maximal %d", n), domain=NA) if(any(z <- i == 0)) i <- i[!z] i } } intI <- function(i, n, dn, give.dn = TRUE) { ## Purpose: translate numeric | logical | character index ## into 0-based integer ## ---------------------------------------------------------------------- ## Arguments: i: index vector (numeric | logical | character) ## n: array extent { == dim(.) [margin] } ## dn: character col/rownames or NULL { == dimnames(.)[[margin]] } ## ---------------------------------------------------------------------- ## Author: Martin Maechler, Date: 23 Apr 2007 has.dn <- !is.null.DN(dn) DN <- has.dn && give.dn if(is.numeric(i) || is(i, "numeric")) { # inherits(, "numeric") is FALSE storage.mode(i) <- "integer" if(anyNA(i)) stop("'NA' indices are not (yet?) supported for sparse Matrices") if(any(i < 0L)) { if(any(i > 0L)) stop("you cannot mix negative and positive indices") i0 <- (0:(n - 1L))[i] } else { if(length(i) && max(i, na.rm=TRUE) > n) stop(gettextf("index larger than maximal %d", n), domain=NA) if(any(z <- i == 0)) i <- i[!z] i0 <- i - 1L # transform to 0-indexing } if(DN) dn <- dn[i] } else if (is.logical(i) || inherits(i, "logical")) { if(length(i) > n) stop(gettextf("logical subscript too long (%d, should be %d)", length(i), n), domain=NA) if(anyNA(i)) stop("'NA' indices are not (yet?) supported for sparse Matrices") i0 <- (0:(n - 1L))[i] if(DN) dn <- dn[i] } else { ## character if(!has.dn) stop("no 'dimnames[[.]]': cannot use character indexing") i0 <- match(i, dn) if(anyNA(i0)) stop("invalid character indexing") if(DN) dn <- dn[i0] i0 <- i0 - 1L } if(!give.dn) i0 else list(i0 = i0, dn = dn) } ## {intI} .ind.prep <- function(xi, intIlist, iDup = duplicated(i0), anyDup = any(iDup)) { ## Purpose: do the ``common things'' for "*gTMatrix" indexing for 1 dim. ## and return match(.,.) + li = length of corresponding dimension ## ## xi = "x@i" ; intIlist = intI(i, dim(x)[margin], ....) i0 <- intIlist$i0 stopifnot(is.numeric(i0))# cheap fast check (i0 may have length 0 !) m <- match(xi, i0, nomatch=0) if(anyDup) { # assuming anyDup <- any(iDup <- duplicated(i0)) ## i0i: where in (non-duplicated) i0 are the duplicated ones i0i <- match(i0[iDup], i0) i.x <- which(iDup) - 1L jm <- lapply(i0i, function(.) which(. == m)) } c(list(m = m, li = length(i0), i0 = i0, anyDup = anyDup, dn = intIlist$dn), ## actually, iDup is rarely needed in calling code if(anyDup) list(iDup = iDup, i0i = i0i, i.x = i.x, jm = unlist(jm), i.xtra = rep.int(i.x, lengths(jm)))) } ## {.ind.prep} ##' ##' Do the ``common things'' for "*gTMatrix" sub-assignment ##' for 1 dimension, 'margin' , ##'
##' @title Indexing Preparation ##' @param i "index" ##' @param margin in {1,2}; ##' @param di = dim(x) { used when i is not character } ##' @param dn = dimnames(x) ##' @return match(.,.) + li = length of corresponding dimension ##' difference to .ind.prep(): use 1-indices; no match(xi,..), no dn at end ##' @author Martin Maechler .ind.prep2 <- function(i, margin, di, dn) { intI(i, n = di[margin], dn = dn[[margin]], give.dn = FALSE) } ## Select rows setMethod("[", signature(x = "TsparseMatrix", i = "index", j = "missing", drop = "logical"), function (x, i, j, ..., drop) { ## select rows na <- nargs() Matrix.msg("Tsp[i,m,l]: nargs()=", na, .M.level=2) if(na == 4) .as.Tsp(as(x,"CsparseMatrix")[i, , drop=drop], noCheck = !drop) else if(na == 3) ## e.g. M[0] , M[TRUE], M[1:2] .M.vectorSub(x,i) else ## should not happen stop("Matrix-internal error in [i,,d]; please report") }) ## Select columns setMethod("[", signature(x = "TsparseMatrix", i = "missing", j = "index", drop = "logical"), function (x, i, j, ..., drop) { ## select columns .as.Tsp(as(x,"CsparseMatrix")[, j, drop=drop], noCheck = !drop) }) setMethod("[", signature(x = "TsparseMatrix", i = "index", j = "index", drop = "logical"), function (x, i, j, ..., drop) .as.Tsp(as(x,"CsparseMatrix")[i, j, drop=drop], noCheck = !drop)) ## This is "just for now" -- Thinking of *not* doing this in the future .as.Tsp <- function(x, noCheck) if(noCheck || is(x,"sparseMatrix")) as(x, "TsparseMatrix") else x ## FIXME: Learn from .TM... below or rather .M.sub.i.2col(.) in ./Matrix.R ## ------ the following should be much more efficient than the ## subset.ij() based ./Matrix.R code : if(FALSE) ## A[ ij ] where ij is (i,j) 2-column matrix : setMethod("[", signature(x = "TsparseMatrix", i = "matrix", j = "missing"),# drop="ANY" function (x, i, j, ..., drop) { di <- dim(x) dn <- dimnames(x) ## TODO check i (= 2-column matrix of indices) --- ## as in .M.sub.i.2col() in ./Matrix.R j <- i[,2] i <- i[,1] if(is(x, "symmetricMatrix")) { isSym <- isTRUE(all(i == j))# work for i,j NA if(!isSym) x <- as(x, paste0(.M.kind(x), "gTMatrix")) } else isSym <- FALSE if(isSym) { offD <- x@i != x@j ip1 <- .ind.prep(c(x@i,x@j[offD]), intI(i, n= di[1], dn=dn[[1]])) ip2 <- .ind.prep(c(x@j,x@i[offD]), intI(j, n= di[2], dn=dn[[2]])) } else { ip1 <- .ind.prep(x@i, intI(i, n = di[1], dn = dn[[1]])) ip2 <- .ind.prep(x@j, intI(j, n = di[2], dn = dn[[2]])) } stop("FIXME: NOT YET FINISHED IMPLEMENTATION") ## The M[i_vec, j_vec] had -- we need "its diagonal" : sel <- ip1$m & ip2$m if(isSym) { # only those corresponding to upper/lower triangle sel <- sel & (if(x@uplo == "U") ip1$m <= ip2$m else ip2$m <= ip1$m) } x@i <- ip1$m[sel] - 1L x@j <- ip2$m[sel] - 1L if (!is(x, "nsparseMatrix")) x@x <- c(x@x, if(isSym) x@x[offD])[sel] if (drop && any(nd == 1)) drop(as(x,"matrix")) else x }) ###========= Sub-Assignment aka *Replace*Methods ========================= ### FIXME: make this `very fast' for the very very common case of ### ----- M[i,j] <- v with i,j = length-1-numeric; v= length-1 number ### *and* M[i,j] == 0 previously ## ## FIXME(2): keep in sync with replCmat() in ./Csparse.R ## FIXME(3): It's terribly slow when used e.g. from diag(M[,-1]) <- value ## ----- which has "workhorse" M[,-1] <- ## ## workhorse for "[<-" : replTmat <- function (x, i, j, ..., value) { ## NOTE: need '...', i.e., exact signature such that setMethod() ## does not use .local() such that nargs() will work correctly: di <- dim(x) dn <- dimnames(x) iMi <- missing(i) jMi <- missing(j) ## "FIXME": could pass this (and much ? more) when this function would not *be* a ## method but be *called* from methods clDv <- getClassDef(class(value)) spV <- extends(clDv, "sparseVector") ## own version of all0() that works both for sparseVector and atomic vectors: .all0 <- function(v) if(spV) length(v@i) == 0 else all0(v) delayedAssign("value.not.logical", !(if(spV) { extends(clDv, "lsparseVector") || extends(clDv, "nsparseVector") } else { is.logical(value) || is.logical(as.vector(value)) })) na <- nargs() if(na == 3) { ## i = vector indexing M[i] <- v, e.g., M[TRUE] <- v or M[] <- v ! Matrix.msg("diagnosing replTmat(x,i,j,v): nargs()= 3; ", if(iMi | jMi) sprintf("missing (i,j) = (%d,%d)", iMi,jMi)) if(iMi) stop("internal bug: missing 'i' in replTmat(): please report") if(is.character(i)) stop("[ ] indexing not allowed: forgot a \",\" ?") if(is.matrix(i)) stop("internal bug: matrix 'i' in replTmat(): please report") ## Now: have M[i] <- v with vector logical or "integer" i : ## Tmatrix maybe non-unique, have an entry split into a sum of several ones: if(!is(x,"generalMatrix")) { cl <- class(x) x <- as(x, paste0(.M.kind(x), "gTMatrix")) Matrix.msg("'sub-optimal sparse 'x[i] <- v' assignment: Coercing class ", cl," to ",class(x)) } nr <- di[1] x.i <- .Call(m_encodeInd2, x@i, x@j, di=di, FALSE, FALSE) if(anyDuplicated(x.i)) { ## == if(anyDuplicatedT(x, di = di)) x <- uniqTsparse(x) x.i <- .Call(m_encodeInd2, x@i, x@j, di=di, FALSE, FALSE) } n <- prod(di) i <- if(is.logical(i)) { # full-size logical indexing if(n) { if(isTRUE(i)) # shortcut 0:(n-1) else { if(length(i) < n) i <- rep_len(i, n) (0:(n-1))[i] # -> 0-based index vector as well {maybe LARGE!} } } else integer(0) } else { ## also works with *negative* indices etc: int2i(as.integer(i), n) - 1L ## 0-based indices [to match m_encodeInd2()] } clx <- class(x) clDx <- getClassDef(clx) # extends(), is() etc all use the class definition has.x <- "x" %in% slotNames(clDx) # === slotNames(x) if(!has.x && # <==> "n.TMatrix" ((iNA <- any(ina <- is.na(value))) || value.not.logical)) { if(value.not.logical) value <- as.logical(value) if(iNA) { value[ina] <- TRUE warning( gettextf("x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced; NA |--> TRUE.", dQuote(clx)), domain=NA) } else warning( gettextf("x[.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.", dQuote(clx)), domain=NA) } ## now have 0-based indices x.i (entries) and i (new entries) ## the simplest case: if(.all0(value)) { ## just drop the non-zero entries if(!all(sel <- is.na(match(x.i, i)))) { ## non-zero there x@i <- x@i[sel] x@j <- x@j[sel] if(has.x) x@x <- x@x[sel] if(.hasSlot(x, "factors") && length(x@factors)) # drop cashed ones x@factors <- list() } return(x) } m <- length(i) if(length(value) != m) { ## use recycling rules if(m %% length(value) != 0) warning("number of items to replace is not a multiple of replacement length") value <- rep_len(value, m) } ## With duplicated entries i, only use the last ones! if(id <- anyDuplicated(i, fromLast=TRUE)) { i <- i[-id] value <- value[-id] if(any(id <- duplicated(i, fromLast=TRUE))) { nd <- -which(id) i <- i[nd] value <- value[nd] } } ## matching existing non-zeros and new entries; isE := "is Existing" ## isE <- i %in% x.i; mi <- {matching i's} isE <- !is.na(mi <- match(i, x.i)) ## => mi[isE] entries in (i,j,x) to be set to new value[]s ## 1) Change the matching non-zero entries if(has.x) x@x[mi[isE]] <- as(value[isE], class(x@x)) else if(any0(value[isE])) { ## "n.TMatrix" : remove (i,j) where value is FALSE get0 <- !value[isE] ## x[i,j] is TRUE, should become FALSE i.rm <- - mi[isE][get0] x@i <- x@i[i.rm] x@j <- x@j[i.rm] } ## 2) add the new non-zero entries i <- i[!isE] xv <- value[!isE] ## --- Be be efficient when 'value' is sparse : if(length(notE <- which(isN0(xv)))) { # isN0(): non-0's; NAs counted too xv <- xv[notE] i <- i[notE] if(has.x) { x@x <- c(x@x, as(xv, class(x@x))) } else { # n.TMatrix : assign (i,j) only where value is TRUE: i <- i[xv] } x@i <- c(x@i, i %% nr) x@j <- c(x@j, i %/% nr) } if(.hasSlot(x, "factors") && length(x@factors)) # drop cashed ones x@factors <- list() return(x) } ## {nargs = 3; x[ii] <- value } ## nargs() == 4 : x[i,j] <- value ## -------------------------------------------------------------------------- lenV <- length(value) Matrix.msg(".. replTmat(x,i,j,v): nargs()= 4; cl.(x)=", class(x),"; len.(value)=", lenV,"; ", if(iMi | jMi) sprintf("missing (i,j) = (%d,%d)", iMi,jMi), .M.level = 2)# level 1 gives too many messages ## FIXME: use 'abIndex' or a better algorithm, e.g. if(iMi) i1 <- if(iMi) 0:(di[1] - 1L) else .ind.prep2(i, 1, di, dn) i2 <- if(jMi) 0:(di[2] - 1L) else .ind.prep2(j, 2, di, dn) dind <- c(length(i1), length(i2)) # dimension of replacement region lenRepl <- prod(dind) if(lenV == 0) { if(lenRepl != 0) stop("nothing to replace with") else return(x) } ## else: lenV := length(value) is > 0 if(lenRepl %% lenV != 0) stop("number of items to replace is not a multiple of replacement length") if(!spV && lenRepl > 2^16) { # (somewhat arbitrary cutoff) value <- as(value, "sparseVector")# so that subsequent rep(.) are fast spV <- TRUE } ## Now deal with duplicated / repeated indices: "last one wins" if(!iMi && any(dup <- duplicated(i1, fromLast = TRUE))) { ## duplicated rows keep <- !dup i1 <- i1[keep] ## keep is "internally" recycled below {and that's important: it is dense!} lenV <- length(value <- rep_len(value, lenRepl)[keep]) dind[1] <- length(i1) lenRepl <- prod(dind) } if(!jMi && any(dup <- duplicated(i2, fromLast = TRUE))) { ## duplicated columns iDup <- which(dup) ## The following is correct, but rep(keep,..) can be *HUGE* ## keep <- !dup ## i2 <- i2[keep] ## lenV <- length(value <- rep_len(value, lenRepl)[rep(keep, each=dind[1])]) ## solution: sv[-i] is efficient for sparseVector: i2 <- i2[- iDup] nr <- dind[1] iDup <- rep((iDup - 1)*nr, each=nr) + seq_len(nr) lenV <- length(value <- rep_len(value, lenRepl)[-iDup]) dind[2] <- length(i2) lenRepl <- prod(dind) } clx <- class(x) clDx <- getClassDef(clx) # extends() , is() etc all use the class definition stopifnot(extends(clDx, "TsparseMatrix")) ## Tmatrix maybe non-unique, have an entry split into a sum of several ones: if(anyDuplicatedT(x, di = di)) x <- uniqTsparse(x) toGeneral <- r.sym <- FALSE if(extends(clDx, "symmetricMatrix")) { ## using array() for large dind is a disaster... mkArray <- if(spV) # TODO: room for improvement function(v, dim) spV2M(v, dim[1],dim[2]) else array r.sym <- (dind[1] == dind[2] && all(i1 == i2) && (lenRepl == 1 || lenV == 1 || isSymmetric(mkArray(value, dim=dind)))) if(r.sym) { ## result is *still* symmetric --> keep symmetry! xU <- x@uplo == "U" # later, we will consider only those indices above / below diagonal: } else toGeneral <- TRUE } else if(extends(clDx, "triangularMatrix")) { xU <- x@uplo == "U" r.tri <- ((any(dind == 1) || dind[1] == dind[2]) && if(xU) max(i1) <= min(i2) else max(i2) <= min(i1)) if(r.tri) { ## result is *still* triangular if(any(i1 == i2)) # diagonal will be changed x <- diagU2N(x) # keeps class (!) } else toGeneral <- TRUE } if(toGeneral) { # go to "generalMatrix" and continue if((.w <- isTRUE(getOption("Matrix.warn"))) || (!is.null(v <- getOption("Matrix.verbose")) && v >= 1)) (if(.w) warning else message)( "M[i,j] <- v : coercing symmetric M[] into non-symmetric") x <- as(x, paste0(.M.kind(x), "gTMatrix")) clDx <- getClassDef(clx <- class(x)) } ## TODO (efficiency): replace 'sel' by 'which(sel)' get.ind.sel <- function(ii,ij) (match(x@i, ii, nomatch = 0L) & match(x@j, ij, nomatch = 0L)) ## sel[k] := TRUE iff k-th non-zero entry (typically x@x[k]) is to be replaced sel <- get.ind.sel(i1,i2) has.x <- "x" %in% slotNames(clDx) # === slotNames(x) ## the simplest case: for all Tsparse, even for i or j missing if(.all0(value)) { ## just drop the non-zero entries if(any(sel)) { ## non-zero there x@i <- x@i[!sel] x@j <- x@j[!sel] if(has.x) x@x <- x@x[!sel] if(.hasSlot(x, "factors") && length(x@factors)) # drop cashed ones x@factors <- list() } return(x) } ## else -- some( value != 0 ) -- if(lenV > lenRepl) stop("too many replacement values") ## now have lenV <= lenRepl if(!has.x && # <==> "n.TMatrix" ((iNA <- anyNA(value)) || value.not.logical)) warning(if(iNA) gettextf("x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced NA |--> TRUE.", dQuote(clx)) else gettextf("x[.,.] <- val: x is %s, val not in {TRUE, FALSE} is coerced.", dQuote(clx)), domain=NA) ## another simple, typical case: if(lenRepl == 1) { if(spV && has.x) value <- as(value, "vector") if(any(sel)) { ## non-zero there if(has.x) x@x[sel] <- value } else { ## new non-zero x@i <- c(x@i, i1) x@j <- c(x@j, i2) if(has.x) x@x <- c(x@x, value) } if(.hasSlot(x, "factors") && length(x@factors)) # drop cashed ones x@factors <- list() return(x) } ### Otherwise, for large lenRepl, we get into trouble below if(lenRepl > 2^20) { # (somewhat arbitrary cutoff) ## FIXME: just for testing !! ## if(identical(Sys.getenv("USER"),"maechler") ## if(lenRepl > 2) { # __________ ___ JUST for testing! _______________ if(nonTRUEoption("Matrix.quiet")) message(gettextf("x[.,.] <- val : x being coerced from Tsparse* to CsparseMatrix"), domain = NA) return(replCmat4(as(x,"CsparseMatrix"), i1, i2, iMi=iMi, jMi=jMi, value = if(spV) value else as(value, "sparseVector"), spV = TRUE)) } ## if(r.sym) # value already adjusted, see above ## lenRepl <- length(value) # shorter (since only "triangle") if(!r.sym && lenV < lenRepl) value <- rep_len(value, lenRepl) ## now: length(value) == lenRepl {but value is sparseVector if it's "long" !} ## value[1:lenRepl]: which are structural 0 now, which not? ## v0 <- is0(value) ## - replaced by using isN0(as.vector(.)) on a typical small subset value[.] ## --> more efficient for sparse 'value' & large 'lenRepl' : ## FIXME [= FIXME(3) above]: ## ----- The use of seq_len(lenRepl) below is *still* inefficient ## (or impossible e.g. when lenRepl == 50000^2) ## and the vN0 <- isN0(as.vector(value[iI0])) is even more ... ## One idea: use "abIndex", (a very efficient storage of index vectors which are ## a concatenation of only a few arithmetic seq()ences use.abI <- isTRUE(getOption("Matrix.use.abIndex")) ## This 'use.abI' should later depend on the *dimension* of things ! ##>>> But for that, we need to implement the following abIndex - "methods": ##>>> [-n], [ ] , intersect(, ) ## and for intersect(): typically sort(), unique() & similar iI0 <- if(use.abI) abIseq1(1L, lenRepl) else seq_len(lenRepl) if(any(sel)) { ## the 0-based indices of non-zero entries -- WRT to submatrix iN0 <- 1L + .Call(m_encodeInd2, match(x@i[sel], i1), match(x@j[sel], i2), di = dind, orig1=TRUE, FALSE) ## 1a) replace those that are already non-zero with non-0 values vN0 <- isN0(value[iN0]) if(any(vN0) && has.x) { vv0 <- which(vN0) x@x[sel][vv0] <- as.vector(value[iN0[vv0]]) } ## 1b) replace non-zeros with 0 --> drop entries if(!all(vN0)) { ##-> ii will not be empty ii <- which(sel)[which(!vN0)] # <- vN0 may be sparseVector if(has.x) x@x <- x@x[-ii] x@i <- x@i[-ii] x@j <- x@j[-ii] } iI0 <- if(length(iN0) < lenRepl) iI0[-iN0] ## else NULL # == complementInd(non0, dind) } if(length(iI0)) { if(r.sym) { ## should only set new entries above / below diagonal, i.e., ## subset iI0 such as to contain only above/below .. iSel <- if(use.abI) abIindTri(dind[1], upper=xU, diag=TRUE) else indTri(dind[1], upper=xU, diag=TRUE) ## select also the corresponding triangle of values ### TODO for "abIndex" -- note we KNOW that both iI0 and iSel ### are strictly increasing : iI0 <- intersect(iI0, iSel) } full <- length(iI0) == lenRepl vN0 <- if(spV) ## "sparseVector" (if(full) value else value[iI0])@i else which(isN0(if(full) value else value[iI0])) if(length(vN0)) { ## 2) add those that were structural 0 (where value != 0) iIN0 <- if(full) vN0 else iI0[vN0] ij0 <- decodeInd(iIN0 - 1L, nr = dind[1]) x@i <- c(x@i, i1[ij0[,1] + 1L]) x@j <- c(x@j, i2[ij0[,2] + 1L]) if(has.x) x@x <- c(x@x, as.vector(value[iIN0])) } } if(.hasSlot(x, "factors") && length(x@factors)) # drop cashed ones x@factors <- list() x } ## end{replTmat} ## A[ ij ] <- value, where ij is a matrix; typically (i,j) 2-column matrix : ## ---------------- ./Matrix.R has a general cheap method ## This one should become as fast as possible -- is also used from Csparse.R -- .TM.repl.i.mat <- function (x, i, j, ..., value) { nA <- nargs() if(nA != 3) stop(gettextf("nargs() = %d should never happen; please report.", nA), domain=NA) ## else: nA == 3 i.e., M [ cbind(ii,jj) ] <- value or M [ Lmat ] <- value if(is.logical(i)) { Matrix.msg(".TM.repl.i.mat(): drop 'matrix' case ...", .M.level=2) ## c(i) : drop "matrix" to logical vector x[as.vector(i)] <- value return(x) } else if(extends(cli <- getClassDef(class(i)),"lMatrix") || extends(cli, "nMatrix")) { Matrix.msg(".TM.repl.i.mat(): \"lMatrix\" case ...", .M.level=2) i <- which(as(i, if(extends(cli, "sparseMatrix")) "sparseVector" else "vector")) ## x[i] <- value ; return(x) return(`[<-`(x,i, value=value)) } else if(extends(cli, "Matrix")) { # "dMatrix" or "iMatrix" if(ncol(i) != 2) stop("such indexing must be by logical or 2-column numeric matrix") i <- as(i, "matrix") } else if(!is.numeric(i) || ncol(i) != 2) stop("such indexing must be by logical or 2-column numeric matrix") if(!is.integer(i)) storage.mode(i) <- "integer" if(any(i < 0)) stop("negative values are not allowed in a matrix subscript") if(anyNA(i)) stop("NAs are not allowed in subscripted assignments") if(any(i0 <- (i == 0))) # remove them i <- i[ - which(i0, arr.ind = TRUE)[,"row"], ] if(length(attributes(i)) > 1) # more than just 'dim'; simplify: will use identical attributes(i) <- list(dim = dim(i)) ## now have integer i >= 1 m <- nrow(i) if(m == 0) return(x) if(length(value) == 0) stop("nothing to replace with") ## mod.x <- .type.kind[.M.kind(x)] if(length(value) != m) { ## use recycling rules if(m %% length(value) != 0) warning("number of items to replace is not a multiple of replacement length") value <- rep_len(value, m) } clx <- class(x) clDx <- getClassDef(clx) # extends() , is() etc all use the class definition stopifnot(extends(clDx, "TsparseMatrix")) di <- dim(x) nr <- di[1] nc <- di[2] i1 <- i[,1] i2 <- i[,2] if(any(i1 > nr)) stop(gettextf("row indices must be <= nrow(.) which is %d", nr), domain=NA) if(any(i2 > nc)) stop(gettextf("column indices must be <= ncol(.) which is %d", nc), domain=NA) ## Tmatrix maybe non-unique, have an entry split into a sum of several ones: if(anyDuplicatedT(x, di = di)) x <- uniqTsparse(x) toGeneral <- FALSE isN <- extends(clDx, "nMatrix") if(r.sym <- extends(clDx, "symmetricMatrix")) { ## Tests to see if the assignments are symmetric as well r.sym <- all(i1 == i2) if(!r.sym) { # do have *some* Lower or Upper entries iL <- i1 > i2 iU <- i1 < i2 r.sym <- sum(iL) == sum(iU) # same number if(r.sym) { iLord <- order(i1[iL], i2[iL]) iUord <- order(i2[iU], i1[iU]) # row <-> col. ! r.sym <- { identical(i[iL, , drop=FALSE][iLord,], i[iU, 2:1, drop=FALSE][iUord,]) && all(value[iL][iLord] == value[iU][iUord]) } } } if(r.sym) { ## result is *still* symmetric --> keep symmetry! ## now consider only those indices above / below diagonal: useI <- if(x@uplo == "U") i1 <= i2 else i2 <= i1 i <- i[useI, , drop=FALSE] value <- value[useI] } else toGeneral <- TRUE } else if(extends(clDx, "triangularMatrix")) { r.tri <- all(if(x@uplo == "U") i1 <= i2 else i2 <= i1) if(r.tri) { ## result is *still* triangular if(any(ieq <- i1 == i2)) { # diagonal will be changed if(x@diag == "U" && all(ieq) && all(value == if(isN) TRUE else as1(x@x))) ## only diagonal values are set to 1 -- i.e. unchanged return(x) x <- diagU2N(x) # keeps class (!) } } else toGeneral <- TRUE } if(toGeneral) { # go to "generalMatrix" and continue if((.w <- isTRUE(getOption("Matrix.warn"))) || isTRUE(getOption("Matrix.verbose"))) (if(.w) warning else message)( "M[ij] <- v : coercing symmetric M[] into non-symmetric") x <- as(x, paste0(.M.kind(x), "gTMatrix")) clDx <- getClassDef(clx <- class(x)) } ii.v <- .Call(m_encodeInd, i, di, orig1=TRUE, checkBounds = TRUE) if(id <- anyDuplicated(ii.v, fromLast=TRUE)) { Matrix.msg("duplicate ij-entries in 'Matrix[ ij ] <- value'; using last", .M.level = 1) ii.v <- ii.v [-id] value <- value[-id] if(any(id <- duplicated(ii.v, fromLast=TRUE))) { nd <- -which(id) ii.v <- ii.v [nd] value <- value[nd] } } ii.x <- .Call(m_encodeInd2, x@i, x@j, di, FALSE, FALSE) m1 <- match(ii.v, ii.x) i.repl <- !is.na(m1) # those that need to be *replaced* if(isN) { ## no 'x' slot isN <- all(value %in% c(FALSE, TRUE)) # will result remain "nMatrix" ? if(!isN) x <- as(x, paste0(if(extends(clDx, "lMatrix")) "l" else "d", .sparse.prefixes[.M.shape(x)], "TMatrix")) } has.x <- !isN ## isN <===> "remains pattern matrix" <===> has no 'x' slot if(any(i.repl)) { ## some to replace at matching (@i, @j) if(has.x) x@x[m1[i.repl]] <- value[i.repl] else { # nMatrix ; eliminate entries that are set to FALSE; keep others if(any(isF <- !value[i.repl])) { ii <- m1[i.repl][isF] x@i <- x@i[ -ii] x@j <- x@j[ -ii] } } } if(any(i.new <- !i.repl & isN0(value))) { ## some new entries i.j <- decodeInd(ii.v[i.new], nr) x@i <- c(x@i, i.j[,1]) x@j <- c(x@j, i.j[,2]) if(has.x) x@x <- c(x@x, value[i.new]) } if(.hasSlot(x, "factors") && length(x@factors)) # drop cashed ones x@factors <- list() x } ## end{.TM.repl.i.mat} setReplaceMethod("[", signature(x = "TsparseMatrix", i = "index", j = "missing", value = "replValue"), replTmat) setReplaceMethod("[", signature(x = "TsparseMatrix", i = "missing", j = "index", value = "replValue"), replTmat) setReplaceMethod("[", signature(x = "TsparseMatrix", i = "index", j = "index", value = "replValue"), replTmat) setReplaceMethod("[", signature(x = "TsparseMatrix", i = "matrix", j = "missing", value = "replValue"), .TM.repl.i.mat) setReplaceMethod("[", signature(x = "TsparseMatrix", i = "Matrix", j = "missing", value = "replValue"), .TM.repl.i.mat) ### When the RHS 'value' is a sparseVector, now can use replTmat as well setReplaceMethod("[", signature(x = "TsparseMatrix", i = "missing", j = "index", value = "sparseVector"), replTmat) setReplaceMethod("[", signature(x = "TsparseMatrix", i = "index", j = "missing", value = "sparseVector"), replTmat) setReplaceMethod("[", signature(x = "TsparseMatrix", i = "index", j = "index", value = "sparseVector"), replTmat) setMethod("solve", signature(a = "TsparseMatrix", b = "ANY"), function(a, b, ...) solve(as(a, "CsparseMatrix"), b)) setMethod("solve", signature(a = "TsparseMatrix", b = "missing"), function(a, b, ...) solve(as(a, "CsparseMatrix"))) ## Want tril(), triu(), band() --- just as "indexing" --- ## return a "close" class: setMethod("tril", "TsparseMatrix", function(x, k = 0, ...) as(tril(.T.2.C(x), k = k, ...), "TsparseMatrix")) setMethod("triu", "TsparseMatrix", function(x, k = 0, ...) as(triu(.T.2.C(x), k = k, ...), "TsparseMatrix")) setMethod("band", "TsparseMatrix", function(x, k1, k2, ...) as(band(.T.2.C(x), k1 = k1, k2 = k2, ...), "TsparseMatrix")) ## For the "general" T ones (triangular & symmetric have special methods): setMethod("t", signature(x = "TsparseMatrix"), function(x) { cld <- getClassDef(class(x)) r <- new(cld) r@i <- x@j r@j <- x@i if(any("x" == slotNames(cld))) r@x <- x@x r@Dim <- x@Dim[2:1] r@Dimnames <- x@Dimnames[2:1] r }) Matrix/R/nsCMatrix.R0000644000176200001440000000334112507007442013754 0ustar liggesusers#### Logical Symmetric Sparse Matrices in Compressed column-oriented format ### contains = "nsparseMatrix" setAs("nsCMatrix", "matrix", function(from) as(as(from, "ngCMatrix"), "matrix")) setAs("nsCMatrix", "ngCMatrix", function(from) .Call(Csparse_symmetric_to_general, from)) ## Specific conversions, should they be necessary. Better to convert as ## as(x, "TsparseMatrix") or as(x, "denseMatrix") setAs("nsCMatrix", "nsTMatrix", function(from) .Call(Csparse_to_Tsparse, from, FALSE)) ## Not needed, once we use "nCsparseMatrix" (-> ./ngCMatrix.R ): setAs("nsCMatrix", "dMatrix", .nC2d) setAs("nsCMatrix", "dsparseMatrix", .nC2d) setAs("nsCMatrix", "dsCMatrix", .nC2d) ## setAs("nsCMatrix", "lMatrix", .nC2l) setAs("nsCMatrix", "lsparseMatrix", .nC2l) setAs("nsCMatrix", "lsCMatrix", .nC2l) ## have rather tril() and triu() methods than ## setAs("nsCMatrix", "ntCMatrix", ....) setMethod("tril", "nsCMatrix", function(x, k = 0, ...) { if(x@uplo == "L" && k == 0) ## same internal structure + diag new("ntCMatrix", uplo = x@uplo, i = x@i, p = x@p, Dim = x@Dim, Dimnames = x@Dimnames) else tril(as(x, "ngCMatrix"), k = k, ...) }) setMethod("triu", "nsCMatrix", function(x, k = 0, ...) { if(x@uplo == "U" && k == 0) new("ntCMatrix", uplo = x@uplo, i = x@i, p = x@p, Dim = x@Dim, Dimnames = x@Dimnames) else triu(as(x, "ngCMatrix"), k = k, ...) }) setMethod("chol", signature(x = "nsCMatrix"), function(x, pivot=FALSE, ...) stop("temporarily disabled"))## FIXME ## Use more general method from CsparseMatrix class ## setMethod("t", signature(x = "nsCMatrix"), ## function(x) ## .Call(nsCMatrix_trans, x), ## valueClass = "nsCMatrix") Matrix/R/lsparseMatrix.R0000644000176200001440000000174612524132306014706 0ustar liggesusers#### Superclass Methods for all sparse logical matrices C2l <- function(from) { if(extends(cld <- getClassDef(class(from)), "lsparseMatrix")) return(from) ## else if(!(is.n <- extends(cld, "nsparseMatrix"))) { ## len.x <- length(from@x) from <- .Call(Csparse_drop, from, 0) ## did.drop <- length(from@x) != len.x } r <- as(.C2nC(from, extends(cld, "triangularMatrix")), "lsparseMatrix") if(!is.n && any(ina <- is.na(from@x))) { ## NAs must remain NA ## since we dropped, we "know" that the 'x' slots match: stopifnot(length(from@x) == length(r@x)) is.na(r@x) <- ina } r } setAs("CsparseMatrix", "lMatrix", C2l) setAs("CsparseMatrix", "lsparseMatrix", C2l) setAs("lsparseMatrix", "matrix", function(from) as(as(from, "ldenseMatrix"), "matrix")) setAs("lsparseMatrix", "dsparseMatrix", function(from) as(from, "dMatrix")) setMethod("image", "lsparseMatrix", function(x, ...) image(as(x,"dMatrix"), ...)) Matrix/R/Matrix.R0000644000176200001440000007151513141335454013322 0ustar liggesusers#### Toplevel ``virtual'' class "Matrix" ### Virtual coercions -- via smart "helpers" (-> ./Auxiliaries.R) setAs("Matrix", "sparseMatrix", function(from) as(from, "CsparseMatrix")) setAs("Matrix", "CsparseMatrix", function(from) as_Csparse(from)) setAs("Matrix", "denseMatrix", function(from) as_dense(from)) ## Maybe TODO: ## setAs("Matrix", "nMatrix", function(from) ....) ## Anything: we build on as.matrix(.) : ## --- authors can always provide their own specific setAs(*, "Matrix") setAs("ANY", "Matrix", function(from) Matrix(as.matrix(from))) ## Most of these work; this is a last resort: setAs("Matrix", "matrix", # do *not* call base::as.matrix() here: function(from) .bail.out.2("coerce", class(from), class(to))) setAs("matrix", "Matrix", function(from) Matrix(from)) ## ## probably not needed eventually: ## setAs(from = "ddenseMatrix", to = "matrix", ## function(from) { ## if(length(d <- dim(from)) != 2) stop("dim(.) has not length 2") ## array(from@x, dim = d, dimnames = dimnames(from)) ## }) .asmatrix <- function(x) as(x, "matrix") # not better; just for those hating typing ## Such that also base functions dispatch properly on our classes: if(.Matrix.avoiding.as.matrix) { as.matrix.Matrix <- function(x, ...) { if(nonTRUEoption("Matrix.quiet.as.matrix") && nonTRUEoption("Matrix.quiet")) warning("as.matrix() is deprecated (to become a no-op in the future). Use as(x, \"matrix\") or .asmatrix(x) instead.") as(x, "matrix") } as.array.Matrix <- function(x, ...) { warning("as.array() is deprecated. Use as(x, \"matrix\") or .asmatrix(x) instead.") as(x, "matrix") } } else { ## regularly -- documented since 2005 that this works as.array.Matrix <- as.matrix.Matrix <- function(x, ...) as(x, "matrix") } ## should propagate to all subclasses: setMethod("as.matrix", signature(x = "Matrix"), function(x) as.matrix.Matrix(x)) ## for 'Matrix' objects, as.array() should be equivalent: setMethod("as.array", signature(x = "Matrix"), function(x) as.array.Matrix(x)) ## head and tail apply to all Matrix objects for which subscripting is allowed: setMethod("head", signature(x = "Matrix"), utils::head.matrix) setMethod("tail", signature(x = "Matrix"), utils::tail.matrix) setMethod("drop", signature(x = "Matrix"), function(x) if(all(dim(x) != 1)) x else drop(as(x, "matrix"))) ## slow "fall back" method {subclasses should have faster ones}: setMethod("as.vector", "Matrix", function(x, mode) as.vector(as(x, "matrix"), mode)) ## so base functions calling as.vector() work too: ## S3 dispatch works for base::as.vector(), but S4 dispatch does not as.vector.Matrix <- function(x, mode) as.vector(as(x, "matrix"), mode) if(FALSE) { ## still does not work for c(1, Matrix(2)) ## For the same reason (and just in case) also do both S3 and S4 here: c.Matrix <- function(...) unlist(lapply(list(...), as.vector)) ## NB: Must use signature '(x, ..., recursive = FALSE)' : setMethod("c", "Matrix", function(x, ..., recursive) c.Matrix(x, ...)) ## The above is not sufficient for c(NA, 3:2, , ) setMethod("c", "numMatrixLike", function(x, ..., recursive) c.Matrix(x, ...)) }# not yet setAs("Matrix", "vector", function(from) as.vector (as(from, "matrix"))) setAs("Matrix", "numeric", function(from) as.numeric(as(from, "matrix"))) setAs("Matrix", "logical", function(from) as.logical(as(from, "matrix"))) setAs("Matrix", "integer", function(from) as.integer(as(from, "matrix"))) setAs("Matrix", "complex", function(from) as.complex(as(from, "matrix"))) ## mainly need these for "dMatrix" or "lMatrix" respectively, but why not general: setMethod("as.numeric", signature(x = "Matrix"), function(x, ...) as.numeric(as.vector(x))) setMethod("as.logical", signature(x = "Matrix"), function(x, ...) as.logical(as.vector(x))) setMethod("mean", signature(x = "sparseMatrix"), function(x, ...) mean(as(x,"sparseVector"), ...)) setMethod("mean", signature(x = "sparseVector"), function(x, trim = 0, na.rm = FALSE, ...) { if (na.rm) # remove NAs such that new length() is ok x <- x[!is.na(x)] # remains sparse! if(is0(trim)) sum(x) / length(x) else { ## fast trimmed mean for sparseVector: ## ---> we'd need fast & sparse sort(). ## Normally this means to define a xtfrm() method; ## however, that plus x[order(x, ..)] will NOT be sparse ## TODO: sortSparseVector(.) warning("trimmed mean of 'sparseVector' -- suboptimally using as.numeric(.)") mean(as.numeric(x), trim=trim) } }) ## for the non-"sparseMatrix" ones: setMethod("mean", signature(x = "Matrix"), function(x, trim = 0, na.rm = FALSE, ...) { if (na.rm) x <- x[!is.na(x)] if(is0(trim)) sum(x) / length(x) else mean(as.numeric(x), trim=trim) }) ## for non-"sparseMatrix" : setMethod("cov2cor", signature(V = "Matrix"), function(V) { ## was as(cov2cor(as(V, "matrix")), "dpoMatrix")) r <- V p <- (d <- dim(V))[1] if(p != d[2]) stop("'V' is not a square matrix") Is <- sqrt(1/diag(V)) # diag( 1/sigma_i ) if(any(!is.finite(Is))) warning("diag(.) had 0 or NA entries; non-finite result is doubtful") Is <- Diagonal(x = Is) r <- Is %*% V %*% Is r[cbind(1:p,1:p)] <- 1 # exact in diagonal as(forceSymmetric(r), "dpoMatrix") }) ## "base" has an isSymmetric() S3-generic since R 2.3.0 setMethod("isSymmetric", signature(object = "symmetricMatrix"), function(object, ...) TRUE) setMethod("isSymmetric", signature(object = "triangularMatrix"), ## TRUE iff diagonal: function(object, ...) isDiagonal(object)) setMethod("isTriangular", signature(object = "matrix"), isTriMat) setMethod("isDiagonal", signature(object = "matrix"), .is.diagonal) ## The "catch all" methods -- far from optimal: setMethod("symmpart", signature(x = "Matrix"), function(x) as(symmetrizeDimnames(x + t(x))/2, "symmetricMatrix")) setMethod("skewpart", signature(x = "Matrix"), function(x) symmetrizeDimnames(x - t(x))/2) ## FIXME: do this (similarly as for "ddense.." in C setMethod("symmpart", signature(x = "matrix"), function(x) symmetrizeDimnames(x + t(x))/2) setMethod("skewpart", signature(x = "matrix"), function(x) symmetrizeDimnames(x - t(x))/2) if(getRversion() >= "3.1.0") ## NB: ./nsparseMatrix.R and ./sparseVector.R have extra methods setMethod("anyNA", signature(x = "xMatrix"), function(x) anyNA(x@x)) setMethod("dim", signature(x = "Matrix"), function(x) x@Dim, valueClass = "integer") setMethod("length", "Matrix", function(x) prod(dim(x))) setMethod("dimnames", signature(x = "Matrix"), function(x) x@Dimnames) ## not exported but used more than once for "dimnames<-" method : ## -- or do only once for all "Matrix" classes ?? dimnamesGets <- function (x, value) { d <- dim(x) if (!is.list(value) || length(value) != 2 || !(is.null(v1 <- value[[1]]) || length(v1) == d[1]) || !(is.null(v2 <- value[[2]]) || length(v2) == d[2])) stop(gettextf("invalid dimnames given for %s object", dQuote(class(x))), domain=NA) x@Dimnames <- .fixupDimnames(value) x } dimnamesGetsNULL <- function(x) { message("dimnames(.) <- NULL: translated to \ndimnames(.) <- list(NULL,NULL) <==> unname(.)") x@Dimnames <- list(NULL,NULL) x } setMethod("dimnames<-", signature(x = "compMatrix", value = "list"), function(x, value) { ## "compMatrix" have 'factors' slot if(length(x@factors)) x@factors <- list() dimnamesGets(x, value) }) setMethod("dimnames<-", signature(x = "Matrix", value = "list"), dimnamesGets) setMethod("dimnames<-", signature(x = "compMatrix", value = "NULL"), function(x, value) { ## "compMatrix" have 'factors' slot if(length(x@factors)) x@factors <- list() dimnamesGetsNULL(x) }) setMethod("dimnames<-", signature(x = "Matrix", value = "NULL"), function(x, value) dimnamesGetsNULL(x)) setMethod("unname", signature("Matrix", force="missing"), function(obj) { obj@Dimnames <- list(NULL,NULL); obj}) Matrix <- function (data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL, sparse = NULL, doDiag = TRUE, forceCheck = FALSE) { i.M <- is(data, "Matrix") sM <- FALSE if(i.M) { if(is(data, "diagonalMatrix")) return(data) # in all cases sV <- FALSE } else if(inherits(data, "table")) # special treatment class(data) <- "matrix" # "matrix" first for S4 dispatch else if(is(data, "sparseVector")) { data <- spV2M(data, nrow, ncol, byrow=byrow) i.M <- sparse <- forceCheck <- sM <- sV <- TRUE } if(is.null(sparse1 <- sparse) && (i.M || is(data, "matrix"))) sparse <- sparseDefault(data) doDN <- TRUE i.m <- is.matrix(data) if (i.M) { if (!sV) { if(!missing(nrow) || !missing(ncol)|| !missing(byrow)) warning("'nrow', 'ncol', etc, are disregarded when 'data' is \"Matrix\" already") sM <- is(data,"sparseMatrix") if(!forceCheck && ((sparse && sM) || (!sparse && !sM))) return(data) ## else : convert dense <-> sparse -> at end } } else if (!i.m) { ## cut & paste from "base::matrix" : ## avoid copying to strip attributes in simple cases if (is.object(data) || !is.atomic(data)) data <- as.vector(data) if(length(data) == 1 && is0(data) && !identical(sparse, FALSE)) { ## Matrix(0, ...) : always sparse unless "sparse = FALSE": if(is.null(sparse)) sparse1 <- sparse <- TRUE i.M <- sM <- TRUE if (missing(nrow)) nrow <- ceiling(1/ncol) else if (missing(ncol)) ncol <- ceiling(1/nrow) isSym <- nrow == ncol ## will be sparse: do NOT construct full matrix! data <- new(paste0(if(is.numeric(data)) "d" else if(is.logical(data)) "l" else stop("invalid 'data'"), if(isSym) "s" else "g", "CMatrix"), p = rep.int(0L, ncol+1L), Dim = as.integer(c(nrow,ncol)), Dimnames = if(is.null.DN(dimnames)) list(NULL,NULL) else dimnames) } else { ## normal case ## Now 'forbidden' : ## data <- .Internal(matrix(data, nrow, ncol, byrow, dimnames, ## missing(nrow), missing(ncol))) data <- .External(Mmatrix, data, nrow, ncol, byrow, dimnames, missing(nrow), missing(ncol)) if(is.null(sparse)) sparse <- sparseDefault(data) } doDN <- FALSE # .. set above } else if(!missing(nrow) || !missing(ncol)|| !missing(byrow)) ## i.m == is.matrix(.) warning("'nrow', 'ncol', etc, are disregarded for matrix 'data'") ## 'data' is now a "matrix" or "Matrix" if (doDN && !is.null(dimnames)) dimnames(data) <- dimnames ## check for symmetric / triangular / diagonal : isSym <- isSymmetric(data) if((isTri <- !isSym)) isTri <- isTriangular(data) isDiag <- isSym # cannot be diagonal if it isn't symmetric if(isDiag) # do not *build* 1 x 1 diagonalMatrix isDiag <- doDiag && !isTRUE(sparse1) && nrow(data) > 1 && isDiagonal(data) ## try to coerce ``via'' virtual classes if(isDiag) { ## diagonal is preferred to sparse ! data <- as(data, "diagonalMatrix") isSym <- FALSE } else if(sparse && !sM) data <- as(data, "sparseMatrix") else if(!sparse) { if(i.M) { ## data is 'Matrix' if(!is(data, "denseMatrix")) data <- as(data, "denseMatrix") } else { ## data is "matrix" (and result "dense" -> go via "general" ctype <- typeof(data) if (ctype == "complex") stop("complex matrices not yet implemented in Matrix package") if (ctype == "integer") ## integer Matrices not yet implemented storage.mode(data) <- "double" data <- new(paste0(.M.kind(data), "geMatrix"), Dim = dim(data), Dimnames = .M.DN(data), x = c(data)) } } if(isTri && !is(data, "triangularMatrix")) { data <- if(attr(isTri,"kind") == "L") tril(data) else triu(data) #was as(data, "triangularMatrix") } else if(isSym && !is(data, "symmetricMatrix")) data <- forceSymmetric(data) #was as(data, "symmetricMatrix") data } ## Methods for operations where one argument is numeric ## maybe not 100% optimal, but elegant: setMethod("solve", signature(a = "Matrix", b = "missing"), function(a, b, ...) solve(a, Diagonal(nrow(a)))) setMethod("solve", signature(a = "Matrix", b = "numeric"), function(a, b, ...) callGeneric(a, Matrix(b))) setMethod("solve", signature(a = "Matrix", b = "matrix"), function(a, b, ...) callGeneric(a, Matrix(b))) setMethod("solve", signature(a = "matrix", b = "Matrix"), function(a, b, ...) callGeneric(Matrix(a), b)) setMethod("solve", signature(a = "Matrix", b = "diagonalMatrix"), function(a, b, ...) callGeneric(a, as(b,"CsparseMatrix"))) ## when no sub-class method is found, bail out setMethod("solve", signature(a = "Matrix", b = "ANY"), function(a, b, ...) .bail.out.2("solve", class(a), class(b))) setMethod("solve", signature(a = "ANY", b = "Matrix"), function(a, b, ...) .bail.out.2("solve", class(a), class(b))) setMethod("chol2inv", signature(x = "denseMatrix"), function (x, ...) chol2inv(as(as(x, "dMatrix"), "dtrMatrix"), ...)) setMethod("chol2inv", signature(x = "diagonalMatrix"), function (x, ...) { chk.s(..., which.call=-2) tcrossprod(solve(x)) }) setMethod("chol2inv", signature(x = "sparseMatrix"), function (x, ...) { chk.s(..., which.call=-2) ## for now: tcrossprod(solve(as(x,"triangularMatrix"))) }) ## There are special sparse methods in ./kronecker.R ; this is a "fall back": setMethod("kronecker", signature(X = "Matrix", Y = "ANY", FUN = "ANY", make.dimnames = "ANY"), function(X, Y, FUN, make.dimnames, ...) { if(is(X, "sparseMatrix")) warning("using slow kronecker() method") X <- as(X, "matrix") ; Matrix(callGeneric()) }) setMethod("kronecker", signature(X = "ANY", Y = "Matrix", FUN = "ANY", make.dimnames = "ANY"), function(X, Y, FUN, make.dimnames, ...) { if(is(Y, "sparseMatrix")) warning("using slow kronecker() method") Y <- as(Y, "matrix") ; Matrix(callGeneric()) }) setMethod("determinant", signature(x = "Matrix", logarithm = "missing"), function(x, logarithm, ...) determinant(x, logarithm = TRUE, ...)) ## The ``Right Thing'' to do : ## base::det() calls [base::]determinant(); ## our det() should call our determinant() : det <- base::det environment(det) <- environment()## == asNamespace("Matrix") setMethod("Cholesky", signature(A = "Matrix"), function(A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, ...) stop(gettextf("Cholesky(A) called for 'A' of class \"%s\";\n\t it is currently defined for sparseMatrix only; consider using chol() instead", class(A)), call. = FALSE, domain=NA)) ## FIXME: All of these should never be called setMethod("chol", signature(x = "Matrix"), function(x, pivot, ...) .bail.out.1("chol", class(x))) setMethod("determinant", signature(x = "Matrix", logarithm = "logical"), function(x, logarithm, ...) determinant(as(x,"dMatrix"), logarithm=logarithm, ...)) setMethod("diag", signature(x = "Matrix"), function(x, nrow, ncol) .bail.out.1("diag", class(x))) if(FALSE)## TODO: activate later setMethod("diag<-", signature(x = "Matrix"), function(x, value) .bail.out.1("diag", class(x))) setMethod("t", signature(x = "Matrix"), function(x) .bail.out.1(.Generic, class(x))) ## NB: "sparseMatrix" works via "sparseVector" setMethod("rep", "Matrix", function(x, ...) rep(as(x, "matrix"), ...)) setMethod("norm", signature(x = "Matrix", type = "character"), function(x, type, ...) .bail.out.1("norm", class(x))) setMethod("rcond", signature(x = "Matrix", norm = "character"), function(x, norm, ...) .bail.out.1("rcond", class(x))) ## for all : setMethod("norm", signature(x = "ANY", type = "missing"), function(x, type, ...) norm(x, type = "O", ...)) setMethod("rcond", signature(x = "ANY", norm = "missing"), function(x, norm, ...) rcond(x, norm = "O", ...)) setMethod("lu", "matrix", function(x, warnSing = TRUE, ...) lu(..2dge(x), warnSing=warnSing, ...)) ## We want to use all.equal.numeric() *and* make sure that uses ## not just base::as.vector but the generic with our methods: all.equal_num <- base::all.equal.numeric ## from /src/library/base/R/all.equal.R environment(all.equal_num) <- environment()## == as.environment("Matrix") all.equal_Mat <- function(target, current, check.attributes = TRUE, factorsCheck = FALSE, ...) { msg <- attr.all_Mat(target, current, check.attributes=check.attributes, factorsCheck=factorsCheck, ...) if(is.list(msg)) msg[[1]] else .a.e.comb(msg, all.equal_num(as.vector(target), as.vector(current), check.attributes=check.attributes, ...)) } ## The all.equal() methods for dense matrices (and fallback): setMethod("all.equal", c(target = "Matrix", current = "Matrix"), all.equal_Mat) setMethod("all.equal", c(target = "Matrix", current = "ANY"), all.equal_Mat) setMethod("all.equal", c(target = "ANY", current = "Matrix"), all.equal_Mat) ## -> ./sparseMatrix.R, ./sparseVector.R have specific methods ## MM: More or less "Cut & paste" from ## --- diff.default() from R/src/library/base/R/diff.R : setMethod("diff", signature(x = "Matrix"), function(x, lag = 1, differences = 1, ...) { if (length(lag) > 1 || length(differences) > 1 || lag < 1 || differences < 1) stop("'lag' and 'differences' must be integers >= 1") xlen <- nrow(x) if (lag * differences >= xlen) return(x[,FALSE][0]) # empty of proper mode i1 <- -1:-lag for (i in 1:differences) x <- x[i1, , drop = FALSE] - x[-nrow(x):-(nrow(x)-lag+1), , drop = FALSE] x }) setMethod("image", "Matrix", function(x, ...) { # coercing to sparse is not inefficient, ## since we need 'i' and 'j' for levelplot() x <- as(as(x, "sparseMatrix"), "dsparseMatrix") ## note that "ddiMatrix" is "sparse*" and "d*", but *not* dsparse callGeneric() }) ## Group Methods ## NOTE: "&" and "|" are now in group "Logic" c "Ops" --> ./Ops.R ## "!" is in ./not.R ## Further, see ./Ops.R ## ~~~~~ ### -------------------------------------------------------------------------- ### ### Subsetting "[" and ### SubAssign "[<-" : The "missing" cases can be dealt with here, "at the top": ## Using "index" for indices should allow ## integer (numeric), logical, or character (names!) indices : ## "x[]": setMethod("[", signature(x = "Matrix", i = "missing", j = "missing", drop = "ANY"), function (x, i, j, ..., drop) x) ## missing 'drop' --> 'drop = TRUE' ## ----------- ## select rows __ or __ vector indexing: setMethod("[", signature(x = "Matrix", i = "index", j = "missing", drop = "missing"), function(x,i,j, ..., drop) { Matrix.msg("M[i,m,m] : nargs()=",nargs(), .M.level = 2) if(nargs() == 2) { ## e.g. M[0] , M[TRUE], M[1:2] .M.vectorSub(x,i) } else { callGeneric(x, i=i, , drop=TRUE) ## ^^ } }) ## select columns setMethod("[", signature(x = "Matrix", i = "missing", j = "index", drop = "missing"), function(x,i,j, ..., drop) { Matrix.msg("M[m,i,m] : nargs()=",nargs(), .M.level = 2) callGeneric(x, j=j, drop= TRUE) }) setMethod("[", signature(x = "Matrix", i = "index", j = "index", drop = "missing"), function(x,i,j, ..., drop) { Matrix.msg("M[i,i,m] : nargs()=",nargs(), .M.level = 2) callGeneric(x, i=i, j=j, drop= TRUE) }) ## bail out if any of (i,j,drop) is "non-sense" setMethod("[", signature(x = "Matrix", i = "ANY", j = "ANY", drop = "ANY"), function(x,i,j, ..., drop) stop("invalid or not-yet-implemented 'Matrix' subsetting")) ## logical indexing, such as M[ M >= 7 ] *BUT* also M[ M[,1] >= 3,], ## The following is *both* for M [ ] ## and also for M [ , ] .M.sub.i.logical <- function (x, i, j, ..., drop) { nA <- nargs() # counts 'M[i]' as 2 arguments, 'M[i,]' as 3 if(nA == 2) { ## M [ M >= 7 ] ## FIXME: when both 'x' and 'i' are sparse, this can be very inefficient if(is(x, "sparseMatrix")) message("[ ] : .M.sub.i.logical() maybe inefficient") toC <- geClass(x) if(canCoerce(x, toC)) as(x, toC)@x[as.vector(i)] else as(as(as(x, "generalMatrix"), "denseMatrix"), toC)@x[as.vector(i)] ## -> error when lengths don't match } else if(nA == 3) { ## M[i, ] e.g., M [ M[,1, drop=FALSE] >= 7, ] ## Note: current method dispatch seems not to call this ever if(!anyNA(i) && all(i)) ## select everything x else ## not selecting all -> result is *NOT* diagonal/triangular/symmetric/.. ## keep j missing, but drop = "logical" callGeneric(as(x,"generalMatrix"), i = i, , drop = TRUE) } else stop(gettextf( "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.logical)?", nA), domain=NA) } ## instead of using 'drop = "ANY"' {against ambiguity notices}: for(ii in c("lMatrix", "logical")) setMethod("[", signature(x = "Matrix", i = ii, j = "missing", drop = "missing"), .M.sub.i.logical) rm(ii) ##' x[ ij ] where ij is (i,j) 2-column matrix ##' @note only called from .M.sub.i.2col(x, i) below subset.ij <- function(x, ij) { m <- nrow(ij) if(m > 3) { cld <- getClassDef(class(x)) sym.x <- extends(cld, "symmetricMatrix") if(sym.x) { W <- if(x@uplo == "U") # stored only [i,j] with i <= j ij[,1] > ij[,2] else ij[,1] < ij[,2] if(any(W)) ij[W,] <- ij[W, 2:1] } if(extends(cld, "sparseMatrix")) { ## do something smarter: di <- dim(x) if(!extends(cld, "CsparseMatrix")) { x <- as(x, "CsparseMatrix") # simpler; our standard cld <- getClassDef(class(x)) } tri.x <- extends(cld, "triangularMatrix") if(tri.x) { ## need these for the 'x' slot in any case if (x@diag == "U") x <- .Call(Csparse_diagU2N, x) ## slightly more efficient than non0.i() or non0ind(): ij.x <- .Call(compressed_non_0_ij, x, isC=TRUE) } else { ## symmetric / general : for symmetric, only "existing" part ij.x <- non0.i(x, cld) } m1 <- .Call(m_encodeInd, ij.x, di, orig1=FALSE, checkBounds=FALSE) m2 <- .Call(m_encodeInd, ij, di, orig1= TRUE, checkBounds= TRUE) mi <- match(m2, m1, nomatch=0) mmi <- mi != 0L ## == (m2 %in% m1) ## Result: all FALSE or 0 apart from where we match non-zero entries ans <- vector(mode = .type.kind[.M.kindC(cld)], length = m) ## those that are *not* zero: ans[mmi] <- if(extends(cld, "nsparseMatrix")) TRUE else x@x[mi[mmi]] if(any(ina <- is.na(m2))) # has one or two NA in that (i,j) row is.na(ans) <- ina ans } else { ## non-sparse : dense ##---- NEVER happens: 'denseMatrix' has its own setMethod(.) ! message("m[ ]: inefficiently indexing single elements") i1 <- ij[,1] i2 <- ij[,2] ## very inefficient for large m unlist(lapply(seq_len(m), function(j) x[i1[j], i2[j]])) } } else { # 1 <= m <= 3 i1 <- ij[,1] i2 <- ij[,2] unlist(lapply(seq_len(m), function(j) x[i1[j], i2[j]])) } } ## A[ ij ] where ij is (i,j) 2-column matrix -- but also when that is logical mat! .M.sub.i.2col <- function (x, i, j, ..., drop) { nA <- nargs() if(nA != 2) stop(domain=NA, gettextf( "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' (i.2col)?", nA)) ## else: (nA == 2): M [ cbind(ii,jj) ] or M [ ] if(!is.integer(nc <- ncol(i))) stop(".M.sub.i.2col(): 'i' has no integer column number;\n should never happen; please report") if(is.logical(i)) return(.M.sub.i.logical(x, i=i)) # call with 2 args! else if(!is.numeric(i) || nc != 2) stop("such indexing must be by logical or 2-column numeric matrix") if(!nrow(i)) return(vector(mode = .type.kind[.M.kind(x)])) ## else subset.ij(x, i) } setMethod("[", signature(x = "Matrix", i = "matrix", j = "missing"),# drop="ANY" .M.sub.i.2col) ## just against ambiguity notices : setMethod("[", signature(x = "Matrix", i = "matrix", j = "missing", drop="missing"), .M.sub.i.2col) ### "[<-" : ----------------- ## A[ ij ] <- value, where ij is (i,j) 2-column matrix : ## ---------------- ## The cheap general method, now only used for "pMatrix","indMatrix" ## sparse all use .TM.repl.i.mat() ## NOTE: need '...' below such that setMethod() does ## not use .local() such that nargs() will work correctly: .M.repl.i.2col <- function (x, i, j, ..., value) { nA <- nargs() if(nA == 3) { ## M [ cbind(ii,jj) ] <- value or M [ Lmat ] <- value if(!is.integer(nc <- ncol(i))) stop(".M.repl.i.2col(): 'i' has no integer column number;\n should never happen; please report") else if(!is.numeric(i) || nc != 2) stop("such indexing must be by logical or 2-column numeric matrix") if(is.logical(i)) { message(".M.repl.i.2col(): drop 'matrix' case ...") ## c(i) : drop "matrix" to logical vector return( callGeneric(x, i=c(i), value=value) ) } if(!is.integer(i)) storage.mode(i) <- "integer" if(any(i < 0)) stop("negative values are not allowed in a matrix subscript") if(anyNA(i)) stop("NAs are not allowed in subscripted assignments") if(any(i0 <- (i == 0))) # remove them i <- i[ - which(i0, arr.ind = TRUE)[,"row"], ] ## now have integer i >= 1 m <- nrow(i) ## mod.x <- .type.kind[.M.kind(x)] if(length(value) > 0 && m %% length(value) != 0) warning("number of items to replace is not a multiple of replacement length") ## recycle: value <- rep_len(value, m) i1 <- i[,1] i2 <- i[,2] if(m > 2) message("m[ ] <- v: inefficiently treating single elements") ## inefficient -- FIXME -- (also loses "symmetry" unnecessarily) for(k in seq_len(m)) x[i1[k], i2[k]] <- value[k] x } else stop(gettextf( "nargs() = %d. Extraneous illegal arguments inside '[ .. ]' ?", nA), domain=NA) } setReplaceMethod("[", signature(x = "Matrix", i = "matrix", j = "missing", value = "replValue"), .M.repl.i.2col) ## Three catch-all methods ... would be very inefficient for sparse* ## --> extra methods in ./sparseMatrix.R setReplaceMethod("[", signature(x = "Matrix", i = "missing", j = "ANY", value = "Matrix"), function (x, i, j, ..., value) callGeneric(x=x, , j=j, value = as.vector(value))) setReplaceMethod("[", signature(x = "Matrix", i = "ANY", j = "missing", value = "Matrix"), function (x, i, j, ..., value) if(nargs() == 3) callGeneric(x=x, i=i, value = as.vector(value)) else callGeneric(x=x, i=i, , value = as.vector(value))) setReplaceMethod("[", signature(x = "Matrix", i = "ANY", j = "ANY", value = "Matrix"), function (x, i, j, ..., value) callGeneric(x=x, i=i, j=j, value = as.vector(value))) setReplaceMethod("[", signature(x = "Matrix", i = "missing", j = "ANY", value = "matrix"), function (x, i, j, ..., value) callGeneric(x=x, , j=j, value = c(value))) setReplaceMethod("[", signature(x = "Matrix", i = "ANY", j = "missing", value = "matrix"), function (x, i, j, ..., value) if(nargs() == 3) callGeneric(x=x, i=i, value = c(value)) else callGeneric(x=x, i=i, , value = c(value))) setReplaceMethod("[", signature(x = "Matrix", i = "ANY", j = "ANY", value = "matrix"), function (x, i, j, value) callGeneric(x=x, i=i, j=j, value = c(value))) ## M [ ] <- value; used notably for x = "CsparseMatrix" ------------------- .repl.i.lDMat <- function (x, i, j, ..., value) { ## nA <- nargs() ## if(nA != 3) stop(gettextf("nargs() = %d should never happen; please report.", nA), domain=NA) ## else: nA == 3 i.e., M [ Lmat ] <- value ## x[i] <- value ; return(x) `[<-`(x, i=which(as.vector(i)), value=value) } setReplaceMethod("[", signature(x = "Matrix", i = "ldenseMatrix", j = "missing", value = "replValue"), .repl.i.lDMat) setReplaceMethod("[", signature(x = "Matrix", i = "ndenseMatrix", j = "missing", value = "replValue"), .repl.i.lDMat) .repl.i.lSMat <- function (x, i, j, ..., value) { ## nA <- nargs() ## if(nA != 3) stop(gettextf("nargs() = %d should never happen; please report.", nA), domain=NA) ## else: nA == 3 i.e., M [ Lmat ] <- value ## x[i] <- value ; return(x) `[<-`(x, i=which(as(i, "sparseVector")), value=value) } setReplaceMethod("[", signature(x = "Matrix", i = "lsparseMatrix", j = "missing", value = "replValue"), .repl.i.lSMat) setReplaceMethod("[", signature(x = "Matrix", i = "nsparseMatrix", j = "missing", value = "replValue"), .repl.i.lSMat) ## (ANY,ANY,ANY) is used when no `real method' is implemented : setReplaceMethod("[", signature(x = "Matrix", i = "ANY", j = "ANY", value = "ANY"), function (x, i, j, value) { if(!is.atomic(value)) stop(gettextf( "RHS 'value' (class %s) matches 'ANY', but must match matrix class %s", class(value), class(x)), domain=NA) else stop("not-yet-implemented 'Matrix[<-' method") }) Matrix/R/ltCMatrix.R0000644000176200001440000000216711004710547013756 0ustar liggesusers#### Logical Sparse Triangular Matrices in Compressed column-oriented format setAs("ltCMatrix", "matrix", function(from) as(as(from, "lgCMatrix"), "matrix")) setAs("matrix", "ltCMatrix", function(from) as(as(from, "dtCMatrix"), "ltCMatrix")) setAs("ltCMatrix", "lgCMatrix", function(from) copyClass(diagU2N(from), "lgCMatrix", c("i", "p", "x", "Dim", "Dimnames"))) setAs("ltCMatrix", "ltTMatrix", function(from) .Call(Csparse_to_Tsparse, from, TRUE)) setAs("ltCMatrix", "dMatrix", # < instead of "dtCMatrix" function(from) new("dtCMatrix", i = from@i, p = from@p, x = as.double(from@x), uplo = from@uplo, diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames)) setAs("lgCMatrix", "ltCMatrix", # to triangular {needed in triu() } function(from) as(as(as(from, "lgTMatrix"), "ltTMatrix"), "ltCMatrix")) ## setAs("ltCMatrix", "generalMatrix", ## function(from) ......) ## setMethod("t", signature(x = "ltCMatrix"), ## function(x) .Call(ltCMatrix_trans, x), ## valueClass = "ltCMatrix") Matrix/R/rankMatrix.R0000644000176200001440000001154213122311202014150 0ustar liggesusers#### Determine *the* rank of a matrix #### -------------------------------- ## ## As this is not such a well-defined problem as people think, ## we provide *some* possibilities here, including the Matlab one. ## ## Ideas by Martin Maechler (April 2007) and Ravi Varadhan (October 2007) rankMatrix <- function(x, tol = NULL, method = c("tolNorm2", "qr.R", "qrLINPACK", "qr", "useGrad", "maybeGrad"), sval = svd(x, 0,0)$d, warn.t = TRUE) { ## Purpose: rank of a matrix ``as Matlab'' or "according to Ravi V" ## ---------------------------------------------------------------------- ## Arguments: x: a numerical matrix, maybe non-square ## tol: numerical tolerance (compared to singular values) ## sval: vector of non-increasing singular values of x ## (pass as argument if already known) ## ---------------------------------------------------------------------- ## Author: Martin Maechler, Date: 7 Apr 2007, 16:16 ## ---------------------------------------------------------------------- ## ## maybeGrad (Ravi V.): This algorithm determines the rank based on the ## "gradient" of the ## absolute, singular values, rather than enforcing a rigid ## tolerance criterion, ## ## Author: Ravi Varadhan, Date: 22 October 2007 // Tweaks: MM, Oct.23 ## ---------------------------------------------------------------------- stopifnot(length(d <- dim(x)) == 2) p <- min(d) ## miss.meth <- missing(method) method <- match.arg(method) if(useGrad <- (method %in% c("useGrad", "maybeGrad"))) { stopifnot(length(sval) == p, diff(sval) <= 0) # must be sorted non-increasingly: max = s..[1] if(sval[1] == 0) { ## <==> all singular values are zero <==> Matrix = 0 <==> rank = 0 useGrad <- FALSE method <- eval(formals()[["method"]])[[1]] } else { ln.av <- log(abs(sval)) diff1 <- diff(ln.av) if(method == "maybeGrad") { grad <- (min(ln.av) - max(ln.av)) / p useGrad <- !is.na(grad) && min(diff1) <= min(-3, 10 * grad) }# ------- } } if(!useGrad) { x.dense <- is.numeric(x) || is(x,"denseMatrix") ## "qr" is allowed for backcompatibility [change @ 2013-11-24] if((Meth <- method) == "qr") method <- if(x.dense) "qrLINPACK" else "qr.R" else Meth <- substr(method, 1,2) if(Meth == "qr") { if(is.null(tol)) tol <- max(d) * .Machine$double.eps } else { ## (Meth != "qr"), i.e. "tolNorm2" if(is.null(tol)) { if(!x.dense && missing(sval) && prod(d) >= 100000L) warning(gettextf( "rankMatrix(, method = '%s') coerces to dense matrix. Probably should rather use method = 'qr' !?", method), immediate.=TRUE, domain=NA) ## the "Matlab" default: stopifnot(diff(sval) <= 0) #=> sval[1]= max(sval) tol <- max(d) * .Machine$double.eps } else stopifnot((tol <- as.numeric(tol)[[1]]) >= 0) } } structure(## rank : if(useGrad) which.min(diff1) else if(Meth == "qr") { if((do.t <- (d[1L] < d[2L])) && warn.t) warning(gettextf( "rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)")) q.r <- qr(if(do.t) t(x) else x, tol=tol, LAPACK = method != "qrLINPACK") if(x.dense && (method == "qrLINPACK")) q.r$rank else { ## else "qr.R" or sparse {or a problem) diagR <- if(x.dense) # faster than, but equivalent to diag(qr.R(q.r)) diag(q.r$qr) else ## FIXME: Here, we could be quite a bit faster, ## by not returning the full sparseQR, but just ## doing the following in C, and return the rank. diag(q.r@R) d.i <- abs(diagR) ## is abs(.) unneeded? [FIXME] ## declare those entries to be zero that are < tol*max(.) if((mdi <- max(d.i)) > 0) sum(d.i >= tol * mdi) else 0L # for 0-matrix ## was sum(diag(q.r@R) != 0) } ## else stop(gettextf( ## "method %s not applicable for qr() result class %s", ## sQuote(method), dQuote(class(q.r)[1])), ## domain=NA) } else if(sval[1] > 0) sum(sval >= tol * sval[1]) else 0L, ## "tolNorm2" "method" = method, "useGrad" = useGrad, "tol" = if(useGrad) NA else tol) } ## Ravi's plot of the absolute singular values: if(FALSE) { ## if (plot.eigen) { plot(abs(sval), type = "b", xlab = "Index", xaxt = "n", log = "y", ylab = "|singular value| [log scaled]") axis(1, at = unique(c(axTicks(1), rank, p))) abline(v = rank, lty = 3) mtext(sprintf("rank = %d (used %s (%g))", rank, if(use.grad)"'gradient'" else "fixed tol.", if(use.grad) min(diff1) else tol)) } Matrix/R/dpoMatrix.R0000644000176200001440000000546612322331041014013 0ustar liggesusers#### Positive-definite Symmetric Matrices -- Coercion and Methods setAs("dpoMatrix", "dppMatrix", function(from) copyClass(.Call(dsyMatrix_as_dspMatrix, from), "dppMatrix", sNames = c("x", "Dim", "Dimnames", "uplo", "factors")))#FIXME , check=FALSE setAs("dpoMatrix", "corMatrix", function(from) { if(!is.null(cm <- from@factors$correlation)) return(cm) ## else sd <- sqrt(diag(from)) if(is.null(names(sd)) && !is.null(nms <- from@Dimnames[[1]])) names(sd) <- nms Is <- Diagonal(x = 1/sd) .set.factors(from, "correlation", new("corMatrix", as(forceSymmetric(Is %*% from %*% Is), "dpoMatrix"), sd = unname(sd))) }) setAs("dpoMatrix", "lMatrix", function(from) as(as(from, "dsyMatrix"), "lMatrix")) setAs("dpoMatrix", "nMatrix", function(from) as(as(from, "dsyMatrix"), "nMatrix")) if(FALSE) # should no longer be needed setAs("corMatrix", "lMatrix", function(from) as(as(from, "dpoMatrix"), "lMatrix")) ## Needed *in addition* to the general to_dpo() method below: setAs("dspMatrix", "dpoMatrix", function(from) as(as(from,"dsyMatrix"), "dpoMatrix")) to_dpo <- function(from) # not coercing to "dsy*" explicitly: as(as(as(as(from, "symmetricMatrix"), "dMatrix"), "denseMatrix"), "dpoMatrix") setAs("Matrix", "dpoMatrix", to_dpo) setAs("matrix", "dpoMatrix", to_dpo) setMethod("chol", signature(x = "dpoMatrix"), function(x, pivot, ...) .Call(dpoMatrix_chol, x)) setMethod("rcond", signature(x = "dpoMatrix", norm = "character"), function(x, norm, ...) .Call(dpoMatrix_rcond, x, norm)) setMethod("rcond", signature(x = "dpoMatrix", norm = "missing"), function(x, norm, ...) .Call(dpoMatrix_rcond, x, "O")) setMethod("solve", signature(a = "dpoMatrix", b = "missing"), function(a, b, ...) .Call(dpoMatrix_solve, a), valueClass = "dpoMatrix") setMethod("solve", signature(a = "dpoMatrix", b = "dgeMatrix"), function(a, b, ...) .Call(dpoMatrix_dgeMatrix_solve, a, b), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dpoMatrix", b = "matrix"), function(a, b, ...) .Call(dpoMatrix_matrix_solve, a, b), valueClass = "matrix") mkDet.via.chol <- function(x, logarithm, ...) mkDet(logarithm, ldet = 2*sum(log(abs(diag(chol(x))))), sig = 1L) setMethod("determinant", signature(x = "dpoMatrix", logarithm = "logical"), mkDet.via.chol) setMethod("determinant", signature(x = "dpoMatrix", logarithm = "missing"), function(x, logarithm, ...) mkDet.via.chol(x, logarithm=TRUE)) ## Is this usable / necessary? -- FIXME! ## setMethod("solve", signature(a = "dpoMatrix", b = "numeric"), ## function(a, b, ...) ## as.numeric(.Call(dpoMatrix_matrix_solve, ## a, as.matrix(b))), ## valueClass = "numeric") Matrix/R/dspMatrix.R0000644000176200001440000000531113047113565014022 0ustar liggesusers### Coercion and Methods for Symmetric Packed Matrices dsp2dsy <- function(from) .Call(dspMatrix_as_dsyMatrix, from) dsp2C <- function(from) dsy2C(.Call(dspMatrix_as_dsyMatrix, from)) setAs("dspMatrix", "dsyMatrix", dsp2dsy) ## setAs("dspMatrix", "dsCMatrix", dsp2C) setAs("dspMatrix", "CsparseMatrix", dsp2C) setAs("dspMatrix", "sparseMatrix", dsp2C) ## dge <--> dsp via dsy .dense2sp <- function(from) .dsy2dsp(.dense2sy(from)) setAs("dgeMatrix", "dspMatrix", .dense2sp) setAs("matrix", "dspMatrix", function(from) .dense2sp(..2dge(from))) ## S3-matrix <--> dsp via dsy setAs("dspMatrix", "matrix", function(from) .dsy2mat(dsp2dsy(from))) setMethod("rcond", signature(x = "dspMatrix", norm = "character"), function(x, norm, ...) .Call(dspMatrix_rcond, x, norm), valueClass = "numeric") setMethod("rcond", signature(x = "dspMatrix", norm = "missing"), function(x, norm, ...) .Call(dspMatrix_rcond, x, "O"), valueClass = "numeric") setMethod("BunchKaufman", signature(x = "dspMatrix"), function(x) .Call(dspMatrix_trf, x)) ## Should define multiplication from the right setMethod("solve", signature(a = "dspMatrix", b = "missing"), function(a, b, ...) .Call(dspMatrix_solve, a), valueClass = "dspMatrix") setMethod("solve", signature(a = "dspMatrix", b = "matrix"), function(a, b, ...) .Call(dspMatrix_matrix_solve, a, b), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dspMatrix", b = "ddenseMatrix"), function(a, b, ...) .Call(dspMatrix_matrix_solve, a, b), valueClass = "dgeMatrix") ##setMethod("solve", signature(a = "dspMatrix", b = "numeric"), ## function(a, b, ...) ## .Call(dspMatrix_matrix_solve, a, as.matrix(b)), ## valueClass = "dgeMatrix") ## No longer needed ## setMethod("solve", signature(a = "dspMatrix", b = "integer"), ## function(a, b, ...) { ## storage.mode(b) <- "double" ## .Call(dspMatrix_matrix_solve, a, as.matrix(b)) ## }, valueClass = "dgeMatrix") setMethod("norm", signature(x = "dspMatrix", type = "character"), function(x, type, ...) if(identical("2", type)) norm2(x) else .Call(dspMatrix_norm, x, type), valueClass = "numeric") setMethod("norm", signature(x = "dspMatrix", type = "missing"), function(x, type, ...) .Call(dspMatrix_norm, x, "O"), valueClass = "numeric") ## FIXME: speed up! setMethod("t", signature(x = "dspMatrix"), function(x) as(t(as(x, "dsyMatrix")), "dspMatrix"), valueClass = "dspMatrix") setMethod("diag", signature(x = "dspMatrix"), function(x, nrow, ncol) .Call(dspMatrix_getDiag, x)) setMethod("diag<-", signature(x = "dspMatrix"), function(x, value) .Call(dspMatrix_setDiag, x, value)) Matrix/R/nearPD.R0000644000176200001440000000752712176145760013237 0ustar liggesusers ## nearcor.R : ## Copyright (2007) Jens Oehlschlägel ## GPL licence, no warranty, use at your own risk nearPD <- ## Computes the nearest correlation matrix to an approximate ## correlation matrix, i.e. not positive semidefinite. function(x # n-by-n approx covariance/correlation matrix , corr = FALSE, keepDiag = FALSE , do2eigen = TRUE # if TRUE do a sfsmisc::posdefify() eigen step , doSym = FALSE # symmetrize after tcrossprod() , doDykstra = TRUE # do use Dykstra's correction , only.values = FALSE# if TRUE simply return lambda[j]. , ensureSymmetry = !isSymmetric(x)# so user can set to FALSE iff she knows.. , eig.tol = 1e-6 # defines relative positiveness of eigenvalues compared to largest , conv.tol = 1e-7 # convergence tolerance for algorithm , posd.tol = 1e-8 # tolerance for enforcing positive definiteness , maxit = 100 # maximum number of iterations allowed , conv.norm.type = "I" , trace = FALSE # set to TRUE (or 1 ..) to trace iterations ) { if(ensureSymmetry) { ## only if needed/wanted ... ## message("applying nearPD() to symmpart(x)") x <- symmpart(x) } n <- ncol(x) if(keepDiag) diagX0 <- diag(x) if(doDykstra) { ## D_S should be like x, but filled with '0' -- following also works for 'Matrix': D_S <- x; D_S[] <- 0 } X <- x iter <- 0 ; converged <- FALSE; conv <- Inf while (iter < maxit && !converged) { Y <- X if(doDykstra) R <- Y - D_S ## project onto PSD matrices X_k = P_S (R_k) e <- eigen(if(doDykstra) R else Y, symmetric = TRUE) ## Q <- e$vectors d <- e$values ## D <- diag(d) ## create mask from relative positive eigenvalues p <- d > eig.tol*d[1] if(!any(p)) stop("Matrix seems negative semi-definite") ## use p mask to only compute 'positive' part Q <- Q[,p,drop = FALSE] ## X <- Q %*% D[p,p,drop = FALSE] %*% t(Q) --- more efficiently : X <- tcrossprod(Q * rep(d[p], each=nrow(Q)), Q) if(doDykstra) ## update Dykstra's correction D_S = \Delta S_k D_S <- X - R ## project onto symmetric and possibly 'given diag' matrices: if(doSym) X <- (X + t(X))/2 if(corr) diag(X) <- 1 else if(keepDiag) diag(X) <- diagX0 conv <- norm(Y-X, conv.norm.type) / norm(Y, conv.norm.type) iter <- iter + 1 if (trace) cat(sprintf("iter %3d : #{p}=%d, ||Y-X|| / ||Y||= %11g\n", iter, sum(p), conv)) converged <- (conv <= conv.tol) } if(!converged) warning(gettextf("'nearPD()' did not converge in %d iterations", iter), domain = NA) ## force symmetry is *NEVER* needed, we have symmetric X here! ## X <- (X + t(X))/2 if(do2eigen || only.values) { ## begin from posdefify(sfsmisc) e <- eigen(X, symmetric = TRUE) d <- e$values Eps <- posd.tol * abs(d[1]) if (d[n] < Eps) { d[d < Eps] <- Eps if(!only.values) { Q <- e$vectors o.diag <- diag(X) X <- Q %*% (d * t(Q)) D <- sqrt(pmax(Eps, o.diag)/diag(X)) X[] <- D * X * rep(D, each = n) } } if(only.values) return(d) ## unneeded(?!): X <- (X + t(X))/2 if(corr) diag(X) <- 1 else if(keepDiag) diag(X) <- diagX0 } ## end from posdefify(sfsmisc) structure(list(mat = new("dpoMatrix", x = as.vector(X), Dim = c(n,n), Dimnames = .M.DN(x)), eigenvalues = d, corr = corr, normF = norm(x-X, "F"), iterations = iter, rel.tol = conv, converged = converged), class = "nearPD") } Matrix/R/ndenseMatrix.R0000644000176200001440000001422713047113565014516 0ustar liggesusers#### "ndenseMatrix" - virtual class of nonzero pattern dense matrices #### ------------ #### Contains nge*; ntr*, ntp*; nsy*, nsp*; ndi* ### NOTA BENE: Much of this is *very* parallel to ./ldenseMatrix.R ### ~~~~~~~~~~~~~~~~ ## packed <-> non-packed : setAs("nspMatrix", "nsyMatrix", ## 1L for "n*", 0L for "l*" : vv nsp2nsy <- function(from) .Call(lspMatrix_as_lsyMatrix, from, 1L)) setAs("nsyMatrix", "nspMatrix", nsy2nsp <- function(from) .Call(lsyMatrix_as_lspMatrix, from, 1L)) setAs("ntpMatrix", "ntrMatrix", ntp2ntr <- function(from) .Call(ltpMatrix_as_ltrMatrix, from, 1L)) setAs("ntrMatrix", "ntpMatrix", ntr2ntp <- function(from) .Call(ltrMatrix_as_ltpMatrix, from, 1L)) ## Nonzero Pattern -> Double {of same structure}: setAs("ngeMatrix", "dgeMatrix", function(from) n2d_Matrix(from, "ngeMatrix")) setAs("nsyMatrix", "dsyMatrix", function(from) n2d_Matrix(from, "nsyMatrix")) setAs("nspMatrix", "dspMatrix", function(from) n2d_Matrix(from, "nspMatrix")) setAs("ntrMatrix", "dtrMatrix", function(from) n2d_Matrix(from, "ntrMatrix")) setAs("ntpMatrix", "dtpMatrix", function(from) n2d_Matrix(from, "ntpMatrix")) setAs("ndenseMatrix", "ldenseMatrix", function(from) n2l_Matrix(from)) setAs("ngeMatrix", "lgeMatrix", function(from) n2l_Matrix(from, "ngeMatrix")) setAs("nsyMatrix", "lsyMatrix", function(from) n2l_Matrix(from, "nsyMatrix")) setAs("nspMatrix", "lspMatrix", function(from) n2l_Matrix(from, "nspMatrix")) setAs("ntrMatrix", "ltrMatrix", function(from) n2l_Matrix(from, "ntrMatrix")) setAs("ntpMatrix", "ltpMatrix", function(from) n2l_Matrix(from, "ntpMatrix")) ## all need be coercable to "ngeMatrix": setAs("nsyMatrix", "ngeMatrix", nsy2nge <- function(from) .Call(lsyMatrix_as_lgeMatrix, from, 1L)) setAs("ntrMatrix", "ngeMatrix", ntr2nge <- function(from) .Call(ltrMatrix_as_lgeMatrix, from, 1L)) setAs("ntpMatrix", "ngeMatrix", function(from) ntr2nge(ntp2ntr(from))) setAs("nspMatrix", "ngeMatrix", function(from) nsy2nge(nsp2nsy(from))) ## and the reverse setAs("ngeMatrix", "ntpMatrix", function(from) ntr2ntp(as(from, "ntrMatrix"))) setAs("ngeMatrix", "nspMatrix", function(from) nsy2nsp(as(from, "nsyMatrix"))) ### -> symmetric : setAs("ngeMatrix", "nsyMatrix", function(from) { if(isSymmetric(from)) new("nsyMatrix", x = from@x, Dim = from@Dim, Dimnames = from@Dimnames, factors = from@factors) else stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") }) setAs("ngeMatrix", "ntrMatrix", function(from) { if(isT <- isTriangular(from)) new("ntrMatrix", x = from@x, Dim = from@Dim, Dimnames = from@Dimnames, uplo = attr(isT, "kind") %||% "U") ## TODO: also check 'diag' else stop("not a triangular matrix") }) ### ldense* <-> "matrix" : ## 1) "nge* : setAs("ngeMatrix", "matrix", ge2mat) setAs("matrix", "ngeMatrix", function(from) { new("ngeMatrix", x = as.logical(from), Dim = as.integer(dim(from)), Dimnames = .M.DN(from)) }) ## 2) base others on "nge*": setAs("matrix", "nsyMatrix", function(from) as(as(from, "ngeMatrix"), "nsyMatrix")) setAs("matrix", "nspMatrix", function(from) nsy2nsp(as(from, "nsyMatrix"))) setAs("matrix", "ntrMatrix", function(from) as(as(from, "ngeMatrix"), "ntrMatrix")) setAs("matrix", "ntpMatrix", function(from) ntr2ntp(as(from, "ntrMatrix"))) ## Useful if this was called e.g. for as(*, "nsyMatrix"), but it isn't setAs("matrix", "ndenseMatrix", function(from) as(from, "ngeMatrix")) setAs("ndenseMatrix", "matrix", ## uses the above l*M. -> lgeM. function(from) as(as(from, "ngeMatrix"), "matrix")) ## dense |-> compressed : ## go via "l" because dense_to_Csparse can't be used for "n" [missing CHOLMOD function] setAs("ndenseMatrix", "CsparseMatrix", function(from) as(as(as(from, "lMatrix"), "CsparseMatrix"), "nMatrix")) setAs("ndenseMatrix", "nsparseMatrix", function(from) as(as(as(from, "lMatrix"), "sparseMatrix"), "nMatrix")) setAs("ndenseMatrix", "sparseMatrix", function(from) as(from, "nsparseMatrix")) setAs("ndenseMatrix", "TsparseMatrix", function(from) { if(is(from, "generalMatrix")) { ## cheap but not so efficient: ij <- which(as(from,"matrix"), arr.ind = TRUE, useNames = FALSE) - 1L new("ngTMatrix", i = ij[,1], j = ij[,2], Dim = from@Dim, Dimnames = from@Dimnames, factors = from@factors) } else ## triangular or symmetric (have *no* diagonal nMatrix) ## is delicate {packed or not, upper /lower indices ..} -> easy way as(as(as(from, "lMatrix"), "TsparseMatrix"), "nMatrix") }) ## Not sure, if these are needed or more efficient than the above: ## First one probably is setAs("ngeMatrix", "ngTMatrix", function(from) { ## cheap but not so efficient: ij <- which(as(from,"matrix"), arr.ind = TRUE, useNames = FALSE) - 1L new("ngTMatrix", i = ij[,1], j = ij[,2], Dim = from@Dim, Dimnames = from@Dimnames, factors = from@factors) }) setAs("ngeMatrix", "ngCMatrix", function(from) as(as(from, "ngTMatrix"), "ngCMatrix")) setMethod("as.logical", signature(x = "ndenseMatrix"), function(x, ...) as(x, "ngeMatrix")@x) ###---------------------------------------------------------------------- setMethod("t", signature(x = "ngeMatrix"), t_geMatrix) setMethod("t", signature(x = "ntrMatrix"), t_trMatrix) setMethod("t", signature(x = "nsyMatrix"), t_trMatrix) setMethod("t", signature(x = "ntpMatrix"), function(x) as(t(as(x, "ntrMatrix")), "ntpMatrix")) setMethod("t", signature(x = "nspMatrix"), function(x) as(t(as(x, "nsyMatrix")), "nspMatrix")) ## NOTE: "&" and "|" are now in group "Logic" c "Ops" --> ./Ops.R ## "!" is in ./not.R setMethod("as.vector", "ndenseMatrix", function(x, mode) as.vector(as(x, "ngeMatrix")@x, mode)) setMethod("norm", signature(x = "ndenseMatrix", type = "character"), function(x, type, ...) if(identical("2", type)) norm2(x) else .Call(dgeMatrix_norm, as(as(x,"dMatrix"),"dgeMatrix"), type), valueClass = "numeric") setMethod("rcond", signature(x = "ndenseMatrix", norm = "character"), .rcond_via_d, valueClass = "numeric") Matrix/R/AllGeneric.R0000644000176200001440000000644612521632155014063 0ustar liggesusers#### Define those generics that we need, if they don't exist; #### not all will be exported setGeneric("expand", function(x, ...) standardGeneric("expand")) setGeneric("isDiagonal", function(object) standardGeneric("isDiagonal")) setGeneric("isTriangular", function(object, upper = NA, ...) standardGeneric("isTriangular")) ## Boolean Arithmetic Matrix multiplication setGeneric("%&%", function (x, y) standardGeneric("%&%")) ## isSymmetric is "S3 generic" in R's base/R/eigen.R setGeneric("facmul", function(x, factor, y, transpose, left, ...) standardGeneric("facmul")) setGeneric("BunchKaufman", function(x, ...) standardGeneric("BunchKaufman")) setGeneric("lu", function(x, ...) standardGeneric("lu")) ##NB ## do not redefine the "base signature" ##NB setGeneric("chol", def = function(x, pivot= FALSE,...) standardGeneric("chol"), ##NB useAsDefault= function(x, pivot= FALSE,...) base::chol(x, pivot, ...)) ##NB setGeneric("qr", def = function(x, tol=1e-7,...) standardGeneric("qr"), ##NB useAsDefault= function(x, tol=1e-7,...) base::qr(x, tol, ...)) if(is.na(match("...", names(formals(implicitGeneric("crossprod")))))) { ## base:crossprod() has no '...', but since 2015-03, there's an implicit generic setGeneric("crossprod", function(x, y=NULL, ...) standardGeneric("crossprod"), useAsDefault= function(x, y=NULL, ...) base::crossprod(x, y)) setGeneric("tcrossprod", function(x, y=NULL, ...) standardGeneric("tcrossprod"), useAsDefault= function(x, y=NULL, ...) base::tcrossprod(x, y)) } setGeneric("Schur", function(x, vectors, ...) standardGeneric("Schur")) setGeneric("unpack", function(x, ...) standardGeneric("unpack")) setGeneric("pack", function(x, ...) standardGeneric("pack")) setGeneric("expm", function(x) standardGeneric("expm")) setGeneric("writeMM", function(obj, file, ...) standardGeneric("writeMM")) setGeneric("tril", function(x, k = 0, ...) standardGeneric("tril")) setGeneric("triu", function(x, k = 0, ...) standardGeneric("triu")) setGeneric("band", function(x, k1, k2, ...) standardGeneric("band")) setGeneric("Cholesky", function(A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, ...) standardGeneric("Cholesky")) setGeneric("symmpart", function(x) standardGeneric("symmpart")) setGeneric("skewpart", function(x) standardGeneric("skewpart")) ## A version of coercion to "symmetric" which does *NOT* check, ## but just takes the ## upper (or lower) values and ## ``declares'' the symmetric: setGeneric("forceSymmetric", function(x, uplo) standardGeneric("forceSymmetric")) setGeneric("nnzero", function(x, na.counted = NA) standardGeneric("nnzero"), signature = "x") setGeneric("updown", function(update, C, L) standardGeneric("updown")) if(FALSE) ## only "need this", as 'Dvec' should not get its default from base::qr.Q : ## unfortunately, this masks base::qr.Q with a warning setGeneric("qr.Q", function(qr, complete = FALSE, Dvec) standardGeneric("qr.Q"), useAsDefault = function(qr, complete = FALSE, Dvec) { if(missing(Dvec)) base::qr.Q(qr, complete=complete) else base::qr.Q(qr, complete=complete, Dvec=Dvec) }) Matrix/R/ntTMatrix.R0000644000176200001440000000236211004710614013771 0ustar liggesusers#### Logical Sparse Triangular Matrices in Triplet format ### contains = "nsparseMatrix" setAs("matrix", "ntTMatrix", function(from) as(as(from, "ntrMatrix"), "TsparseMatrix")) setAs("ntTMatrix", "ngTMatrix", function(from) tT2gT(from, cl = "ntTMatrix", toClass = "ngTMatrix")) setAs("ntTMatrix", "generalMatrix", function(from) tT2gT(from, cl = "ntTMatrix", toClass = "ngTMatrix")) setAs("ntTMatrix", "ntCMatrix", function(from) .Call(Tsparse_to_Csparse, from, TRUE)) setAs("ntTMatrix", "ngCMatrix", function(from) as(.Call(Tsparse_to_Csparse, from, TRUE), "ngCMatrix")) setAs("ntTMatrix", "dtTMatrix", function(from) new("dtTMatrix", i = from@i, j = from@j, x = rep.int(1, length(from@i)), uplo = from@uplo, diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames)) setAs("ntTMatrix", "ntrMatrix", function(from) .Call(ntTMatrix_as_ntrMatrix, from)) setAs("ntTMatrix", "matrix", function(from) as(as(from, "ntrMatrix"), "matrix")) setMethod("t", "ntTMatrix", function(x) new("ntTMatrix", Dim = x@Dim[2:1], Dimnames = x@Dimnames[2:1], i = x@j, j = x@i, diag = x@diag, uplo = if (x@uplo == "U") "L" else "U")) Matrix/R/SparseM-conv.R0000644000176200001440000000574512050202345014363 0ustar liggesusers####----------- Minimal conversion utilities <--> "SparseM" ### I. The "natural pairs" between the two packages: setAs("matrix.csr", "dgRMatrix", function(from) { new("dgRMatrix", x = from@ra, j = from@ja - 1L, p = from@ia - 1L, Dim = from@dimension) }) setAs("dgRMatrix", "matrix.csr", function(from) { new("matrix.csr", ra = from@x, ja = from@j + 1L, ia = from@p + 1L, dimension = from@Dim) }) setAs("matrix.csc", "dgCMatrix", function(from) { new("dgCMatrix", x = from@ra, i = from@ja - 1L, p = from@ia - 1L, Dim = from@dimension) }) setAs("dgCMatrix", "matrix.csc", function(from) { new("matrix.csc", ra = from@x, ja = from@i + 1L, ia = from@p + 1L, dimension = from@Dim) }) setAs("matrix.coo", "dgTMatrix", function(from) { new("dgTMatrix", x = from@ra, i = from@ia - 1L, j = from@ja - 1L, Dim = from@dimension) }) setAs("dgTMatrix", "matrix.coo", function(from) { new("matrix.coo", ra = from@x, ia = from@i + 1L, ja = from@j + 1L, dimension = from@Dim) }) ### II. Enable coercion to the ``favorite'' of each package; ### --- ---------------------------- ### i.e., "dgCMatrix" and "matrix.csr" setAs("dsparseMatrix", "matrix.csr", function(from) as(as(as(from, "RsparseMatrix"), "dgRMatrix"), "matrix.csr")) ## setAs("matrix.csr", "dgCMatrix", function(from) as(as(from, "dgRMatrix"), "CsparseMatrix")) setAs("matrix.coo", "dgCMatrix", function(from) as(as(from, "dgTMatrix"), "dgCMatrix")) ### also define the virtual coercions that we (should) advertize: setAs("matrix.csr", "RsparseMatrix", function(from) as(from, "dgRMatrix")) setAs("matrix.csc", "CsparseMatrix", function(from) as(from, "dgCMatrix")) setAs("matrix.coo", "TsparseMatrix", function(from) as(from, "dgTMatrix")) ## to "Csparse*" and "Tsparse*" should work for all sparse: setAs("matrix.csr", "CsparseMatrix", function(from) as(as(from, "dgRMatrix"), "CsparseMatrix")) setAs("matrix.coo", "CsparseMatrix", function(from) as(as(from, "dgTMatrix"), "CsparseMatrix")) setAs("matrix.csc", "TsparseMatrix", function(from) as(as(from, "dgCMatrix"), "TsparseMatrix")) setAs("matrix.csr", "TsparseMatrix", function(from) as(as(from, "dgRMatrix"), "TsparseMatrix")) ## Also *from* (our favorite) Csparse should work to all 3 SparseM setAs("CsparseMatrix", "matrix.csr", function(from) as(as(from, "RsparseMatrix"), "matrix.csr")) setAs("CsparseMatrix", "matrix.coo", function(from) as(as(from, "TsparseMatrix"), "matrix.coo")) setAs("CsparseMatrix", "matrix.csc", function(from) as(as(from, "dgCMatrix"), "matrix.csc")) ## Easy coercion: just always use as( , "Matrix") : setAs("matrix.csr", "Matrix", function(from) as(from, "CsparseMatrix")) # we favor! setAs("matrix.coo", "Matrix", function(from) as(from, "TsparseMatrix")) setAs("matrix.csc", "Matrix", function(from) as(from, "CsparseMatrix")) Matrix/R/Math.R0000644000176200001440000001571712571665074012763 0ustar liggesusers####--- All "Math" and "Math2" group methods for all Matrix classes (incl sparseVector) ------ #### ==== ===== but diagonalMatrix -> ./diagMatrix.R and abIndex.R #### ~~~~~~~~~~~~ ~~~~~~~~~ ###--------- Csparse Math.vecGenerics <- grep("^cum", getGroupMembers("Math"), value=TRUE) ## "cummax" .. "cumsum" : work on full *vector* and return vector also for matrix input setMethod("Math", signature(x = "CsparseMatrix"), function(x) { if(.Generic %nin% Math.vecGenerics && is0(callGeneric(0.))) { ## sparseness, symm., triang.,... preserved cl <- class(x) has.x <- !extends(cl, "nsparseMatrix") ## has.x <==> *not* nonzero-pattern == "nMatrix" if(has.x) { type <- storage.mode(x@x) r <- callGeneric(x@x) } else { ## nsparseMatrix type <- "" r <- rep.int(as.double(callGeneric(TRUE)), switch(.sp.class(cl), CsparseMatrix = length(x@i), TsparseMatrix = length(x@i), RsparseMatrix = length(x@j))) } if(type == storage.mode(r)) { x@x <- r x } else { ## e.g. abs( ) --> integer Csparse ## FIXME: when we have 'i*' classes, use them here: rx <- new(sub("^.", "d", MatrixClass(cl))) rx@x <- as.double(r) ## result is "same" sNams <- slotNames(cl) for(nm in sNams[sNams != "x"]) slot(rx, nm) <- slot(x, nm) rx } } else { ## no sparseness (or no matrix!); C2dense() returns *numeric* callGeneric(C2dense(x)) } }) ## {Math} ###--------- ddenseMatrix ##' Used for dt[rp]Matrix, ds[yp]Matrix (and subclasses, e.g. dpo*(), cor*() !): ##' as dgeMatrix has direct method: setMethod("Math", "ddenseMatrix", function(x) { if(.Generic %in% Math.vecGenerics) # vector result callGeneric(as(x,"dgeMatrix")@x) else if(is(x, "symmetricMatrix")) { ## -> result symmetric: keeps class cl <- .class0(x) if(cl %in% (scl <- c("dsyMatrix","dspMatrix"))) { x@x <- callGeneric(x@x) x } else { ## *sub*class of dsy/dsp: e.g., dpoMatrix ## -> "[dsy/dsp]Matrix": x <- as(x, scl[match(scl, names(getClass(cl)@contains), nomatch=0L)]) x@x <- callGeneric(x@x) x } } else { ## triangularMatrix (no need for testing), includes, e.g. "corMatrix"! ## if(is0(f0 <- callGeneric(0.))) { ## -> result remains triangular if(is0(callGeneric(0.))) { ## -> result remains triangular cl <- .class0(x) if(cl %in% (scl <- c("dtrMatrix","dtpMatrix"))) { x@x <- callGeneric(x@x) x } else { ## *sub*class of dtr/dtp: e.g., corMatrix ## -> "[dtr/dtp]Matrix": x <- as(x, scl[match(scl, names(getClass(cl)@contains), nomatch=0L)]) x@x <- callGeneric(x@x) x } } else { ## result is general: *could* use f0 for the whole 0-triangle, ## but this is much easier: callGeneric(as(x,"dgeMatrix")) } } }) ###--------- denseMatrix ## FIXME: Once we have integer (idense..), sign(), abs(.) may need different: setMethod("Math", signature(x = "denseMatrix"), function(x) callGeneric(as(x, "dMatrix"))) # -> ./ddenseMatrix.R has next method ###--------- dgeMatrix setMethod("Math", signature(x = "dgeMatrix"), function(x) { if(.Generic %in% Math.vecGenerics) callGeneric(x@x) else { x@x <- callGeneric(x@x) x } }) ###--------- diagMatrix ## Till 2014-08-04, went via "dtC" (triangular) -- "Math" method in ./Math.R setMethod("Math", signature(x = "diagonalMatrix"), function(x) { if(.Generic %in% Math.vecGenerics) # vector result callGeneric(.diag2mat(x)) ## else if(is0(f0 <- callGeneric(0.))) { ## result remains diagonal else if(is0(callGeneric(0.))) { ## result remains diagonal cl <- class(x) if(!extends(cl, "ddiMatrix")) cl <- class(x <- as(x, "dMatrix")) ##d type <- storage.mode(x@x) if(x@diag == "U") { ##d if((f1 <- callGeneric(as1(mod=type))) == 1 && type == "double") if((f1 <- callGeneric(1.)) == 1) return(x) # [ddi] as f(0) = 0, f(1) = 1 else { n <- x@Dim[1] return( Diagonal(n=n, x = rep.int(f1, n)) ) } } r <- callGeneric(x@x) ##d if(type == storage.mode(r)) { x@x <- r x ##d } else { ## e.g. abs( ) --> integer Csparse ##d ## FIXME: when we have 'i*' classes, use them here: ##d rx <- new(sub("^.", "d", cl)) ##d rx@x <- as.double(r) ##d ## result is "same" ##d sNams <- slotNames(cl) ##d for(nm in sNams[sNams != "x"]) ##d slot(rx, nm) <- slot(x, nm) ##d rx ##d } } else { ## no sparseness, i.e., no diagonal, but still symmetric: ## FIXME: gain efficiency by reusing f0 for *all* off-diagonal entries! callGeneric(as(as(as(.diag2sT(x), "dMatrix"), "denseMatrix"), "dspMatrix")) } }) ## {Math} ## NB: "Math2" (round, signif) for diagMatrix is perfectly via "dMatrix" ###--------- dMatrix ## Use these as "catch-all" -- more specific methods are for sub-classes (sparse) setMethod("Math2", signature(x = "dMatrix"), ## Assume that Generic(u, k) |--> u for u in {0,1} ## which is true for round(), signif() ==> all structure maintained function(x, digits) { x@x <- callGeneric(x@x, digits = digits) x }) ## the same, first coercing to "dMatrix": setMethod("Math2", signature(x = "Matrix"), function(x, digits) { x <- as(x, "dMatrix") x@x <- callGeneric(x@x, digits = digits) x }) ###--------- sparseMatrix setMethod("Math", signature(x = "sparseMatrix"), function(x) callGeneric(as(x, "CsparseMatrix"))) ###--------- sparseVector setMethod("Math", signature(x = "sparseVector"), function(x) { if(.Generic %nin% Math.vecGenerics && is0(callGeneric(0.))) { ## sparseness preserved cld <- getClassDef(class(x)) kind <- .M.kindC(cld)# "d", "n", "l", "i", "z", ... has.x <- kind != "n" if(has.x) { rx <- callGeneric(x@x) if(kind == "d") { x@x <- rx x } else { new("dsparseVector", x = rx, i = x@i, length = x@length) } } else { ## kind == "n" new("dsparseVector", x = rep.int(callGeneric(1), length(x@i)), i = x@i, length = x@length) } } else { ## dense callGeneric(sp2vec(x)) } }) setMethod("Math2", signature(x = "dsparseVector"), ## Assume that Generic(u, k) |--> u for u in {0,1} ## which is true for round(), signif() ==> all structure maintained function(x, digits) { x@x <- callGeneric(x@x, digits = digits) x }) ## the same, first coercing to "dsparseVector": setMethod("Math2", signature(x = "sparseVector"), function(x, digits) { x <- as(x, "dsparseVector") x@x <- callGeneric(x@x, digits = digits) x }) Matrix/R/dgeMatrix.R0000644000176200001440000000642413047113565014001 0ustar liggesusers ## ..2dge() -> ./Auxiliaries.R setAs("matrix", "dgeMatrix", ..2dge) setAs("numLike", "dgeMatrix", ..2dge) ge2mat <- function(from) array(from@x, dim = from@Dim, dimnames = from@Dimnames) setAs("dgeMatrix", "matrix", ge2mat) ## "[" settings are "up in" Matrix.R & denseMatrix.R setMethod("as.vector", "dgeMatrix", function(x, mode) as.vector(x@x, mode)) setMethod("norm", signature(x = "dgeMatrix", type = "missing"), function(x, type, ...) norm(x, type = "O", ...)) setMethod("norm", signature(x = "dgeMatrix", type = "character"), function(x, type, ...) if(identical("2", type)) norm2(x) else .Call(dgeMatrix_norm, x, type), valueClass = "numeric") setMethod("rcond", signature(x = "dgeMatrix", norm = "missing"), function(x, norm, ...) rcond(x, norm = "O", ...)) setMethod("rcond", signature(x = "dgeMatrix", norm = "character"), function(x, norm, ...) { if({d <- dim(x); d[1] == d[2]}) .Call(dgeMatrix_rcond, x, norm) else rcond(qr.R(qr(if(d[1] < d[2]) t(x) else x)), norm=norm, ...) }, valueClass = "numeric") ##> FIXME: R-devel (2.11.0) norm() is *wrong* for NAs, whereas this dgeMatrix ##> ----- one works, even though both should call the identical LAPACK 'dlange' ????? ##> Hence, keep the Matrix version active for now: ##> if(getRversion() < "2.11.0" || R.version$`svn rev` < 51018) ##--- the same for "traditional" 'matrix': ## 2017-02-08: Rather keep using base norm for 'matrix' ## setMethod("norm", signature(x = "matrix", type = "character"), ## function(x, type, ...) .Call(dgeMatrix_norm, ..2dge(x), type), ## valueClass = "numeric") setMethod("t", signature(x = "dgeMatrix"), t_geMatrix) .dge.diag <- function(x, nrow, ncol) .Call(dgeMatrix_getDiag, x) setMethod("diag", signature(x = "dgeMatrix"), .dge.diag) setMethod("diag<-", signature(x = "dgeMatrix"), function(x, value) .Call(dgeMatrix_setDiag, x, value)) setMethod("chol", signature(x = "dgeMatrix"), cholMat) setMethod("solve", signature(a = "dgeMatrix", b = "missing"), function(a, b, ...) .Call(dgeMatrix_solve, a), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dgeMatrix", b = "ddenseMatrix"), function(a, b, ...) .Call(dgeMatrix_matrix_solve, a, b), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dgeMatrix", b = "matrix"), function(a, b, ...) .Call(dgeMatrix_matrix_solve, a, b), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dgeMatrix", b = "sparseMatrix"), function(a, b, ...) .Call(dgeMatrix_matrix_solve, a, as(b, "denseMatrix")), valueClass = "dgeMatrix") ## not needed - method for numeric defined for Matrix class ## setMethod("solve", signature(a = "dgeMatrix", b = "numeric"), ## function(a, b, ...) ## .Call(dgeMatrix_matrix_solve, a, as.matrix(as.double(b)))) setMethod("lu", signature(x = "dgeMatrix"), function(x, warnSing = TRUE, ...) .Call(dgeMatrix_LU, x, warnSing), valueClass = "denseLU") setMethod("determinant", signature(x = "dgeMatrix", logarithm = "missing"), function(x, logarithm, ...) .Call(dgeMatrix_determinant, x, TRUE)) setMethod("determinant", signature(x = "dgeMatrix", logarithm = "logical"), function(x, logarithm, ...) .Call(dgeMatrix_determinant, x, logarithm)) ##-> ./expm.R for expm() ##-> ./colSums.R for colSums,... rowMeans Matrix/R/dtrMatrix.R0000644000176200001440000000752513047113565014036 0ustar liggesusers#### Triangular Matrices -- Coercion and Methods ## FIXME: get rid of this (coerce to "triangular..") ?!? setAs("dgeMatrix", "dtrMatrix", function(from) asTri(from, "dtrMatrix")) setAs("dtrMatrix", "dtpMatrix", dtr2dtp <- function(from) .Call(dtrMatrix_as_dtpMatrix, from)) setAs("dtrMatrix", "sparseMatrix", function(from) .dense2C(from, kind="tri", uplo=from@uplo)) setAs("dtrMatrix", "CsparseMatrix", function(from) .dense2C(from, kind="tri", uplo=from@uplo)) .dtr2mat <- function(from, keep.dimnames=TRUE) .Call(dtrMatrix_as_matrix, from, keep.dimnames) ## needed for t() method setAs("dtrMatrix", "matrix", function(from) .Call(dtrMatrix_as_matrix, from, TRUE)) setAs("matrix", "dtrMatrix", function(from) as(..2dge(from), "dtrMatrix")) setAs("Cholesky", "lMatrix", function(from) as(as(from, "dtrMatrix"), "lMatrix")) setAs("BunchKaufman", "lMatrix", function(from) as(as(from, "dtrMatrix"), "lMatrix")) ## Group Methods: ## TODO: carefully check for the cases where the result remains triangular ## instead : inherit them from "dgeMatrix" via definition in ./dMatrix.R ## Note: Just *because* we have an explicit dtr -> dge coercion, ## show( ) is not okay, and we need our own: setMethod("show", "dtrMatrix", function(object) prMatrix(object)) setMethod("determinant", signature(x = "dtrMatrix", logarithm = "missing"), function(x, logarithm, ...) callGeneric(x, TRUE)) setMethod("determinant", signature(x = "dtrMatrix", logarithm = "logical"), function(x, logarithm, ...) mkDet(diag(x), logarithm)) setMethod("diag", signature(x = "dtrMatrix"), function(x, nrow, ncol) .Call(dtrMatrix_getDiag, x), valueClass = "numeric") setMethod("diag<-", signature(x = "dtrMatrix"), function(x, value) { .Call(dtrMatrix_setDiag, if(x@diag == "U") .dense.diagU2N(x, "d", isPacked=FALSE) else x, value) }) setMethod("norm", signature(x = "dtrMatrix", type = "character"), function(x, type, ...) if(identical("2", type)) norm2(x) else .Call(dtrMatrix_norm, x, type), valueClass = "numeric") setMethod("norm", signature(x = "dtrMatrix", type = "missing"), function(x, type, ...) .Call(dtrMatrix_norm, x, "O"), valueClass = "numeric") setMethod("rcond", signature(x = "dtrMatrix", norm = "character"), function(x, norm, ...) .Call(dtrMatrix_rcond, x, norm), valueClass = "numeric") setMethod("rcond", signature(x = "dtrMatrix", norm = "missing"), function(x, norm, ...) .Call(dtrMatrix_rcond, x, "O"), valueClass = "numeric") setMethod("chol2inv", signature(x = "dtrMatrix"), function (x, ...) { chk.s(..., which.call=-2) if (x@diag != "N") x <- diagU2N(x) .Call(dtrMatrix_chol2inv, x) }) setMethod("solve", signature(a = "dtrMatrix", b="missing"), function(a, b, ...) { ## warn, as e.g. CHMfactor have 'system' as third argument chk.s(..., which.call=-2) .Call(dtrMatrix_solve, a) }, valueClass = "dtrMatrix") setMethod("solve", signature(a = "dtrMatrix", b="ddenseMatrix"), function(a, b, ...) { chk.s(..., which.call=-2) .Call(dtrMatrix_matrix_solve, a, b) }, valueClass = "dgeMatrix") setMethod("solve", signature(a = "dtrMatrix", b="dMatrix"), function(a, b, ...) { chk.s(..., which.call=-2) .Call(dtrMatrix_matrix_solve, a, as(b,"denseMatrix")) }, valueClass = "dgeMatrix") setMethod("solve", signature(a = "dtrMatrix", b="Matrix"), function(a, b, ...) { chk.s(..., which.call=-2) .Call(dtrMatrix_matrix_solve, a, as(as(b, "dMatrix"), "denseMatrix")) }, valueClass = "dgeMatrix") setMethod("solve", signature(a = "dtrMatrix", b="matrix"), function(a, b, ...) { chk.s(..., which.call=-2) .Call(dtrMatrix_matrix_solve, a, b) }, valueClass = "dgeMatrix") setMethod("t", signature(x = "dtrMatrix"), t_trMatrix) Matrix/R/ltTMatrix.R0000644000176200001440000000237311004710614013771 0ustar liggesusers#### Logical Sparse Triangular Matrices in Triplet format ### contains = "lsparseMatrix" setAs("matrix", "ltTMatrix", function(from) as(as(from, "ltrMatrix"), "TsparseMatrix")) setAs("ltTMatrix", "lgTMatrix", function(from) tT2gT(from, cl = "ltTMatrix", toClass = "lgTMatrix")) setAs("ltTMatrix", "generalMatrix", function(from) tT2gT(from, cl = "ltTMatrix", toClass = "lgTMatrix")) setAs("ltTMatrix", "ltCMatrix", function(from) .Call(Tsparse_to_Csparse, from, TRUE)) setAs("ltTMatrix", "lgCMatrix", function(from) as(.Call(Tsparse_to_Csparse, from, TRUE), "lgCMatrix")) setAs("ltTMatrix", "dtTMatrix", function(from) new("dtTMatrix", i = from@i, j = from@j, x = rep.int(1, length(from@i)), uplo = from@uplo, diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames)) setAs("ltTMatrix", "ltrMatrix", function(from) .Call(ltTMatrix_as_ltrMatrix, from)) setAs("ltTMatrix", "matrix", function(from) as(as(from, "ltrMatrix"), "matrix")) setMethod("t", "ltTMatrix", function(x) new("ltTMatrix", Dim = x@Dim[2:1], Dimnames = x@Dimnames[2:1], i = x@j, j = x@i, x = x@x, diag = x@diag, uplo = if (x@uplo == "U") "L" else "U")) Matrix/R/Ops.R0000644000176200001440000020042713201345103012600 0ustar liggesusers####--- All "Ops" group methods for all Matrix classes (incl sparseVector) ------ #### === but diagonalMatrix -> ./diagMatrix.R and abIndex.R #### ~~~~~~~~~~~~ ~~~~~~~~~ ### Note that the "Ops" group consists of ### sub-groups "Arith", "Compare", and "Logic" ### ----- ------- ----- ### where 'Arith' := '"+"', '"-"', '"*"', '"^"', '"%%"', '"%/%"', '"/"' ### 'Compare' := '"=="', '">"', '"<"', '"!="', '"<="', '">="' ### 'Logic' := '"&"', '"|"' (( but *not* '"!"' since that has ### only one argument )) ## find them with M-x grep -E 'Method\("(Ops|Compare|Arith|Logic)"' *.R ## -------- ### Design decision for *sparseMatrix*: ### work via Csparse since Tsparse are not-unique (<-> slots not compatible) ### Dimnames: (partly) via dimNamesCheck() [ ./Auxiliaries.R ] ### -- 0 -- (not dense *or* sparse) ----------------------------------- ##-------- originally from ./Matrix.R -------------------- ## Some ``Univariate'' "Arith": setMethod("+", signature(e1 = "Matrix", e2 = "missing"), function(e1,e2) e1) ## "fallback": setMethod("-", signature(e1 = "Matrix", e2 = "missing"), function(e1, e2) { warning("inefficient method used for \"- e1\"") 0-e1 }) setMethod("-", signature(e1 = "denseMatrix", e2 = "missing"), function(e1, e2) { e1@x <- -e1@x; e1 }) ## "diagonalMatrix" -- only two cases -- easiest to do both setMethod("-", signature(e1 = "ddiMatrix", e2 = "missing"), function(e1, e2) { if(e1@diag == "U") { e1@x <- rep.int(-1., e1@Dim[1]) e1@diag <- "N" } else ## diag == "N" -> using 'x' slot e1@x <- -e1@x e1 }) setMethod("-", signature(e1 = "ldiMatrix", e2 = "missing"), function(e1, e2) { d <- e1@Dim new("ddiMatrix", Dim = d, Dimnames = e1@Dimnames, diag = "N", x = if(e1@diag == "U") rep.int(-1, d[1]) else -e1@x) }) ## old-style matrices are made into new ones setMethod("Ops", signature(e1 = "Matrix", e2 = "matrix"), function(e1, e2) callGeneric(e1, Matrix(e2))) setMethod("Ops", signature(e1 = "matrix", e2 = "Matrix"), function(e1, e2) callGeneric(Matrix(e1), e2)) ## Note: things like callGeneric(Matrix(e1, sparse=is(e2,"sparseMatrix")), e2)) ## may *not* be better: e.g. Matrix(.) can give *diagonal* instead of sparse ## NULL should be treated as logical(0) {which often will be coerced to numeric(0)}: setMethod("Ops", signature(e1 = "Matrix", e2 = "NULL"), function(e1, e2) callGeneric(e1, logical())) setMethod("Ops", signature(e1 = "NULL", e2 = "Matrix"), function(e1, e2) callGeneric(logical(), e2)) ## bail-outs -- on highest possible level, hence "Ops", not "Compare"/"Arith" : .bail.out.Ops <- function(e1, e2) { if(is(e1, "mMatrix") && is(e2, "mMatrix")) dimCheck(e1,e2) .bail.out.2(.Generic, class(e1), class(e2)) } setMethod("Ops", signature(e1 = "Matrix", e2 = "ANY"), function(e1, e2) { if(is(e1, "mMatrix") && is(e2, "mMatrix")) dimCheck(e1,e2) if(is.matrix(e2) && identical(e2, as.matrix(e2)) && is.object(e2) && !isS4(e2)) # e.g. for "table" callGeneric(e1, unclass(e2)) else .bail.out.2(.Generic, class(e1), class(e2)) }) setMethod("Ops", signature(e1 = "ANY", e2 = "Matrix"), function(e1, e2) { if(is(e1, "mMatrix") && is(e2, "mMatrix")) dimCheck(e1,e2) if(is.matrix(e1) && identical(e1, as.matrix(e1)) && is.object(e1) && !isS4(e1)) # e.g. for "table" callGeneric(unclass(e1), e2) else .bail.out.2(.Generic, class(e1), class(e2)) }) rm(.bail.out.Ops) ## "General principle" ## - - - - - - - - - ## For "Arith" it is sufficient (though not optimal, once we have "iMatrix"!) ## to define "dMatrix" methods and coerce all other "[nli]Matrix" to "dMatrix" setMethod("Arith", signature(e1 = "Matrix", e2 = "Matrix"), function(e1, e2) callGeneric(as(e1, "dMatrix"), as(e2, "dMatrix"))) ## For "Compare", this would be feasible too, but is clearly suboptimal, ## particularly for "==" and "!=" ## and for "lMatrix" and "nMatrix" should not coerce at all if(FALSE) setMethod("Compare", signature(e1 = "Matrix", e2 = "Matrix"), function(e1, e2) { if(is.na(match(.Generic, c("==", "!=")))) callGeneric(as(e1, "dMatrix"), as(e2, "dMatrix")) else { ## no coercion needed for "==" or "!=" ## ## what now ? <<<<<<<<<<< FIXME >>>>>>>>> .bail.out.2(.Generic, class(e1), class(e2)) } }) ## Working entirely on "matching" x slot: ## can be done for matching-dim "*geMatrix", and also ## matching-{dim + uplo} for *packed* (only!) symmetric+triangular .Ops.via.x <- function(e1,e2) { dimCheck(e1, e2) e1@x <- callGeneric(e1@x, e2@x) e1 } ###-------- originally from ./dMatrix.R -------------------- ## ## Note that there extra methods for o ! ## ## "Compare" -> returning logical Matrices; .Cmp.swap() is in ./Auxiliaries.R setMethod("Compare", signature(e1 = "numeric", e2 = "dMatrix"), .Cmp.swap) setMethod("Compare", signature(e1 = "logical", e2 = "dMatrix"), .Cmp.swap) setMethod("Compare", signature(e1 = "numeric", e2 = "lMatrix"), .Cmp.swap) setMethod("Compare", signature(e1 = "logical", e2 = "lMatrix"), .Cmp.swap) setMethod("Compare", signature(e1 = "numeric", e2 = "nMatrix"), .Cmp.swap) setMethod("Compare", signature(e1 = "logical", e2 = "nMatrix"), .Cmp.swap) ## This is parallel to Logic.Mat.atomic() below ---> __keep parallel__ ! Cmp.Mat.atomic <- function(e1, e2) { ## result will inherit from "lMatrix" n1 <- prod(d <- e1@Dim) cl <- class(e1) if((l2 <- length(e2)) == 0) return(if(n1 == 0) new(class2(cl, "l"), Dim = d, Dimnames = e1@Dimnames) else ## stop(gettextf(" %s %s is undefined", ## .Generic, paste0(class(e2),"(0)")), domain=NA) as.logical(e2)) ## else if(n1 && n1 < l2) stop(sprintf( "dim [product %d] do not match the length of object [%d]", n1, l2)) cl1 <- getClassDef(cl) slots1 <- names(cl1@slots) has.x <- any("x" == slots1)# *fast* check for "x" slot presence if(l2 > 1 && has.x) return(if(n1 == 0) new(class2(cl, "l"), x = callGeneric(e1@x, e2), Dim = d, Dimnames = e1@Dimnames) else ## e2 cannot simply be compared with e1@x --> use another method callGeneric(e1, Matrix(e2, nrow=d[1], ncol=d[2]))) ## else Udg <- extends(cl1, "triangularMatrix") && e1@diag == "U" r0 <- callGeneric(0, e2) ## Udg: append the diagonal at *end*, as diagU2N(): r <- callGeneric(if(Udg) c(e1@x,..diag.x(e1)) else if(has.x) e1@x else TRUE, e2) ## trivial case first (beware of NA) if(isTRUE(all(r0) && all(r))) { r <- new(if(d[1] == d[2]) "lsyMatrix" else "lgeMatrix") r@Dim <- d r@Dimnames <- e1@Dimnames r@x <- rep.int(TRUE, n1) } else if(extends(cl1, "denseMatrix")) { full <- !.isPacked(e1) # << both "dtr" and "dsy" are 'full' if(full || allFalse(r0) || extends(cl1, "symmetricMatrix")) { isTri <- extends(cl1, "triangularMatrix") if(isTri) { if(extends(cl1,"Cholesky") || extends(cl1,"BunchKaufman")) cl1 <- getClassDef(cl <- class(e1 <- as(e1, "dtrMatrix"))) } ## FIXME? using copyClass() to copy "relevant" slots r <- new(class2(cl, "l"), x = r, Dim = d, Dimnames = e1@Dimnames) if(extends(cl1, "symmetricMatrix")) { r@uplo <- e1@uplo } else if(isTri) { r@uplo <- e1@uplo r@diag <- e1@diag } } else { ## packed matrix with structural 0 and r0 is not all FALSE: ##--> result cannot be packed anymore ## [dense & packed & not symmetric ] ==> must be "dtp*" : if(!extends(cl1, "dtpMatrix")) stop("internal bug in \"Compare\" method (Cmp.Mat.atomic); please report") rx <- rep_len(r0, n1) rx[indTri(d[1], upper = (e1@uplo == "U"), diag=TRUE)] <- r r <- new("lgeMatrix", x = rx, Dim = d, Dimnames = e1@Dimnames) } } else { ##---- e1 is(. , sparseMatrix) ----------------- ## FIXME: remove this test eventually if(extends(cl1, "diagonalMatrix")) stop("Cmp.Mat.atomic() should not be called for diagonalMatrix") remainSparse <- allFalse(r0) ## <==> things remain sparse if(Udg) { # e1 *is* unit-diagonal (triangular sparse) r1 <- callGeneric(1, e2) Udg <- all(r1) # maybe Unit-diagonal (sparse) result ## if(!remainSparse) we'll use non0ind() which *has* unit-diag. indices at end ## if(Udg && remainSparse) { } else { ## result will not be unit-diagonal sparse e1 <- .diagU2N(e1, cl = cl1) # otherwise, result is U-diag if(extends(cl1, "CsparseMatrix")) { ## repeat computation if e1 has changed r <- callGeneric(if(has.x) e1@x else TRUE, e2) } } } if(remainSparse) { if(!anyNA(r) && ((Ar <- all(r)) || !any(r))) { lClass <- class2(cl, "l") # is "lsparse*" r <- new(lClass) r@Dim <- d r@Dimnames <- e1@Dimnames if(Ar) { # 'TRUE' instead of 'x': same sparsity: for(n in intersect(c("i","j","p","uplo","diag"), slots1)) slot(r, n) <- slot(e1, n) n <- if(has.x) length(e1@x) else if(any("p" == slots1)) e1@p[d[2]+1L] else length(e1@i) r@x <- rep.int(TRUE, n) } else { ## !any(r): all FALSE: keep empty 'r' matrix ## but may need a valid 'pointer' slot: if(extends(lClass, "CsparseMatrix")) r@p <- rep.int(0L, 1+ncol(r)) else if(extends(lClass, "RsparseMatrix")) r@p <- rep.int(0L, 1+nrow(r)) } } else { # some TRUE, FALSE, NA : go via unique 'Tsparse' M <- asTuniq(e1) nCl <- class2(class(M), 'l') # logical Tsparse sN <- slotNames(nCl) ## copy "the other slots" (important for "tr"/"sym"): r <- copyClass(M, nCl, sNames = sN[is.na(match(sN, "x"))]) r@x <- callGeneric(if(has.x) M@x else 1, e2) if(extends(cl1, "CsparseMatrix")) r <- as(r, "CsparseMatrix") else if(extends(cl1, "RsparseMatrix")) r <- as(r, "RsparseMatrix") } } else { ## non sparse result; triangularity also gone, typically lClass <- if(extends(cl1, "symmetricMatrix")) "lsyMatrix" else "lgeMatrix" Matrix.msg(sprintf("sparse to dense (%s) coercion in '%s' -> %s", lClass, .Generic, "Cmp.Mat.atomic"), .M.level = 2) rx <- rep_len(r0, n1) ## Here, we assume that 'r' and the indices align (!) encI <- .Call(m_encodeInd, non0ind(e1, cl1, uniqT=FALSE, xtendSymm=FALSE), di = d, orig1=FALSE, checkBounds=FALSE) rx[1L + encI] <- r r <- new(lClass, x = rx, Dim = d, Dimnames = e1@Dimnames) } } r } setMethod("Compare", signature(e1 = "dMatrix", e2 = "numeric"), Cmp.Mat.atomic) setMethod("Compare", signature(e1 = "dMatrix", e2 = "logical"), Cmp.Mat.atomic) setMethod("Compare", signature(e1 = "lMatrix", e2 = "numeric"), Cmp.Mat.atomic) setMethod("Compare", signature(e1 = "lMatrix", e2 = "logical"), Cmp.Mat.atomic) setMethod("Compare", signature(e1 = "nMatrix", e2 = "numeric"), Cmp.Mat.atomic) setMethod("Compare", signature(e1 = "nMatrix", e2 = "logical"), Cmp.Mat.atomic) ## "xMatrix <-> work with 'x' slot {was originally just for "Compare"}: ## ------- {also used for "Arith"}: Ops.x.x <- function(e1, e2) { d <- dimCheck(e1,e2) if((dens1 <- extends(c1 <- class(e1), "denseMatrix"))) gen1 <- extends(c1, "generalMatrix") if((dens2 <- extends(c2 <- class(e2), "denseMatrix"))) gen2 <- extends(c2, "generalMatrix") if(dens1 && dens2) { ## both inherit from ddense* geM <- TRUE if(!gen1) { if(!gen2) { ## consider preserving "triangular" / "symmetric" geM <- FALSE le <- prod(d) isPacked <- function(x) length(x@x) < le Mclass <- if(extends(c1, "symmetricMatrix") && extends(c2, "symmetricMatrix")) { if(e1@uplo != e2@uplo) ## one is upper, one is lower e2 <- t(e2) if((p1 <- isPacked(e1)) | (p2 <- isPacked(e2))) { ## at least one is packed if(p1 != p2) { # one is not packed --> *do* pack it: pack.sy <- function(x) if(is.numeric(x@x)) .Call(dsyMatrix_as_dspMatrix, x) else .Call(lsyMatrix_as_lspMatrix, x, 0L) if(p1) e2 <- pack.sy(e2) else e1 <- pack.sy(e1) } "spMatrix" } else "syMatrix" } else if(extends(c1, "triangularMatrix") && extends(c2, "triangularMatrix")) { if(!(geM <- e1@uplo != e2@uplo || isN0(callGeneric(0,0)))) { p1 <- isPacked(e1) p2 <- isPacked(e2) if(e1@diag == "U") e1 <- .dense.diagU2N(e1, isPacked=p1) if(e2@diag == "U") e2 <- .dense.diagU2N(e2, isPacked=p2) if(p1 | p2) { ## at least one is packed if(p1 != p2) { # one is not packed --> *do* pack it: pack.tr <- function(x) if(is.numeric(x@x)) .Call(dtrMatrix_as_dtpMatrix, x) else .Call(ltrMatrix_as_ltpMatrix, x, 0L) if(p1) e2 <- pack.tr(e2) else e1 <- pack.tr(e1) } "tpMatrix" } else "trMatrix" } } else { ## not symmetric, not triangular ==> "general" geM <- TRUE } if(geM) e2 <- as(e2, "generalMatrix") } if(geM) e1 <- as(e1, "generalMatrix") # was "dgeMatrix" } else { ## gen1 if(!gen2) e2 <- as(e2, "generalMatrix") } ## now, in all cases @x should be matching & correct {only "uplo" part is used} r <- callGeneric(e1@x, e2@x) kr <- .M.kind(r) if(kr == "d" && !is.double(r)) ## as "igeMatrix" does not yet exist! r <- as.double(r) if(geM) new(paste0(kr, "geMatrix"), x = r, Dim = d, Dimnames = e1@Dimnames) else new(paste0(kr, Mclass), x = r, Dim = d, Dimnames = e1@Dimnames, uplo = e1@uplo) } else { r <- if(!dens1 && !dens2) ## both e1 _and_ e2 are sparse. ## Now (new method dispatch, 2009-01) *does* happen ## even though we have o methods callGeneric(as(e1, "CsparseMatrix"), as(e2, "CsparseMatrix")) else if(dens1 && !dens2) ## go to dense callGeneric(e1, as(e2, "denseMatrix")) else ## if(!dens1 && dens2) callGeneric(as(e1, "denseMatrix"), e2) ## criterion "2 * nnz(.) < ." as in sparseDefault() in Matrix() [./Matrix.R] : if(2 * nnzero(r, na.counted = TRUE) < prod(d)) as(r, "sparseMatrix") else r } } setMethod("Ops", signature(e1 = "dMatrix", e2 = "dMatrix"), Ops.x.x) setMethod("Ops", signature(e1 = "lMatrix", e2 = "lMatrix"), Ops.x.x) ## n*: for "Arith" go via dMatrix, for "Logic" via "lMatrix" setMethod("Compare", signature(e1 = "nMatrix", e2 = "nMatrix"), Ops.x.x) ## l o d : depends on *kind* of Ops -- but Ops.x.x works on slots - correctly: setMethod("Ops", signature(e1="lMatrix", e2="dMatrix"), Ops.x.x) setMethod("Ops", signature(e1="dMatrix", e2="lMatrix"), Ops.x.x) ## lMatrix & nMatrix ... probably should also just use "Matrix" ? ## ## Hmm, the coercion should differ, depending on subgroup ("Logic", "Arith",..) ## --> try to get rid of these setMethod("Ops", signature(e1="lMatrix", e2="numeric"), function(e1,e2) callGeneric(as(e1,"dMatrix"), e2)) setMethod("Ops", signature(e1="numeric", e2="lMatrix"), function(e1,e2) callGeneric(e1, as(e2,"dMatrix"))) setMethod("Ops", signature(e1="nMatrix", e2="numeric"), function(e1,e2) callGeneric(as(e1,"dMatrix"), e2)) setMethod("Ops", signature(e1="numeric", e2="nMatrix"), function(e1,e2) callGeneric(e1, as(e2,"dMatrix"))) ## setMethod("Ops", signature(e1="Matrix", e2="logical"), ## function(e1,e2) callGeneric(as(e1,"lMatrix"), e2)) ## setMethod("Ops", signature(e1="logical", e2="Matrix"), ## function(e1,e2) callGeneric(e1, as(e2,"lMatrix"))) ## "dpoMatrix" / "dppMatrix" : ## Positive-definiteness is lost with all "Ops" but some "Arith" cases for(cl in c("numeric", "logical")) { # "complex", "raw" : basically "replValue" setMethod("Arith", signature(e1 = cl, e2 = "dpoMatrix"), function(e1, e2) if(length(e1) <= 1 && any(.Generic == c("*","/","+")) && (e1 > 0)) { e2@x <- callGeneric(e1, e2@x) ; e2 # remains "dpo" } else ## in all other cases callGeneric(e1, as(e2, "dsyMatrix"))) setMethod("Arith", signature(e1 = cl, e2 = "dppMatrix"), function(e1, e2) if(length(e1) <= 1 && any(.Generic == c("*","/","+")) && (e1 > 0)) { e2@x <- callGeneric(e1, e2@x) ; e2 # remains "dpp" } else ## in all other cases callGeneric(e1, as(e2, "dspMatrix"))) setMethod("Arith", signature(e1 = "dpoMatrix", e2 = cl), function(e1, e2) if(length(e2) <= 1 && any(.Generic == c("*","/","+")) && (e2 > 0)) { e1@x <- callGeneric(e1@x, e2) ; e1 # remains "dpo" } else ## in all other cases callGeneric(as(e1, "dsyMatrix"), e2)) setMethod("Arith", signature(e1 = "dppMatrix", e2 = cl), function(e1, e2) if(length(e2) <= 1 && any(.Generic == c("*","/","+")) && (e2 > 0)) { e1@x <- callGeneric(e1@x, e2) ; e1 # remains "dpp" } else ## in all other cases callGeneric(as(e1, "dspMatrix"), e2)) setMethod("Ops", signature(e1 = cl, e2 = "dpoMatrix"), function(e1, e2) callGeneric(e1, as(e2, "dsyMatrix"))) setMethod("Ops", signature(e1 = cl, e2 = "dppMatrix"), function(e1, e2) callGeneric(e1, as(e2, "dspMatrix"))) setMethod("Ops", signature(e1 = "dpoMatrix", e2 = cl), function(e1, e2) callGeneric(as(e1, "dsyMatrix"), e2)) setMethod("Ops", signature(e1 = "dppMatrix", e2 = cl), function(e1, e2) callGeneric(as(e1, "dspMatrix"), e2)) }# for(cl...) ### -- I -- dense ----------------------------------------------------------- ##-------- originally from ./dgeMatrix.R -------------------- ## ----- only work with NAMESPACE importFrom(methods, ..) setMethod("Arith", signature(e1 = "dgeMatrix", e2 = "dgeMatrix"), ## "+", "-", "*", "^", "%%", "%/%", "/" function(e1, e2) { ## NB: triangular, symmetric, etc may need own method d1 <- e1@Dim d2 <- e2@Dim eqD <- d1 == d2 if (!eqD[1]) stop("Matrices must have same number of rows for arithmetic") same.dim <- eqD[2] if (same.dim) { d <- d1 dn <- dimNamesCheck(e1, e2) } else { # nrows differ ----> maybe recycling if(d2[2] %% d1[2] == 0) { # nrow(e2) is a multiple e1@x <- rep.int(e1@x, d2[2] %/% d1[2]) d <- d2 dn <- e2@Dimnames } else if(d1[2] %% d2[2] == 0) { # nrow(e1) is a multiple e2@x <- rep.int(e2@x, d1[2] %/% d2[2]) d <- d1 dn <- e1@Dimnames } else stop(gettextf("number of rows are not compatible for %s", .Generic), domain=NA) } new("dgeMatrix", Dim = d, Dimnames = dn, x = callGeneric(e1@x, e2@x)) }) A.M.n <- function(e1, e2) { d <- e1@Dim le <- length(e2) if(le == 0) if(prod(d) == 0) new(class2(class(e1), "d"), Dim = d, Dimnames = e1@Dimnames) else as.numeric(e2) else if(le == 1 || le == d[1] || any(prod(d) == c(le, 0L))) { # matching dim e1@x <- callGeneric(e1@x, as.vector(e2)) e1 } else stop ("length of 2nd arg does not match dimension of first") } setMethod("Arith", signature(e1 = "dgeMatrix", e2 = "numeric"), A.M.n) setMethod("Arith", signature(e1 = "dgeMatrix", e2 = "logical"), A.M.n) setMethod("Arith", signature(e1 = "dgeMatrix", e2 = "sparseVector"), A.M.n) A.n.M <- function(e1, e2) { d <- e2@Dim le <- length(e1) if(le == 0) if(prod(d) == 0) new(class2(class(e2), "d"), Dim = d, Dimnames = e2@Dimnames) else as.numeric(e1) else if(le == 1 || le == d[1] || any(prod(d) == c(le, 0L))) { # matching dim e2@x <- callGeneric(as.vector(e1), e2@x) e2 } else stop ("length of 1st arg does not match dimension of 2nd") } setMethod("Arith", signature(e1 = "numeric", e2 = "dgeMatrix"), A.n.M) setMethod("Arith", signature(e1 = "logical", e2 = "dgeMatrix"), A.n.M) setMethod("Arith", signature(e1 = "sparseVector", e2 = "dgeMatrix"), A.n.M) ## rm(A.M.n, A.n.M) ##-------- originally from ./ddenseMatrix.R -------------------- ## Cheap version: work via "dgeMatrix" and use the group methods there: if(FALSE)## preserve "symmetric", "triangular", --> rather use Ops.x.x setMethod("Arith", signature(e1 = "ddenseMatrix", e2 = "ddenseMatrix"), function(e1, e2) callGeneric(as(e1, "dgeMatrix"), as(e2, "dgeMatrix"))) .Arith.denseM.atom <- function(e1, e2) { ## since e1 = "dgeMatrix" has its own method, we have ## either symmetric or triangular ! n1 <- prod(d <- e1@Dim) le <- length(e2 <- as.vector(e2)) if(n1 && n1 < le) stop(sprintf( "dim [product %d] do not match the length of object [%d]", n1, le)) if(le == 0) if(prod(d) == 0) new(class2(class(e1), "d"), Dim = d, Dimnames = e1@Dimnames) else as.numeric(e2) else if(le == 1 || le == d[1] || any(prod(d) == c(le, 0L))) { # matching dim if(is(e1, "triangularMatrix")) { r0 <- callGeneric(0, e2) if(all0(r0)) { # result remains triangular if(e1@diag == "U" && !all(1 == callGeneric(1,e2))) e1 <- diagU2N(e1) e1@x <- callGeneric(e1@x, e2) e1 } else { ## result *general* callGeneric(as(e1,"dgeMatrix"), e2) } } else { ## symmetric if(le == 1) { ## result remains symmetric e1@x <- callGeneric(e1@x, e2) e1 } else { ## (le == d[1] || prod(d) == le) ## *might* remain symmetric, but 'x' may contain garbage ## *testing* for symmetry is also a bit expensive ==> simple: callGeneric(as(e1,"dgeMatrix"), e2) } } } else stop ("length of 2nd arg does not match dimension of first") } setMethod("Arith", signature(e1 = "ddenseMatrix", e2 = "numeric"), .Arith.denseM.atom) setMethod("Arith", signature(e1 = "ddenseMatrix", e2 = "logical"), .Arith.denseM.atom) setMethod("Arith", signature(e1 = "ddenseMatrix", e2 = "sparseVector"), .Arith.denseM.atom) .Arith.atom.denseM <- function(e1, e2) { d <- e2@Dim ## note that e2 is either symmetric or triangular here le <- length(e1 <- as.vector(e1)) if(le == 0) if(prod(d) == 0) new(class2(class(e2), "d"), Dim = d, Dimnames = e2@Dimnames) else as.numeric(e1) else if(le == 1 || le == d[1] || any(prod(d) == c(le, 0L))) { # matching dim if(is(e2, "triangularMatrix")) { r0 <- callGeneric(e1, 0) if(all0(r0)) { # result remains triangular if(e2@diag == "U" && !all(1 == callGeneric(e1,1))) e2 <- diagU2N(e2) e2@x <- callGeneric(e1, e2@x) e2 } else { # result *general* callGeneric(e1, as(e2,"dgeMatrix")) } } else { ## symmetric if(le == 1) { # result remains symmetric e2@x <- callGeneric(e1, e2@x) e2 } else { ## (le == d[1] || prod(d) == le) ## *might* remain symmetric, but 'x' may contain garbage ## *testing* for symmetry is also a bit expensive ==> simple: callGeneric(e1, as(e2,"dgeMatrix")) } } } else stop ("length of 1st arg does not match dimension of 2nd") } ## setMethod("Arith", signature(e1 = "numeric", e2 = "ddenseMatrix"), ## function(e1, e2) callGeneric(e1, as(e2, "dgeMatrix"))) setMethod("Arith", signature(e1 = "numeric", e2 = "ddenseMatrix"), .Arith.atom.denseM) setMethod("Arith", signature(e1 = "logical", e2 = "ddenseMatrix"), .Arith.atom.denseM) setMethod("Arith", signature(e1 = "sparseVector", e2 = "ddenseMatrix"), .Arith.atom.denseM) ## "Logic" ## ------- ##-------- originally from ./ldenseMatrix.R -------------------- ## These all had "Logic", now also for "Compare", ## but "Arith" differs: result will be "dgeMatrix' : .Ops2dge.via.x <- function(e1,e2) { dimCheck(e1, e2) r <- copyClass(e1, "dgeMatrix", sNames = c("Dim","Dimnames")) r@x <- as.numeric(callGeneric(e1@x, e2@x)) r } setMethod("Compare", signature(e1="lgeMatrix", e2="lgeMatrix"), .Ops.via.x) setMethod("Logic", signature(e1="lgeMatrix", e2="lgeMatrix"), .Ops.via.x) setMethod("Arith", signature(e1="lgeMatrix", e2="lgeMatrix"), .Ops2dge.via.x) setMethod("Compare", signature(e1="ngeMatrix", e2="ngeMatrix"), .Ops.via.x) setMethod("Logic", signature(e1="ngeMatrix", e2="ngeMatrix"), .Ops.via.x) setMethod("Arith", signature(e1="ngeMatrix", e2="ngeMatrix"), .Ops2dge.via.x) ## FIXME: These lose symmmetry & triangularity setMethod("Ops", signature(e1="ldenseMatrix", e2="ldenseMatrix"), function(e1,e2) { dimCheck(e1, e2) callGeneric(as(e1, "lgeMatrix"), as(e2, "lgeMatrix")) }) setMethod("Ops", signature(e1="ndenseMatrix", e2="ndenseMatrix"), function(e1,e2) { dimCheck(e1, e2) callGeneric(as(e1, "ngeMatrix"), as(e2, "ngeMatrix")) }) ## nMatrix -> lMatrix conversions when "the other" is not nMatrix ## Use Ops.x.x unless both are sparse setMethod("Ops", signature(e1="nMatrix", e2="lMatrix"), Ops.x.x) setMethod("Ops", signature(e1="lMatrix", e2="nMatrix"), Ops.x.x) setMethod("Ops", signature(e1="nMatrix", e2="dMatrix"), Ops.x.x) setMethod("Ops", signature(e1="dMatrix", e2="nMatrix"), Ops.x.x) ## ... both are sparse: cannot use Ops.x.x setMethod("Ops", signature(e1="nsparseMatrix", e2="lsparseMatrix"), function(e1,e2) callGeneric(as(e1,"lMatrix"), e2)) setMethod("Ops", signature(e1="lsparseMatrix", e2="nsparseMatrix"), function(e1,e2) callGeneric(e1, as(e2,"lMatrix"))) setMethod("Ops", signature(e1="nsparseMatrix", e2="dsparseMatrix"), function(e1,e2) callGeneric(as(e1,"lMatrix"), e2)) setMethod("Ops", signature(e1="dsparseMatrix", e2="nsparseMatrix"), function(e1,e2) callGeneric(e1, as(e2,"lMatrix"))) ## Have this for "Ops" already above ## setMethod("Logic", signature(e1 = "logical", e2 = "Matrix"), ## function(e1, e2) callGeneric(e1, as(e2, "lMatrix"))) ## setMethod("Logic", signature(e1 = "Matrix", e2 = "logical"), ## function(e1, e2) callGeneric(as(e1, "lMatrix"), e2)) .ll <- function(e1, e2) callGeneric(as(e1,"lMatrix"), as(e2, "lMatrix")) setMethod("Logic", signature(e1 = "nMatrix", e2 = "Matrix"), .ll) setMethod("Logic", signature(e1 = "Matrix", e2 = "nMatrix"), .ll) setMethod("Logic", signature(e1 = "nMatrix", e2 = "nMatrix"), .ll) rm(.ll) ### "ANY" here means "any non-Matrix" (since "Ops"(ANY) has already bailout above): setMethod("Logic", signature(e1 = "ANY", e2 = "Matrix"), function(e1, e2) callGeneric(as.logical(e1), as(e2, "lMatrix"))) setMethod("Logic", signature(e1 = "Matrix", e2 = "ANY"), function(e1, e2) callGeneric(as(e1, "lMatrix"), as.logical(e2))) ## "swap RHS and LHS" and use the method below -- can do this, since ## "Logic" := { "&" , "|" } and both are commutative for(Mcl in c("lMatrix","nMatrix","dMatrix")) for(cl in c("logical", "numeric", "sparseVector")) setMethod("Logic", signature(e1 = cl, e2 = Mcl), function(e1,e2) callGeneric(e2, e1)) ## conceivably "numeric" could use callGeneric(e2, as.logical(e1)) ## but that's not useful at the moment, since Logic.Mat.atomic() does as.logical() ## This is parallel to Cmp.Mat.atomic() above ---> __keep parallel__ ! Logic.Mat.atomic <- function(e1, e2) { ## result will typically be "like" e1: l2 <- length(e2 <- as.logical(e2)) n1 <- prod(d <- e1@Dim) if(n1 && n1 < l2) stop(sprintf( "dim [product %d] do not match the length of object [%d]", n1, l2)) if(.Generic == "&" && l2 && allTrue (e2)) return(as(e1, "lMatrix")) if(.Generic == "|" && l2 && allFalse(e2)) return(as(e1, "lMatrix")) cl <- class(e1) if(l2 == 0) return(if(n1 == 0) new(class2(cl, "l"), Dim = d, Dimnames = e1@Dimnames) else ## stop(gettextf(" %s %s is undefined", ## .Generic, paste0(class(e2),"(0)")), domain=NA) as.logical(e2)) ## else cl1 <- getClassDef(cl) slots1 <- names(cl1@slots) has.x <- any("x" == slots1)# *fast* check for "x" slot presence if(l2 > 1 && has.x) return(if(prod(d) == 0) new(class2(cl, "l"), x = callGeneric(e1@x, e2), Dim = d, Dimnames = e1@Dimnames) else ## e2 cannot simply be compared with e1@x --> use another method callGeneric(e1, Matrix(e2, nrow=d[1], ncol=d[2]))) ## else Udg <- extends(cl1, "triangularMatrix") && e1@diag == "U" r0 <- callGeneric(0, e2) ## Udg: append the diagonal at *end*, as diagU2N(): r <- callGeneric(if(Udg) c(e1@x,..diag.x(e1)) else if(has.x) e1@x else TRUE, e2) ## trivial case first (beware of NA) if(isTRUE(all(r0) && all(r))) { r <- new(if(d[1] == d[2]) "lsyMatrix" else "lgeMatrix") r@Dim <- d r@Dimnames <- e1@Dimnames r@x <- rep.int(TRUE, prod(d)) } else if(extends(cl1, "denseMatrix")) { full <- !.isPacked(e1) # << both "dtr" and "dsy" are 'full' if(full || allFalse(r0) || extends(cl1, "symmetricMatrix")) { isTri <- extends(cl1, "triangularMatrix") if(isTri) { if(extends(cl1,"Cholesky") || extends(cl1,"BunchKaufman")) cl1 <- getClassDef(cl <- class(e1 <- as(e1, "dtrMatrix"))) } ## FIXME? using copyClass() to copy "relevant" slots r <- new(class2(cl, "l"), x = r, Dim = d, Dimnames = e1@Dimnames) if(extends(cl1, "symmetricMatrix")) { r@uplo <- e1@uplo } else if(isTri) { r@uplo <- e1@uplo r@diag <- e1@diag } } else { ## packed matrix with structural 0 and r0 is not all FALSE: ##--> result cannot be packed anymore ## [dense & packed & not symmetric ] ==> must be "ltp*" : if(!extends(cl1, "ltpMatrix")) stop("internal bug in \"Logic\" method (Logic.Mat.atomic); please report") rx <- rep_len(r0, prod(d)) rx[indTri(d[1], upper = (e1@uplo == "U"), diag=TRUE)] <- r r <- new("lgeMatrix", x = rx, Dim = d, Dimnames = e1@Dimnames) } } else { ##---- e1 is(. , sparseMatrix) ----------------- ## FIXME: remove this test eventually if(extends(cl1, "diagonalMatrix")) stop("Logic.Mat.atomic() should not be called for diagonalMatrix") remainSparse <- allFalse(r0) ## <==> things remain sparse if(Udg) { # e1 *is* unit-diagonal (triangular sparse) r1 <- callGeneric(1, e2) Udg <- all(r1) # maybe Unit-diagonal (sparse) result ## if(!remainSparse) we'll use non0ind() which *has* unit-diag. indices at end ## if(Udg && remainSparse) { } else { ## result will not be unit-diagonal sparse e1 <- .diagU2N(e1, cl = cl1) # otherwise, result is U-diag if(extends(cl1, "CsparseMatrix")) { ## repeat computation if e1 has changed r <- callGeneric(if(has.x) e1@x else TRUE, e2) } } } if(remainSparse) { if(!anyNA(r) && ((Ar <- all(r)) || !any(r))) { lClass <- class2(cl, "l") # is "lsparse*" r <- new(lClass) r@Dim <- d r@Dimnames <- e1@Dimnames if(Ar) { # 'TRUE' instead of 'x': same sparsity: for(n in intersect(c("i","j","p","uplo","diag"), slots1)) slot(r, n) <- slot(e1, n) n <- if(has.x) length(e1@x) else if(any("p" == slots1)) e1@p[d[2]+1L] else length(e1@i) r@x <- rep.int(TRUE, n) } else { ## !any(r): all FALSE: keep empty 'r' matrix ## but may need a valid 'pointer' slot: if(extends(lClass, "CsparseMatrix")) r@p <- rep.int(0L, 1+ncol(r)) else if(extends(lClass, "RsparseMatrix")) r@p <- rep.int(0L, 1+nrow(r)) } } else { # some TRUE, FALSE, NA : go via unique 'Tsparse' M <- asTuniq(e1) nCl <- class2(class(M), 'l') # logical Tsparse sN <- slotNames(nCl) ## copy "the other slots" (important for "tr"/"sym"): r <- copyClass(M, nCl, sNames = sN[is.na(match(sN, "x"))]) r@x <- callGeneric(if(has.x) M@x else TRUE, e2) if(extends(cl1, "CsparseMatrix")) r <- as(r, "CsparseMatrix") else if(extends(cl1, "RsparseMatrix")) r <- as(r, "RsparseMatrix") } } else { ## non sparse result lClass <- if(extends(cl1, "symmetricMatrix")) "lsyMatrix" else "lgeMatrix" Matrix.msg(sprintf("sparse to dense (%s) coercion in '%s' -> %s", lClass, .Generic, "Logic.Mat.atomic"), .M.level = 2) rx <- rep_len(r0, prod(d)) ## Here, we assume that 'r' and the indices align (!) encI <- .Call(m_encodeInd, non0ind(e1, cl1, uniqT=FALSE, xtendSymm=FALSE), di = d, orig1=FALSE, checkBounds=FALSE) rx[1L + encI] <- r r <- new(lClass, x = rx, Dim = d, Dimnames = e1@Dimnames) } } r } for(Mcl in c("lMatrix","nMatrix","dMatrix")) for(cl in c("logical", "numeric", "sparseVector")) setMethod("Logic", signature(e1 = Mcl, e2 = cl), Logic.Mat.atomic) ### -- II -- sparse ---------------------------------------------------------- ## Have lgC o lgC and then lgT o lgT Logic - quite similarly - ## also lsC o * and ltC o * : ## Here's the common functionality .do.Logic.lsparse <- function(e1,e2, d, dn, isOR, ij1, ij2) { ## NB non-diagonalMatrix := Union{ general, symmetric, triangular} gen1 <- extends(cD1 <- getClassDef(class(e1)), "generalMatrix") gen2 <- extends(cD2 <- getClassDef(class(e2)), "generalMatrix") sym1 <- !gen1 && extends(cD1, "symmetricMatrix") sym2 <- !gen2 && extends(cD2, "symmetricMatrix") tri1 <- !gen1 && !sym1 tri2 <- !gen2 && !sym2 G <- gen1 && gen2 S <- sym1 && sym2 && e1@uplo == e2@uplo T <- tri1 && tri2 && e1@uplo == e2@uplo if(T && e1@diag != e2@diag) { ## one is "U" the other "N" if(e1@diag == "U") e1 <- diagU2N(e1) else ## (e2@diag == "U" e2 <- diagU2N(e2) shape <- "t" } else if(!G && !S && !T) { ## e.g. one symmetric, one general ## coerce to generalMatrix and go : if(!gen1) e1 <- as(e1, "generalMatrix", strict = FALSE) if(!gen2) e2 <- as(e2, "generalMatrix", strict = FALSE) shape <- "g" } else { shape <- if(T) "t" else if(S) "s" else "g" } ii <- WhichintersectInd(ij1, ij2, di=d) I1 <- ii[[1]] ; has1 <- length(I1) > 0 I2 <- ii[[2]] ; has2 <- length(I2) > 0 ## 1) common indices i <- ij1[I1, 1] j <- ij1[I1, 2] if(isOR) { ## i.e. .Generic == "|" i.e. not "&" x <- e1@x[I1] | e2@x[I2] ## 2) "e1 o FALSE": x2 <- if(has1) e1@x[- I1] else e1@x # == callGeneric(e1@x[- I1], FALSE) ## 3) "0 o e1": x3 <- if(has2) e2@x[- I2] else e2@x # == callGeneric(FALSE, e2@x[- I2]) i <- c(i, if(has1) ij1[-I1, 1] else ij1[, 1], if(has2) ij2[-I2, 1] else ij2[, 1]) j <- c(j, if(has1) ij1[-I1, 2] else ij1[, 2], if(has2) ij2[-I2, 2] else ij2[, 2]) x <- c(x, x2, x3) } else { ## AND x <- e1@x[I1] & e2@x[I2] } if(any(!(x. <- x | is.na(x)))) { ## drop 'FALSE's i <- i[x.] j <- j[x.] x <- x[x.] } new(paste0("l",shape,"TMatrix"), Dim = d, Dimnames = dn, i = i, j = j, x = x) } Logic.lCMat <- function(e1, e2, isOR) { stopifnot(is.logical(isOR)) d <- dimCheck(e1, e2) dn <- dimNamesCheck(e1, e2) ## Very easy case first : if(identical(e1@i, e2@i) && identical(e1@p, e2@p)) { e1@x <- if(isOR) e1@x | e2@x else e1@x & e2@x return(e1) } ## else : .Call(Tsparse_to_Csparse, .do.Logic.lsparse(e1, e2, d = d, dn = dn, isOR = isOR, ij1 = .Call(compressed_non_0_ij, e1, TRUE), ij2 = .Call(compressed_non_0_ij, e2, TRUE)), FALSE) } m.Logic.lCMat <- function(e1, e2) Logic.lCMat(e1, e2, isOR = .Generic == "|") Logic.lTMat <- function(e1,e2) { d <- dimCheck(e1, e2) dn <- dimNamesCheck(e1, e2) ## Very easy case first : if(identical(e1@i, e2@i) && identical(e1@j, e2@j)) { e1@x <- callGeneric(e1@x, e2@x) return(e1) } ## else : cld <- getClassDef(class(e1)) .do.Logic.lsparse(e1, e2, d = d, dn = dn, isOR = .Generic == "|", ij1 = non0ind(e1, cld), ij2 = non0ind(e2, cld)) } setMethod("Logic", signature(e1="lgCMatrix", e2="lgCMatrix"), m.Logic.lCMat) setMethod("Logic", signature(e1="lgTMatrix", e2="lgTMatrix"), Logic.lTMat) setMethod("Logic", signature(e1 = "lsCMatrix", e2 = "lsCMatrix"), function(e1, e2) { if(e1@uplo == e2@uplo) Logic.lCMat(e1, e2, isOR = .Generic == "|") else Logic.lCMat(e1, t(e2), isOR = .Generic == "|") }) setMethod("Logic", signature(e1 = "ltCMatrix", e2 = "ltCMatrix"), function(e1, e2) { if(e1@uplo == e2@uplo) { if(e1@diag == e2@diag) ## both "N" or both "U" (!) Logic.lCMat(e1, e2, isOR = .Generic == "|") else if(e1@diag == "U") Logic.lCMat(diagU2N(e1), e2, isOR = .Generic == "|") else ## e1@diag == "N" *and* e2@diag == "U" Logic.lCMat(e1, diagU2N(e2), isOR = .Generic == "|") } else { d <- dimCheck(e1, e2) ## differing triangle (upper <-> lower): ## all will be FALSE apart from diagonal as(.diag2tT(new("ldiMatrix", Dim=d, x = get(.Generic)(diag(e1), diag(e2))), uplo = e1@uplo, kind = "l"), "dtCMatrix") } }) ## Now the other "Ops" for the "lgT" and "lgC" cases: setMethod("Arith", signature(e1="lgCMatrix", e2="lgCMatrix"), function(e1, e2) callGeneric(as(e1, "dgCMatrix"), as(e2, "dgCMatrix"))) setMethod("Arith", signature(e1="lgTMatrix", e2="lgTMatrix"), function(e1, e2) callGeneric(as(e1, "dgTMatrix"), as(e2, "dgTMatrix"))) ## More generally: Arith: l* and n* via d* setMethod("Arith", signature(e1="lsparseMatrix", e2="Matrix"), function(e1, e2) callGeneric(as(e1, "dMatrix"), as(e2,"dMatrix"))) setMethod("Arith", signature(e1="Matrix", e2="lsparseMatrix"), function(e1, e2) callGeneric(as(e1, "dMatrix"), as(e2,"dMatrix"))) setMethod("Arith", signature(e1="nsparseMatrix", e2="Matrix"), function(e1, e2) callGeneric(as(e1, "dMatrix"), as(e2,"dMatrix"))) setMethod("Arith", signature(e1="Matrix", e2="nsparseMatrix"), function(e1, e2) callGeneric(as(e1, "dMatrix"), as(e2,"dMatrix"))) ## for(cl in c("numeric", "logical")) # "complex", "raw" : basically "replValue" for(Mcl in c("lMatrix", "nMatrix")) { setMethod("Arith", signature(e1=Mcl, e2=cl), function(e1, e2) callGeneric(as(e1, "dMatrix"), e2)) setMethod("Arith", signature(e1=cl, e2=Mcl), function(e1, e2) callGeneric(e1, as(e2,"dMatrix"))) } rm(cl, Mcl) ## FIXME: These are really too cheap: currently almost all go via dgC*() : ## setMethod("Compare", signature(e1="lgCMatrix", e2="lgCMatrix"), ## setMethod("Compare", signature(e1="lgTMatrix", e2="lgTMatrix"), ## setMethod("Compare", signature(e1="lsparseMatrix", e2="lsparseMatrix"), ## function(e1, e2) callGeneric(as(e1, "dgCMatrix"), as(e2, "dgCMatrix"))) ##. Have "Ops" below which only goes *conditionally* via Csparse ##. setMethod("Compare", signature(e1="lsparseMatrix", e2="lsparseMatrix"), ##. function(e1, e2) callGeneric(as(e1, "CsparseMatrix"), ##. as(e2, "CsparseMatrix"))) ## setMethod("Compare", signature(e1="lgTMatrix", e2="lgTMatrix"), ## coerce to Csparse ## function(e1, e2) callGeneric(as(e1, "dgCMatrix"), as(e2, "dgCMatrix"))) ###--- Sparse ... ---------- setMethod("Ops", signature(e1="lsparseMatrix", e2="lsparseMatrix"), function(e1,e2) callGeneric(as(e1, "CsparseMatrix"), as(e2, "CsparseMatrix"))) setMethod("Logic", signature(e1="lsparseMatrix", e2="ldenseMatrix"), function(e1,e2) callGeneric(as(e1, "generalMatrix"), as(e2, "sparseMatrix"))) setMethod("Logic", signature(e1="ldenseMatrix", e2="lsparseMatrix"), function(e1,e2) callGeneric(as(e1, "sparseMatrix"), as(e2, "generalMatrix"))) setMethod("Logic", signature(e1="lsparseMatrix", e2="lsparseMatrix"), function(e1,e2) { if(!is(e1,"generalMatrix")) callGeneric(as(as(e1, "generalMatrix"), "CsparseMatrix"), e2) else if(!is(e2,"generalMatrix")) callGeneric(e1, as(as(e2, "generalMatrix"), "CsparseMatrix")) else callGeneric(as(e1, "lgCMatrix"), as(e2, "lgCMatrix")) }) ## FIXME: also want (symmetric o symmetric) , (triangular o triangular) ## ----- setMethod("Arith", signature(e1 = "dsCMatrix", e2 = "dsCMatrix"), function(e1, e2) { Matrix.msg("suboptimal 'Arith' implementation of 'dsC* o dsC*'") forceSymmetric(callGeneric(as(e1, "dgCMatrix"), as(e2, "dgCMatrix"))) }) ##-------- originally from ./dgCMatrix.R -------------------- .Arith.Csparse <- function(e1, e2, Generic, class., triangular = FALSE, check.dimnames = TRUE) { ## Generic is one of "+", "-", "*", "^", "%%", "%/%", "/" ## triangular: TRUE iff e1,e2 are triangular _and_ e1@uplo == e2@uplo d <- dimCheck(e1, e2) dn <- dimNamesCheck(e1, e2, check = check.dimnames) if(triangular) { ## need these for the 'x' slots in any case if (e1@diag == "U") e1 <- .Call(Csparse_diagU2N, e1) if (e2@diag == "U") e2 <- .Call(Csparse_diagU2N, e2) ## slightly more efficient than non0.i() or non0ind(): ij1 <- .Call(compressed_non_0_ij, e1, isC=TRUE) ij2 <- .Call(compressed_non_0_ij, e2, isC=TRUE) newTMat <- function(i,j,x) new("dtTMatrix", Dim = d, Dimnames = dn, i = i, j = j, x = x, uplo = e1@uplo) dmat <- "dtrMatrix" } else { cld <- getClassDef(class.) ij1 <- non0ind(e1, cld) ij2 <- non0ind(e2, cld) newTMat <- function(i,j,x) new("dgTMatrix", Dim = d, Dimnames = dn, i = i, j = j, x = x) dmat <- "dgeMatrix" } switch(Generic, "+" = , "-" = { ## care for over-allocated 'x' slot: nc1 <- d[2] + 1L if((nz <- e1@p[nc1]) < length(e1@x)) e1@x <- e1@x[seq_len(nz)] if((nz <- e2@p[nc1]) < length(e2@x)) e2@x <- e2@x[seq_len(nz)] ## special "T" convention: repeated entries are *summed* .Call(Tsparse_to_Csparse, newTMat(i = c(ij1[,1], ij2[,1]), j = c(ij1[,2], ij2[,2]), x = if(Generic == "+") c(e1@x, e2@x) else c(e1@x, - e2@x)), triangular) }, "*" = { ## X * 0 == 0 * X == 0 --> keep common non-0 ii <- WhichintersectInd(ij1, ij2, di=d) ij <- ij1[ii[[1]], , drop = FALSE] .Call(Tsparse_to_Csparse, newTMat(i = ij[,1], j = ij[,2], x = e1@x[ii[[1]]] * e2@x[ii[[2]]]), triangular) }, "^" = { ii <- WhichintersectInd(ij1, ij2, di=d) ## 3 cases: ## 1) X^0 := 1 (even for X=0) ==> dense ## 2) 0^Y := 0 for Y != 0 ===== ## 3) x^y : ## FIXME: dgeM[cbind(i,j)] <- V is not yet possible ## nor dgeM[ i_vect ] <- V ## r <- as(e2, "dgeMatrix") ## ... r <- as(e2, "matrix") Yis0 <- is0(r) r[complementInd(ij1, dim=d)] <- 0 ## 2) r[1L + ij2[ii[[2]], , drop=FALSE]] <- e1@x[ii[[1]]] ^ e2@x[ii[[2]]] ## 3) r[Yis0] <- 1 ## 1) as(r, dmat) }, "%%" = , "%/%" = , "/" = ## 0 op 0 |-> NaN => dense get(Generic)(as(e1, dmat), e2) )# end{switch(..)} } setMethod("Arith", signature(e1 = "dgCMatrix", e2 = "dgCMatrix"), function(e1,e2) .Arith.Csparse(e1,e2, .Generic, class.= "dgCMatrix")) setMethod("Arith", signature(e1 = "dtCMatrix", e2 = "dtCMatrix"), function(e1, e2) { U1 <- e1@uplo isTri <- U1 == e2@uplo && .Generic != "^" # will the result definitely be triangular? if(isTri) { .Arith.Csparse(e1,e2, .Generic, class. = "dtCMatrix", triangular = TRUE) } else { ## lowerTri o upperTri: |--> "all 0" {often} -- FIXME? .Arith.Csparse(as(e1, "dgCMatrix"), as(e2, "dgCMatrix"), .Generic, class.= "dgCMatrix") } }) ## TODO : Consider going a level up, and do this for all "Ops" ## ## NB: For "dgCMatrix" have special method ==> this is for dsC*, lgC*, ... ## now also for Tsparse etc {*must* as method directly: "callGeneric()"} .Arith.CM.atom <- function(e1, e2) { if(length(e2) == 1) { ## e.g., Mat ^ a f0 <- callGeneric(0, e2) if(is0(f0)) { ## remain sparse, symm., tri.,... e1 <- as(e1, "dMatrix") if(!extends(cld <- getClassDef(class(e1)), "CsparseMatrix")) cld <- getClassDef(class(e1 <- as(e1, "CsparseMatrix"))) if(extends(cld, "triangularMatrix") && e1@diag == "U" && !all(1 == callGeneric(1, e2))) e1 <- .diagU2N(e1, cld) e1@x <- callGeneric(e1@x, e2) if(extends(cld, "compMatrix") && length(e1@factors)) ## TODO: be much smarter and try *updating* (some) 'factors': e1@factors <- list() return(e1) } } ## all other (potentially non-sparse) cases: give up symm, tri,.. callGeneric(as(as(as(e1, "dMatrix"), "CsparseMatrix"), "dgCMatrix"), e2) } ## The same, e1 <-> e2 : .Arith.atom.CM <- function(e1, e2) { if(length(e1) == 1) { f0 <- callGeneric(e1, 0) if(is0(f0)) { e2 <- as(e2, "dMatrix") if(!extends(cld <- getClassDef(class(e2)), "CsparseMatrix")) cld <- getClassDef(class(e2 <- as(e2, "CsparseMatrix"))) if(extends(cld, "triangularMatrix") && e2@diag == "U" && !all(1 == callGeneric(e1, 1))) e2 <- .diagU2N(e2, cld) e2@x <- callGeneric(e1, e2@x) if(extends(cld, "compMatrix") && length(e2@factors)) ## TODO: be much smarter and try *updating* (some) 'factors': e2@factors <- list() return(e2) } } callGeneric(e1, as(as(as(e2, "dMatrix"), "CsparseMatrix"), "dgCMatrix")) } setMethod("Arith", signature(e1 = "CsparseMatrix", e2 = "numeric"), .Arith.CM.atom) setMethod("Arith", signature(e1 = "numeric", e2 = "CsparseMatrix"), .Arith.atom.CM) ##' compute indices for recycling of length 'len' to match sparseMatrix 'spM' .Ops.recycle.ind <- function(spM, len) { n <- prod(d <- dim(spM)) if(n < len) stop("vector too long in Matrix - vector operation") if(n %% len != 0) ## identical warning as in main/arithmetic.c warning("longer object length\n\tis not a multiple of shorter object length") ## TODO(speedup!): construction of [1L + in0 %%len] via one .Call() in0 <- .Call(m_encodeInd, .Call(compressed_non_0_ij, spM, TRUE), d, FALSE, FALSE) 1L + in0 %% len } A.M.n <- function(e1, e2) { if((l2 <- length(e2)) == 0) stop(gettextf(" %s %s is undefined", .Generic, paste0(class(e2),"(0)")), domain=NA) is0f <- is0(f0 <- callGeneric(0, e2)) if(all(is0f)) { ## result keeps sparseness structure of e1 if(l2 > 1) { # "recycle" e2 "carefully" e2 <- e2[.Ops.recycle.ind(e1, len = l2)] } e1@x <- callGeneric(e1@x, e2) if(length(e1@factors)) # TODO: be smarter and try *updating* (some) 'factors': e1@factors <- list() e1 } else if(mean(is0f) > 7/8) { ## remain sparse ['7/8' is *somewhat* arbitrary] if(l2 > 1) ## as not all callGeneric(0, e2) is 0, e2 is typically sparse callGeneric(e1, as(e2, "sparseVector")) else { ## l2 == 1: e2 is "scalar" e1@x <- callGeneric(e1@x, e2) if(length(e1@factors)) # TODO: be smarter (see above) e1@factors <- list() e1 } } else { ## non-sparse, since '0 o e2' is not (all) 0 r <- as(e1, "matrix") if(l2 == 1) { r[] <- f0 r[non0ind(e1, getClassDef("dgCMatrix")) + 1L] <- callGeneric(e1@x, e2) ..2dge(r) } else { as(callGeneric(r, e2), "dgeMatrix") } } } setMethod("Arith", signature(e1 = "dgCMatrix", e2 = "numeric"), A.M.n) setMethod("Arith", signature(e1 = "dgCMatrix", e2 = "logical"), A.M.n) ## coercing to "general*" / "dgC*" would e.g. lose symmetry of 'S * 3' setMethod("Arith", signature(e1 = "dsparseMatrix", e2 = "numeric"), .Arith.CM.atom) setMethod("Arith", signature(e1 = "dsparseMatrix", e2 = "logical"), .Arith.CM.atom) A.n.M <- function(e1, e2) { if((l1 <- length(e1)) == 0) stop(gettextf("%s %s is undefined", paste0(class(e2),"(0)"), .Generic), domain=NA) is0f <- is0(f0 <- callGeneric(e1, 0)) if(all(is0f)) { ## result keeps sparseness structure of e2 if(l1 > 1) { # "recycle" e1 "carefully" e1 <- e1[.Ops.recycle.ind(e2, len = l1)] } e2@x <- callGeneric(e1, e2@x) if(length(e2@factors))# TODO: be much smarter and try *updating* (some) 'factors': e2@factors <- list() e2 } else if(mean(is0f) > 7/8) { ## remain sparse ['7/8' is *somewhat* arbitrar if(l1 > 1) ## as not all callGeneric(e1, 0) is 0, e1 is typically sparse callGeneric(as(e1, "sparseVector"), e2) else { ## l1 == 1: e1 is "scalar" e2@x <- callGeneric(e1, e2@x) if(length(e2@factors))# TODO: be much smarter (see above) e2@factors <- list() e2 } } else { ## non-sparse, since '0 o e2' is not (all) 0 r <- as(e2, "matrix") if(l1 == 1) { r[] <- f0 r[non0ind(e2, getClassDef("dgCMatrix")) + 1L] <- callGeneric(e1, e2@x) ..2dge(r) } else { as(callGeneric(e1, r), "dgeMatrix") } } } setMethod("Arith", signature(e1 = "numeric", e2 = "dgCMatrix"), A.n.M) setMethod("Arith", signature(e1 = "logical", e2 = "dgCMatrix"), A.n.M) ## coercing to "general*" / "dgC*" would e.g. lose symmetry of '3 * S' setMethod("Arith", signature(e1 = "numeric", e2 = "dsparseMatrix"), .Arith.atom.CM) setMethod("Arith", signature(e1 = "logical", e2 = "dsparseMatrix"), .Arith.atom.CM) rm(A.M.n, A.n.M) ##-------- originally from ./Csparse.R -------------------- setMethod("Arith", signature(e1 = "CsparseMatrix", e2 = "CsparseMatrix"), function(e1, e2) { ## go via "symmetric" if both are symmetric, etc... s1 <- .M.shape(e1, getClassDef(class(e1))) s2 <- .M.shape(e2, getClassDef(class(e2))) viaCl <- paste0("d", if(s1 == s2) s1 else "g", "CMatrix") callGeneric(as(as(e1, "dMatrix"), viaCl), as(as(e2, "dMatrix"), viaCl)) }) setMethod("Logic", signature(e1 = "CsparseMatrix", e2 = "CsparseMatrix"), function(e1, e2) { ## go via "symmetric" if both are symmetric, etc... s1 <- .M.shape(e1, getClassDef(class(e1))) s2 <- .M.shape(e2, getClassDef(class(e2))) viaCl <- paste0("l", if(s1 == s2) s1 else "g", "CMatrix") callGeneric(as(as(e1, "lMatrix"), viaCl), as(as(e2, "lMatrix"), viaCl)) }) setMethod("Compare", signature(e1 = "CsparseMatrix", e2 = "CsparseMatrix"), function(e1, e2) { d <- dimCheck(e1,e2) ## How do the "0" or "FALSE" entries compare? ## Depends if we have an "EQuality RELation" or not: EQrel <- switch(.Generic, "==" =, "<=" =, ">=" = TRUE, "!=" =, "<" =, ">" = FALSE) if(EQrel) { ## The (0 op 0) or (FALSE op FALSE) comparison gives TRUE ## -> result becomes *dense*; the following may be suboptimal return( callGeneric(as(e1, "denseMatrix"), as(e2, "denseMatrix"))) } ## else: INequality: 0 op 0 gives FALSE ---> remain sparse! cD1 <- getClassDef(class(e1)) cD2 <- getClassDef(class(e2)) Matrix.msg(sprintf("Compare -- \"%s\" %s \"%s\" :\n", cD1@className, .Generic, cD2@className), .M.level = 2) ## NB non-diagonalMatrix := Union{ general, symmetric, triangular} gen1 <- extends(cD1, "generalMatrix") gen2 <- extends(cD2, "generalMatrix") sym1 <- !gen1 && extends(cD1, "symmetricMatrix") sym2 <- !gen2 && extends(cD2, "symmetricMatrix") tri1 <- !gen1 && !sym1 tri2 <- !gen2 && !sym2 G <- gen1 && gen2 S <- sym1 && sym2 && e1@uplo == e2@uplo T <- tri1 && tri2 && e1@uplo == e2@uplo if(T && e1@diag != e2@diag) { ## one is "U" the other "N" if(e1@diag == "U") e1 <- diagU2N(e1) else ## (e2@diag == "U" e2 <- diagU2N(e2) shape <- "t" } else if(!G && !S && !T) { ## e.g. one symmetric, one general ## coerce to generalMatrix and go : if(!gen1) e1 <- as(e1, "generalMatrix", strict = FALSE) if(!gen2) e2 <- as(e2, "generalMatrix", strict = FALSE) shape <- "g" } else { shape <- if(T) "t" else if(S) "s" else "g" } dn <- dimNamesCheck(e1, e2) ## <- FIXME: for 'S'; allow staying ## the result object: newC <- sub("^.", "l", MatrixClass(class(e1))) ## FIXME: "n" result when e1 & e2 are "n", or even whenever possible r <- new(newC) e1is.n <- extends(cD1, "nMatrix") e2is.n <- extends(cD2, "nMatrix") ## Easy case: identical sparsity pattern if(identical(e1@i, e2@i) && identical(e1@p, e2@p)) { if(e1is.n) { if(e2is.n) ## non-equality of identical pattern matrices: all FALSE r@p <- rep.int(0L, d[2]+1L) # and r@i, r@x remain empty else { ## e1 pattern, e2@x rx <- callGeneric(TRUE, e2@x) if(allFalse(rx)) r@p <- rep.int(0L, d[2]+1L) # and r@i, r@x remain empty else { r@x <- rx r@i <- e2@i r@p <- e2@p } } } else if(e2is.n) { ## e1@x, e2 pattern rx <- callGeneric(e1@x, TRUE) if(allFalse(rx)) r@p <- rep.int(0L, d[2]+1L) # and r@i, r@x remain empty else { r@x <- rx r@i <- e1@i r@p <- e1@p } } else { # both have 'x' slot r@x <- callGeneric(e1@x, e2@x) ## and all others are '0 op 0' which give FALSE r@i <- e1@i r@p <- e1@p } r@Dim <- d r@Dimnames <- dn r } else { ## now the 'x' slots ``match'' insofar as they are for the ## same "space" (triangle for tri* and symm*; else rectangle) ## not non0ind() which gives more; ## want only those which correspond to 'x' slot ij1 <- .Call(compressed_non_0_ij, e1, TRUE) ij2 <- .Call(compressed_non_0_ij, e2, TRUE) ii <- WhichintersectInd(ij1, ij2, di=d) I1 <- ii[[1]]; has1 <- length(I1) > 0 I2 <- ii[[2]]; has2 <- length(I2) > 0 ## potentially could be faster for 'nsparse' but this is simple: e1x <- if(e1is.n) rep.int(1L, length(e1@i)) else e1@x e2x <- if(e2is.n) rep.int(1L, length(e2@i)) else e2@x ## 1) common x <- callGeneric(e1x[I1], e2x[I2]) ## 2) "e1 o 0": x2 <- callGeneric(if(has1) e1x[- I1] else e1x, 0) ## 3) "0 o e2": x3 <- callGeneric(0, if(has2) e2x[- I2] else e2x) i <- c(ij1[I1, 1], if(has1) ij1[-I1, 1] else ij1[, 1], if(has2) ij2[-I2, 1] else ij2[, 1]) j <- c(ij1[I1, 2], if(has1) ij1[-I1, 2] else ij1[, 2], if(has2) ij2[-I2, 2] else ij2[, 2]) x <- c(x, x2, x3) if(any(i0x <- is0(x))) { # drop 'FALSE's n0 <- !i0x i <- i[n0] j <- j[n0] x <- x[n0] } .Call(Tsparse_to_Csparse, if(e1is.n && e2is.n) new(paste0("n",shape,"TMatrix"), Dim = d, Dimnames = dn, i = i, j = j) else new(paste0("l",shape,"TMatrix"), Dim = d, Dimnames = dn, i = i, j = j, x = x), FALSE) } }) ##-------- originally from ./sparseMatrix.R -------------------- ## "Arith" short cuts / exceptions setMethod("-", signature(e1 = "sparseMatrix", e2 = "missing"), function(e1, e2) { e1 <- diagU2N(e1) e1@x <- -e1@x e1@factors <- list()# Drop Cholesky factors; TODO: Consider to modify & keep LU e1 }) ## with the following exceptions: setMethod("-", signature(e1 = "nsparseMatrix", e2 = "missing"), function(e1,e2) callGeneric(as(as(as(e1, "CsparseMatrix"), "dMatrix"), "dgCMatrix"))) setMethod("-", signature(e1 = "pMatrix", e2 = "missing"), function(e1,e2) callGeneric(as(e1, "ngTMatrix"))) ## Group method "Arith" ## have CsparseMatrix methods above ## which may preserve "symmetric", "triangular" -- simply defer to those: setMethod("Ops", signature(e1 = "sparseMatrix", e2 = "nsparseMatrix"), function(e1, e2) callGeneric(as(e1, "CsparseMatrix"), as(e2, "lsparseMatrix"))) setMethod("Ops", signature(e1 = "nsparseMatrix", e2 = "sparseMatrix"), function(e1, e2) callGeneric(as(e1, "lsparseMatrix"), as(e2, "CsparseMatrix"))) ## these were 'Arith', now generalized: if(FALSE) { ## just shifts the ambiguity warnings .. ## o more complicated - against PITA disambiguation warnings: setMethod("Ops", signature(e1 = "TsparseMatrix", e2 = "TsparseMatrix"), function(e1, e2) callGeneric(as(e1, "CsparseMatrix"), as(e2, "CsparseMatrix"))) setMethod("Ops", signature(e1 = "TsparseMatrix", e2 = "CsparseMatrix"), function(e1, e2) callGeneric(as(e1, "CsparseMatrix"), e2)) setMethod("Ops", signature(e1 = "CsparseMatrix", e2 = "TsparseMatrix"), function(e1, e2) callGeneric(e1, as(e2, "CsparseMatrix"))) } ## catch the rest: Rsparse* and T* o R* setMethod("Ops", signature(e1 = "sparseMatrix", e2 = "sparseMatrix"), function(e1, e2) callGeneric(as(e1, "CsparseMatrix"), as(e2, "CsparseMatrix"))) setMethod("Ops", signature(e1 = "sparseMatrix", e2 = "numeric"), function(e1, e2) callGeneric(as(e1, "CsparseMatrix"), e2)) setMethod("Ops", signature(e1 = "numeric", e2 = "sparseMatrix"), function(e1, e2) callGeneric(e1, as(e2, "CsparseMatrix"))) ## setMethod("Compare", signature(e1 = "sparseMatrix", e2 = "sparseMatrix"), ## function(e1, e2) callGeneric(as(e1, "CsparseMatrix"), ## as(e2, "CsparseMatrix"))) ###-------- sparseVector ------------- ###-------- ============ ------------- ## Catch all remaining setMethod("Ops", signature(e1 = "sparseVector", e2 = "ANY"), function(e1, e2) .bail.out.2(.Generic, class(e1), class(e2))) setMethod("Ops", signature(e1 = "ANY", e2 = "sparseVector"), function(e1, e2) .bail.out.2(.Generic, class(e1), class(e2))) ## 1) spVec o (sp)Vec : ------------- ## FIXME: ## 2. o should also happen directly and ## |-> sparse for o = {'*', "/", '&&', '==', ... setMethod("Ops", signature(e1 = "sparseVector", e2 = "atomicVector"), function(e1, e2) { if(length(e2) == 1) { ## scalar ------ special case - "fast" if(all0(callGeneric(FALSE, e2))) { # result remains sparse if(is(e1, "nsparseVector")) { # no 'x' slot, i.e. all TRUE r <- callGeneric(TRUE, e2) if(is.logical(r)) { if(isTRUE(all(r))) # (could be NA) e1 # result unchanged else newSpVec("lsparseVector", x = r, e1) } else { newSpVec(paste0(if(is.integer(r)) "i" else "d", "sparseVector"), x = r, e1) } } else { # has x slot r <- callGeneric(e1@x, e2) if(identical(class(r), class(e1@x))) { e1@x <- r e1 } else { newSpVec(paste0(.V.kind(r), "sparseVector"), x = r, e1) } } } else ## non-sparse result callGeneric(sp2vec(e1), e2) } else ## e2 is not scalar callGeneric(e1, as(e2, "sparseVector")) }) setMethod("Ops", signature(e1 = "atomicVector", e2 = "sparseVector"), function(e1, e2) { if(length(e1) == 1) { ## scalar ------ special case - "fast" if(all0(callGeneric(e1, FALSE))) { # result remains sparse if(is(e2, "nsparseVector")) { # no 'x' slot, i.e. all TRUE r <- callGeneric(e1, TRUE) if(is.logical(r)) { if(isTRUE(all(r))) # (could be NA) e2 # result unchanged else newSpVec("lsparseVector", x = r, e2) } else { newSpVec(paste0(if(is.integer(r)) "i" else "d", "sparseVector"), x = r, e2) } } else { # has x slot r <- callGeneric(e1, e2@x) if(identical(class(r), class(e2@x))) { e2@x <- r e2 } else { newSpVec(paste0(.V.kind(r), "sparseVector"), x = r, e2) } } } else ## non-sparse result callGeneric(e1, sp2vec(e2)) } else ## e1 is not scalar callGeneric(as(e1, "sparseVector"), e2) }) Ops.spV.spV <- function(e1, e2) { n1 <- e1@length n2 <- e2@length if(n1 != n2) { if(n1 < n2) { n <- n1 ; N <- n2 } else { n <- n2 ; N <- n1 } if(n == 1) { # simple case, do not really recycle if(n1 < n2) return(callGeneric(sp2vec(e1), e2)) else return(callGeneric(e1, sp2vec(e2))) } ## else : 2 <= n < N if(N %% n != 0) warning("longer object length is not a multiple of shorter object length") ## recycle the shorter one if(n1 < n2) { e1 <- rep(e1, length = N) } else { e2 <- rep(e2, length = N) } } else { ## n1 == n2 N <- n1 } ## ---- e1 & e2 now are both of length 'N' ---- ## First check the (0 o 0) result is1n <- extends(class(e1), "nsparseVector") is2n <- extends(class(e2), "nsparseVector") r00 <- callGeneric(if(is1n) FALSE else as0(e1@x), if(is2n) FALSE else as0(e2@x)) if(is0(r00)) { ## -> sparseVector e1x <- if(is1n) TRUE else e1@x e2x <- if(is2n) TRUE else e2@x sp <- .setparts(e1@i, e2@i) ## Idea: Modify 'e2' and return it : new.x <- c(callGeneric(e1x[sp[["ix.only"]]], 0), # e1-only callGeneric(0, e2x[sp[["iy.only"]]]), # e2-only callGeneric(e1x[sp[["my"]]], # common to both e2x[sp[["mx"]]])) i. <- c(sp[["x.only"]], sp[["y.only"]], sp[["int"]]) cl2x <- typeof(e2x) ## atomic "class"es - can use in is(), as(), too: if(!is2n && is(new.x, cl2x)) { i. <- sort.int(i., method = "quick", index.return=TRUE) e2@x <- as(new.x, cl2x)[i.$ix] e2@i <- i.$x e2 } else { newSpV(paste0(.kind.type[typeof(new.x)],"sparseVector"), x = new.x, i = i., length = e2@length) } } else { ## 0 o 0 is NOT in {0 , FALSE} --> "dense" result callGeneric(sp2vec(e1), sp2vec(e2)) } } ## {Ops.spV.spV} ## try to use it in all cases setMethod("Ops", signature(e1 = "sparseVector", e2 = "sparseVector"), Ops.spV.spV) ## was function(e1, e2) .bail.out.2(.Generic, class(e1), class(e2))) setMethod("Arith", signature(e1 = "sparseVector", e2 = "sparseVector"), function(e1, e2) callGeneric(as(e1, "dsparseVector"), as(e2, "dsparseVector"))) setMethod("Arith", signature(e1 = "dsparseVector", e2 = "dsparseVector"), Ops.spV.spV) ## "Arith" exception (shortcut) setMethod("-", signature(e1 = "dsparseVector", e2 = "missing"), function(e1) { e1@x <- -e1@x ; e1 }) setMethod("Logic", signature(e1 = "sparseVector", e2 = "sparseVector"), ## FIXME: this is suboptimal for "nsparseVector" !! function(e1, e2) callGeneric(as(e1, "lsparseVector"), as(e2, "lsparseVector"))) setMethod("Logic", signature(e1 = "lsparseVector", e2 = "lsparseVector"), Ops.spV.spV) ## "nsparse" have no 'x' slot --> version of Ops.spV.spV.. ## -------- but also for (nsp.. o lsp..) etc, when lsp... has no NA if(FALSE) ### FIXME setMethod("Logic", signature(e1 = "nsparseVector", e2 = "nsparseVector"), function(e1, e2) { .bail.out.2(.Generic, class(e1), class(e2)) }) ## 2) spVec o [Mm]atrix : ------------- Ops.M.spV <- function(e1, e2) { d <- e1@Dim n1 <- prod(d) n2 <- e2@length if(n1 != n2) { if(n1 < n2) { stop(sprintf( "dim [product %d] do not match the length of object [%d]", n1, n2)) } ## else n1 > n2 [vector] N <- n1 if(n2 == 1) ## simple case, do not really recycle return(callGeneric(e1, sp2vec(e2))) if(N %% n2 != 0) warning("longer object length is not a multiple of shorter object length") ## else : 2 <= n < N --- recycle the vector e2 <- rep(e2, length = N) } else { ## n1 == n2 N <- n1 } ## ---- e1 & e2 now are both of length 'N' ---- dim(e2) <- d #-> sparseMatrix (!) callGeneric(e1, e2) }## {Ops.M.spV} Ops.spV.M <- function(e1, e2) { n1 <- e1@length d <- e2@Dim n2 <- prod(d) if(n2 != n1) { if(n2 < n1) { stop(sprintf( "dim [product %d] do not match the length of object [%d]", n2, n1)) } ## else n2 > n1 [vector] N <- n2 if(n1 == 1) ## simple case, do not really recycle return(callGeneric(sp2vec(e1), e2)) if(N %% n1 != 0) warning("longer object length is not a multiple of shorter object length") ## else : 2 <= n < N --- recycle the vector e1 <- rep(e1, length = N) } else { ## n2 == n1 N <- n2 } ## ---- e2 & e1 now are both of length 'N' ---- dim(e1) <- d #-> sparseMatrix (!) callGeneric(e1, e2) }## {Ops.spV.M} ## try to use it in all cases setMethod("Ops", signature(e1 = "Matrix", e2 = "sparseVector"), Ops.M.spV) setMethod("Ops", signature(e1 = "sparseVector", e2 = "Matrix"), Ops.spV.M) Matrix/R/dsyMatrix.R0000644000176200001440000001121213047113565014030 0ustar liggesusers### Coercion and Methods for Dense Numeric Symmetric Matrices ##' @export (!) Note: ..?dense2sy() work for "dgeMatrix" *and* "matrix" .dense2sy <- function(from, ...) { if(isSymmetric(from, ...)) # < with tolerance! .Call(dense_to_symmetric, from, "U", FALSE) else stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") } ## NB: The alternative, 'zero tolerance' { <=> isSymmetric(*, tol=0) } ## breaks too much previous code -- though it would be much faster -- ##' usable directly as function in setAs() <== no "..." ..dense2sy <- function(from) { if(isSymmetric(from)) # < with tolerance! .Call(dense_to_symmetric, from, "U", FALSE) else stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") } setAs("dgeMatrix", "dsyMatrix", ..dense2sy) setAs("matrix", "dsyMatrix", function(from) .dense2sy(..2dge(from))) .dsy2mat <- function(from, keep.dimnames=TRUE)# faster .Call(dsyMatrix_as_matrix, from, keep.dimnames) ..dsy2mat <- function(from) .Call(dsyMatrix_as_matrix, from, TRUE) setAs("dsyMatrix", "matrix", ..dsy2mat) .dsy2dsp <- function(from) .Call(dsyMatrix_as_dspMatrix, from) setAs("dsyMatrix", "dspMatrix", .dsy2dsp) dsy2T <- function(from) { # 'dsT': only store upper *or* lower uplo <- from@uplo if(any0(dim(from))) { ij <- matrix(0L, 0,2) ; m <- from@x } else { ## FIXME! working via "matrix" is *not* efficient: ## the "other triangle" is filled, compared with 0, and then trashed: m <- .Call(dsyMatrix_as_matrix, from, FALSE) # no dimnames! ij <- which(m != 0, arr.ind = TRUE, useNames = FALSE) ij <- ij[if(uplo == "U") ij[,1] <= ij[,2] else ij[,1] >= ij[,2], , drop = FALSE] } new("dsTMatrix", i = ij[,1] - 1L, j = ij[,2] - 1L, x = as.vector(m[ij]), uplo = uplo, Dim = from@Dim, Dimnames = from@Dimnames) } setAs("dsyMatrix", "dsTMatrix", dsy2T) setAs("dsyMatrix", "dsCMatrix", dsy2C <- function(from) .T2Cmat(dsy2T(from), isTri=FALSE)) ## Note: Just *because* we have an explicit dtr -> dge coercion, ## show( ) is not okay, and we need our own: setMethod("show", "dsyMatrix", function(object) prMatrix(object)) setMethod("rcond", signature(x = "dsyMatrix", norm = "character"), function(x, norm, ...) .Call(dsyMatrix_rcond, x, norm), valueClass = "numeric") setMethod("rcond", signature(x = "dsyMatrix", norm = "missing"), function(x, norm, ...) .Call(dsyMatrix_rcond, x, "O"), valueClass = "numeric") setMethod("solve", signature(a = "dsyMatrix", b = "missing"), function(a, b, ...) .Call(dsyMatrix_solve, a), valueClass = "dsyMatrix") setMethod("solve", signature(a = "dsyMatrix", b = "matrix"), function(a, b, ...) .Call(dsyMatrix_matrix_solve, a, b), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dsyMatrix", b = "ddenseMatrix"), function(a, b, ...) .Call(dsyMatrix_matrix_solve, a, b)) setMethod("solve", signature(a = "dsyMatrix", b = "denseMatrix"), ## eg. for ddi* or ldi* function(a, b, ...) .Call(dsyMatrix_matrix_solve, a, as(b,"dMatrix"))) setMethod("norm", signature(x = "dsyMatrix", type = "character"), function(x, type, ...) if(identical("2", type)) norm2(x) else .Call(dsyMatrix_norm, x, type), valueClass = "numeric") setMethod("norm", signature(x = "dsyMatrix", type = "missing"), function(x, type, ...) .Call(dsyMatrix_norm, x, "O"), valueClass = "numeric") ## *Should* create the opposite storage format: "U" -> "L" and vice-versa: setMethod("t", signature(x = "dsyMatrix"), t_trMatrix, valueClass = "dsyMatrix") setMethod("BunchKaufman", signature(x = "dsyMatrix"), function(x) .Call(dsyMatrix_trf, x)) setAs("dsyMatrix", "dpoMatrix", function(from){ if(is.null(tryCatch(.Call(dpoMatrix_chol, from), error = function(e) NULL))) stop("not a positive definite matrix") ## else copyClass(from, "dpoMatrix", sNames = c("x", "Dim", "Dimnames", "uplo", "factors")) }) setMethod("diag", signature(x = "dsyMatrix"), function(x, nrow, ncol) .Call(dgeMatrix_getDiag, x)) setMethod("diag<-", signature(x = "dsyMatrix"), function(x, value) .Call(dgeMatrix_setDiag, x, value)) ## Now that we have "chol", we can define "determinant" methods, ## exactly like in ./dsCMatrix.R ## DB - Probably figure out how to use the BunchKaufman decomposition instead ## {{FIXME: Shouldn't it be possible to have "determinant" work by ## default automatically for "Matrix"es when there's a "chol" method available? ## ..> work with ss <- selectMethod("chol", signature("dgCMatrix")) ## -- not have to define showMethod("determinant", ...) for all classes Matrix/R/Summary.R0000644000176200001440000002742012772471324013515 0ustar liggesusers####--- All "Summary" group methods for all Matrix classes (incl sparseVector) ------ #### ======= but diagonalMatrix -> ./diagMatrix.R and abIndex.R #### ~~~~~~~~~~~~ ~~~~~~~~~ ## M-x grep -E -e 'Method\("(Summary|max|min|range|all|any|prod|sum)"' *.R ## ---- sG <- getGroupMembers("Summary") if(FALSE) sG ## "max" "min" "range" "prod" "sum" "any" "all" ## w/o "prod" & "sum": summGener1 <- sG[match(sG, c("prod","sum"), 0) == 0] rm(sG) ###---------- dMatrix setMethod("Summary", "ddenseMatrix", function(x, ..., na.rm) { d <- x@Dim if(any(d == 0)) return(callGeneric(numeric(0), ..., na.rm=na.rm)) clx <- getClassDef(class(x)) if(extends(clx, "generalMatrix")) callGeneric(x@x, ..., na.rm = na.rm) else if(extends(clx, "symmetricMatrix")) { # incl packed, pos.def. if(.Generic %in% summGener1) { callGeneric(if (length(x@x) < prod(d)) x@x else x@x[indTri(d[1], upper= x@uplo == "U", diag= TRUE)], ..., na.rm = na.rm) } else callGeneric(..2dge(x)@x, ..., na.rm = na.rm) } else { ## triangular , possibly packed if(.Generic %in% summGener1) { if(.Generic %in% c("any","all")) { Zero <- FALSE; One <- TRUE; xx <- as.logical(x@x) } else { Zero <- 0; One <- 1; xx <- x@x } callGeneric(if (length(xx) < prod(d)) xx ## <- 'packed' else xx[indTri(d[1], upper= x@uplo == "U", diag= TRUE)], if(d[1] >= 2) Zero, if(x@diag == "U") One, ..., na.rm = na.rm) } else callGeneric(..2dge(x)@x, ..., na.rm = na.rm) } }) setMethod("Summary", "dsparseMatrix", function(x, ..., na.rm) { ne <- prod(d <- dim(x)) if(ne == 0) return(callGeneric(numeric(0), ..., na.rm=na.rm)) n <- d[1] clx <- getClassDef(class(x)) isTri <- extends(clx, "triangularMatrix") if(extends(clx, "TsparseMatrix") && anyDuplicatedT(x, di = d)) x <- .Call(Tsparse_to_Csparse, x, isTri)# = as(x, "Csparsematrix") l.x <- length(x@x) if(l.x == ne) ## fully non-zero (and "general") - very rare but quick return( callGeneric(x@x, ..., na.rm = na.rm) ) ## else l.x < ne isSym <- !isTri && extends(clx, "symmetricMatrix") isU.tri <- isTri && x@diag == "U" ## "full": has *no* structural zero : very rare, but need to catch : full.x <- ((isSym && l.x == choose(n+1, 2)) || (n == 1 && (isU.tri || l.x == 1))) isGener1 <- .Generic %in% summGener1 if(isGener1) { ## not prod() or sum() -> no need check for symmetric ## we rely on (x, NULL, y, ..) :== (x, y, ..): if(any(.Generic == c("any","all"))) ## logic: callGeneric(as.logical(x@x), if(!full.x) FALSE, if(isU.tri) TRUE, ..., na.rm = na.rm) else callGeneric(x@x, if(!full.x) 0, if(isU.tri) 1, ..., na.rm = na.rm) } else { ## prod() or sum() : care for "symmetric" and U2N if(!full.x && .Generic == "prod") { if(anyNA(x@x)) NaN else 0 } else callGeneric((if(isSym) as(x, "generalMatrix") else x)@x, if(!full.x) 0, # one 0 <==> many 0's if(isU.tri) rep.int(1, n), ..., na.rm = na.rm) } }) ###---------- ldenseMatrix if(FALSE) # not correct (@x may contain "wrong" in "other" triangel setMethod("all", "lsyMatrix", function(x, ..., na.rm = FALSE) all(x@x, ..., na.rm = na.rm)) if(FALSE) # replaced by "Summary" below ## Note: the above "lsy*" method is needed [case below can be wrong] setMethod("all", "ldenseMatrix", function(x, ..., na.rm = FALSE) { if(prod(dim(x)) >= 1) (!is(x, "triangularMatrix") && !is(x, "diagonalMatrix") && all(x@x, ..., na.rm = na.rm)) else all(x@x, ..., na.rm = na.rm) }) ## almost copy_paste from "ddenseMatrix" above Summ.ln.dense <- function(x, ..., na.rm) { d <- x@Dim if(any(d == 0)) return(callGeneric(logical(0), ..., na.rm=na.rm)) ext <- extends(getClassDef(class(x))) if(any("generalMatrix" == ext)) callGeneric(x@x, ..., na.rm = na.rm) else if(any("symmetricMatrix" == ext)) { # incl packed, pos.def. if(.Generic != "sum") { ## i.e., %in% summGener1 callGeneric(if (length(x@x) < prod(d)) x@x else x@x[indTri(d[1], upper= x@uplo == "U", diag= TRUE)], ..., na.rm = na.rm) } else ## sum() -- FIXME-faster: use x@x[indTri(...)] similar to above callGeneric(as(x, paste0(if(any("ldenseMatrix" == ext)) "l" else "n", "geMatrix"))@x, ..., na.rm = na.rm) } else { ## triangular , possibly packed if(.Generic != "sum") ## incl. prod() ! callGeneric(x@x, if(d[1] >= 2) FALSE, if(x@diag == "U") TRUE, ..., na.rm = na.rm) else ## sum() -- FIXME-faster: using indTri()..; in unit-diag. case: plus n x TRUE = d[1] ## if packed: sum(x@x, if(x@diag == "U") d[1], ..., na.rm = na.rm) callGeneric(as(x, paste0(if(any("ldenseMatrix" == ext)) "l" else "n", "geMatrix"))@x, ..., na.rm = na.rm) } } setMethod("Summary", "ldenseMatrix", Summ.ln.dense) setMethod("Summary", "ndenseMatrix", Summ.ln.dense) ###---------- lMatrix setMethod("any", "lMatrix", function(x, ..., na.rm = FALSE) ## logical unit-triangular has TRUE diagonal: (prod(dim(x)) >= 1 && is(x, "triangularMatrix") && x@diag == "U") || any(x@x, ..., na.rm = na.rm)) ###---------- lsparseMatrix ##------- Work via as(*, lgC) : ------------ setMethod("all", "lsparseMatrix", function(x, ..., na.rm = FALSE) { d <- x@Dim l.x <- length(x@x) if(l.x == prod(d)) ## fully non-zero all(x@x, ..., na.rm = na.rm) else if(is(x, "symmetricMatrix") && l.x == choose(d[1]+1, 2)) { if(.Generic %in% summGener1) all(x@x, ..., na.rm = na.rm) else all(as(x, "generalMatrix")@x, ..., na.rm = na.rm) } else FALSE ## has at least one structural 0 }) ###---------- Matrix ## For all other Matrix objects {and note that "all" and "any" have their own}: setMethod("all", "Matrix", function(x, ..., na.rm) callGeneric(as(x, "lMatrix"), ..., na.rm=na.rm)) setMethod("any", "Matrix", function(x, ..., na.rm) callGeneric(as(x, "lMatrix"), ..., na.rm=na.rm)) setMethod("Summary", "Matrix", ## FIXME (too cheap): all() should not go via dMatrix!! function(x, ..., na.rm) callGeneric(as(x,"dMatrix"), ..., na.rm = na.rm)) ## Try to make min(1, ) work, i.e., not dispatch on first arg to .Primitive ## This for(..) gives {during installation} ## Error in setGeneric(F, signature = "...") : ## ‘max’ is a primitive function; methods can be defined, but the generic function is implicit, and cannot be changed. if(FALSE) for(F in c("max", "min", "range", "prod", "sum", "any", "all")) { setGeneric(F, signature = "...") } ## try on "min" for now --- ~/R/Pkgs/Rmpfr/R/mpfr.R is the example (for "pmin") if(FALSE)## This gives error message that the "ANY" is method is sealed ... setMethod("min", "ANY", function(..., na.rm = FALSE) { args <- list(...) if(all(isAtm <- vapply(args, is.atomic, NA))) return( base::min(..., na.rm = na.rm) ) ## else try to dispatch on an argument which is a Matrix.. or in a if(any(isM <- vapply(args, is, NA, class2="Matrix"))) { ## swap the Matrix with the first argument i <- which.max(isM)# the first "Matrix" if(i == 1) stop("programming error: min() should have dispatched w/ 1st arg much earlier") } else { ## if no "Matrix", take the first non-atomic argument ## (FIXME: should take the first for which there is a method !) i <- which.max(!isAtm) } ii <- seq_along(args) ii[c(1,i)] <- c(i,1) do.call(min, c(args[ii], list(na.rm=na.rm))) }) if(FALSE) { ## FIXME: it does *not* solve the problem anyway .. ## ## (m <- Matrix(c(0,0,2:0), 3,5)) ## min(1,m) ##-> error, as it calls the .Primitive min() and that does *not* dispatch on 2nd arg ## setMethod("Summary", "ANY", function(x, ..., na.rm) { if(!length(a <- list(...))) (get(.Generic, envir=baseenv()))(x, na.rm=na.rm) else { if(!is.null(v <- getOption("Matrix.verbose")) && v >= 1) if(length(a) > 1) message(gettextf("in Summary(, .): %s(<%s>, <%s>,...)\n", .Generic, class(x), class(a[[1]])), domain = NA) else message(gettextf("in Summary(, .): %s(<%s>, <%s>)\n", .Generic, class(x), class(a[[1]])), domain = NA) do.call(.Generic, c(x, a, list(na.rm=na.rm))) }}) }## {does not help --> not used} Summary.l <- function(x, ..., na.rm) { ## must be method directly if(.Generic %in% c("all", "any")) callGeneric(x@x, ..., na.rm = na.rm) else { r <- callGeneric(as(x,"dMatrix"), ..., na.rm = na.rm) if(.Generic != "prod" && !any(is.infinite(r))) as.integer(r) else r } } ## almost identical: Summary.np <- function(x, ..., na.rm) { if(.Generic %in% c("all", "any")) callGeneric(as(x, "lMatrix"), ..., na.rm = na.rm) else { r <- callGeneric(as(x,"dMatrix"), ..., na.rm = na.rm) if(.Generic != "prod" && !any(is.infinite(r))) as.integer(r) else r } } ## setMethod("Summary", "lMatrix", Summary.l) setMethod("Summary", "nMatrix", Summary.np) setMethod("Summary", "indMatrix", Summary.np) ###---------- nsparseMatrix setMethod("all", "nsparseMatrix", function(x, ..., na.rm = FALSE) { pd <- prod(d <- dim(x)) if(pd == 0) return(TRUE) cld <- getClassDef(class(x)) if(extends(cld, "triangularMatrix")) return(FALSE) ## else if(extends(cld, "TsparseMatrix")) cld <- getClassDef(class(x <- as(x, "CsparseMatrix"))) ## now have Csparse or Rsparse: length of index slot = no.{TRUE} l.x <- length(if(extends(cld, "CsparseMatrix")) x@i else x@j) (l.x == pd) || ## fully non-zero (extends(cld, "symmetricMatrix") && l.x == choose(d[1]+1, 2)) ## else FALSE }) setMethod("any", "nsparseMatrix", function(x, ..., na.rm = FALSE) { if(any(dim(x) == 0)) return(FALSE) cld <- getClassDef(class(x)) if(extends(cld, "triangularMatrix") && x@diag == "U") TRUE # unit-diagonal else if(extends(cld, "CsparseMatrix") || extends(cld, "TsparseMatrix")) length(x@i) > 0 else # RsparseMatrix length(x@j) > 0 }) ###---------- sparseVector setMethod("Summary", "nsparseVector", function(x, ..., na.rm) { ## no 'x' slot, no NA's .. n <- x@length l.x <- length(x@i) if(l.x == n) callGeneric(rep.int(TRUE, n), ..., na.rm = na.rm) else ## l.x < n : has some FALSE entries switch(.Generic, "prod" = 0, "min" = 0L, "all" = FALSE, "any" = l.x > 0, "sum" = l.x, "max" = as.integer(l.x > 0), "range" = c(0L, as.integer(l.x > 0))) }) ## The "other" "sparseVector"s ("d", "l", "i" ..): all have an 'x' slot : setMethod("Summary", "sparseVector", function(x, ..., na.rm) { n <- x@length l.x <- length(x@x) if(l.x == n) ## fully non-zero (and "general") - very rare but quick callGeneric(x@x, ..., na.rm = na.rm) else if(.Generic != "prod") { ## we rely on (x, NULL, y, ..) :== (x, y, ..): if(any(.Generic == c("any","all"))) ## logic: callGeneric(as.logical(x@x), FALSE, ..., na.rm = na.rm) else # "numeric" callGeneric(x@x, 0, ..., na.rm = na.rm) } else { ## prod() if(anyNA(x@x)) NaN else 0 } }) ## help( pmin ) in R : ## ----- ## ‘pmax’ and ‘pmin’ will also work on classed objects with appropriate methods ## for comparison, ‘is.na’ and ‘rep’ (if recycling of arguments is needed). ## ##--> and that now *does* work, in 'R 3.3.1 patched' and newer Matrix/R/dMatrix.R0000644000176200001440000000373612507176717013500 0ustar liggesusers### Define Methods that can be inherited for all subclasses ##-> "dMatrix" <--> "lMatrix" ---> ./lMatrix.R ## these two are parallel to "n <-> l" in the above : setAs("nMatrix", "dMatrix", function(from) { cld <- getClassDef(cl <- MatrixClass(class(from))) isSp <- extends(cld, "sparseMatrix") ## faster(not "nicer"): any(substr(cl,3,3) == c("C","T","R")) sNams <- slotNames(cld) r <- copyClass(from, sub("^n", "d", cl), if(isSp) sNams else sNams[sNams != "x"]) r@x <- if(isSp) rep.int(1., nnzSparse(from)) else as.double(from@x) r }) ## NOTE: This is *VERY* parallel to ("lMatrix" -> "nMatrix") in ./lMatrix.R : setAs("dMatrix", "nMatrix", function(from) { if(anyNA(from@x) && ((.w <- isTRUE(getOption("Matrix.warn"))) || isTRUE(getOption("Matrix.verbose")))) { (if(.w) warning else message)( "\"dMatrix\" object with NAs coerced to \"nMatrix\": NA |-> TRUE") from@x[is.na(from@x)] <- 1 # "TRUE" } cld <- getClassDef(cl <- MatrixClass(class(from))) if(extends(cld, "diagonalMatrix")) # no "ndi*" class ## should not happen, setAs(diagonalMatrix -> nMatrix) in ./diagMatrix.R: return(di2nMat(from)) ## else isSp <- extends(cld, "sparseMatrix") if(isSp && any(from@x == 0)) { from <- drop0(from) # was drop0(from, cld) if(cl != (c. <- class(from))) cld <- getClassDef(cl <- c.) } sNams <- slotNames(cld) r <- copyClass(from, sub("^d", "n", cl), sNams[sNams != "x"]) if(!isSp) # 'x' slot |--> logical r@x <- as.logical(from@x) r }) ## Group Methods: ## ----- ## "Math", "Math2" in --> ./Math.R ## "Summary" --> ./Summary.R ## "Ops" ("Arith", "Compare", "Logic") --> ./Ops.R ## Methods for single-argument transformations setMethod("zapsmall", signature(x = "dMatrix"), function(x, digits = getOption("digits")) { x@x <- zapsmall(x@x, digits) x }) ## -- end(single-argument transformations) ------ Matrix/R/lgTMatrix.R0000644000176200001440000000371712475031340013764 0ustar liggesusers#### Logical Sparse Matrices in triplet format ### contains = "lsparseMatrix" ### ============= ---> superclass methods in ./lsparseMatrix.R setAs("lgTMatrix", "lgeMatrix", function(from) .Call(lgTMatrix_to_lgeMatrix, from)) setAs("lgTMatrix", "matrix", function(from) .Call(lgTMatrix_to_matrix, from)) ## setAs("lgTMatrix", "matrix", # go via fast C code: ## function(from) as(as(from, "lgCMatrix"), "matrix")) setAs("matrix", "lgTMatrix", function(from) { stopifnot(is.logical(from)) dn <- dimnames(from) if(is.null.DN(dn)) dn <- list(NULL,NULL) else dimnames(from) <- NULL TorNA <- is.na(from) | from ij <- which(TorNA, arr.ind = TRUE, useNames = FALSE) - 1L if(length(ij) == 0) ij <- matrix(ij, 0, 2) new("lgTMatrix", i = ij[,1], j = ij[,2], x = from[TorNA], Dim = as.integer(dim(from)), Dimnames = dn) }) setAs("lgTMatrix", "dgTMatrix", function(from) ## more efficient than ## as(as(as(sM, "lgCMatrix"), "dgCMatrix"), "dgTMatrix") new("dgTMatrix", i = from@i, j = from@j, x = as.double(from@x), ## cannot copy factors, but can we use them? Dim = from@Dim, Dimnames= from@Dimnames)) setAs("lgTMatrix", "triangularMatrix", function(from) check.gT2tT(from, toClass = "ltTMatrix", do.n=FALSE)) setAs("lgTMatrix", "ltTMatrix", function(from) check.gT2tT(from, toClass = "ltTMatrix", do.n=FALSE)) setAs("lgTMatrix", "symmetricMatrix", function(from) check.gT2sT(from, toClass = "lsTMatrix", do.n=FALSE)) ## We favor coercion to super-classes, here, "symmetricMatrix" ## setAs("lgTMatrix", "lsTMatrix", ## function(from) check.gT2sT(from, toClass = "lsTMatrix", do.n=FALSE)) if(FALSE) ## unneeded: use t. setMethod("t", signature(x = "lgTMatrix"), function(x) new("lgTMatrix", i = x@j, j = x@i, x = x@x, Dim = x@Dim[2:1], Dimnames= x@Dimnames[2:1]), valueClass = "lgTMatrix") Matrix/R/ldenseMatrix.R0000644000176200001440000001511713047113565014513 0ustar liggesusers#### "ldenseMatrix" - virtual class of logical dense matrices #### ------------ #### Contains lge*; ltr*, ltp*; lsy*, lsp*; ldi* ### NOTA BENE: Much of this is *very* parallel to ./ndenseMatrix.R ### ~~~~~~~~~~~~~~~~ ## packed <-> non-packed : setAs("lspMatrix", "lsyMatrix", ## vv for "l*", 1L for "n*" lsp2lsy <- function(from) .Call(lspMatrix_as_lsyMatrix, from, 0L)) setAs("lsyMatrix", "lspMatrix", lsy2lsp <- function(from) .Call(lsyMatrix_as_lspMatrix, from, 0L)) setAs("ltpMatrix", "ltrMatrix", ltp2ltr <- function(from) .Call(ltpMatrix_as_ltrMatrix, from, 0L)) setAs("ltrMatrix", "ltpMatrix", ltr2ltp <- function(from) .Call(ltrMatrix_as_ltpMatrix, from, 0L)) ## Logical -> Double {of same structure}: setAs("lgeMatrix", "dgeMatrix", function(from) l2d_Matrix(from, "lgeMatrix")) setAs("lsyMatrix", "dsyMatrix", function(from) l2d_Matrix(from, "lsyMatrix")) setAs("lspMatrix", "dspMatrix", function(from) l2d_Matrix(from, "lspMatrix")) setAs("ltrMatrix", "dtrMatrix", function(from) l2d_Matrix(from, "ltrMatrix")) setAs("ltpMatrix", "dtpMatrix", function(from) l2d_Matrix(from, "ltpMatrix")) ## all need be coercable to "lgeMatrix": setAs("lsyMatrix", "lgeMatrix", lsy2lge <- function(from) .Call(lsyMatrix_as_lgeMatrix, from, 0L)) setAs("ltrMatrix", "lgeMatrix", ltr2lge <- function(from) .Call(ltrMatrix_as_lgeMatrix, from, 0L)) setAs("ltpMatrix", "lgeMatrix", function(from) ltr2lge(ltp2ltr(from))) setAs("lspMatrix", "lgeMatrix", function(from) lsy2lge(lsp2lsy(from))) ## and the reverse setAs("lgeMatrix", "ltpMatrix", function(from) ltr2ltp(as(from, "ltrMatrix"))) setAs("lgeMatrix", "lspMatrix", function(from) lsy2lsp(as(from, "lsyMatrix"))) ### -> symmetric : setAs("lgeMatrix", "lsyMatrix", function(from) { if(isSymmetric(from)) new("lsyMatrix", x = from@x, Dim = from@Dim, Dimnames = from@Dimnames, factors = from@factors) else stop("not a symmetric matrix; consider forceSymmetric() or symmpart()") }) setAs("lgeMatrix", "ltrMatrix", function(from) { if(isT <- isTriangular(from)) new("ltrMatrix", x = from@x, Dim = from@Dim, Dimnames = from@Dimnames, uplo = attr(isT, "kind") %||% "U") ## TODO: also check 'diag' else stop("not a triangular matrix") }) ### ldense* <-> "matrix" : ## 1) "lge* : setAs("lgeMatrix", "matrix", ge2mat) setAs("matrix", "lgeMatrix", function(from) { new("lgeMatrix", x = as.logical(from), Dim = as.integer(dim(from)), Dimnames = .M.DN(from)) }) ## 2) base others on "lge*": setAs("matrix", "lsyMatrix", function(from) as(as(from, "lgeMatrix"), "lsyMatrix")) setAs("matrix", "lspMatrix", function(from) lsy2lsp(as(from, "lsyMatrix"))) setAs("matrix", "ltrMatrix", function(from) as(as(from, "lgeMatrix"), "ltrMatrix")) setAs("matrix", "ltpMatrix", function(from) ltr2ltp(as(from, "ltrMatrix"))) ## Useful if this was called e.g. for as(*, "lsyMatrix"), but it isn't setAs("matrix", "ldenseMatrix", function(from) as(from, "lgeMatrix")) setAs("ldenseMatrix", "matrix", ## uses the above l*M. -> lgeM. function(from) as(as(from, "lgeMatrix"), "matrix")) ## dense |-> compressed : setAs("lgeMatrix", "lgTMatrix", function(from) as(.dense2C(from, kind = "gen"), "lgTMatrix")) setAs("lgeMatrix", "lgCMatrix", # TODO: need as(*, ..) ? function(from) as(.dense2C(from, kind = "gen"), "lgCMatrix")) setMethod("as.logical", signature(x = "ldenseMatrix"), function(x, ...) as(x, "lgeMatrix")@x) ###---------------------------------------------------------------------- setMethod("diag", signature(x = "lgeMatrix"), function(x, nrow, ncol) .Call(lgeMatrix_getDiag, x)) setMethod("diag", signature(x = "lsyMatrix"), function(x, nrow, ncol) .Call(lgeMatrix_getDiag, x)) setMethod("diag", signature(x = "lspMatrix"), function(x, nrow, ncol) .Call(lspMatrix_getDiag, x)) setMethod("diag", signature(x = "ltrMatrix"), function(x, nrow, ncol) .Call(ltrMatrix_getDiag, x)) setMethod("diag", signature(x = "ltpMatrix"), function(x, nrow, ncol) .Call(ltpMatrix_getDiag, x)) setMethod("diag", signature(x = "ndenseMatrix"),# << the "same" function(x, nrow, ncol) diag(as(x, "ldenseMatrix"))) ## --- *SETTING* of diagonal : diag(x) <- value --------- ## --- ===================== faster than default x[cbind[c(i,i)]] <- value setMethod("diag<-", signature(x = "lgeMatrix"), function(x, value) .Call(lgeMatrix_setDiag, x, value)) setMethod("diag<-", signature(x = "lsyMatrix"), function(x, value) .Call(lgeMatrix_setDiag, x, value)) setMethod("diag<-", signature(x = "lspMatrix"), function(x, value) .Call(lspMatrix_setDiag, x, value)) .diag.set.ltr <- function(x, value) { .Call(ltrMatrix_setDiag, if(x@diag == "U") .dense.diagU2N(x, "l", isPacked=FALSE) else x, value) } .diag.set.ltp <- function(x, value) { .Call(ltpMatrix_setDiag, if(x@diag == "U") .dense.diagU2N(x, "l", isPacked=TRUE) else x, value) } setMethod("diag<-", signature(x = "ltrMatrix"), .diag.set.ltr) setMethod("diag<-", signature(x = "ltpMatrix"), .diag.set.ltp) ## the *same* for the "ndenseMatrix" elements: setMethod("diag<-", signature(x = "ngeMatrix"), function(x, value) .Call(lgeMatrix_setDiag, x, value)) setMethod("diag<-", signature(x = "nsyMatrix"), function(x, value) .Call(lgeMatrix_setDiag, x, value)) setMethod("diag<-", signature(x = "nspMatrix"), function(x, value) .Call(lspMatrix_setDiag, x, value)) setMethod("diag<-", signature(x = "ntrMatrix"), .diag.set.ltr) setMethod("diag<-", signature(x = "ntpMatrix"), .diag.set.ltp) rm(.diag.set.ltr, .diag.set.ltp) setMethod("t", signature(x = "lgeMatrix"), t_geMatrix) setMethod("t", signature(x = "ltrMatrix"), t_trMatrix) setMethod("t", signature(x = "lsyMatrix"), t_trMatrix) setMethod("t", signature(x = "ltpMatrix"), function(x) as(t(as(x, "ltrMatrix")), "ltpMatrix")) setMethod("t", signature(x = "lspMatrix"), function(x) as(t(as(x, "lsyMatrix")), "lspMatrix")) ## NOTE: "&" and "|" are now in group "Logic" c "Ops" --> ./Ops.R ## "!" is in ./not.R setMethod("as.vector", "ldenseMatrix", function(x, mode) as.vector(as(x, "lgeMatrix")@x, mode)) setMethod("norm", signature(x = "ldenseMatrix", type = "character"), function(x, type, ...) if(identical("2", type)) norm2(x) else .Call(dgeMatrix_norm, as(as(x,"dMatrix"),"dgeMatrix"), type), valueClass = "numeric") .rcond_via_d <- function(x, norm, ...) rcond(as(as(x, "dMatrix"), "dgeMatrix"), norm=norm, ...) setMethod("rcond", signature(x = "ldenseMatrix", norm = "character"), .rcond_via_d, valueClass = "numeric") Matrix/R/nsTMatrix.R0000644000176200001440000000151612501023016013764 0ustar liggesusers#### Sparse Symmetric non-zero pattern Matrices in Triplet format ### contains = "nsparseMatrix" setAs("nsTMatrix", "matrix", function(from) as(as(from, "ngTMatrix"), "matrix")) setAs("nsTMatrix", "ngCMatrix", # for diag function(from) as(as(from, "nsCMatrix"), "ngCMatrix")) setAs("nsTMatrix", "ngTMatrix", function(from) .Call(nsTMatrix_as_ngTMatrix, from)) setAs("nsTMatrix", "dsTMatrix", function(from) new("dsTMatrix", i = from@i, j = from@j, uplo = from@uplo, x = rep.int(1., length(from@i)), Dim = from@Dim, Dimnames = from@Dimnames)) setAs("nsTMatrix", "nsyMatrix", function(from) .Call(nsTMatrix_as_nsyMatrix, from)) setMethod("t", "nsTMatrix", function(x) new("nsTMatrix", Dim = x@Dim, Dimnames = x@Dimnames[2:1], i = x@j, j = x@i, uplo = if (x@uplo == "U") "L" else "U")) Matrix/R/LU.R0000644000176200001440000000101411054545144012361 0ustar liggesuserssetMethod("expand", signature(x = "denseLU"), function(x, ...) .Call(LU_expand, x)) setMethod("solve", signature(a = "denseLU", b = "missing"), function(a, b, ...) { ll <- expand(a) #-> list(L, U, P); orig x = P %*% L %*% U ## too expensive: with(lapply(ll, solve), U %*% L %*% P) solve(ll$U, solve(ll$L, ll$P)) }) setMethod("expand", signature(x = "sparseLU"), function(x, ...) list(P = as(x@p + 1L, "pMatrix"), L = x@L, U = x@U, Q = as(x@q + 1L, "pMatrix"))) Matrix/R/expm.R0000644000176200001440000000222011004063604013001 0ustar liggesusers#### All methods for expm() , the Matrix Exponential setMethod("expm", signature(x = "dgeMatrix"), function(x) .Call(dgeMatrix_exp, x)) setMethod("expm", signature(x = "Matrix"), function(x) expm(as(x, "dMatrix"))) setMethod("expm", signature(x = "dMatrix"),function(x) expm(as(x, "dgeMatrix"))) ## but these trigger first: expmSpec <- function(x, newClass) { r <- copyClass(x, newClass, c("uplo", "Dim", "Dimnames")) r@x <- expm(as(as(x, "dMatrix"),"generalMatrix"))@x r } setMethod("expm", signature(x = "triangularMatrix"), function(x) expmSpec(x, "dtrMatrix")) setMethod("expm", signature(x = "symmetricMatrix"), function(x) expmSpec(x, "dsyMatrix")) setMethod("expm", signature(x = "ddiMatrix"), function(x) { if(x@diag == "U") { x@diag <- "N" x@x <- rep.int(exp(1), x@Dim[1]) } else { x@x <- exp(x@x) } x }) ## Not necessary (and there's no direct ldi -> ddi coercion anyway: ## setMethod("expm", signature(x = "ldiMatrix"), ## function(x) expm(as(x,"ddiMatrix"))) ## As long as this is not "in R" : setMethod("expm", signature(x = "matrix"), function(x) expm(Matrix(x))) Matrix/R/sparseQR.R0000644000176200001440000001377513141330160013607 0ustar liggesusers#### Methods for the sparse QR decomposition ## TODO: qr.R() generic that allows optional args ['backPermute'] ## --- so we can add it to our qr.R() method, *instead* of this : qrR <- function(qr, complete = FALSE, backPermute = TRUE, row.names = TRUE) { ir <- seq_len(qr@Dim[if(complete) 1L else 2L]) r <- if(backPermute <- backPermute && (n <- length(qr@q)) && !isSeq(qr@q, n-1L)) qr@R[ir, order(qr@q), drop = FALSE] else qr@R[ir, , drop = FALSE] if(row.names && !is.null(rn <- qr@V@Dimnames[[1]])) # qr.R() in 'base' gives rownames r@Dimnames[[1]] <- rn[seq_len(r@Dim[1L])] if(complete || backPermute) r else as(r, "triangularMatrix") } setMethod("qr.R", signature(qr = "sparseQR"), function(qr, complete = FALSE) { if(nonTRUEoption("Matrix.quiet.qr.R") && nonTRUEoption("Matrix.quiet")) warning("qr.R() may differ from qr.R() because of permutations. Possibly use our qrR() instead") qrR(qr, complete=complete, backPermute=FALSE) }) ## if(identical("", as.character(formals(qr.Q)$Dvec))) { # "new" setMethod("qr.Q", "sparseQR", function(qr, complete=FALSE, Dvec) { d <- qr@Dim ## ir <- seq_len(d[k <- if(complete) 1L else 2L]) k <- if(complete) 1L else 2L if(missing(Dvec)) Dvec <- rep.int(1, if(complete) d[1] else min(d)) D <- .sparseDiagonal(d[1], x=Dvec, cols=0L:(d[k] -1L)) qr.qy(qr, D) }) ## } else { ## setMethod("qr.Q", "sparseQR", ## function(qr, complete=FALSE, Dvec = rep.int(1, if(complete) d[1] else min(d))) ## { ## d <- qr@Dim ## ir <- seq_len(d[k <- if(complete) 1L else 2L]) ## D <- .sparseDiagonal(d[1], x=Dvec, cols=0L:(d[k] -1L)) ## qr.qy(qr, D) ## }) ## } ## NB: Here, the .Call()s to sparseQR_qty all set keep_names = TRUE ## --- instead of allowing it to become an argument, ## mainly because the base functions qr.qy() / qr.qty() have no '...' formal argument ## To change, would make these *implicit* generics in 'methods' - as qr.R ## Also, qr() itself has keep.names = TRUE/FALSE -- should be enough setMethod("qr.qy", signature(qr = "sparseQR", y = "ddenseMatrix"), function(qr, y) .Call(sparseQR_qty, qr, y, FALSE, TRUE), valueClass = "dgeMatrix") setMethod("qr.qy", signature(qr = "sparseQR", y = "matrix"), function(qr, y) .Call(sparseQR_qty, qr, y, FALSE, TRUE), valueClass = "dgeMatrix") setMethod("qr.qy", signature(qr = "sparseQR", y = "numeric"), ## drop to vector {to be 100% standard-R-matrix compatible} : function(qr, y) .Call(sparseQR_qty, qr, y, FALSE, TRUE)@x) setMethod("qr.qy", signature(qr = "sparseQR", y = "Matrix"), function(qr, y) .Call(sparseQR_qty, qr, as(as(y, "denseMatrix"),"dgeMatrix"), FALSE, TRUE), valueClass = "dgeMatrix") setMethod("qr.qty", signature(qr = "sparseQR", y = "ddenseMatrix"), function(qr, y) .Call(sparseQR_qty, qr, y, TRUE, TRUE), valueClass = "dgeMatrix") setMethod("qr.qty", signature(qr = "sparseQR", y = "matrix"), function(qr, y) .Call(sparseQR_qty, qr, y, TRUE, TRUE), valueClass = "dgeMatrix") setMethod("qr.qty", signature(qr = "sparseQR", y = "numeric"), function(qr, y) .Call(sparseQR_qty, qr, y, TRUE, TRUE)@x) setMethod("qr.qty", signature(qr = "sparseQR", y = "Matrix"), function(qr, y) .Call(sparseQR_qty, qr, as(as(y, "denseMatrix"),"dgeMatrix"), TRUE, TRUE), valueClass = "dgeMatrix") ## FIXME: really should happen in C, i.e sparseQR_coef() in ../src/sparseQR.c : .coef.trunc <- function(qr, res, drop=FALSE) { if((d <- lengths(res@Dimnames)) != c(0L,0L) && !identical(d, D <- res@Dim)) { ## Fix dimnames from dim (when not NULL !) : if(d[[1]]) length(res@Dimnames[[1]]) <- D[[1]] if(d[[2]]) length(res@Dimnames[[2]]) <- D[[2]] } res[seq_len(ncol(qr@R)),,drop=drop] } setMethod("qr.coef", signature(qr = "sparseQR", y = "ddenseMatrix"), function(qr, y) .coef.trunc(qr, .Call(sparseQR_coef, qr, y)), valueClass = "dgeMatrix") setMethod("qr.coef", signature(qr = "sparseQR", y = "matrix"), function(qr, y) .coef.trunc(qr, .Call(sparseQR_coef, qr, y)), valueClass = "dgeMatrix") setMethod("qr.coef", signature(qr = "sparseQR", y = "numeric"), function(qr, y) .coef.trunc(qr, .Call(sparseQR_coef, qr, y), drop=TRUE)) setMethod("qr.coef", signature(qr = "sparseQR", y = "Matrix"), function(qr, y) .coef.trunc(qr, .Call(sparseQR_coef, qr, as(as(y, "denseMatrix"),"dgeMatrix"))), valueClass = "dgeMatrix") ## qr.resid() & qr.fitted() : --------------------------- setMethod("qr.resid", signature(qr = "sparseQR", y = "ddenseMatrix"), function(qr, y) .Call(sparseQR_resid_fitted, qr, y, TRUE), valueClass = "dgeMatrix") setMethod("qr.resid", signature(qr = "sparseQR", y = "matrix"), function(qr, y) .Call(sparseQR_resid_fitted, qr, y, TRUE), valueClass = "dgeMatrix") setMethod("qr.resid", signature(qr = "sparseQR", y = "numeric"), function(qr, y) drop(.Call(sparseQR_resid_fitted, qr, y, TRUE))) setMethod("qr.resid", signature(qr = "sparseQR", y = "Matrix"), function(qr, y) .Call(sparseQR_resid_fitted, qr, as(as(y, "denseMatrix"),"dgeMatrix"), TRUE), valueClass = "dgeMatrix") setMethod("qr.fitted", signature(qr = "sparseQR", y = "ddenseMatrix"), function(qr, y, k) .Call(sparseQR_resid_fitted, qr, y, FALSE), valueClass = "dgeMatrix") setMethod("qr.fitted", signature(qr = "sparseQR", y = "matrix"), function(qr, y, k) .Call(sparseQR_resid_fitted, qr, y, FALSE), valueClass = "dgeMatrix") setMethod("qr.fitted", signature(qr = "sparseQR", y = "numeric"), function(qr, y, k) drop(.Call(sparseQR_resid_fitted, qr, y, FALSE))) setMethod("qr.fitted", signature(qr = "sparseQR", y = "Matrix"), function(qr, y, k) .Call(sparseQR_resid_fitted, qr, as(as(y, "denseMatrix"),"dgeMatrix"), FALSE), valueClass = "dgeMatrix") ## setMethod("solve", signature(a = "sparseQR", b = "ANY"), function(a, b, ...) qr.coef(a, b)) Matrix/R/dtCMatrix.R0000644000176200001440000001106613141330160013735 0ustar liggesusers#### Triangular Sparse Matrices in compressed column-oriented format setAs("dtCMatrix", "ltCMatrix", function(from) new("ltCMatrix", i = from@i, p = from@p, uplo = from@uplo, diag = from@diag, x = as.logical(from@x), ## FIXME?: use from@factors smartly Dim = from@Dim, Dimnames = from@Dimnames)) setAs("dtCMatrix", "ntCMatrix", # just drop 'x' slot: function(from) new("ntCMatrix", i = from@i, p = from@p, uplo = from@uplo, diag = from@diag, ## FIXME?: use from@factors smartly Dim = from@Dim, Dimnames = from@Dimnames)) setAs("matrix", "dtCMatrix", function(from) as(as(from, "dtTMatrix"), "dtCMatrix")) setAs("dtCMatrix", "dgCMatrix", function(from) { if (from@diag == "U") from <- .Call(Csparse_diagU2N, from) new("dgCMatrix", i = from@i, p = from@p, x = from@x, Dim = from@Dim, Dimnames = from@Dimnames) }) setAs("dtCMatrix", "dsCMatrix", function(from) as(from, "symmetricMatrix")) setAs("dtCMatrix", "dgTMatrix", function(from) { if (from@diag == "U") from <- .Call(Csparse_diagU2N, from) ## ignore triangularity in conversion to TsparseMatrix .Call(Csparse_to_Tsparse, from, FALSE) }) ## FIXME: make more efficient ## ----- and as(., "triangularMatrix") is even worse via as_Sp() setAs("dgCMatrix", "dtCMatrix", # to triangular, needed for triu,.. function(from) as(.Call(Csparse_to_Tsparse, from, FALSE), "dtCMatrix")) setAs("dtCMatrix", "dgeMatrix", function(from) as(as(from, "dgTMatrix"), "dgeMatrix")) ## These are all needed because cholmod doesn't support triangular: ## (see end of ./Csparse.R ), e.g. for triu() setAs("dtCMatrix", "dtTMatrix", function(from) .Call(Csparse_to_Tsparse, from, TRUE)) ## {# and this is not elegant: ## x <- as(from, "dgTMatrix") ## if (from@diag == "U") { ## drop diagonal entries '1': ## i <- x@i; j <- x@j ## nonD <- i != j ## xx <- x@x[nonD] ; i <- i[nonD] ; j <- j[nonD] ## } else { ## xx <- x@x; i <- x@i; j <- x@j ## } ## new("dtTMatrix", x = xx, i = i, j = j, Dim = x@Dim, ## Dimnames = x@Dimnames, uplo = from@uplo, diag = from@diag) ## }) ## Now that we support triangular matrices use the inherited method. ## setAs("dtCMatrix", "TsparseMatrix", function(from) as(from, "dtTMatrix")) setAs("dtCMatrix", "dtrMatrix", function(from) as(as(from, "dtTMatrix"), "dtrMatrix")) setMethod("determinant", signature(x = "dtCMatrix", logarithm = "logical"), function(x, logarithm = TRUE, ...) { if(x@diag == "N") mkDet(diag(x), logarithm) else structure(list(modulus = structure(if (logarithm) 0 else 1, "logarithm" = logarithm), sign = 1L), class = "det") }) setMethod("solve", signature(a = "dtCMatrix", b = "missing"), function(a, b, ...) { stopifnot((n <- nrow(a)) == ncol(a)) as(.Call(dtCMatrix_sparse_solve, a, .trDiagonal(n, unitri=FALSE)), "dtCMatrix") }, valueClass = "dtCMatrix") setMethod("solve", signature(a = "dtCMatrix", b = "dgeMatrix"), function(a, b, ...) .Call(dtCMatrix_matrix_solve, a, b, TRUE), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dtCMatrix", b = "CsparseMatrix"), function(a, b, ...) .sortCsparse(.Call(dtCMatrix_sparse_solve, a, b)), ## ------------ TODO: both in C code valueClass = "dgCMatrix") setMethod("solve", signature(a = "dtCMatrix", b = "matrix"), function(a, b, ...) { storage.mode(b) <- "double" .Call(dtCMatrix_matrix_solve, a, b, FALSE) }, valueClass = "dgeMatrix") ## Isn't this case handled by the method for (a = "Matrix', b = ## "numeric") in ./Matrix.R? Or is this method defined here for ## the as.double coercion? setMethod("solve", signature(a = "dtCMatrix", b = "numeric"), function(a, b, ...) .Call(dtCMatrix_matrix_solve, a, cbind(as.double(b), deparse.level=0L), FALSE), valueClass = "dgeMatrix") if(FALSE)## still not working setMethod("diag", "dtCMatrix", function(x, nrow, ncol) .Call(diag_tC, x, "diag")) ## no pivoting here, use L or U setMethod("lu", "dtCMatrix", function(x, ...) { n <- (d <- x@Dim)[1L] p <- 0:(n-1L) if(x@uplo == "U") new("sparseLU", L = .trDiagonal(n, uplo="L"), U = x, p = p, q = p, Dim = d) else { ## "L" : x = L = L I d <- diag(x) new("sparseLU", L = x %*% Diagonal(n, 1/d), U = .trDiagonal(n, x = d), p = p, q = p, Dim = d) } }) Matrix/R/zzz.R0000644000176200001440000000560113142365226012705 0ustar liggesusers### Note that "in theory" even base::as.vector() should be overloaded. ### In practice that could be too much of a performance penalty in some cases. .MatrixEnv <- new.env(parent = emptyenv(), hash = FALSE)# e.g., for once-per-session warnings .chm_common <- new.env(parent = emptyenv()) ## environment in which to store some settings from cholmod_common .onLoad <- function(libname, pkgname) { .Call(CHM_set_common_env, .chm_common) ## S4 method dispatch ambiguity warnings if(is.null(getOption("ambiguousMethodSelection"))) { if((!is.null(v <- getOption("Matrix.verbose")) && v >= 1) || isTRUE(getOption("Matrix.ambiguityNotes")) || interactive() && identical(Sys.info()[["user"]], "maechler")) { ## nothing } else { # ambiguity notices are trashed options(ambiguousMethodSelection = function(cond) {}) assign("no.methods.ambiguityNotes", TRUE, envir=.MatrixEnv) } } } ## Instead, simply re-assign the [cr]bind()s which are recursively ## based on [cr]bind2 : ## ## save to cBind / rBind ("rename") if(getRversion() >= "3.2.0") { ## New (2015-02) base :: cbind(), rbind() which dispatch on S4 "when needed": cBind <- function (..., deparse.level = 1) { ## Once per session warning (or if "Matrix.(warn|verbose)"): if(is.null(wrn <- get0("warned.cBind", .MatrixEnv)) || isTRUE(getOption("Matrix.warn")) || isTRUE(getOption("Matrix.verbose"))) { if(is.null(wrn)) assign("warned.cBind", TRUE, envir=.MatrixEnv) || .Deprecated(msg = "'cBind' is deprecated. Since R version 3.2.0, base's cbind() should work fine with S4 objects") } base::cbind(..., deparse.level=deparse.level) } rBind <- function (..., deparse.level = 1) { ## Once per session warning (or if "Matrix.(warn|verbose)"): if(is.null(wrn <- get0("warned.rBind", .MatrixEnv)) || isTRUE(getOption("Matrix.warn")) || isTRUE(getOption("Matrix.verbose"))) { if(is.null(wrn)) assign("warned.rBind", TRUE, envir=.MatrixEnv) || .Deprecated(msg = "'rBind' is deprecated. Since R version 3.2.0, base's rbind() should work fine with S4 objects") } base::rbind(..., deparse.level=deparse.level) } } else { cBind <- methods:::cbind rBind <- methods:::rbind lengths <- function (x, use.names = TRUE) vapply(x, length, 1L, USE.NAMES = use.names) } .onUnload <- function(libpath) { library.dynam.unload("Matrix", libpath) if(isTRUE(.MatrixEnv $ no.methods.ambiguityNotes))# revert options(ambiguousMethodSelection = NULL) } .SuiteSparse_version <- function() { ssv <- .Call(get_SuiteSparse_version) package_version(list(major = ssv[1], minor = paste(ssv[2:3], collapse="."))) } if(getRversion() < "3.1.0") { if(getRversion() < "3.0.0") { rep_len <- function(x, length.out) rep(x, length.out=length.out) } anyNA <- function(x) any(is.na(x)) } Matrix/R/eigen.R0000644000176200001440000001126513141330160013126 0ustar liggesusers#### eigen() , Schur() etc #### ===== ===== ## eigen() is not even generic, and we haven't any C code, ## NOTE base::eigen() "magically" can work via as.matrix() if(.Matrix.avoiding.as.matrix) { ## ---- IFF as.matrix(.) <==> as(., "matrix") [which we consider _deprecating_] ## FIXME: Code for *sparse* !! [RcppEigen ~??~] setMethod("eigen", signature(x = "Matrix", only.values = "missing"), function(x, symmetric, only.values, EISPACK) # << must match generic base::eigen(as(x,"matrix"), symmetric, FALSE)) setMethod("eigen", signature(x = "Matrix", only.values = "logical"), function(x, symmetric, only.values, EISPACK) base::eigen(as(x,"matrix"), symmetric, only.values)) ## base::svd() using as.matrix() := asRbasematrix() if(getRversion() < "3.5.0") # svd not yet implicit generic setGeneric("svd", function(x, ...) base::svd(x, ...)) setMethod("svd", "Matrix", function (x, ...) base::svd(as(x,"matrix"), ...)) } .dgeSchur <- function(x, vectors, ...) { cl <- .Call(dgeMatrix_Schur, x, TRUE, TRUE) realEV <- all(cl$WI == 0) ## TODO: do all this in C new("Schur", Dim = x@Dim, Q = as(cl$Z, "dgeMatrix"), T = as(cl$T, if(realEV)"dtrMatrix" else "dgeMatrix"), EValues = if(realEV) cl$WR else complex(real = cl$WR, imaginary = cl$WI)) } setMethod("Schur", signature(x = "dgeMatrix", vectors = "missing"), .dgeSchur) setMethod("Schur", signature(x = "dgeMatrix", vectors = "logical"), function(x, vectors, ...) { if(vectors) .dgeSchur(x) else { cl <- .Call(dgeMatrix_Schur, x, FALSE, TRUE) realEV <- all(cl$WI == 0) list(T = as(cl$T, if(realEV) "dtrMatrix" else "dgeMatrix"), EValues = if(realEV) cl$WR else complex(real = cl$WR, imaginary = cl$WI)) }}) ## Ok, for the faint of heart, also provide "matrix" methods : .mSchur <- function(x, vectors, ...) { cl <- .Call(dgeMatrix_Schur, x, TRUE, FALSE) list(Q = cl$Z, T = cl$T, EValues = if(all(cl$WI == 0)) cl$WR else complex(real = cl$WR, imaginary = cl$WI)) } setMethod("Schur", signature(x = "matrix", vectors = "missing"), .mSchur) setMethod("Schur", signature(x = "matrix", vectors = "logical"), function(x, vectors, ...) { if(vectors) .mSchur(x) else { cl <- .Call(dgeMatrix_Schur, x, FALSE, FALSE) EV <- if(all(cl$WI == 0)) cl$WR else complex(real = cl$WR, imaginary = cl$WI) cl$WR <- cl$WI <- NULL cl$EValues <- EV cl }}) Schur.dsy <- function(x, vectors, ...) { if(missing(vectors)) vectors <- TRUE ## TODO: do all this in C ## Should directly call LAPACK dsyev() evl <- eigen(x, only.values = !vectors) eVals <- evl$values if(vectors) new("Schur", Dim = x@Dim, Q = as(evl$vectors, "dgeMatrix"), T = Diagonal(x = eVals), EValues = eVals) else list(T = Diagonal(x = eVals), EValues = eVals) } setMethod("Schur", signature(x = "dsyMatrix", vectors = "ANY"), Schur.dsy) ## FIXME(?) these coerce from sparse to *dense* setMethod("Schur", signature(x = "generalMatrix", vectors = "missing"), function(x, vectors, ...) callGeneric(as(x, "dgeMatrix"))) setMethod("Schur", signature(x = "generalMatrix", vectors = "logical"), function(x, vectors, ...) callGeneric(as(x, "dgeMatrix"), vectors)) setMethod("Schur", signature(x = "symmetricMatrix", vectors = "missing"), function(x, vectors, ...) Schur.dsy(as(x, "dsyMatrix"))) setMethod("Schur", signature(x = "symmetricMatrix", vectors = "logical"), function(x, vectors, ...) Schur.dsy(as(x, "dsyMatrix"), vectors)) ## Schur() : {Note that the Schur decomposition is not unique here} .simpleSchur <- function(x, vectors, ...) { x <- as(x, "dMatrix") d <- dim(x) new("Schur", Dim = d, Q = Diagonal(d[1]), T = x, EValues = diag(x)) } setMethod("Schur", signature(x = "diagonalMatrix", vectors = "missing"), .simpleSchur) setMethod("Schur", signature(x = "diagonalMatrix", vectors = "logical"), function(x, vectors, ...) { if(vectors) .simpleSchur(x) else { x <- as(x, "dMatrix") list(T = x, EValues = x@x) }}) .triSchur <- function(x, vectors, ...) { x <- as(x, "dMatrix") d <- dim(x) n <- d[1] if(x@uplo == "U" || n == 0) new("Schur", Dim = d, Q = Diagonal(n), T = x, EValues = diag(x)) else { i <- n:1 new("Schur", Dim = d, Q = as(i, "pMatrix"), T = t(t(x)[i,i]), EValues = diag(x)[i]) } } setMethod("Schur", signature(x = "triangularMatrix", vectors = "missing"), .triSchur) setMethod("Schur", signature(x = "triangularMatrix", vectors = "logical"), function(x, vectors, ...) { if(vectors) .triSchur(x) else { x <- as(x, "dMatrix") list(T = x, EValues = x@x) }}) Matrix/R/dsCMatrix.R0000644000176200001440000002044212605510450013740 0ustar liggesusers#### Symmetric Sparse Matrices in compressed column-oriented format setAs("dgCMatrix", "dsCMatrix", function(from) { ## r2130 ... | 2008-03-14 | added deprecation warning warning("as(.,\"dsCMatrix\") is deprecated (since 2008); do use as(., \"symmetricMatrix\")") as(from, "symmetricMatrix") }) ## Specific conversions, should they be necessary. Better to convert as ## as(x, "TsparseMatrix") or as(x, "denseMatrix") ## Moved to ./Csparse.R ## setAs("dsCMatrix", "dsTMatrix", ## function(from) .Call(Csparse_to_Tsparse, from, FALSE)) setAs("dsCMatrix", "dgTMatrix", # needed for show(), image() function(from) ## pre-Cholmod -- FIXME: get rid of .Call(dsCMatrix_to_dgTMatrix, from)) setAs("dsCMatrix", "dgeMatrix", function(from) as(as(from, "dgTMatrix"), "dgeMatrix")) setAs("dsCMatrix", "matrix", function(from) as(as(from, "generalMatrix"), "matrix")) setAs("matrix", "dsCMatrix", function(from) as(as(as(from, "CsparseMatrix"), "symmetricMatrix"), "dMatrix")) setAs("dsCMatrix", "lsCMatrix", function(from) new("lsCMatrix", i = from@i, p = from@p, uplo = from@uplo, x = as.logical(from@x), Dim = from@Dim, Dimnames = from@Dimnames)) setAs("dsCMatrix", "nsCMatrix", function(from) new("nsCMatrix", i = from@i, p = from@p, uplo = from@uplo, Dim = from@Dim, Dimnames = from@Dimnames)) setAs("dsCMatrix", "dgCMatrix", function(from) .Call(Csparse_symmetric_to_general, from)) setAs("dsCMatrix", "dsyMatrix", function(from) as(from, "denseMatrix")) ##' Check if \code{name} (== "[sS][pP][dD]Cholesky") fits the values of the ##' logicals (perm, LDL, super). ##' @param name a string such as "sPdCholesky" ##' @param perm also known as \code{pivot} ##' @param LDL ##' @param super ##' @return logical: TRUE if the name matches .chkName.CHM <- function(name, perm, LDL, super) .Call(R_chkName_Cholesky, name, perm, LDL, super) ## ../src/dsCMatrix.c .CHM.factor.name <- function(perm, LDL, super) .Call(R_chm_factor_name, perm, LDL, super) ## have rather tril() and triu() methods than ## setAs("dsCMatrix", "dtCMatrix", ....) setMethod("tril", "dsCMatrix", function(x, k = 0, ...) { if(x@uplo == "L" && k == 0) ## same internal structure (speedup potential !?) new("dtCMatrix", uplo = x@uplo, i = x@i, p = x@p, x = x@x, Dim = x@Dim, Dimnames = x@Dimnames) else tril(as(x, "dgCMatrix"), k = k, ...) }) setMethod("triu", "dsCMatrix", function(x, k = 0, ...) { if(x@uplo == "U" && k == 0) ## same internal structure (speedup potential !?) new("dtCMatrix", uplo = x@uplo, i = x@i, p = x@p, x = x@x, Dim = x@Dim, Dimnames = x@Dimnames) else triu(as(x, "dgCMatrix"), k = k, ...) }) solve.dsC.mat <- function(a,b, LDL = NA, tol = .Machine$double.eps) { r <- tryCatch(.Call(dsCMatrix_matrix_solve, a, b, LDL), error=function(e)NULL, warning=function(w)NULL) if(is.null(r)) { ## cholmod factorization was not ok Matrix.msg("solve.dsC.mat(): Cholmod factorization unsuccessful --> using LU()") .solve.dgC.lu(as(a,"dgCMatrix"), b=b, tol=tol) } else r } ## ``Fully-sparse'' solve() {different Cholmod routine, otherwise "the same"}: solve.dsC.dC <- function(a,b, LDL = NA, tol = .Machine$double.eps) { r <- tryCatch(.Call(dsCMatrix_Csparse_solve, a, b, LDL), error=function(e)NULL, warning=function(w)NULL) if(is.null(r)) { ## cholmod factorization was not ok Matrix.msg("solve.dsC.dC(): Cholmod factorization unsuccessful --> using LU()") .solve.dgC.lu(as(a,"dgCMatrix"), b=b, tol=tol) } else r } ## . ------------------------ setMethod("solve", signature(a = "dsCMatrix", b = "ddenseMatrix"), function(a, b, LDL = NA, tol = .Machine$double.eps, ...) { solve.dsC.mat(a, b = if(!is(b, "dgeMatrix")) ..2dge(b) else b, LDL=LDL, tol=tol) }, valueClass = "dgeMatrix") setMethod("solve", signature(a = "dsCMatrix", b = "denseMatrix"), ## only triggers for diagonal*, ldense*.. (but *not* ddense: above) function(a, b, LDL = NA, tol = .Machine$double.eps, ...) solve.dsC.mat(a, as(.Call(dup_mMatrix_as_geMatrix, b), "dgeMatrix"), LDL=LDL, tol=tol)) setMethod("solve", signature(a = "dsCMatrix", b = "matrix"), function(a, b, LDL = NA, tol = .Machine$double.eps, ...) solve.dsC.mat(a, ..2dge(b), LDL=LDL, tol=tol), valueClass = "dgeMatrix") setMethod("solve", signature(a = "dsCMatrix", b = "numeric"), function(a, b, LDL = NA, tol = .Machine$double.eps, ...) solve.dsC.mat(a, ..2dge(b), LDL=LDL, tol=tol), valueClass = "dgeMatrix") ## . ------------------------ setMethod("solve", signature(a = "dsCMatrix", b = "dsparseMatrix"), function(a, b, LDL = NA, tol = .Machine$double.eps, ...) { cb <- getClassDef(class(b)) if (!extends(cb, "CsparseMatrix")) cb <- getClassDef(class(b <- as(b, "CsparseMatrix"))) if (extends(cb, "symmetricMatrix")) ## not supported (yet) by cholmod_spsolve b <- as(b, "dgCMatrix") solve.dsC.dC(a,b, LDL=LDL, tol=tol) }) setMethod("solve", signature(a = "dsCMatrix", b = "missing"), function(a, b, ...) solve(a, .trDiagonal(nrow(a), unitri=FALSE), ...)) setMethod("chol", signature(x = "dsCMatrix"), function(x, pivot = FALSE, ...) .Call(dsCMatrix_chol, x, pivot), valueClass = "dtCMatrix") setMethod("Cholesky", signature(A = "dsCMatrix"), ## signature(): leaving away (perm, LDL,..), but specify below: ## <==> all "ANY" function(A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, ...) .Call(dsCMatrix_Cholesky, A, perm, LDL, super, Imult)) setMethod("t", signature(x = "dsCMatrix"), function(x) .Call(Csparse_transpose, x, FALSE), valueClass = "dsCMatrix") ### These two are very similar, the first one has the advantage to be applicable to 'Chx' directly: ## "used" currently only in ../tests/factorizing.R .diag.dsC <- function(x, Chx = Cholesky(x, LDL=TRUE), res.kind = "diag") { force(Chx) if(!missing(Chx)) stopifnot(.isLDL(Chx), is.integer(Chx@p), is.double(Chx@x)) .Call(diag_tC, Chx, res.kind) ## ^^^^^^^ from ../src/Csparse.c ## => res.kind in ("trace", "sumLog", "prod", "min", "max", "range", "diag", "diagBack") } ## nowhere used/tested (FIXME?) ## here, we *could* allow a 'mult = 0' factor : .CHM.LDL.D <- function(x, perm = TRUE, res.kind = "diag") { .Call(dsCMatrix_LDL_D, x, perm, res.kind) ## ^^^^^^^^^^^^^^^^ from ../src/dsCMatrix.c } ## FIXME: kind = "diagBack" is not yet implemented ## would be much more efficient, but there's no CHOLMOD UI (?) ## ## Note: for det(), permutation is unimportant; ## for diag(), apply *inverse* permutation ## q <- p ; q[q] <- seq_along(q); q ldet1.dsC <- function(x, ...) .Call(CHMfactor_ldetL2, Cholesky(x, ...)) ## these are slightly faster (ca. 3 to 4 %): ldet2.dsC <- function(x, ...) { Ch <- Cholesky(x, super = FALSE, ...) .Call(diag_tC, Ch, "sumLog") } ## only very slightly ( ~ < 1% ) faster (than "ldet2"): ldet3.dsC <- function(x, perm = TRUE) .Call(dsCMatrix_LDL_D, x, perm=perm, "sumLog") setMethod("determinant", signature(x = "dsCMatrix", logarithm = "missing"), function(x, logarithm, ...) determinant(x, TRUE)) setMethod("determinant", signature(x = "dsCMatrix", logarithm = "logical"), function(x, logarithm, ...) { if(x@Dim[1] <= 1L) return(mkDet(diag(x), logarithm)) Chx <- tryCatch(suppressWarnings(Cholesky(x, LDL=TRUE)), error = function(e) NULL) ## or ## ldet <- .Call("CHMfactor_ldetL2", Chx) # which would also work ## when Chx <- Cholesky(x, super=TRUE) ## ldet <- tryCatch(.Call(dsCMatrix_LDL_D, x, perm=TRUE, "sumLog"), ## if(is.null(ldet)) if(is.null(Chx)) ## we do *not* have a positive definite matrix detSparseLU(x, logarithm) else { d <- .Call(diag_tC, Chx, res.kind = "diag") mkDet(d, logarithm=logarithm) } }) ## setMethod("writeHB", signature(obj = "dsCMatrix"), ## function(obj, file, ...) { ## .Deprecated("writeMM") ## .Call(Matrix_writeHarwellBoeing, ## if (obj@uplo == "U") t(obj) else obj, ## as.character(file), "DSC") ## }) Matrix/R/ngCMatrix.R0000644000176200001440000000221612507003275013740 0ustar liggesusers#### Logical Sparse Matrices in Compressed column-oriented format ### contains = "nsparseMatrix" .nC2d <- function(from) .Call(nz_pattern_to_Csparse, from, 0L)## 0 --> "double" .nC2l <- function(from) .Call(nz_pattern_to_Csparse, from, 1L)## 1 --> "logical" if(FALSE) { ## nice idea, but needs more method re-definitions --- setAs("nCsparseMatrix", "dMatrix", .nC2d) setAs("nCsparseMatrix", "dsparseMatrix", .nC2d) setAs("nCsparseMatrix", "dgCMatrix", .nC2d) setAs("nCsparseMatrix", "lMatrix", .nC2l) setAs("nCsparseMatrix", "lsparseMatrix", .nC2l) setAs("nCsparseMatrix", "lgCMatrix", .nC2l) } else { setAs("ngCMatrix", "dMatrix", .nC2d) setAs("ngCMatrix", "dsparseMatrix", .nC2d) setAs("ngCMatrix", "dgCMatrix", .nC2d) setAs("ngCMatrix", "lMatrix", .nC2l) setAs("ngCMatrix", "lsparseMatrix", .nC2l) setAs("ngCMatrix", "lgCMatrix", .nC2l) } setAs("ngCMatrix", "matrix", function(from) .Call(ngC_to_matrix, from)) ## not this: .Call(Csparse_to_matrix, from)), since it goes via dense -> double precision ## TODO (maybe): write matrix_to_lcsc() in ../src/ngCMatrix.c setAs("matrix", "ngCMatrix", function(from) as(as(from, "ngTMatrix"), "ngCMatrix")) Matrix/R/lgCMatrix.R0000644000176200001440000000244512213574105013741 0ustar liggesusers#### Logical Sparse Matrices in Compressed column-oriented format ### contains = "lsparseMatrix" ## Can use CsparseMatrix methods for all of these ## setMethod("t", signature(x = "lgCMatrix"), ## function(x) .Call(lgCMatrix_trans, x), ## valueClass = "lgCMatrix") ## setMethod("diag", signature(x = "lgCMatrix"), ## function(x, nrow, ncol) .Call(lgCMatrix_diag, x)) setAs("lgCMatrix", "dgCMatrix", function(from) new("dgCMatrix", i = from@i, p = from@p, x = as.double(from@x), Dim = from@Dim, Dimnames = from@Dimnames)) setAs("lgCMatrix", "lgTMatrix", function(from) new("lgTMatrix", i = from@i, x = from@x, j = .Call(Matrix_expand_pointers, from@p), Dim = from@Dim, Dimnames = from@Dimnames)) setAs("lgCMatrix", "lgeMatrix", function(from) new("lgeMatrix", x = c(as(from, "matrix")), # is fast, Dim = from@Dim, Dimnames = from@Dimnames)) setAs("lgCMatrix", "matrix", function(from) .Call(lgC_to_matrix, from)) ## not this: .Call(Csparse_to_matrix, from)), since it goes via dense -> double precision ## TODO (maybe): write matrix_to_lcsc() in ../src/lgCMatrix.c setAs("matrix", "lgCMatrix", function(from) as(as(from, "lgTMatrix"), "lgCMatrix")) Matrix/R/Rsparse.R0000644000176200001440000001735112524132306013466 0ustar liggesusers#### Sparse Matrices in Compressed row-oriented format #### --- "R" ### ``mainly for completeness'' --- we *do* favour Csparse ## - - - - - - - - - - - - hence only "minimal" methods here ! ## see also ./SparseM-conv.R ### contains = "dMatrix" ## compressed_to_TMatrix -- fails on 32bit--enable-R-shlib with segfault {Kurt} ## ------------ --> ../src/dgCMatrix.c .R.2.T <- function(from) .Call(compressed_to_TMatrix, from, FALSE) ## slow R-level workaround ## this is cheap; alternative: going there directly, using ## i <- .Call(Matrix_expand_pointers, from@p), if(FALSE) .R.2.T <- function(from) as(.R.2.C(from), "TsparseMatrix") ## R_to_CMatrix ## ------------ --> ../src/dgCMatrix.c .R.2.C <- function(from) .Call(R_to_CMatrix, from) if(FALSE)## "slow" unneeded R-level version .R.2.C <- function(from) { cl <- class(from) valid <- c("dgRMatrix", "dsRMatrix", "dtRMatrix", "lgRMatrix", "lsRMatrix", "ltRMatrix", "ngRMatrix", "nsRMatrix", "ntRMatrix", "zgRMatrix", "zsRMatrix", "ztRMatrix") icl <- match(cl, valid) - 1L if(is.na(icl)) stop(gettextf("invalid class: %s", dQuote(cl)), domain=NA) Ccl <- sub("^(..)R","\\1C", cl) # corresponding Csparse class name r <- new(Ccl) r@Dim <- from@Dim[2:1] if(icl %/% 3 != 2) ## not "n..Matrix" --> has 'x' slot r@x <- from@x if(icl %% 3 != 0) { # symmetric or triangular r@uplo <- from@uplo if(icl %% 3 == 2) # triangular r@diag <- from@diag } r@i <- from@j r@p <- from@p r <- t(r) r@Dimnames <- from@Dimnames r } ## However, a quick way to "treat a t() as corresponding " : .tR.2.C <- function(from) { cl <- class(from) valid <- c("dgRMatrix", "dsRMatrix", "dtRMatrix", "lgRMatrix", "lsRMatrix", "ltRMatrix", "ngRMatrix", "nsRMatrix", "ntRMatrix", "zgRMatrix", "zsRMatrix", "ztRMatrix") icl <- match(cl, valid) - 1L if(is.na(icl)) stop(gettextf("invalid class: %s", dQuote(cl)), domain=NA) Ccl <- sub("^(..)R","\\1C", cl) # corresponding Csparse class name r <- new(Ccl) r@i <- from@j ##- - r@p <- from@p r@Dim <- from@Dim[2:1] r@Dimnames <- from@Dimnames[2:1] if(icl %/% 3 != 2) ## not "n..Matrix" --> has 'x' slot r@x <- from@x if(icl %% 3 != 0) { # symmetric or triangular r@uplo <- from@uplo if(icl %% 3 == 2) # triangular r@diag <- from@diag } r } ## coercion to other virtual classes --- the functionality we want to encourage setAs("RsparseMatrix", "TsparseMatrix", .R.2.T) setAs("RsparseMatrix", "CsparseMatrix", .R.2.C) setAs("RsparseMatrix", "denseMatrix", function(from) as(.R.2.C(from), "denseMatrix")) setAs("RsparseMatrix", "dsparseMatrix", function(from) as(.R.2.C(from), "dsparseMatrix")) setAs("RsparseMatrix", "lsparseMatrix", function(from) as(.R.2.C(from), "lsparseMatrix")) setAs("RsparseMatrix", "nsparseMatrix", function(from) as(.R.2.C(from), "nsparseMatrix")) setAs("RsparseMatrix", "dMatrix", function(from) as(.R.2.C(from), "dMatrix")) setAs("RsparseMatrix", "lMatrix", function(from) as(.R.2.C(from), "lMatrix")) setAs("RsparseMatrix", "nMatrix", function(from) as(.R.2.C(from), "nMatrix")) setAs("RsparseMatrix", "generalMatrix", function(from) as(.R.2.C(from), "generalMatrix")) ## for printing etc: setAs("RsparseMatrix", "dgeMatrix", function(from) as(.R.2.C(from), "dgeMatrix")) setAs("RsparseMatrix", "matrix", function(from) as(.R.2.C(from), "matrix")) ## **VERY** cheap substitute: work via dgC and t(.) .viaC.to.dgR <- function(from) { m <- as(t(from), "dgCMatrix") new("dgRMatrix", Dim = dim(from), Dimnames = .M.DN(from), p = m@p, j = m@i, x = m@x) } ## one of the few coercions "to " {tested in ../tests/Class+Meth.R} setAs("matrix", "dgRMatrix", .viaC.to.dgR) ## *very* cheap substitute: work via t(.) and Csparse .viaC.to.R <- function(from) { m <- as(t(from), "CsparseMatrix")# preserve symmetry/triangular clx <- getClassDef(class(m)) has.x <- !extends(clx, "nsparseMatrix")## <==> has 'x' slot ## instead of "d": .M.kind (m,cl) ## instead of "g": ..M.shape(m,cl) sh <- .M.shapeC(m,clx) r <- new(paste0(.M.kindC(clx), sh, "RMatrix")) r@Dim <- dim(from) r@Dimnames <- .M.DN(from) r@p <- m@p r@j <- m@i if(has.x) r@x <- m@x if(sh != "g") { r@uplo <- if(m@uplo != "U") "U" else "L" if(sh == "t") r@diag <- m@diag } r } setAs("matrix", "RsparseMatrix", .viaC.to.R) setAs("denseMatrix", "RsparseMatrix", .viaC.to.R) setAs("sparseMatrix","RsparseMatrix", .viaC.to.R) ## symmetric: can use same 'p' slot setAs("dsCMatrix", "dsRMatrix", function(from) new("dsRMatrix", Dim = dim(from), Dimnames = .M.DN(from), p = from@p, j = from@i, x = from@x, uplo = if (from@uplo == "U") "L" else "U")) ## FIXME: if this makes sense, do it for "l" and "n" as well as "d" ## setAs("dtCMatrix", "dtRMatrix", .viaC.to.dgR) # should work; can NOT use 'p' ##setAs("dgRMatrix", "dgeMatrix", ## function(from) .Call(csc_to_dgeMatrix, from)) ##setAs("matrix", "dgRMatrix", ## function(from) { ## storage.mode(from) <- "double" ## .Call(matrix_to_csc, from) ## }) ##setMethod("diag", signature(x = "dgRMatrix"), ## function(x = 1, nrow, ncol = n) .Call(csc_getDiag, x)) ## try to define for "Matrix" -- once and for all -- but that fails -- why? __ FIXME __ ## setMethod("dim", signature(x = "dgRMatrix"), ## function(x) x@Dim, valueClass = "integer") ##setMethod("t", signature(x = "dgRMatrix"), ## function(x) .Call(csc_transpose, x), ## valueClass = "dgRMatrix") setMethod("image", "dgRMatrix", function(x, ...) image(as(x, "TsparseMatrix"), ...)) setMethod("t", "RsparseMatrix", function(x) as(t(.R.2.T(x)), "RsparseMatrix")) ## Want tril(), triu(), band() --- just as "indexing" --- ## return a "close" class: setMethod("tril", "RsparseMatrix", function(x, k = 0, ...) as(tril(.R.2.C(x), k = k, ...), "RsparseMatrix")) setMethod("triu", "RsparseMatrix", function(x, k = 0, ...) as(triu(.R.2.C(x), k = k, ...), "RsparseMatrix")) setMethod("band", "RsparseMatrix", function(x, k1, k2, ...) as(band(.R.2.C(x), k1 = k1, k2 = k2, ...), "RsparseMatrix")) setReplaceMethod("[", signature(x = "RsparseMatrix", i = "index", j = "missing", value = "replValue"), function (x, i, j, ..., value) replTmat(as(x,"TsparseMatrix"), i=i, value=value)) setReplaceMethod("[", signature(x = "RsparseMatrix", i = "missing", j = "index", value = "replValue"), function (x, i, j, ..., value) replTmat(as(x,"TsparseMatrix"), j=j, value=value)) setReplaceMethod("[", signature(x = "RsparseMatrix", i = "index", j = "index", value = "replValue"), function (x, i, j, ..., value) replTmat(as(x,"TsparseMatrix"), i=i, j=j, value=value)) setReplaceMethod("[", signature(x = "RsparseMatrix", i = "index", j = "missing", value = "sparseVector"), function (x, i, j, ..., value) replTmat(as(x,"TsparseMatrix"), i=i, value=value)) setReplaceMethod("[", signature(x = "RsparseMatrix", i = "missing", j = "index", value = "sparseVector"), function (x, i, j, ..., value) replTmat(as(x,"TsparseMatrix"), j=j, value=value)) setReplaceMethod("[", signature(x = "RsparseMatrix", i = "index", j = "index", value = "sparseVector"), function (x, i, j, ..., value) replTmat(as(x,"TsparseMatrix"), i=i, j=j, value=value)) setReplaceMethod("[", signature(x = "RsparseMatrix", i = "matrix", j = "missing", value = "replValue"), function (x, i, j, ..., value) .TM.repl.i.mat(as(x,"TsparseMatrix"), i=i, value=value)) Matrix/R/symmetricMatrix.R0000644000176200001440000001466412501122043015244 0ustar liggesusers#### symmetricMatrix : virtual class setAs("denseMatrix", "symmetricMatrix", function(from) ## vvvv do *check* symmetry .Call(dense_to_symmetric, from, "U", TRUE)) setAs("matrix", "symmetricMatrix", function(from) .Call(dense_to_symmetric, from, "U", TRUE)) ### ----------- forceSymmetric() ----- *all* methods ------------------------ ## forceSymmetric() coerces to "symmetricMatrix" withOUT testing ## ---------------- contrary to as(M, ) which should only ## work when 'M' is a symmetric matrix __ in the sense of isSymmetric() __ ## i.e., with allowing a little bit of asymmetric numeric fuzz: setMethod("forceSymmetric", signature(x = "matrix", uplo="ANY"), function(x, uplo) .Call(dense_to_symmetric, x, if(missing(uplo)) "U" else uplo, FALSE)) symCls <- names(getClass("symmetricMatrix")@subclasses) for(cls in symCls) { ## When x is symmetric and uplo is missing, we keep 'uplo' from 'x': setMethod("forceSymmetric", signature(x = cls, uplo="missing"), function(x, uplo) x) setMethod("forceSymmetric", signature(x = cls, uplo="character"), function(x, uplo) { if(uplo == x@uplo) x else ## uplo is "wrong" for x t(x) }) } setMethod("forceSymmetric", signature(x = "denseMatrix", uplo="character"), function(x, uplo) .Call(dense_to_symmetric, x, uplo, FALSE)) setMethod("forceSymmetric", signature(x = "denseMatrix", uplo="missing"), function(x, uplo) { uplo <- if(is(x, "triangularMatrix")) x@uplo else "U" ## FIXME? diagU2N() ?? .Call(dense_to_symmetric, x, uplo, FALSE) }) setMethod("forceSymmetric", signature(x="sparseMatrix"), function(x, uplo) { x <- as(x, "CsparseMatrix") callGeneric() }) ##' @title Transform a CsparseMatrix into a [dln]sCMatrix (symmetricMatrix) ##' @param x CsparseMatrix ##' @param uplo missing, "U", or "L" ##' @param isTri logical specifying if 'x' is triangular ##' @param symDimnames logical specifying if dimnames() will be forced to ##' symmetric even when one of the two is NULL forceCspSymmetric <- function(x, uplo, isTri = is(x, "triangularMatrix"), symDimnames = FALSE) { ## isTri ==> effectively *diagonal* if(isTri && x@diag == "U") x <- .Call(Csparse_diagU2N, x) if(missing(uplo)) uplo <- if(isTri) x@uplo else "U" .Call(Csparse_general_to_symmetric, x, uplo, symDimnames) } .gC2sym <- function(x, uplo, symDimnames = FALSE) .Call(Csparse_general_to_symmetric, x, uplo, symDimnames) setMethod("forceSymmetric", signature(x="CsparseMatrix"), function(x, uplo) forceCspSymmetric(x, uplo)) setMethod("symmpart", signature(x = "symmetricMatrix"), function(x) x) setMethod("skewpart", signature(x = "symmetricMatrix"), function(x) .setZero(x)) ##' Allow x@Dimnames to be contain one NULL with still symmetric dimnames() if(FALSE) ##' R version {overwritten, just below}: symmetricDimnames <- function(x) { r <- x@Dimnames # validity ==> r is length-2 list if(is.null(r[[1L]]) && !is.null(r[[2L]])) r[[1L]] <- r[[2L]] else if(is.null(r[[2L]]) && !is.null(r[[1L]])) r[[2L]] <- r[[1L]] r } symmetricDimnames <- function(x) .Call(R_symmetric_Dimnames, x) setMethod("dimnames", signature(x = "symmetricMatrix"), symmetricDimnames) ###------- pack() and unpack() --- for *dense* symmetric & triangular matrices: packM <- function(x, Mtype, kind, unpack=FALSE) { cd <- getClassDef(cx <- class(x)) if(extends(cd, "sparseMatrix")) stop(sprintf("(un)packing only applies to dense matrices, class(x)='%s'", cx)) if(!missing(kind) && kind == "symmetric") { ## use 'unpack' but not 'Mtype' ## special treatment for positive definite ones: as(x, if(unpack) { if(extends(cd, "dppMatrix")) "dpoMatrix" else paste0(.M.kindC(cd), "syMatrix") } else { ## !unpack : "pack" : if(extends(cd, "dpoMatrix")) "dppMatrix" else paste0(.M.kindC(cd), "spMatrix") }) } else as(x, paste0(.M.kindC(cd), Mtype)) } setMethod("unpack", "symmetricMatrix", function(x, ...) packM(x, kind="symmetric", unpack=TRUE)) setMethod("pack", "symmetricMatrix", function(x, ...) packM(x, kind="symmetric")) setMethod("unpack", "triangularMatrix", function(x, ...) packM(x, "trMatrix", unpack=TRUE)) setMethod("pack", "triangularMatrix", function(x, ...) packM(x, "tpMatrix")) ## to produce a nicer error message: pckErr <- function(x, ...) stop(sprintf("(un)packing only applies to dense matrices, class(x)='%s'", class(x))) setMethod("unpack", "sparseMatrix", pckErr) setMethod("pack", "sparseMatrix", pckErr) rm(pckErr) ##' pack () -- smartly: setMethod("pack", signature(x = "matrix"), function(x, symmetric=NA, upperTri = NA, ...) { if(is.na(symmetric)) ## must guess symmetric / triangular symmetric <- isSymmetric.matrix(x) if(symmetric) { pack(.Call(dense_to_symmetric, x, "U", TRUE), ...) } else { # triangular ## isTriMat(..) : should still check fully (speed up ?) .. if(isTr <- isTriMat(x, upper=upperTri)) { uplo <- attr(isTr, "kind") pack(new(paste0(.M.kind(x),"tpMatrix"), x = x[indTri(nrow(x), upper=(uplo == "U"), diag=TRUE)], Dim = dim(x), Dimnames = .M.DN(x), uplo = uplo), ...) } else stop("'x' is not symmetric nor triangular") } }) ## {"traditional"} specific methods setMethod("unpack", "dspMatrix", function(x, ...) dsp2dsy(x), valueClass = "dsyMatrix") setMethod("unpack", "dtpMatrix", function(x, ...) dtp2dtr(x), valueClass = "dtrMatrix") ### ## autogenerate coercions ## as(*, "symmetricMatrix") ## ~~~~~~~~~~~~~~~~~~~~~~~~~ ## Basic problem: ## This should work at package install time when package:Matrix does not exist! if(FALSE) local({ allCl <- getClasses("package:Matrix") ## << fails at install time!!!! clss <- allCl[sapply(allCl, extends, class2 = "Matrix")] virt <- sapply(clss, isVirtualClass) ## Now ensure coercions for all non-virtual "Matrix" inheriting classes: for(cl in clss[!virt]) { cld <- getClassDef(cl) if(extends(cld, "symmetricMatrix")) cat("\tsymmetric:\t", cl,"\n") else if(extends(cld, "triangularMatrix")) cat("\ttriangular:\t", cl,"\n") else if(extends(cld, "diagonalMatrix")) cat("\tdiagonal:\t", cl,"\n") else { cat("do ",cl,"\n") ## setAs(cl, "symmetricMatrix", ## function(from) as(from, ".s.Matrix")) } }## for }) Matrix/vignettes/0000755000176200001440000000000013203323427013525 5ustar liggesusersMatrix/vignettes/Design-issues.Rnw0000644000176200001440000001273212070262574016752 0ustar liggesusers\documentclass{article} % \usepackage{myVignette} \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} \newcommand{\noFootnote}[1]{{\small (\textit{#1})}} \newcommand{\myOp}[1]{{$\left\langle\ensuremath{#1}\right\rangle$}} %% vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv %%\VignetteIndexEntry{Design Issues in Matrix package Development} %%\VignetteDepends{Matrix} \SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=true,keep.source=TRUE} % ^^^^^^^^^^^^^^^^ \title{Design Issues in Matrix package Development} \author{Martin Maechler and Douglas Bates\\R Core Development Team \\\email{maechler@stat.math.ethz.ch}, \email{bates@r-project.org}} \date{Spring 2008 ({\tiny typeset on \tiny\today})} % \begin{document} \maketitle \begin{abstract} This is a (\textbf{currently very incomplete}) write-up of the many smaller and larger design decisions we have made in organizing functionalities in the Matrix package. Classes: There's a rich hierarchy of matrix classes, which you can visualize as a set of trees whose inner (and ``upper'') nodes are \emph{virtual} classes and only the leaves are non-virtual ``actual'' classes. Functions and Methods: - setAs() - others \end{abstract} %% Note: These are explained in '?RweaveLatex' : <>= options(width=75) @ \section{The Matrix class structures} \label{sec:classes} Take Martin's DSC 2007 talk to depict class hierarchy. \\ --- --- --- %% \hrule[1pt]{\textwidth} \subsection{Diagonal Matrices} \label{ssec:diagMat} The class of diagonal matrices is worth mentioning for several reasons. First, we have wanted such a class, because \emph{multiplication} methods are particularly simple with diagonal matrices. The typical constructor is \Rfun{Diagonal} whereas the accessor (as for traditional matrices), \Rfun{diag} simply returns the \emph{vector} of diagonal entries: <>= library(Matrix) (D4 <- Diagonal(4, 10*(1:4))) str(D4) diag(D4) @ We can \emph{modify} the diagonal in the traditional way (via method definition for \Rfun{diag<-}): <>= diag(D4) <- diag(D4) + 1:4 D4 @ Note that \textbf{unit-diagonal} matrices (the identity matrices of linear algebra) with slot \code{diag = "U"} can have an empty \code{x} slot, very analogously to the unit-diagonal triangular matrices: <>= str(I3 <- Diagonal(3)) ## empty 'x' slot getClass("diagonalMatrix") ## extending "denseMatrix" @ We have implemented diagonal matrices as \emph{dense} rather than sparse matrices, for the following reasons: \begin{enumerate} \item The \code{diag()}onal (vector) is the basic part of such a matrix, and this is simply the \code{x} slot unless the \code{diag} slot is \code{"U"}, the unit-diagonal case, which is the identity matrix. \item given '1)', it does not make much sense to store \emph{where} the matrix is non-zero. This contrasts with all sparse matrix implementations, and hence we did not want to call a diagonal matrix ``sparse''. \end{enumerate} \section{Matrix Transformations} \label{sec:trafos} \subsection{Coercions between Matrix classes} \label{ssec:coerce} You may need to transform Matrix objects into specific shape (triangular, symmetric), content type (double, logical, \dots) or storage structure (dense or sparse). Every useR should use \code{as(x, )} to this end, where \code{} is a \emph{virtual} Matrix super class, such as \code{"triangularMatrix"} \code{"dMatrix"}, or \code{"sparseMatrix"}. In other words, the user should \emph{not} coerce directly to a specific desired class such as \code{"dtCMatrix"}, even though that may occasionally work as well. Here is a set of rules to which the Matrix developers and the users should typically adhere: \begin{description} \item[Rule~1]: \code{as(M, "matrix")} should work for \textbf{all} Matrix objects \code{M}. \item[Rule~2]: \code{Matrix(x)} should also work for matrix like objects \code{x} and always return a ``classed'' Matrix. Applied to a \code{"matrix"} object \code{m}, \code{M. <- Matrix(m)} can be considered a kind of inverse of \code{m <- as(M, "matrix")}. For sparse matrices however, \code{M.} well be a \code{CsparseMatrix}, and it is often ``more structured'' than \code{M}, e.g., <>= (M <- spMatrix(4,4, i=1:4, j=c(3:1,4), x=c(4,1,4,8))) # dgTMatrix m <- as(M, "matrix") (M. <- Matrix(m)) # dsCMatrix (i.e. *symmetric*) @ \item[Rule~3]: All the following coercions to \emph{virtual} matrix classes should work:\\ \begin{enumerate} \item \code{as(m, "dMatrix")} \item \code{as(m, "lMatrix")} \item \code{as(m, "nMatrix")} \item \code{as(m, "denseMatrix")} \item \code{as(m, "sparseMatrix")} \item \code{as(m, "generalMatrix")} \end{enumerate} whereas the next ones should work under some assumptions: \begin{enumerate} \item \code{as(m1, "triangularMatrix")} \\ should work when \code{m1} is a triangular matrix, i.e. the upper or lower triangle of \code{m1} contains only zeros. \item \code{as(m2, "symmetricMatrix")} should work when \code{m2} is a symmetric matrix in the sense of \code{isSymmetric(m2)} returning \code{TRUE}. Note that this is typically equivalent to something like \code{isTRUE(all.equal(m2, t(m2)))}, i.e., the lower and upper triangle of the matrix have to be equal \emph{up to small numeric fuzz}. \end{enumerate} \end{description} \section{Session Info} <>= toLatex(sessionInfo()) @ %not yet %\bibliography{Matrix} \end{document} Matrix/vignettes/Intro2Matrix.Rnw0000644000176200001440000004453212070262574016575 0ustar liggesusers\documentclass{article} % \usepackage{myVignette} \usepackage{fullpage}% save trees ;-) \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} \newcommand{\noFootnote}[1]{{\small (\textit{#1})}} \newcommand{\myOp}[1]{{$\left\langle\ensuremath{#1}\right\rangle$}} % %%\VignetteIndexEntry{2nd Introduction to the Matrix Package} %%\VignetteDepends{Matrix} \SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=7,height=4,strip.white=true,keep.source=TRUE} % ^^^^^^^^^^^^^^^^ \title{2nd Introduction to the Matrix package} \author{Martin Maechler and Douglas Bates\\ R Core Development Team \\\email{maechler@stat.math.ethz.ch}, \email{bates@r-project.org}} \date{September 2006 ({\tiny typeset on \tiny\today})} % \begin{document} \maketitle \begin{abstract} % \emph{\Large Why should you want to work with this package and what % does it do for you?} Linear algebra is at the core of many areas of statistical computing and from its inception the \Slang{} has supported numerical linear algebra via a matrix data type and several functions and operators, such as \code{\%*\%}, \code{qr}, \code{chol}, and \code{solve}. However, these data types and functions do not provide direct access to all of the facilities for efficient manipulation of dense matrices, as provided by the Lapack subroutines, and they do not provide for manipulation of sparse matrices. The \pkg{Matrix} package provides a set of S4 classes for dense and sparse matrices that extend the basic matrix data type. Methods for a wide variety of functions and operators applied to objects from these classes provide efficient access to BLAS (Basic Linear Algebra Subroutines), Lapack (dense matrix), CHOLMOD including AMD and COLAMD and \code{Csparse} (sparse matrix) routines. One notable characteristic of the package is that whenever a matrix is factored, the factorization is stored as part of the original matrix so that further operations on the matrix can reuse this factorization. \end{abstract} %% Note: These are explained in '?RweaveLatex' : <>= options(width=75) @ \section{Introduction} \label{sec:Intro} The most automatic way to use the \pkg{Matrix} package is via the \Rfun{Matrix} function which is very similar to the standard \RR\ function \Rfun{matrix}, @ <>= library(Matrix) M <- Matrix(10 + 1:28, 4, 7) M tM <- t(M) @ %def Such a matrix can be appended to (using \Rfun{cBind} or \Rfun{rBind} with capital ``B'') or indexed, <>= (M2 <- cBind(-1, M)) M[2, 1] M[4, ] @ where the last two statements show customary matrix indexing, returning a simple numeric vector each\footnote{because there's an additional default argument to indexing, \code{drop = TRUE}. If you add \hbox{``\code{\ ,\ drop = FALSE}\ ''} you will get submatrices instead of simple vectors.}. We assign 0 to some columns and rows to ``sparsify'' it, and some \code{NA}s (typically ``missing values'' in data analysis) in order to demonstrate how they are dealt with; note how we can \emph{``subassign''} as usual, for classical \RR{} matrices (i.e., single entries or whole slices at once), @ <>= M2[, c(2,4:6)] <- 0 M2[2, ] <- 0 M2 <- rBind(0, M2, 0) M2[1:2,2] <- M2[3,4:5] <- NA @ and then coerce it to a sparse matrix, @ <>= sM <- as(M2, "sparseMatrix") 10 * sM identical(sM * 2, sM + sM) is(sM / 10 + M2 %/% 2, "sparseMatrix") @ %def where the last three calls show that multiplication by a scalar keeps sparcity, as does other arithmetic, but addition to a ``dense'' object does not, as you might have expected after some thought about ``sensible'' behavior: @ <>= sM + 10 @ %def Operations on our classed matrices include (componentwise) arithmetic ($+$, $-$, $*$, $/$, etc) as partly seen above, comparison ($>$, $\le$, etc), e.g., <>= Mg2 <- (sM > 2) Mg2 @ returning a logical sparse matrix. When interested in the internal \textbf{str}ucture, \Rfun{str} comes handy, and we have been using it ourselves more regulary than \Rfun{print}ing (or \Rfun{show}ing as it happens) our matrices; alternatively, \Rfun{summary} gives output similar to Matlab's printing of sparse matrices. @ <>= str(Mg2) summary(Mg2) @ As you see from both of these, \code{Mg2} contains ``extra zero'' (here \code{FALSE}) entries; such sparse matrices may be created for different reasons, and you can use \Rfun{drop0} to remove (``drop'') these extra zeros. This should \emph{never} matter for functionality, and does not even show differently for logical sparse matrices, but the internal structure is more compact: <>= Mg2 <- drop0(Mg2) str(Mg2@x) # length 13, was 16 @ For large sparse matrices, visualization (of the sparsity pattern) is important, and we provide \Rfun{image} methods for that, e.g., <>= data(CAex) print(image(CAex, main = "image(CAex)")) # print(.) needed for Sweave @ \smallskip Further, i.e., in addition to the above implicitly mentioned \code{"Ops"} operators (\code{+}, \code{*},\dots, \code{<=},\code{>},\dots, \code{\&} which all work with our matrices, notably in conjunction with scalars and traditional matrices), the \code{"Math"}-operations (such as \Rfun{exp}, \Rfun{sin} or \Rfun{gamma}) and \code{"Math2"} (\Rfun{round} etc) and the \code{"Summary"} group of functions, \Rfun{min}, \Rfun{range}, \Rfun{sum}, all work on our matrices as they should. Note that all these are implemented via so called \emph{group methods}, see e.g., \code{?Arith} in \RR. The intention is that sparse matrices remain sparse whenever sensible, given the matrix \emph{classes} and operators involved, but not content specifically. E.g., + gives even for the rare cases where it would be advantageous to get a result. These classed matrices can be ``indexed'' (more technically ``subset'') as traditional \Slang{} (and hence \RR) matrices, as partly seen above. This also includes the idiom \code{M [ M \myOp{\mathit{op}} \myOp{\mathrm{num}}~]} which returns simple vectors, @ <>= sM[sM > 2] sml <- sM[sM <= 2] sml @ %def and \emph{``subassign''}ment similarly works in the same generality as for traditional \Slang{} matrices. %% We have seen that already above! %% This was the 2005 - Introduction vignette's first section: \subsection{\pkg{Matrix} package for numerical linear algebra} \label{ssec:intro-linalg} Linear algebra is at the core of many statistical computing techniques and, from its inception, the \Slang{} has supported numerical linear algebra via a matrix data type and several functions and operators, such as \code{\%*\%}, \code{qr}, \code{chol}, and \code{solve}. %% Initially the numerical linear algebra functions in \RR{} called underlying Fortran routines from the Linpack~\citep{Linpack} and Eispack~\citep{Eispack} libraries but over the years most of these functions have been switched to use routines from the Lapack~\citep{Lapack} library which is the state-of-the-art implementation of numerical dense linear algebra. %% Furthermore, \RR{} can be configured to use accelerated BLAS (Basic Linear Algebra Subroutines), such as those from the Atlas~\citep{Atlas} project or other ones, see the \RR~manual ``Installation and Administration''. Lapack provides routines for operating on several special forms of matrices, such as triangular matrices and symmetric matrices. Furthermore, matrix decompositions like the QR decompositions produce multiple output components that should be regarded as parts of a single object. There is some support in \RR{} for operations on special forms of matrices (e.g. the \code{backsolve}, \code{forwardsolve} and \code{chol2inv} functions) and for special structures (e.g. a QR structure is implicitly defined as a list by the \code{qr}, \code{qr.qy}, \code{qr.qty}, and related functions) but it is not as fully developed as it could be. Also there is no direct support for sparse matrices in \RR{} although \citet{koen:ng:2003} have developed the \pkg{SparseM} package for sparse matrices based on SparseKit. The \pkg{Matrix} package provides S4 classes and methods for dense and sparse matrices. The methods for dense matrices use Lapack and BLAS. The sparse matrix methods use CHOLMOD~\citep{Cholmod}, CSparse~\citep{Csparse} and other parts (AMD, COLAMD) of Tim Davis' ``SuiteSparse'' collection of sparse matrix libraries, many of which also use BLAS. \TODO{\Rfun{triu}, \Rfun{tril}, \Rfun{diag}, ... and \command{as(.,.)} , but of course only when they've seen a few different ones.} \TODO{matrix operators include \code{\%*\%}, \Rfun{crossprod}, \Rfun{tcrossprod}, \Rfun{solve}} \TODO{\Rfun{expm} is the matrix exponential ... ...} \TODO{\Rfun{symmpart} and \Rfun{skewpart} compute the symmetric part, \code{(x + t(x))/2} and the skew-symmetric part, \code{(x - t(x))/2} of a matrix \code{x}.} \TODO{factorizations include \Rfun{Cholesky} (or \Rfun{chol}), \Rfun{lu}, \Rfun{qr} (not yet for dense)} \TODO{Although generally the result of an operation on dense matrices is a dgeMatrix, certain operations return matrices of special types.} \TODO{E.g. show the distinction between \code{t(mm) \%*\% mm} and \code{crossprod(mm)}.} % \bigskip % ... ... ... The following is the old \file{Introduction.Rnw} ... FIXME ... ... \bigskip \section{Matrix Classes} The \pkg{Matrix} package provides classes for real (stored as double precision), logical and so-called ``pattern'' (binary) dense and sparse matrices. There are provisions to also provide integer and complex (stored as double precision complex) matrices. Note that in \RR, \code{logical} means entries \code{TRUE}, \code{FALSE}, or \code{NA}. To store just the non-zero pattern for typical sparse matrix algorithms, the pattern matrices are \emph{binary}, i.e., conceptually just \code{TRUE} or \code{FALSE}. In \pkg{Matrix}, the pattern matrices all have class names starting with \code{"n"} (patter\textbf{n}). \subsection{Classes for dense matrices} \label{ssec:DenseClasses} For the sake of brevity, we restrict ourselves to the \emph{real} (\textbf{d}ouble) classes, but they are paralleled by \textbf{l}ogical and patter\textbf{n} matrices for all but the positive definite ones. \begin{description} \item[dgeMatrix] Real matrices in general storage mode \item[dsyMatrix] Symmetric real matrices in non-packed storage \item[dspMatrix] Symmetric real matrices in packed storage (one triangle only) \item[dtrMatrix] Triangular real matrices in non-packed storage \item[dtpMatrix] Triangular real matrices in packed storage (triangle only) \item[dpoMatrix] Positive semi-definite symmetric real matrices in non-packed storage \item[dppMatrix] \ \ ditto \ \ in packed storage \end{description} Methods for these classes include coercion between these classes, when appropriate, and coercion to the \code{matrix} class; methods for matrix multiplication (\code{\%*\%}); cross products (\code{crossprod}), matrix norm (\code{norm}); reciprocal condition number (\code{rcond}); LU factorization (\code{lu}) or, for the \code{poMatrix} class, the Cholesky decomposition (\code{chol}); and solutions of linear systems of equations (\code{solve}). %-- mentioned above already: % Further, group methods have been defined for the \code{Arith} (basic % arithmetic, including with scalar numbers) and the \code{Math} (basic % mathematical functions) group.. Whenever a factorization or a decomposition is calculated it is preserved as a (list) element in the \code{factors} slot of the original object. In this way a sequence of operations, such as determining the condition number of a matrix then solving a linear system based on the matrix, do not require multiple factorizations of the same matrix nor do they require the user to store the intermediate results. \subsection{Classes for sparse matrices} \label{sec:SparseClasses} Used for large matrices in which most of the elements are known to be zero (or \code{FALSE} for logical and binary (``pattern'') matrices). Sparse matrices are automatically built from \Rfun{Matrix} whenever the majority of entries is zero (or \code{FALSE} respectively). Alternatively, \Rfun{sparseMatrix} builds sparse matrices from their non-zero entries and is typically recommended to construct large sparse matrices, rather than direct calls of \Rfun{new}. \TODO{E.g. model matrices created from factors with a large number of levels} \TODO{ or from spline basis functions (e.g. COBS, package \pkg{cobs}), etc.} \TODO{Other uses include representations of graphs. indeed; good you mentioned it! particularly since we still have the interface to the \pkg{graph} package. I think I'd like to draw one graph in that article --- maybe the undirected graph corresponding to a crossprod() result of dimension ca. $50^2$} \TODO{Specialized algorithms can give substantial savings in amount of storage used and execution time of operations.} \TODO{Our implementation is based on the CHOLMOD and CSparse libraries by Tim Davis.} \subsection{Representations of sparse matrices} \label{ssec:SparseReps} \subsubsection{Triplet representation (\class{TsparseMatrix})} Conceptually, the simplest representation of a sparse matrix is as a triplet of an integer vector \code{i} giving the row numbers, an integer vector \code{j} giving the column numbers, and a numeric vector \code{x} giving the non-zero values in the matrix.\footnote{For efficiency reasons, we use ``zero-based'' indexing in the \pkg{Matrix} package, i.e., the row indices \code{i} are in \code{0:(nrow(.)-1)} and the column indices \code{j} accordingly.} In \pkg{Matrix}, the \class{TsparseMatrix} class is the virtual class of all sparse matrices in triplet representation. Its main use is for easy input or transfer to other classes. As for the dense matrices, the class of the \code{x} slot may vary, and the subclasses may be triangular, symmetric or unspecified (``general''), such that the \class{TsparseMatrix} class has several\footnote{the $3 \times 3$ actual subclasses of \class{TsparseMatrix} are the three structural kinds, namely \textbf{t}riangular, \textbf{s}ymmetric and \textbf{g}eneral, times three entry classes, \textbf{d}ouble, \textbf{l}ogical, and patter\textbf{n}.} `actual'' subclasses, the most typical (numeric, general) is \class{dgTMatrix}: <>= getClass("TsparseMatrix") # (i,j, Dim, Dimnames) slots are common to all getClass("dgTMatrix") @ Note that the \emph{order} of the entries in the \code{(i,j,x)} vectors does not matter; consequently, such matrices are not unique in their representation. \footnote{ Furthermore, there can be \emph{repeated} \code{(i,j)} entries with the customary convention that the corresponding \code{x} entries are \emph{added} to form the matrix element $m_{ij}$. } %% The triplet representation is row-oriented if elements in the same row %% were adjacent and column-oriented if elements in the same column were %% adjacent. \subsubsection{Compressed representations: \class{CsparseMatrix} and \class{RsparseMatrix}} For most sparse operations we use the compressed column-oriented representation (virtual class \class{CsparseMatrix}) (also known as ``csc'', ``compressed sparse column''). Here, instead of storing all column indices \code{j}, only the \emph{start} index of every column is stored. Analogously, there is also a compressed sparse row (csr) representation, which e.g. is used in in the \pkg{SparseM} package, and we provide the \class{RsparseMatrix} for compatibility and completeness purposes, in addition to basic coercion (\code({as(., \textit{})} between the classes. %% (column-oriented triplet) except that \code{i} (\code{j}) just stores %% the index of the first element in the row (column). (There are a %% couple of other details but that is the gist of it.) These compressed representations remove the redundant row (column) indices and provide faster access to a given location in the matrix because you only need to check one row (column). There are certain advantages \footnote{routines can make use of high-level (``level-3'') BLAS in certain sparse matrix computations} to csc in systems like \RR{}, Octave and Matlab where dense matrices are stored in column-major order, therefore it is used in sparse matrix libraries such as CHOLMOD or CSparse of which we make use. For this reason, the \class{CsparseMatrix} class and subclasses are the principal classes for sparse matrices in the \pkg{Matrix} package. The Matrix package provides the following classes for sparse matrices \FIXME{many more --- maybe explain naming scheme?} \begin{description} \item[dgTMatrix] general, numeric, sparse matrices in (a possibly redundant) triplet form. This can be a convenient form in which to construct sparse matrices. \item[dgCMatrix] general, numeric, sparse matrices in the (sorted) compressed sparse column format. \item[dsCMatrix] symmetric, real, sparse matrices in the (sorted) compressed sparse column format. Only the upper or the lower triangle is stored. Although there is provision for both forms, the lower triangle form works best with TAUCS. \item[dtCMatrix] triangular, real, sparse matrices in the (sorted) compressed sparse column format. \end{description} \TODO{Can also read and write the Matrix Market and read the Harwell-Boeing representations.} \TODO{Can convert from a dense matrix to a sparse matrix (or use the Matrix function) but going through an intermediate dense matrix may cause problems with the amount of memory required.} \TODO{similar range of operations as for the dense matrix classes.} \section{More detailed examples of ``Matrix'' operations} Have seen \texttt{drop0()} above, %(p.3); only with logical showe a nice double example (where you see ``.'' and ``0''). Show the use of \code{dim<-} for \emph{resizing} a (sparse) matrix. Maybe mention \Rfun{nearPD}. \TODO{Solve a sparse least squares problem and demonstrate memory / speed gain} \TODO{mention \code{lme4} and \Rfun{lmer}, maybe use one example to show the matrix sizes.} \section{Notes about S4 classes and methods implementation} Maybe we could % even here (for R News, not only for JSS) give some glimpses of implementations at least on the \RR{} level ones? \TODO{The class hierarchy: a non-trivial tree where only the leaves are ``actual'' classes.} \TODO{The main advantage of the multi-level hierarchy is that methods can often be defined on a higher (virtual class) level which ensures consistency [and saves from ``cut \& paste'' and forgetting things]} \TODO{Using Group Methods} \section{Session Info} <>= toLatex(sessionInfo()) @ \bibliography{Matrix} \end{document} Matrix/vignettes/sparseModels.Rnw0000644000176200001440000002520212221066570016661 0ustar liggesusers\documentclass{article} % \usepackage{fullpage} \usepackage{myVignette} \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} \newcommand{\noFootnote}[1]{{\small (\textit{#1})}} \newcommand{\myOp}[1]{{$\left\langle\ensuremath{#1}\right\rangle$}} %%\VignetteIndexEntry{Sparse Model Matrices} %%\VignetteDepends{Matrix,MASS} \title{Sparse Model Matrices} \author{Martin Maechler\\ R Core Development Team \\\email{maechler@R-project.org}} \date{July 2007, 2008 ({\tiny typeset on \tiny\today})} % \begin{document} \maketitle \SweaveOpts{engine=R, keep.source=TRUE} \SweaveOpts{eps=FALSE, pdf=TRUE, width=8, height=5.5, strip.white=true} \setkeys{Gin}{width=\textwidth} % \begin{abstract} % ............................ FIXME % \end{abstract} %% Note: These are explained in '?RweaveLatex' : <>= options(width=75) @ \section*{Introduction} Model matrices in the very widely used (generalized) linear models of statistics, (typically fit via \Rfun{lm} or \Rfun{glm} in \RR) are often practically sparse --- whenever categorical predictors, \code{factor}s in \RR, are used. %% FIXME: Introduce lm.fit.sparse() or not ? We show for a few classes of such linear models how to construct sparse model matrices using sparse matrix (S4) objects from the \pkg{Matrix} package, and typically \emph{without} using dense matrices in intermediate steps. %% only the latter is really novel, since "SparseM" (and others) %% have used the equivalent of %% as( model.matrix(.....), "sparseMatrix") \section{One factor: \texttt{y $\sim$ f1}} Let's start with an artifical small example: <>= (ff <- factor(strsplit("statistics_is_a_task", "")[[1]], levels=c("_",letters))) factor(ff) # drops the levels that do not occur f1 <- ff[, drop=TRUE] # the same, more transparently @ and now assume a model $$y_i = \mu + \alpha_{j(i)} + E_i,$$ for $i=1,\dots,n =$~\code{length(f1)}$= 20$, and $\alpha_{j(i)}$ with a constraint such as $\sum_j \alpha_j = 0$ (``sum'') or $\alpha_1 = 0$ (``treatment'') and $j(i) =$\code{as.numeric(f1[i])} being the level number of the $i$-th observation. For such a ``design'', the model is only estimable if the levels \code{c} and \code{k} are merged, and <>= levels(f1)[match(c("c","k"), levels(f1))] <- "ck" library(Matrix) Matrix(contrasts(f1)) # "treatment" contrasts by default -- level "_" = baseline Matrix(contrasts(C(f1, sum))) Matrix(contrasts(C(f1, helmert)), sparse=TRUE) # S-plus default; much less sparse @ where \Rfun{contrasts} is (conceptually) just one major ingredient in the well-known \Rfun{model.matrix} function to build the linear model matrix $\mathbf{X}$ of so-called ``dummy variables''. %% Since 2007, the \pkg{Matrix} package has been providing coercion from a \code{factor} object to a \code{sparseMatrix} one to produce the transpose of the model matrix corresponding to a model with that factor as predictor (and no intercept): <>= as(f1, "sparseMatrix") @ which is really almost the transpose of using the above sparsification of \Rfun{contrasts} (and arranging for nice printing), <>= printSpMatrix( t( Matrix(contrasts(f1))[as.character(f1) ,] ), col.names=TRUE) @ and that is the same as the ``sparsification'' of \Rfun{model.matrix}, apart from the column names (here transposed), <>= t( Matrix(model.matrix(~ 0+ f1))) # model with*OUT* intercept @ A more realistic small example is the \code{chickwts} data set, <>= str(chickwts)# a standard R data set, 71 x 2 x.feed <- as(chickwts$feed, "sparseMatrix") x.feed[ , (1:72)[c(TRUE,FALSE,FALSE)]] ## every 3rd column: @ % FIXME: Move this to ../../../MatrixModels/inst/doc/ ??? % ## Provisional (hence unexported) sparse lm.fit(): % Matrix:::lm.fit.sparse(x = t(x.feed), y = chickwts[,1]) %- for emacs: $ \section{One factor, one continuous: \texttt{y $\sim$ f1 + x}} To create the model matrix for the case of one factor and one continuous predictor---called ``analysis of covariance'' in the historical literature--- we can adopt the following simple scheme. %% Possible examples: %% - Puromycin %% - ToothGrowth %--- FIXME --- The final model matrix is the concatenation of: 1) create the sparse 0-1 matrix \code{m1} from the f1 main-effect 2) the single row/column 'x' == 'x' main-effect 3) replacing the values 1 in \code{m1@x} (the x-slot of the factor model matrix), by the values of \code{x} (our continuous predictor). \section{Two (or more) factors, main effects only: \texttt{y $\sim$ f1 + f2}} %% FIXME: 'warpbreaks' is smaller and more natural as fixed effect model! Let us consider the \code{warpbreaks} data set of 54 observations, <>= data(warpbreaks)# a standard R data set str(warpbreaks) # 2 x 3 (x 9) balanced two-way with 9 replicates: xtabs(~ wool + tension, data = warpbreaks) @ %It is \emph{not} statistically sensible to assume that \code{Run} is a %fixed effect, however the example is handy to depict how a model matrix This example depicts how a model matrix would be built for the model \code{breaks ~ wool + tension}. Since this is a main effects model (no interactions), the desired model matrix is simply the concatenation of the model matrices of the main effects. There are two here, but the principle applies to general main effects of factors. The most sparse matrix is reached by \emph{not} using an intercept, (which would give an all-1-column) but rather have one factor fully coded (aka ``swallow'' the intercept), and all others being at \code{"treatment"} contrast, i.e., here, the \emph{transposed} model matrix, \code{tmm}, is <>= tmm <- with(warpbreaks, rBind(as(tension, "sparseMatrix"), as(wool, "sparseMatrix")[-1,,drop=FALSE])) print( image(tmm) ) # print(.) the lattice object @ \\ The matrices are even sparser when the factors have more than just two or three levels, e.g., for the morley data set, <>= data(morley) # a standard R data set morley$Expt <- factor(morley$Expt) morley$Run <- factor(morley$Run) str(morley) t.mm <- with(morley, rBind(as(Expt, "sparseMatrix"), as(Run, "sparseMatrix")[-1,])) print( image(t.mm) ) # print(.) the lattice object @ %% Also see Doug's E-mail to R-help % From: "Douglas Bates" % Subject: Re: [R] Large number of dummy variables % Date: Mon, 21 Jul 2008 18:07:26 -0500 \section{Interactions of two (or more) factors,.....} %% Of course, this is *the* interesting part %% To form interactions, we would have to ``outer-multiply'' %% the single-factor model-matrices (after "[, -1]") In situations with more than one factor, particularly with interactions, the model matrix is currently not directly available via \pkg{Matrix} functions --- but we still show to build them carefully. The easiest---but not at memory resources efficient---way is to go via the dense \Rfun{model.matrix} result: <>= data(npk, package="MASS") npk.mf <- model.frame(yield ~ block + N*P*K, data = npk) ## str(npk.mf) # the data frame + "terms" attribute m.npk <- model.matrix(attr(npk.mf, "terms"), data = npk) class(M.npk <- Matrix(m.npk)) dim(M.npk)# 24 x 13 sparse Matrix t(M.npk) # easier to display, column names readably displayed as row.names(t(.)) @ %% printSpMatrix(M.npk, col.names = "abb1") Another example was reported by a user on R-help (July 15, 2008, {\small \url{https://stat.ethz.ch/pipermail/r-help/2008-July/167772.html}}) about an ``aov error with large data set''. \begin{citation} % RAS: in my PDF, I don't see the first character I I'm looking to analyze a large data set: a within-Ss 2*2*1500 design with 20 Ss. However, aov() gives me an error. %, reproducible as follows: \end{citation} And gave the following code example (slightly edited): <>= id <- factor(1:20) a <- factor(1:2) b <- factor(1:2) d <- factor(1:1500) aDat <- expand.grid(id=id, a=a, b=b, d=d) aDat$y <- rnorm(length(aDat[, 1])) # generate some random DV data dim(aDat) # 120'000 x 5 (120'000 = 2*2*1500 * 20 = 6000 * 20) @ %% ^^^^^^^ MM: "fix" and generate much more interesting data and then continued with \begin{Sinput} m.aov <- aov(y ~ a*b*d + Error(id/(a*b*d)), data=aDat) \end{Sinput} \begin{citation}\sffamily which yields the following error:\\ \ttfamily Error in model.matrix.default(mt, mf, contrasts) :\\ allocMatrix: too many elements specified\\ \end{citation} to which he got the explanation by Peter Dalgaard that the formal model matrix involved was much too large in this case, and that PD assumed, \pkg{lme4} would be able to solve the problem. However, currently there would still be a big problem with using \pkg{lme4}, because of the many levels of \emph{fixed} effects: Specifically\footnote{the following is not run in \RR\ on purpose, rather just displayed here}, \begin{Sinput} dim(model.matrix( ~ a*b*d, data = aDat)) # 120'000 x 6000 \end{Sinput} where we note that $120'000 \times 6000 = 720 \textrm{mio}$, which is $720'000'000 * 8 / 2^{20} \approx 5500$ Megabytes. \emph{Unfortunately} \pkg{lme4} does \emph{not} use a sparse $X$-matrix for the fixed effects (yet), it just uses sparse matrices for the $Z$-matrix of random effects and sparse matrix operations for computations related to $Z$. Let us use a smaller factor \code{d} in order to investigate how sparse the $X$ matrix would be: <>= d2 <- factor(1:150) # 10 times smaller tmp2 <- expand.grid(id=id, a=a, b=b, d=d2) dim(tmp2) dim(mm <- model.matrix( ~ a*b*d, data=tmp2)) ## is 100 times smaller than original example class(smm <- Matrix(mm)) # automatically coerced to sparse round(object.size(mm) / object.size(smm), 1) @ shows that even for the small \code{d} here, the memory reduction would be more than an order of magnitude. \\ %% Reasons to fake here: %% 1) print() is needed for lattice -- but looks ugly, %% 2) the resulting pdf file is too large -- use png instead: <>= image(t(smm), aspect = 1/3, lwd=0, col.regions = "red") <>= png("sparseModels-X-sparse-image.png", width=6, height=3, units='in', res=150) print( <> ) dev.off() @ %%--NB: 'keep.source=FALSE' above is workaround-a-bug-in-R-devel-(2.13.x)--- \par\vspace*{-1ex} \centerline{% \includegraphics[width=1.1\textwidth]{sparseModels-X-sparse-image.png}} and working with the sparse instead of the dense model matrix is considerably faster as well, <>= x <- 1:600 system.time(y <- smm %*% x) ## sparse is much faster system.time(y. <- mm %*% x) ## than dense identical(as.matrix(y), y.) ## TRUE @ <>= toLatex(sessionInfo()) @ \end{document} Matrix/vignettes/myVignette.sty0000644000176200001440000000666512070321331016427 0ustar liggesusers\RequirePackage{hyperref} \RequirePackage{url} \RequirePackage{amsmath} \RequirePackage{bm}%-> \bm (= bold math) \newcommand{\Slang}{\textsf{S} language} \newcommand{\RR}{\textsf{R}} \newcommand{\email}[1]{\href{mailto:#1}{\normalfont\texttt{#1}}} %- R programming markup \newcommand\code{\bgroup\@codex} \def\@codex#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup} \let\env=\code \let\command=\code \newcommand*{\Rfun}[1]{\code{#1()}\index{\RR~function #1}} \newcommand*{\class}[1]{\code{#1}\index{class #1}}% \newcommand*{\pkg}[1]{\code{#1}\index{\RR~package #1}} % \newcommand{\kbd}[1]{{\normalfont\texttt{#1}}} \newcommand{\key}[1]{{\normalfont\texttt{\uppercase{#1}}}} \newcommand\samp{`\bgroup\@noligs\@sampx} \def\@sampx#1{{\normalfont\texttt{#1}}\egroup'} \let\option=\samp \newcommand{\var}[1]{{\normalfont\textsl{#1}}} \newcommand{\file}[1]{{`\normalfont\textsf{#1}'}} \newcommand{\dfn}[1]{{\normalfont\textsl{#1}}} \newcommand{\acronym}[1]{{\normalfont\textsc{\lowercase{#1}}}} \newcommand{\strong}[1]{{\normalfont\fontseries{b}\selectfont #1}} \let\pkg=\strong % \RequirePackage{alltt} \newenvironment{example}{\begin{alltt}}{\end{alltt}} \newenvironment{smallexample}{\begin{alltt}\small}{\end{alltt}} \newenvironment{display}{\list{}{}\item\relax}{\endlist} \newenvironment{smallverbatim}{\small\verbatim}{\endverbatim} % This is already in ``Sweave'' -- but withOUT the fontsize=\small part !! %% \RequirePackage{fancyvrb} %% \DefineVerbatimEnvironment{Sinput}{Verbatim}{fontsize=\small,fontshape=sl} %% \DefineVerbatimEnvironment{Soutput}{Verbatim}{fontsize=\small} %% \DefineVerbatimEnvironment{Scode}{Verbatim}{fontsize=\small,fontshape=sl} % \newcommand{\FIXME}[1]{\marginpar{ \dots FIXME \emph{#1} \dots}} \newcommand{\TODO}[1]{\par\noindent\textsc{Todo:} \textit{#1}\par} % %% Matrix stuff : % \newcommand{\trans}{\ensuremath{^\mathsf{T}}} \newcommand{\bA}{\ensuremath{\bm{A}}} \newcommand{\bD}{\ensuremath{\bm{D}}} \newcommand{\bDelta}{\ensuremath{\bm{\Delta}}} \newcommand{\bI}{\ensuremath{\bm{I}}} \newcommand{\bL}{\ensuremath{\bm{L}}} \newcommand{\LXXi}[1]{\ensuremath{\bL_{\mathit{XX}({#1})}}} \newcommand{\LXX}{\ensuremath{\bL_\mathit{XX}}} \newcommand{\LXZi}[1]{\ensuremath{\bL_{\mathit{XZ}({#1})}}} \newcommand{\LXZ}{\ensuremath{\bL_\mathit{XZ}}} \newcommand{\LZZi}[1]{\ensuremath{\bL_{\mathit{ZZ}({#1})}}} \newcommand{\LZZ}{\ensuremath{\bL_\mathit{ZZ}}} \newcommand{\LZZoo}{\ensuremath{\bL_{\mathit{ZZ}11}}} \newcommand{\LZZot}{\ensuremath{\bL_{\mathit{ZZ}12}}} \newcommand{\LZZtt}{\ensuremath{\bL_{\mathit{ZZ}22}}} \newcommand{\bOmega}{\ensuremath{\bm{\Omega}}} \newcommand{\bPhi}{\ensuremath{\bm{\Phi}}} \newcommand{\bR}{\ensuremath{\bm{R}}} \newcommand{\bX}{\ensuremath{\bm{X}}} \newcommand{\bZ}{\ensuremath{\bm{Z}}} \newcommand{\bbeta}{\ensuremath{\bm{\beta}}} \newcommand{\bb}{\ensuremath{\bm{b}}} \newcommand{\beps}{\ensuremath{\bm{\epsilon}}} \newcommand{\dX}{\ensuremath{\bm{d}_{\mathit{X}}}} \newcommand{\dZ}{\ensuremath{\bm{d}_{\mathit{Z}}}} \newcommand{\dy}{\ensuremath{d_{\mathit{y}}}} \newcommand{\lyXi}[1]{\ensuremath{\bm{\ell}_{\mathit{yX}(#1)}}} \newcommand{\lyX}{\ensuremath{\bm{\ell}_\mathit{yX}}} \newcommand{\lyZi}[1]{\ensuremath{\bm{\ell}_{\mathit{yZ}(#1)}}} \newcommand{\lyZ}{\ensuremath{\bm{\ell}_\mathit{yZ}}} \newcommand{\lyyi}[1]{\ensuremath{\bm{\ell}_{\mathit{yy}(#1)}}} \newcommand{\lyy}{\ensuremath{\ell_\mathit{yy}}} \newcommand{\btheta}{\ensuremath{\bm{\theta}}} \newcommand{\by}{\ensuremath{\bm{y}}} \newcommand{\bzer}{\ensuremath{\bm{0}}} Matrix/vignettes/Introduction.Rnw0000644000176200001440000001753412070262574016716 0ustar liggesusers\documentclass{article} \usepackage{myVignette} \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} %%\VignetteIndexEntry{Introduction to the Matrix Package} %%\VignetteDepends{Matrix} \SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=true,keep.source=TRUE} \title{Introduction to the Matrix package --- as of Feb.~2005\footnote{ There's an unfinished ``2nd Introduction to the Matrix package'' which contains partly newer information, but is not at all self-contained. Eventually that will replace this one.}} \author{Douglas Bates\\R Core Development Group\\\email{bates@r-project.org}} \date{\today} \begin{document} \maketitle \begin{abstract} Linear algebra is at the core of many areas of statistical computing and from its inception the \Slang{} has supported numerical linear algebra via a matrix data type and several functions and operators, such as \code{\%*\%}, \code{qr}, \code{chol}, and \code{solve}. However, these data types and functions do not provide direct access to all of the facilities for efficient manipulation of dense matrices, as provided by the Lapack subroutines, and they do not provide for manipulation of sparse matrices. The \code{Matrix} package provides a set of S4 classes for dense and sparse matrices that extend the basic matrix data type. Methods for a wide variety of functions and operators applied to objects from these classes provide efficient access to BLAS (Basic Linear Algebra Subroutines), Lapack (dense matrix), TAUCS (sparse matrix) and UMFPACK (sparse matrix) routines. One notable characteristic of the package is that whenever a matrix is factored, the factorization is stored as part of the original matrix so that further operations on the matrix can reuse this factorization. \end{abstract} <>= options(width=75) @ \section{Introduction} \label{sec:Intro} Linear algebra is at the core of many statistical computing techniques and, from its inception, the \Slang{} has supported numerical linear algebra via a matrix data type and several functions and operators, such as \code{\%*\%}, \code{qr}, \code{chol}, and \code{solve}. Initially the numerical linear algebra functions in \RR{} called underlying Fortran routines from the Linpack~\citep{Linpack} and Eispack~\cite{Eispack} libraries but over the years most of these functions have been switched to use routines from the Lapack~\cite{Lapack} library. Furthermore, \RR{} can be configured to use accelerated BLAS (Basic Linear Algebra Subroutines), such as those from the Atlas~\cite{Atlas} project or Goto's BLAS~\cite{GotosBLAS}. Lapack provides routines for operating on several special forms of matrices, such as triangular matrices and symmetric matrices. Furthermore,matrix decompositions like the QR decompositions produce multiple output components that should be regarded as parts of a single object. There is some support in R for operations on special forms of matrices (e.g. the \code{backsolve}, \code{forwardsolve} and \code{chol2inv} functions) and for special structures (e.g. a QR structure is implicitly defined as a list by the \code{qr}, \code{qr.qy}, \code{qr.qty}, and related functions) but it is not as fully developed as it could be. Also there is no direct support for sparse matrices in R although \citet{koen:ng:2003} have developed a contributed package for sparse matrices based on SparseKit. The \code{Matrix} package provides S4 classes and methods for dense and sparse matrices. The methods for dense matrices use Lapack and BLAS. The sparse matrix methods use TAUCS~\citep{Taucs}, UMFPACK~\citep{Umfpack}, and Metis~\citep{Metis}. \section{Classes for dense matrices} \label{sec:DenseClasses} The \code{Matrix} package will provide classes for real (stored as double precision) and complex (stored as double precision complex) dense matrices. At present only the real classes have been implemented. These classes are \begin{description} \item[dgeMatrix] Real matrices in general storage mode \item[dsyMatrix] Symmetric real matrices in non-packed storage \item[dspMatrix] Symmetric real matrices in packed storage (one triangle only) \item[dtrMatrix] Triangular real matrices in non-packed storage \item[dtpMatrix] Triangular real matrices in packed storage (triangle only) \item[dpoMatrix] Positive semi-definite symmetric real matrices in non-packed storage \item[dppMatrix] \ \ ditto \ \ in packed storage \end{description} Methods for these classes include coercion between these classes, when appropriate, and coercion to the \code{matrix} class; methods for matrix multiplication (\code{\%*\%}); cross products (\code{crossprod}), matrix norm (\code{norm}); reciprocal condition number (\code{rcond}); LU factorization (\code{lu}) or, for the \code{poMatrix} class, the Cholesky decomposition (\code{chol}); and solutions of linear systems of equations (\code{solve}). Further, group methods have been defined for the \code{Arith} (basic arithmetic, including with scalar numbers) and the \code{Math} (basic mathematical functions) group.. Whenever a factorization or a decomposition is calculated it is preserved as a (list) element in the \code{factors} slot of the original object. In this way a sequence of operations, such as determining the condition number of a matrix then solving a linear system based on the matrix, do not require multiple factorizations of the same matrix nor do they require the user to store the intermediate results. \section{Classes for sparse matrices} \label{sec:SparseClasses} \subsection{Representations of sparse matrices} \label{ssec:SparseReps} Conceptually, the simplest representation of a sparse matrix is as a triplet of an integer vector \code{i} giving the row numbers, an integer vector \code{j} giving the column numbers, and a numeric vector \code{x} giving the non-zero values in the matrix. An S4 class definition might be \begin{Schunk} \begin{Sinput} setClass("dgTMatrix", representation(i = "integer", j = "integer", x = "numeric", Dim = "integer")) \end{Sinput} \end{Schunk} The triplet representation is row-oriented if elements in the same row were adjacent and column-oriented if elements in the same column were adjacent. The compressed sparse row (csr) (or compressed sparse column - csc) representation is similar to row-oriented triplet (column-oriented triplet) except that \code{i} (\code{j}) just stores the index of the first element in the row (column). (There are a couple of other details but that is the gist of it.) These compressed representations remove the redundant row (column) indices and provide faster access to a given location in the matrix because you only need to check one row (column). The preferred representation of sparse matrices in the SparseM package is csr. Matlab uses csc. We hope that Octave will also use this representation. There are certain advantages to csc in systems like R and Matlab where dense matrices are stored in column-major order. For example, Sivan Toledo's TAUCS~\cite{Taucs} library and Tim Davis's UMFPACK~\cite{Umfpack} library are both based on csc and can both use level-3 BLAS in certain sparse matrix computations. The Matrix package provides the following classes for sparse matrices \begin{description} \item[dgTMatrix] general, numeric, sparse matrices in (a possibly redundant) triplet form. This can be a convenient form in which to construct sparse matrices. \item[dgCMatrix] general, numeric, sparse matrices in the (sorted) compressed sparse column format. \item[dsCMatrix] symmetric, real, sparse matrices in the (sorted) compressed sparse column format. Only the upper or the lower triangle is stored. Although there is provision for both forms, the lower triangle form works best with TAUCS. \item[dtCMatrix] triangular, real, sparse matrices in the (sorted) compressed sparse column format. \end{description} \bibliography{Matrix} \end{document} Matrix/vignettes/Comparisons.Rnw0000644000176200001440000002150212070262574016520 0ustar liggesusers\documentclass{article} \usepackage{myVignette} \usepackage[authoryear,round]{natbib} \bibliographystyle{plainnat} %%\VignetteIndexEntry{Comparisons of Least Squares calculation speeds} %%\VignetteDepends{Matrix} \begin{document} \SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=true,keep.source=TRUE} \setkeys{Gin}{width=\textwidth} \title{Comparing Least Squares Calculations} \author{Douglas Bates\\R Development Core Team\\\email{Douglas.Bates@R-project.org}} \date{\today} \maketitle \begin{abstract} Many statistics methods require one or more least squares problems to be solved. There are several ways to perform this calculation, using objects from the base R system and using objects in the classes defined in the \code{Matrix} package. We compare the speed of some of these methods on a very small example and on a example for which the model matrix is large and sparse. \end{abstract} <>= options(width=75) @ \section{Linear least squares calculations} \label{sec:LeastSquares} Many statistical techniques require least squares solutions \begin{equation} \label{eq:LeastSquares} \widehat{\bm{\beta}}= \arg\min_{\bm{\beta}}\left\|\bm{y}-\bX\bm{\beta}\right\|^2 \end{equation} where $\bX$ is an $n\times p$ model matrix ($p\leq n$), $\bm{y}$ is $n$-dimensional and $\bm{\beta}$ is $p$ dimensional. Most statistics texts state that the solution to (\ref{eq:LeastSquares}) is \begin{equation} \label{eq:XPX} \widehat{\bm{\beta}}=\left(\bX\trans\bX\right)^{-1}\bX\trans\bm{y} \end{equation} when $\bX$ has full column rank (i.e. the columns of $\bX$ are linearly independent) and all too frequently it is calculated in exactly this way. \subsection{A small example} \label{sec:smallLSQ} As an example, let's create a model matrix, \code{mm}, and corresponding response vector, \code{y}, for a simple linear regression model using the \code{Formaldehyde} data. <>= data(Formaldehyde) str(Formaldehyde) (m <- cbind(1, Formaldehyde$carb)) (yo <- Formaldehyde$optden) @ Using \code{t} to evaluate the transpose, \code{solve} to take an inverse, and the \code{\%*\%} operator for matrix multiplication, we can translate \ref{eq:XPX} into the \Slang{} as <>= solve(t(m) %*% m) %*% t(m) %*% yo @ On modern computers this calculation is performed so quickly that it cannot be timed accurately in \RR{} \footnote{From R version 2.2.0, \code{system.time()} has default argument \code{gcFirst = TRUE} which is assumed and relevant for all subsequent timings} <>= system.time(solve(t(m) %*% m) %*% t(m) %*% yo) @ and it provides essentially the same results as the standard \code{lm.fit} function that is called by \code{lm}. <>= dput(c(solve(t(m) %*% m) %*% t(m) %*% yo)) dput(unname(lm.fit(m, yo)$coefficients)) @ %$ \subsection{A large example} \label{sec:largeLSQ} For a large, ill-conditioned least squares problem, such as that described in \citet{koen:ng:2003}, the literal translation of (\ref{eq:XPX}) does not perform well. <>= library(Matrix) data(KNex, package = "Matrix") y <- KNex$y mm <- as(KNex$mm, "matrix") # full traditional matrix dim(mm) system.time(naive.sol <- solve(t(mm) %*% mm) %*% t(mm) %*% y) @ Because the calculation of a ``cross-product'' matrix, such as $\bX\trans\bX$ or $\bX\trans\bm{y}$, is a common operation in statistics, the \code{crossprod} function has been provided to do this efficiently. In the single argument form \code{crossprod(mm)} calculates $\bX\trans\bX$, taking advantage of the symmetry of the product. That is, instead of calculating the $712^2=506944$ elements of $\bX\trans\bX$ separately, it only calculates the $(712\cdot 713)/2=253828$ elements in the upper triangle and replicates them in the lower triangle. Furthermore, there is no need to calculate the inverse of a matrix explicitly when solving a linear system of equations. When the two argument form of the \code{solve} function is used the linear system \begin{equation} \label{eq:LSQsol} \left(\bX\trans\bX\right) \widehat{\bm{\beta}} = \bX\trans\by \end{equation} is solved directly. Combining these optimizations we obtain <>= system.time(cpod.sol <- solve(crossprod(mm), crossprod(mm,y))) all.equal(naive.sol, cpod.sol) @ On this computer (2.0 GHz Pentium-4, 1 GB Memory, Goto's BLAS, in Spring 2004) the crossprod form of the calculation is about four times as fast as the naive calculation. In fact, the entire crossprod solution is faster than simply calculating $\bX\trans\bX$ the naive way. <>= system.time(t(mm) %*% mm) @ Note that in newer versions of \RR{} and the BLAS library (as of summer 2007), \RR's \code{\%*\%} is able to detect the many zeros in \code{mm} and shortcut many operations, and is hence much faster for such a sparse matrix than \code{crossprod} which currently does not make use of such optimizations. This is not the case when \RR{} is linked against an optimized BLAS library such as GOTO or ATLAS. %% Also, for fully dense matrices, \code{crossprod()} indeed remains faster (by a factor of two, typically) independently of the BLAS library: <>= fm <- mm set.seed(11) fm[] <- rnorm(length(fm)) system.time(c1 <- t(fm) %*% fm) system.time(c2 <- crossprod(fm)) stopifnot(all.equal(c1, c2, tol = 1e-12)) @ % using stopifnot(.) to save output \subsection{Least squares calculations with Matrix classes} \label{sec:MatrixLSQ} The \code{crossprod} function applied to a single matrix takes advantage of symmetry when calculating the product but does not retain the information that the product is symmetric (and positive semidefinite). As a result the solution of (\ref{eq:LSQsol}) is performed using general linear system solver based on an LU decomposition when it would be faster, and more stable numerically, to use a Cholesky decomposition. The Cholesky decomposition could be used but it is rather awkward <>= system.time(ch <- chol(crossprod(mm))) system.time(chol.sol <- backsolve(ch, forwardsolve(ch, crossprod(mm, y), upper = TRUE, trans = TRUE))) stopifnot(all.equal(chol.sol, naive.sol)) @ The \code{Matrix} package uses the S4 class system \citep{R:Chambers:1998} to retain information on the structure of matrices from the intermediate calculations. A general matrix in dense storage, created by the \code{Matrix} function, has class \code{"dgeMatrix"} but its cross-product has class \code{"dpoMatrix"}. The \code{solve} methods for the \code{"dpoMatrix"} class use the Cholesky decomposition. <>= mm <- as(KNex$mm, "dgeMatrix") class(crossprod(mm)) system.time(Mat.sol <- solve(crossprod(mm), crossprod(mm, y))) stopifnot(all.equal(naive.sol, unname(as(Mat.sol,"matrix")))) @ Furthermore, any method that calculates a decomposition or factorization stores the resulting factorization with the original object so that it can be reused without recalculation. <>= xpx <- crossprod(mm) xpy <- crossprod(mm, y) system.time(solve(xpx, xpy)) system.time(solve(xpx, xpy)) # reusing factorization @ The model matrix \code{mm} is sparse; that is, most of the elements of \code{mm} are zero. The \code{Matrix} package incorporates special methods for sparse matrices, which produce the fastest results of all. <>= mm <- KNex$mm class(mm) system.time(sparse.sol <- solve(crossprod(mm), crossprod(mm, y))) stopifnot(all.equal(naive.sol, unname(as(sparse.sol, "matrix")))) @ As with other classes in the \code{Matrix} package, the \code{dsCMatrix} retains any factorization that has been calculated although, in this case, the decomposition is so fast that it is difficult to determine the difference in the solution times. <>= xpx <- crossprod(mm) xpy <- crossprod(mm, y) system.time(solve(xpx, xpy)) system.time(solve(xpx, xpy)) @ \subsection*{Session Info} <>= toLatex(sessionInfo()) @ <>= if(identical(1L, grep("linux", R.version[["os"]]))) { ##----- Linux - only ---- Sys.procinfo <- function(procfile) { l2 <- strsplit(readLines(procfile),"[ \t]*:[ \t]*") r <- sapply(l2[sapply(l2, length) == 2], function(c2)structure(c2[2], names= c2[1])) attr(r,"Name") <- procfile class(r) <- "simple.list" r } Scpu <- Sys.procinfo("/proc/cpuinfo") Smem <- Sys.procinfo("/proc/meminfo") } # Linux only @ <>= if(identical(1L, grep("linux", R.version[["os"]]))) { ## Linux - only --- Scpu <- sfsmisc::Sys.procinfo("/proc/cpuinfo") Smem <- sfsmisc::Sys.procinfo("/proc/meminfo") print(Scpu[c("model name", "cpu MHz", "cache size", "bogomips")]) print(Smem[c("MemTotal", "SwapTotal")]) } @ <>= if(identical(1L, grep("linux", R.version[["os"]]))) { ## Linux - only --- print(Scpu[c("model name", "cpu MHz", "cache size", "bogomips")]) print(Smem[c("MemTotal", "SwapTotal")]) } @ \bibliography{Matrix} \end{document} Matrix/vignettes/Matrix.bib0000644000176200001440000003410412764547531015470 0ustar liggesusers@BOOK{R:Venables+Ripley:2000, AUTHOR = {William N. Venables and Brian D. Ripley}, TITLE = {S Programming}, PUBLISHER = {Springer}, YEAR = 2000, NOTE = {ISBN 0-387-98966-8}, URL = {http://www.stats.ox.ac.uk/pub/MASS3/Sprog/}, ABSTRACT = {This provides an in-depth guide to writing software in the S language which forms the basis of both the commercial S-PLUS and the Open Source R data analysis software systems.} } @BOOK{R:Chambers+Hastie:1992, AUTHOR = {John M. Chambers and Trevor J. Hastie}, TITLE = {Statistical Models in {S}}, PUBLISHER = {Chapman \& Hall}, YEAR = 1992, ADDRESS = {London}, ISBN = {0-412-83040-X}, ABSTRACT = {This is also called the ``\emph{White Book}'', and introduced S version 3, which added structures to facilitate statistical modeling in S. } } @Article{Rnews:Gentleman+Carey:2002, author = {Robert Gentleman and Vincent Carey}, title = {Bioconductor}, journal = {R News}, year = 2002, volume = 2, number = 1, pages = {11--16}, month = {March}, url = {https://CRAN.R-project.org/doc/Rnews/} } @article{Ke:Wang:2001, author = {Ke, Chunlei and Wang, Yuedong}, title = {Semiparametric nonlinear mixed-effects models and their applications}, year = {2001}, journal = {Journal of the American Statistical Association}, volume = {96}, number = {456}, pages = {1272--1298}, keywords = {NONLINEAR MIXED EFFECTS MODEL; Penalized likelihood; Repeated measures; SELF-MODELING NONLINEAR REGRESSION; Smoothing spline} } @Article{Lind:Bate:1988, author = {Lindstrom, Mary J. and Bates, Douglas M.}, title = {Newton-{R}aphson and {EM} algorithms for linear mixed-effects models for repeated-measures data ({C}orr: 94{V}89 p1572)}, year = {1988}, journal = {Journal of the American Statistical Association}, volume = {83}, pages = {1014--1022}, keywords = {Growth curve; Longitudinal data} } @ARTICLE{Atlas, AUTHOR = "R. Clint Whaley and Antoine Petitet and Jack J. Dongarra", TITLE = "Automated Empirical Optimization of Software and the {ATLAS} Project", JOURNAL = "Parallel Computing", VOLUME = "27", NUMBER = "1--2", PAGES = "3--35", YEAR = 2001, NOTE = "Also available as University of Tennessee LAPACK Working Note \#147, UT-CS-00-448, 2000 ({\tt www.netlib.org/lapack/lawns/lawn147.ps})" } @TechReport{GotosBLAS, author = {Kazushige Goto and Robert van de Geijn}, title = {On Reducing TLB Misses in Matrix Multiplication}, institution = {Department of Computer Sciences, U. of Texas at Austin}, year = 2002, number = {TR02-55} } @Misc{Taucs, author = {Sivan Toledo}, title = {Taucs: A Library of Sparse Linear Solvers}, howpublished = {http://www.tau.ac.il/~stoledo/taucs/}, year = 2003 } @Misc{Umfpack, author = {Tim Davis}, title = {UMFPACK: Unified Multifrontal Package}, howpublished = {http://www.cise.ufl.edu/research/sparse/umfpack}, year = 2003 } @misc{Cholmod, author = {Tim Davis}, title = {{CHOLMOD}: sparse supernodal {Cholesky} factorization and update/downdate}, howpublished = {http://www.cise.ufl.edu/research/sparse/cholmod}, year = 2005 } @Misc{CSparse, author = {Tim Davis}, title = {{CSparse}: a concise sparse matrix package}, howpublished = {http://www.cise.ufl.edu/research/sparse/CSparse}, year = 2005 } @Book{davis06:csparse_book, author = {Timothy A. Davis }, title = {Direct Methods for Sparse Linear Systems}, publisher = {SIAM}, year = 2006, series = {Fundamentals of Algorithms} } @Misc{Metis, author = {George Karapis}, title = {Metis: Family of Multilevel Partioning Algorithms}, howpublished = {http://www-users.cs.umn.edu/~karypis/metis/}, year = 2003 } @Book{Linpack, author = {Jack Dongarra and Cleve Moler and Bunch and G.W. Stewart}, title = {Linpack Users' Guide}, publisher = {SIAM}, year = 1979 } @Book{Lapack, author = {E. Anderson and Z. Bai and C. Bischof and S. Blackford and J. Demmel and J. Dongarra and J. Du Croz and A. Greenbaum and S. Hammarling and A. McKenney and D. Sorensen}, title = {LAPACK Users' Guide}, chapter = {}, publisher = {SIAM}, year = 1999, address = {Philadelphia, PA}, edition = {3rd} } @Book{bryk00:_hlm, author = {A. S. Bryk and S. W. Raudenbush and R. Congdon}, title = {{HLM} version 5}, publisher = {Scientific Software International, Inc.}, year = 2000, address = {Chicago} } @Article{demp:lair:rubi:1977, Journal = JRSSB, Volume = 39, Pages = {1--22}, Keywords = {Posterior mode}, Author = {A. P. Dempster and N. M. Laird and D. B. Rubin}, Title = {Maximum Likelihood From Incomplete Data Via the {EM} Algorithm}, Year = 1977 } @Book{denn:schn:1983, author = {J. E. Dennis and R. B. Schnabel}, title = {Numerical Methods for Unconstrained Optimization and Nonlinear Equations}, publisher = {Prentice-Hall}, year = 1983, address = {Englewood Cliffs, NJ} } @Book{dong:bunc:mole:stew:1979, publisher = "SIAM", address = "Philadelphia", author = "J. J. Dongarra and J. R. Bunch and C. B. Moler and G. W. Stewart", title = "Linpack Users' Guide", year = 1979 } @Book{goldstein98:_mlwin, author = {H. Goldstein and J. Rasbash and I. Plewis and D. Draper and W. Browne and M. Wang}, title = {A user's guide to {MLwiN}}, publisher = {University of London, Institute of Education}, year = 1998, address = {London} } @Book{golu:vanl:1996, author = {Golub, Gene H. and van Loan, Charles F.}, title = {Matrix Computations}, publisher = {Johns Hopkins}, year = 1996, edition = {3rd} } @Article{ harv:1974, author = {Harville, David A.}, title = {Bayesian Inference for Variance Components Using Only Error Contrasts}, journal = {Biometrika}, year = 1974, volume = 61, pages = {383--385}, keywords = {Maximum likelihood} } @Article{ lair:ware:1982, author = {Laird, Nan M. and Ware, James H.}, title = {Random-effects Models for Longitudinal Data}, journal = {Biometrics}, year = 1982, volume = 38, pages = {963--974}, keywords = {Variance components; Repeated measurements; Empirical Bayes; EM algorithm} } @Book{lapack:1992, publisher = "SIAM", address = "Philadelphia", author = "E. Anderson and Z. Bai and C. Bischof and J. Demmel and J. Dongarra and J. Du Croz and A. Greenbaum and S. Hammaring and A. McKenney and S. Ostrouchov and D. Sorensen", title = "Lapack Users' Guide", year = 1992 } @Article{liu:rubi:1994, author = {Liu, Chuanhai and Rubin, Donald B.}, title = {The {ECME} algorithm: {A} simple extension of {EM} and {ECM} with faster monotone convergence}, year = {1994}, journal = {Biometrika}, volume = {81}, pages = {633--648}, keywords = {Markov chain monte carlo; Incomplete data} } @article{patt:thom:1971, Author = {Patterson, H. D. and Thompson, R.}, Title = {Recovery of Interblock Information When Block Sizes Are Unequal}, Year = 1971, Journal = {Biometrika}, Volume = 58, Pages = {545--554}, Keywords = {Incomplete block design; Components of variance; Maximum likelihood; Design of experiments} } @phdthesis{pinh:1994, author = {Jos\'{e} C. Pinheiro}, title = {Topics in Mixed-Effects Models}, school = {University of Wisconsin}, year = 1994, address = {Madison, WI} } @Article{pinh:bate:1995, author = "Jos\'{e} C. Pinheiro and Douglas M. Bates", title = "Approximations to the Log-Likelihood Function in the Nonlinear Mixed-Effects Model", year = 1995, journal = "Journal of Computational and Graphical Statistics", volume = 4, number = 1, pages = "12--35" } @Article{ pinh:bate:1996, author = {Jos\'{e} C. Pinheiro and Douglas M. Bates}, title = {Unconstrained Parameterizations for Variance-Covariance Matrices}, journal = {Statistics and Computing}, year = 1996, volume = 6, pages = {289--296} } @Book{pinh:bate:2000, author = {Jos\'{e} C. Pinheiro and Douglas M. Bates}, title = {Mixed-Effects Models in {S} and {S-PLUS}}, year = 2000, pages = {528}, ISBN = {0-387-98957-9}, publisher = {Springer} } @Article{schn:koon:1985, Journal = {ACM Trans. Math. Software}, Volume = 11, Pages = {419--440}, Author = {R. B. Schnabel and J. E. Koontz and B. E. Weiss}, Title = {A modular system of algorithms for unconstrained minimization}, Year = 1985 } @book{snijders99:_multil_analy, author = {Tom Snijders and Roel Bosker}, title = {Multilevel Analysis: An introduction to basic and advanced multilevel analysis}, publisher = {Sage}, year = 1999, address = {London} } @book{this:1988, Author = {Thisted, R. A.}, Title = {Elements of Statistical Computing}, Year = 1988, Publisher = {Chapman \& Hall}, address = {London} } @Article{van:2000, author = {van Dyk, David A.}, title = {Fitting mixed-effects models using efficient {EM}-type algorithms}, year = {2000}, journal = {Journal of Computational and Graphical Statistics}, volume = {9}, number = {1}, pages = {78--98}, keywords = {EM algorithm; ECME algorithm; Gaussian hierarchical models; Posterior inference; PXEM algorithm; random-effects models; Reml; variance-component models; working parameters} } @misc{jfox:2002, author = {Fox, John}, title = {Linear Mixed Models -- Appendix to {An R and S-PLUS Companion to Applied Regression}}, year = 2002, month= {May}, url = {http://www.socsci.mcmaster.ca/jfox/Books/companion/appendix-mixed-models.pdf} } @book{roge:1980, Author = {Rogers, Gerald S.}, Title = {Matrix Derivatives}, Year = 1980, Publisher = {Marcell Dekker, Inc.}, address = {New York and Basel} } @TechReport{DebRoy:Bates:2003a, author = {Saikat DebRoy and Douglas M. Bates}, title = {Computational Methods for Single Level Linear Mixed-effects Models}, institution = {Department of Statistics, University of Wisconsin-Madison}, number = {1073}, year = 2003 } @TechReport{DebRoy:Bates:2003b, author = {Saikat DebRoy and Douglas M. Bates}, title = {Computational Methods for Multiple Level Linear Mixed-effects Models}, institution = {Department of Statistics, University of Wisconsin-Madison}, number = {1076}, year = 2003 } @Article{RaudenbushYangYosef:2000, author = {Stephen W. Raudenbush and Meng-Li Yang and Matheos Yosef}, title = {Maximum Likelihood for Generalized Linear Models With Nested Random Effects via High-Order, Multivariate {L}aplace Approximation}, journal = {J. Comput. Graph. Statist.}, year = 2000, volume = 9, number = 1, pages = {141--157} } @Book{goldstein87:_multil, author = {Goldstein, Harvey}, title = {Multilevel models in education and social research}, publisher = {Oxford University Press}, year = 1987 } @Book{raudenbush02:_hierar_linear_model, author = {Stephen W. Raudenbush and Anthony S. Bryk}, title = {Hierarchical Linear Models: Applications and Data Analysis Methods}, publisher = {Sage}, year = 2002, edition = {second}, ISBN = {0-7619-1904-X} } @BOOK{R:Chambers:1998, AUTHOR = {John M. Chambers}, TITLE = {Programming with Data}, PUBLISHER = {Springer}, YEAR = 1998, ADDRESS = {New York}, ISBN = {0-387-98503-4}, ABSTRACT = {This ``\emph{Green Book}'' describes version 4 of S, a major revision of S designed by John Chambers to improve its usefulness at every stage of the programming process.} } @article{Rodriguez:Goldman:1995, author = {Germ\'an Rodriguez and Noreen Goldman}, title = {An assessment of estimation procedures for multilevel models with binary responses}, year = {1995}, journal = {Journal of the Royal Statistical Society, Series A, General}, volume = {158}, pages = {73--89}, keywords = {Logistic regression; Random effects model; Software; Variance component} } @Article{koen:ng:2003, author = {Roger Koenker and Pin Ng}, title = {{SparseM}: A Sparse Matrix Package for {R}}, journal = {J. of Statistical Software}, year = 2003, volume = 8, number = 6 } @Book{Eispack, author = {Smith, B. T. and Boyle, J. M. and Dongarra, J. J. and Garbow, B. S. and Ikebe, Y. and Klema, V. C. and Moler, C. B.}, title = {Matrix Eigensystem Routines. EISPACK Guide}, publisher = {Springer-Verlag}, year = 1976, volume = 6, series = {Lecture Notes in Computer Science}, address = {New York} } @Article{bate:debr:2004, author = {Douglas M. Bates and Saikat DebRoy}, title = {Linear Mixed Models and Penalized Least Squares}, journal = {J. of Multivariate Analysis}, year = 2004, note = {to appear} } @Article{Rnews:Lockwood+Doran+Mccaffrey:2003, author = {J.R. Lockwood and Harold Doran and Daniel F. McCaffrey}, title = {Using R for Estimating Longitudinal Student Achievement Models}, journal = {R News}, year = 2003, volume = 3, number = 3, pages = {17--23}, month = {December}, url = {https://CRAN.R-project.org/doc/Rnews/} } @Article{Paterson:1991, author = {L. Paterson}, title = {Socio economic status and educational attainment: a multidimensional and multilevel study}, journal = {Evaluation and Research in Education}, year = 1991, volume = 5, pages = {97--121} } Matrix/MD50000644000176200001440000006477413203335572012053 0ustar liggesusers675a3a48a357cb2ee05ed285387b3e85 *ChangeLog a78ed29f884a5b879dc9f217b68749a3 *DESCRIPTION 49c7113b5e0e4fbf269132f6a5ff5b06 *LICENCE 61d776025f0fda2d49c237532b4af1a6 *NAMESPACE 4b2ad901cf4b42fae0830a393ab0fdd7 *R/AllClass.R b8ddeb8ff877f40a12519c3e965debb2 *R/AllGeneric.R 7395d3bd3f8cbb924beb8c5b3ee9a3f0 *R/Auxiliaries.R e184b3cf64c092b6ed0a0d22eb332a44 *R/CHMfactor.R 4c1f0e33719c2a4292c556bdf487a0ea *R/Csparse.R 75db2aef5533eb1cff06e859feccc81c *R/HBMM.R 3f37d43942f54523314df6f5406cf488 *R/Hilbert.R 4d794b4715d6efa432fd7cf86f69da7a *R/KhatriRao.R 7cd5d5938844fa73c1a2b50fae7fdd19 *R/LU.R 639a65f83a4dccc663aad5299708071b *R/Math.R 1cf818a7b09f949c4bec546ae34d6035 *R/Matrix.R e19ed36934229e22f41552d4d40c5d5a *R/MatrixFactorization.R 8518faa31b3f81f45c0e4e3e03de379e *R/Ops.R a738e970d3c972b9ce5bc9492024a724 *R/Rsparse.R 6433ca318f74c40760e68b1d56466d09 *R/SparseM-conv.R a10feefbb64a28605326520754ba07a5 *R/Summary.R 2681094a29a0b022994b0bf363a4ba14 *R/Tsparse.R e0e755ece77810961adf04e91b70230d *R/abIndex.R d0cc7cb316bdb3f8a19c1f1ae5b642eb *R/bandSparse.R cb1df1dc24384491e201dfa61ed761eb *R/bind2.R 36fc495f5f428bc1855952343790bfa3 *R/colSums.R 73f70ce30c4eb94c71d69d824173f8e3 *R/condest.R 9107b79ca2f8d9d0692f2a11614def29 *R/corMatrix.R 30d3814cd0c8e0bb65e32a8afcf266e7 *R/dMatrix.R 8f877c1d8d4f15b6e226505bf3922fce *R/ddenseMatrix.R 8779d27a6383083443ed2f1c6f6bff1f *R/denseMatrix.R 1e4701a2f806db46dacff8049266ef70 *R/dgCMatrix.R 1fc4711d16cafbba316edf09edace251 *R/dgTMatrix.R 4a19560632a9bab7a208659535578cc9 *R/dgeMatrix.R a8a00afd1395265152bc973092637649 *R/diagMatrix.R be76b734bbed865c5a76f90ecd874448 *R/dpoMatrix.R 8820816c1ba5b2b9cc958829d9b8a439 *R/dppMatrix.R 61c894c719a681323d62763230b5c6bc *R/dsCMatrix.R 09de435f59f2647d1df19343018f2944 *R/dsTMatrix.R 7d70e1915a11838d4b769182208b778b *R/dspMatrix.R 030bf1a324d474d915ad44d4092d5b37 *R/dsparseMatrix.R 4abd4fd974b5ec66d32361e0cd4637ce *R/dsyMatrix.R 4aaf86a84055641df27335f5f84df345 *R/dtCMatrix.R e826da941555bb348d828af69c77b7dc *R/dtTMatrix.R 019575cc5f9a75d8a2196b6018f48d32 *R/dtpMatrix.R 4cc6181517f3cef3721b56ff91454aa0 *R/dtrMatrix.R cac2aed2748ce92e00d6a59c1120619d *R/eigen.R 333accc94fd2c5ba991ce2473e4cd510 *R/expm.R 81c04317005ed6237b4686d3c033a9d5 *R/indMatrix.R 0a95fa59e5d79a0c7a161a21e3b952d4 *R/kronecker.R 1ad204c1bc7f81b847db8f99f5f3a332 *R/lMatrix.R 2cc411a9418590cc3d864f172d49dad3 *R/ldenseMatrix.R b20a87bf779fb61474a2dc3e39db7893 *R/lgCMatrix.R 6ee5d8250439cac40030ec3a6b5f2b72 *R/lgTMatrix.R 32f129fb9fec2b6de53b2e4d6bbab656 *R/lsCMatrix.R 599da5bf12a53c62027b1a71dddc3a56 *R/lsTMatrix.R acf5c490e61aaebc2321862f4a3b6078 *R/lsparseMatrix.R ba75b509b85c63732e38f2521e9766a1 *R/ltCMatrix.R 47012791a775a04b711b374e846d4637 *R/ltTMatrix.R 5e16ca4b45953dc6397f7c2c092f9078 *R/ndenseMatrix.R 349409010ac0683a7672aaab6940b7f6 *R/nearPD.R 0e2392a9363bade395c7bded4e1b78a5 *R/ngCMatrix.R fcb45493f9bf912c437e6bd8469d4628 *R/ngTMatrix.R d5e42272817bc3082d5860d296abba02 *R/nnzero.R a7d4c2f2e58bf7b10dda13211a67190a *R/not.R 4264a9bacf136df9609ac07a9aa269b2 *R/nsCMatrix.R 1d83aff8b65c3776a8bcbfddff2e8109 *R/nsTMatrix.R ef9e369349fd33729f55a96c2b5713b2 *R/nsparseMatrix.R e9884d53a29d2fe1fee43846826c7755 *R/ntCMatrix.R f12c8b3ac756a91e8c0dfdf270a38b98 *R/ntTMatrix.R 0514b0a4895312a1820692af6df7f8ed *R/pMatrix.R da7fc80f7bba428f0f57b21d8741c076 *R/products.R 7b34b419cf63f6a20f19d39679e5d74b *R/rankMatrix.R b9adc6ff21b76196ce593efd311a945d *R/spModels.R e6d0e907b140f28fb72af6d5d72d1ed1 *R/sparseMatrix.R e18984cb9d9a049338aaf9f403c80dd1 *R/sparseQR.R 16e2334805293e62badc4195216e84bf *R/sparseVector.R 97e508e9e124aac0fb3dc3d046de347f *R/symmetricMatrix.R a3265f0761ef916f610e9849c6677600 *R/triangularMatrix.R c36d45820e6827dfb2168a17ce93f92e *R/zzz.R 9368bc014392d3023e34c2f61f710be3 *TODO 1a2033359f492f8efdef0f4e24d3fd96 *build/vignette.rds f2ad5375e270deeb7b041272dd095032 *cleanup d3528bc0cd82f248821809f253bffe35 *data/CAex.R 7586556183d8d0a3c7979702254f93c1 *data/KNex.R 10b959df8869ec28b992f2ff6dad2991 *data/USCounties.R 8734f0b040c6292983d273d4251d250a *inst/Copyrights ac3697580885d17a062ce39df01338ad *inst/Doxyfile c668e7ad9626695a6094e822ee4cbe69 *inst/NEWS.Rd ea747a35318c564002a7144ebd510e28 *inst/doc/Announce.txt 0eeea40a3fb6da7157d2862bba10713a *inst/doc/Comparisons.R 09e13507b9832a30aa92e8aff0dc96a0 *inst/doc/Comparisons.Rnw 781b2a000917677b0a543de64e439462 *inst/doc/Comparisons.pdf 3fb9bf234f272d784fde95ee66b75f71 *inst/doc/Design-issues.R 7bf6c80a144d27b6baece257c69bd800 *inst/doc/Design-issues.Rnw 9a1d3187967f306b01ead39171eb7274 *inst/doc/Design-issues.pdf 6f66bd95aab28d7bf06a019e7fbc14b5 *inst/doc/Intro2Matrix.R a6d6903590a8f5ac036fdeb74b48bb89 *inst/doc/Intro2Matrix.Rnw 7f131ce15d5f992f0512c9d07c7b9ed2 *inst/doc/Intro2Matrix.pdf 188b839523ce6ec32e1f00ec4e2bc18e *inst/doc/Introduction.R c39a26dfe7ccaafd044e88468155b153 *inst/doc/Introduction.Rnw c358d4e58545ecefa889e8734562fc6a *inst/doc/Introduction.pdf 7d60c8defc517d361513bac03d04f13b *inst/doc/SuiteSparse/AMD.txt e4f8cd28fc8be8ab14106630610b9c5f *inst/doc/SuiteSparse/CHOLMOD.txt 0a80fb0db9cefb02e290ffd2f3431e6c *inst/doc/SuiteSparse/COLAMD.txt d75882d4bb768ba0ea352291652daaee *inst/doc/SuiteSparse/SPQR.txt 29429afaf74eaac98cb1957ddd4e8a38 *inst/doc/SuiteSparse/SuiteSparse_config.txt 6d217288f5da4fe419afaa34988bf42d *inst/doc/SuiteSparse/UserGuides.txt 2ab394c4daa5c94c2498ba3fa0578462 *inst/doc/sparseModels.R 491d961ca64f8da569c817b82daa9c58 *inst/doc/sparseModels.Rnw 18bf8813ebf611bddbf0139cf5b16208 *inst/doc/sparseModels.pdf dcd11f6947f910f743254824e930b2c7 *inst/external/CAex_slots.rda be886d6bb832210bb654b9ad064fe0ff *inst/external/KNex_slots.rda 90f019ec81e67d7f3542f7ca39bf3f2d *inst/external/USCounties_slots.rda 47bc35200e7b3fc1cdd6ab1adbeef3a0 *inst/external/lund_a.mtx fc72dd2599982f25f9ffbfc75f149134 *inst/external/lund_a.rsa a5748e10322306f8c2114db09cd58dd8 *inst/external/pores_1.mtx 8758e19cf3478732e62e563b638bcda7 *inst/external/symA.rda 7980f700b4fd62d0d6de7f96201b2645 *inst/external/symW.rda 7e22a368a5d129fc7396432949fb72ab *inst/external/test3comp.rda 697db4242eb44425ce2550fafdc957a8 *inst/external/utm300.rua 5ce5ea63a73e4641173fe37b6a809a01 *inst/external/wrong.mtx 2bc93fdcb676c2c69df013fa23cf32de *inst/include/Matrix.h d67a3a0fc0a39419ebf6b7902e944dca *inst/include/Matrix_stubs.c a42f11b6572cd4e01e271d14cf658059 *inst/include/cholmod.h 296ba6645a754f762413ed54df0f9929 *inst/po/de/LC_MESSAGES/Matrix.mo f3467b0d27cfd80f09ee0c0fc47e6055 *inst/po/de/LC_MESSAGES/R-Matrix.mo cf0270ba625ad82ce4b76afbf402f961 *inst/po/en@quot/LC_MESSAGES/Matrix.mo 685077253f562c953283cae3e41c4f31 *inst/po/en@quot/LC_MESSAGES/R-Matrix.mo 84c5683bd2e8cb4aeedd1a6b9ecf88f2 *inst/po/fr/LC_MESSAGES/Matrix.mo 2a2c8abe50f5bba4065dde7bff6053d5 *inst/po/fr/LC_MESSAGES/R-Matrix.mo fa9d5fe07da83b14da5a6e07e640ad67 *inst/po/ko/LC_MESSAGES/R-Matrix.mo 8f85da68c0b18926409e8bc046b7fa14 *inst/po/pl/LC_MESSAGES/Matrix.mo 0616a7bda008139f1e5ba2f6d4866fe1 *inst/po/pl/LC_MESSAGES/R-Matrix.mo b1ed561e2c3172d0d6c82159004fcbe2 *inst/test-tools-1.R 9058fc5e4ffde0cb2066517ce4e050b5 *inst/test-tools-Matrix.R 384ad19fd9e35dfa867ff36dc6d502f4 *inst/test-tools.R 008b2c14ce99ff19c7c5fa9e8c8736b1 *man/BunchKaufman-methods.Rd a84142e187e2a8d79be122f60b91395e *man/CAex.Rd 5b10b3332f494d1fc81c004541234d8b *man/CHMfactor-class.Rd f39cd7f9daaa240217e1d6ce0f810b47 *man/Cholesky-class.Rd fae327cdc0842311ae1a481ad0c4764c *man/Cholesky.Rd 4ef1b053e942af5a8a2289f4e252d323 *man/CsparseMatrix-class.Rd 1bc478f12324eb24562b8071ea7fca42 *man/Diagonal.Rd 74df4ccf77c8797a57520d36afe98a0f *man/Hilbert.Rd 2ad7cc5b8c267f23bf7012c5248f87a5 *man/KNex.Rd 7b81b5d90ede29d521819227497f26e7 *man/KhatriRao.Rd b79c16e807bb0dc031ddb41644d605f6 *man/LU-class.Rd e34bbb732812b338d5a263246bc89ca4 *man/Matrix-class.Rd 0241d3d91abca6086cb03e1292cb4432 *man/Matrix.Rd c50c7e06a955a5d2ecea071b7160b2bf *man/MatrixClass.Rd 34116420a7c90c8df288f9eba5233966 *man/MatrixFactorization-class.Rd 12d75917210de453f9572de25be75995 *man/RsparseMatrix-class.Rd 965323db9aa812ceff4c71d7b0881397 *man/Schur-class.Rd d15bfb87449f86c5cb9b65e77de821bb *man/Schur.Rd a1baef4f86b3e5c15a18d126b66e081f *man/SparseM-conv.Rd b946bf426edf45858278e6eaacb14f4a *man/Subassign-methods.Rd 93b66f4c5fe69d4122fc140510c684de *man/TsparseMatrix-class.Rd 61465055d850a039eac3853d4ad120b1 *man/USCounties.Rd 0502c8aba3321a819cd00dd1e553ab5d *man/Xtrct-methods.Rd e71bf7921ef9b0ad3485a162c2a4175b *man/abIndex-class.Rd 0611d202a92b93597a926a452ac5f525 *man/abIseq.Rd 6b4ec88403685427fea91824fecd33fc *man/all-methods.Rd 3468e037f94352ea8fe8803cde364d17 *man/all.equal-methods.Rd f4f8612666bf98866b98f1630a89f5f0 *man/atomicVector-class.Rd 1b1d5cbf19514d832542121fafb8a48e *man/band.Rd 797406a4ee19c95300e2b058889aceed *man/bandSparse.Rd 1bca03bfd79c2564a73bd846e63a2b4e *man/bdiag.Rd 908ebebcda1ea09c3f061fbe869ab333 *man/boolean-matprod.Rd 98c94a4099936ff8242120d2d16dfe41 *man/cBind.Rd 8c7312211f0224f12b21c3342de442c7 *man/chol.Rd 56c41276d74b7373b67fe98947b62834 *man/chol2inv-methods.Rd 8d7c220ad9a7fe5b76e28c945f9f7a79 *man/colSums.Rd 16c76be17728e8ade8678ab81a125899 *man/compMatrix-class.Rd bc004ec546340928a245be773286408d *man/condest.Rd 253bb6ac974d08c57d9da1fec62ea887 *man/dMatrix-class.Rd 67fcf5d02576b9c5a2d0b54237c0ec26 *man/ddenseMatrix-class.Rd fea7d6aa90395d29ab34ebe90603aec4 *man/ddiMatrix-class.Rd a45e58a48e996ba2ee632fb58122e6a9 *man/denseMatrix-class.Rd df0fb227fe85954a595a59d9900f2038 *man/dgCMatrix-class.Rd 33311e5379364ad7d6fa816ce187506d *man/dgRMatrix-class.Rd 041d945f08fb616237f7b522492cbe80 *man/dgTMatrix-class.Rd a83ca4c4fb76a85c66e3c21ba291efbc *man/dgeMatrix-class.Rd 546b1c5f8bab6de2265cd8817a8a92b5 *man/diagU2N.Rd 906021883f39ba3269248030cef1aea9 *man/diagonalMatrix-class.Rd cab5f0fa9bd7b9c584d9025ace66e4e6 *man/dpoMatrix-class.Rd fe1acb9ad779ffe89d0169baec96938c *man/drop0.Rd 2e193c409e5072667ff59aee82235321 *man/dsCMatrix-class.Rd e6232ded0c7b441674776381b8e25efa *man/dsRMatrix-class.Rd 5a84601e5f8ed336d3cc947e6703d271 *man/dsparseMatrix-class.Rd 1f52e18e5bc70601f1c49abb4ca5658e *man/dsyMatrix-class.Rd ac3f72f537dbfa72345d274fcde51e48 *man/dtCMatrix-class.Rd 9e88fe051b42ffdfc4fdc08361372a21 *man/dtRMatrix-class-def.Rd 3f894c8473e90abe89ca43c9d8cbe465 *man/dtpMatrix-class.Rd 22a99ac7381f2b826f73c3c76114bc1e *man/dtrMatrix-class.Rd 81ec856c53625af15c043370bf37b29e *man/expand.Rd 73864e9c2d507a2f5a3fdb04ac36705c *man/expm.Rd 16101bc3d19b286913e0273c0cdeade5 *man/externalFormats.Rd dd7dc20ed8afa4c6a0dd752270ff2617 *man/facmul.Rd 12fee6d998e1b954161ce53043fae6e2 *man/forceSymmetric.Rd c332f4d33b290c48d2b066d87b9ad588 *man/formatSparseM.Rd 10534177267141a74ee6f1403862bf3c *man/generalMatrix-class.Rd 62fde3213a1be9c3665f467b15d19883 *man/graph2T.Rd 04a3ade6a04ae335b5488259fa312ff0 *man/image-methods.Rd de19721cfc02ecc5e800f26f5c836be2 *man/indMatrix-class.Rd 0853b4b3c74400077c7e660d7ba11e97 *man/index-class.Rd 1bc58269199564d45feef99cf46ca01f *man/invPerm.Rd eeed15170e23c5a284c59332a97f76cc *man/is.na-methods.Rd 46efc2ba7204f7391229a157e0853997 *man/is.null.DN.Rd 70cb42ba2fbfebc7e94b82138da9a3f3 *man/isSymmetric-methods.Rd 578954786e644291a3912ad9d75b024b *man/isTriangular.Rd ed16ec064ca2ce017b1ac7b60f97ee3b *man/kronecker-methods.Rd 55098a59974d83541bf3d00f66760a7a *man/ldenseMatrix-class.Rd bec8838d4bd72f6a27d62383edc953b5 *man/ldiMatrix-class.Rd cc4f3ec710ac4aaa17e75e6ff265dafc *man/lgeMatrix-class.Rd 414ed370bf65f846147b5ddf4b04caff *man/lsparseMatrix-classes.Rd f1e1cfefe3650a6c19b1c63b7d6052dc *man/lsyMatrix-class.Rd fc78ae1f310100dc8dbe8cff430a2093 *man/ltrMatrix-class.Rd f5127ffbf702e88219a61c8385c53de2 *man/lu.Rd 4a897749bfc1ee9afd46bb58f8fa8c05 *man/matrix-products.Rd 4a449d40a733322c55cf7146d8ddb43e *man/nMatrix-class.Rd 3e94bd26a125e628e83c7b6d4d8a045c *man/ndenseMatrix-class.Rd 46dc1c9089fefb669bf1b8137edd2d12 *man/nearPD.Rd 07c563eefd115c5f74e5ba28231ffb46 *man/ngeMatrix-class.Rd ffb57c3063559175113661c71b6f130d *man/nnzero.Rd 001c81a2b8215c310e817aa60ea2095b *man/norm.Rd 07d71b43dd151e9ec97599ed39c97053 *man/nsparseMatrix-classes.Rd b299d889bba52b4d4e558b7d121eb97a *man/nsyMatrix-class.Rd 11890bb8c3bdd03d0d0ca39ab95a6c08 *man/ntrMatrix-class.Rd b44976fc24c22cc0d7d0bf722a951a3b *man/number-class.Rd 358232f60f227a3908652716415f6b5c *man/pMatrix-class.Rd 443e9bfc1585637418430170706069d9 *man/printSpMatrix.Rd 94abdadb8b7781ea566e726f52188e0f *man/qr-methods.Rd cd756d7688e967d1c7962803c9f685e5 *man/rankMatrix.Rd e6a10cf788588d6a28eb8b8ed328a790 *man/rcond.Rd eaa76f30797997d7d49d45c2f9c55c4f *man/rep2abI.Rd 4bd0fe0494027a0145e0357a7d839d87 *man/replValue-class.Rd 12d2c9caa3c91beecd1f6c60903478f6 *man/rleDiff-class.Rd 5e85265a461822bd32acf5d56a3a2861 *man/rsparsematrix.Rd 0cc917f4625559f00b18b296608abe7a *man/solve-methods.Rd 9b68c5da96127168eb998860261126ef *man/spMatrix.Rd 47b173d7c7515d8616daab061f58df12 *man/sparse.model.matrix.Rd 41ee4b254fd4375e8f500a03e3cb8e2e *man/sparseLU-class.Rd 03f182926aa9fbc73543b9a03ee58e1c *man/sparseMatrix-class.Rd c84d52ef4e65a95f2d4a314b1b5b919c *man/sparseMatrix.Rd aaaeedb1b37258fd2ca01a7de68edd33 *man/sparseQR-class.Rd c621e0ace8c68ff9d30dcbd6d5c91c70 *man/sparseVector-class.Rd d55a0d5dc2476a64f08435526794ad8d *man/sparseVector.Rd 3f3010b99b5b9081fb75f8543b4031f6 *man/symmetricMatrix-class.Rd 749ddc8f3da2e72556ea5a3b605e570e *man/symmpart.Rd 7c865bb2197d10d31e7262b4ecac067f *man/triangularMatrix-class.Rd 77598fe8249969008a753f46af557c00 *man/uniqTsparse.Rd c85d81fef271d0f630bea4ad1ddf67d8 *man/unpack.Rd 95a864f6e2b3c41d1aefd0c6686f278a *man/unused-classes.Rd 0ef56496d0eca5c262145a3bc0760242 *man/updown.Rd 7191c419bac54e71085b3a6ed114dab6 *po/Matrix.pot cddb4992b9544776ddaf2e32cc3a9e3c *po/R-Matrix.pot 8004af2ba135f75bcce6e380a7eb079c *po/R-de.po 0fcc87da49f23ddccefa2a887aa68c8a *po/R-en@quot.po eb252ee5cd096bfb36b17b9a8604d976 *po/R-fr.po f378d00d0adedde217fdda304977566b *po/R-ko.po b6c120e1e6dd197325c0de0dc200ee46 *po/R-pl.po d57de6a890259f155e757fc03ce0b63f *po/de.po 57680b9c8d9a9e8cd4fe5329ce92d7fe *po/en@quot.po e195abba91cb5bde53f22c7e9442ad29 *po/fr.po f26f05962807d51e2b9e4e5c792501e3 *po/ko.po 7b04e93597c47f276568303f06e49d92 *po/pl.po e23ab5be4fd03f0085929c32bcf59b46 *po/update-me.sh 752c6c39d6c94efc9d6ab8059c1b7335 *src/AMD/Include/amd.h 56386916c8bd4f210026aecd88fba0e3 *src/AMD/Include/amd_internal.h 44b5e7133f7f818d07d17637c8410c51 *src/AMD/Makefile 2df4e18aa3b3cc889f3d521e98a42c20 *src/AMD/Source/Makefile 41ec90eacd97a62c7393f9a66f714662 *src/AMD/Source/amd_1.c 8422d8422c1e737a6e4732bad5e7d9a3 *src/AMD/Source/amd_2.c 23003d2ff7e400dc8738a838951a80cb *src/AMD/Source/amd_aat.c 212a9b583543cc25aceb7c7be7d88b04 *src/AMD/Source/amd_control.c c0a3524d4f5ddcb63065eeabe8ae57f8 *src/AMD/Source/amd_defaults.c 896cccbf9ea7f21142964fe1868da79d *src/AMD/Source/amd_dump.c 5b374877a4f346b8a3ea13c2c9ee75fd *src/AMD/Source/amd_global.c 9abf67b12455bb1989b0e9edaa0bec03 *src/AMD/Source/amd_info.c e0391fcc241630fa3a5b9b2c5ee3f0ea *src/AMD/Source/amd_order.c 5f8f83de491e328aefbff08a09c3b467 *src/AMD/Source/amd_post_tree.c d696467688131d58e3acf9e5a627360e *src/AMD/Source/amd_postorder.c 5d46a2442b5d099f6ba9fa6b427d7a1f *src/AMD/Source/amd_preprocess.c 56f64a3203f5752b5a012b806f101d8c *src/AMD/Source/amd_valid.c addde010ddd6b0dd973dd110fb760c26 *src/AMD/Source/make-Make.R fb72579361b37fe421cb34b65b9b7b3f *src/AMD/Source/make_o.mk bcf116dda4a2190aab42a79ab8065892 *src/CHMfactor.c 30dc9cebc72c3cab2862a1f04209874e *src/CHMfactor.h d2d49c52f19cae17de0efe9bbd0e50b0 *src/CHOLMOD/Check/License.txt 0689532ab6ed7c3864c9fafbee1aa1b6 *src/CHOLMOD/Check/cholmod_check.c eff565a1144bd2dba2d0a9757e50b481 *src/CHOLMOD/Check/cholmod_read.c 84444c62831c05f57c0a41336c7a1f3b *src/CHOLMOD/Check/cholmod_write.c 887d3c7dc221e09fa581c96ce66e76f2 *src/CHOLMOD/Cholesky/License.txt 8a939bb8ed17557aced224bb47854d8f *src/CHOLMOD/Cholesky/cholmod_amd.c 7213ecb3b13826762028047c2341d9e6 *src/CHOLMOD/Cholesky/cholmod_analyze.c 767989bd106e5d9b8da93137c9985dbf *src/CHOLMOD/Cholesky/cholmod_colamd.c 1fc207b3547818bb016492f2d9714d4b *src/CHOLMOD/Cholesky/cholmod_etree.c ed20e10d4965835e49980924b568536c *src/CHOLMOD/Cholesky/cholmod_factorize.c 7f4ddcc6f7a0b9de350c91ede8b6992c *src/CHOLMOD/Cholesky/cholmod_postorder.c 4873c960895bf2eec956006e2014061b *src/CHOLMOD/Cholesky/cholmod_rcond.c be208074ff7a33899ff08a5ab9102fd9 *src/CHOLMOD/Cholesky/cholmod_resymbol.c 914dc4160a428eae28de6c5f085ff129 *src/CHOLMOD/Cholesky/cholmod_rowcolcounts.c 23f6f11fd436f347922790580e2de2fc *src/CHOLMOD/Cholesky/cholmod_rowfac.c 913f2a4136ae76d3874f4ed82488f486 *src/CHOLMOD/Cholesky/cholmod_solve.c 6cfb3b948b5ff28de6f8f7d4d8fa4859 *src/CHOLMOD/Cholesky/cholmod_spsolve.c 189e18b2104803d0e0d39a3b6b03e99f *src/CHOLMOD/Cholesky/debug_c 2d3b7ec83d164d8189d29581badd2ab2 *src/CHOLMOD/Cholesky/t_cholmod_lsolve.c caea1d7895120894a93778e44558bf80 *src/CHOLMOD/Cholesky/t_cholmod_ltsolve.c df437e6236532f410f7dec95c530f689 *src/CHOLMOD/Cholesky/t_cholmod_rowfac.c 5bb20e7d6a626be362a29171bd1eea6d *src/CHOLMOD/Cholesky/t_cholmod_solve.c 0b650d81b9287230f7335cb5d6404b97 *src/CHOLMOD/Core/License.txt 8e9fcd70bd9c5a7809519e89df32536d *src/CHOLMOD/Core/cholmod_aat.c d38fc004c4240ce11eccf6214b9fb76e *src/CHOLMOD/Core/cholmod_add.c 212b6834b4f705afd74c1826836074ca *src/CHOLMOD/Core/cholmod_band.c 3363557ed9201c7fdb11e2a0ee50b938 *src/CHOLMOD/Core/cholmod_change_factor.c bd97debc58e4e02b8a02f117aa291ca1 *src/CHOLMOD/Core/cholmod_common.c 60d8d7bb40db79b8e41a41dd879fe01d *src/CHOLMOD/Core/cholmod_complex.c 741aa40db56db6df1c4157aa8b35f299 *src/CHOLMOD/Core/cholmod_copy.c 4ab120fc9bf2143578f57e91f9176115 *src/CHOLMOD/Core/cholmod_dense.c a0a55400242cbad3c11df002a8f82ba9 *src/CHOLMOD/Core/cholmod_error.c 491edb629e50ec8b63e78be48e79fee3 *src/CHOLMOD/Core/cholmod_factor.c d43e39ea2e8764bee2120ca9720c864e *src/CHOLMOD/Core/cholmod_memory.c 353c79883b82016484f8791916d40392 *src/CHOLMOD/Core/cholmod_sparse.c 4d56f96d959dbb044aad2b1e2543a489 *src/CHOLMOD/Core/cholmod_transpose.c 749075b69c8f254b01f4c1e2ac700b9a *src/CHOLMOD/Core/cholmod_triplet.c d3ab4a4b9ce5287a13a696c837e8178b *src/CHOLMOD/Core/cholmod_version.c 5935895eb635942363de326b69f1f135 *src/CHOLMOD/Core/t_cholmod_change_factor.c 113394eba44b660e8b1f250794d9e315 *src/CHOLMOD/Core/t_cholmod_dense.c 5eba949e29cf3716912d54cbcaa3d691 *src/CHOLMOD/Core/t_cholmod_transpose.c c28402b3ada915779c2e3f6ea105ade0 *src/CHOLMOD/Core/t_cholmod_triplet.c 43dea0a98ff00c4d001efdcf9e1107fe *src/CHOLMOD/Include/License.txt aebdd50c54b3d11988fa4be5fb71d05f *src/CHOLMOD/Include/README.txt 403be4e598bd11adb647b463f7eb4192 *src/CHOLMOD/Include/cholmod.h a58f9a4b2aa00fbb0bbafdc8e505e304 *src/CHOLMOD/Include/cholmod_blas.h 8c1e3f82c00d6a67dd5d9d3139bea5a5 *src/CHOLMOD/Include/cholmod_camd.h bf7a358cf5641e22d1ae78fc9b350c47 *src/CHOLMOD/Include/cholmod_check.h 67ecb03414269c5dda2e161a330fe1f0 *src/CHOLMOD/Include/cholmod_cholesky.h 3adbb76236b883c09b4065c6f80d0e47 *src/CHOLMOD/Include/cholmod_complexity.h 2bc29a401875fbec85ba108089b90333 *src/CHOLMOD/Include/cholmod_config.h e9946fff88271c4aa2125c88e6316fbf *src/CHOLMOD/Include/cholmod_core.h 22e2cffd0d0420e8e2fe3c428759ce1a *src/CHOLMOD/Include/cholmod_internal.h 0fbe5016dc058131ec1b9161271c287d *src/CHOLMOD/Include/cholmod_io64.h ea5a291dcfe7892727e272bb2ac6d752 *src/CHOLMOD/Include/cholmod_matrixops.h e62d8c9cd22547845a55d05b01fd0c50 *src/CHOLMOD/Include/cholmod_modify.h c834620d8dec432569c68147d3d3e886 *src/CHOLMOD/Include/cholmod_partition.h 690f52f536eca0f17bf339abf01d07ef *src/CHOLMOD/Include/cholmod_supernodal.h 0f53c41fc3e65fc75bd8489e34c552d0 *src/CHOLMOD/Include/cholmod_template.h e18d16dd7650530c14404002c4130fbc *src/CHOLMOD/Lib/Makefile a298bc42f87addd27a4b4c0834b444e0 *src/CHOLMOD/Makefile e60f67b276c37ca2fc0796a45b61c470 *src/CHOLMOD/MatrixOps/License.txt 49cd872b6e8996dcd66d297ba60389ae *src/CHOLMOD/MatrixOps/cholmod_drop.c 061a1e2dfd78e9ae7ba3c5586faa9acb *src/CHOLMOD/MatrixOps/cholmod_horzcat.c df0d737af990b2d73cd268407ba3d6cb *src/CHOLMOD/MatrixOps/cholmod_norm.c a7e865911dc280f1a508c8a7f1ff7975 *src/CHOLMOD/MatrixOps/cholmod_scale.c 469e5a07b5afdbc789ed3229198030df *src/CHOLMOD/MatrixOps/cholmod_sdmult.c a2fc03dbf62f15c8ed356c20c1355b54 *src/CHOLMOD/MatrixOps/cholmod_ssmult.c 7ffeb180ba7ebb9dd887ae2fb4c1876b *src/CHOLMOD/MatrixOps/cholmod_submatrix.c 2136d5f0931b18d308e9aa9fa44296ca *src/CHOLMOD/MatrixOps/cholmod_symmetry.c 3973c30221dd6c3fccc0ff15507ee260 *src/CHOLMOD/MatrixOps/cholmod_vertcat.c 884c14d213c4e66bae0d0afbec2e89aa *src/CHOLMOD/MatrixOps/t_cholmod_sdmult.c e38b4b22e31f8f215bbf4580cf50619c *src/CHOLMOD/Modify/License.txt 4797dfd399ed782013687044ef323f7e *src/CHOLMOD/Modify/cholmod_rowadd.c 11b6fba3ee7f4d4e63dc7dedd394dcf4 *src/CHOLMOD/Modify/cholmod_rowdel.c 7cf6727bf9f9f03cd07e4e93d533b7f8 *src/CHOLMOD/Modify/cholmod_updown.c 728fec932755d9a0aea090b48d0992d4 *src/CHOLMOD/Modify/t_cholmod_updown.c a6f9b195edaa19e04836ca1d7ac2f834 *src/CHOLMOD/Modify/t_cholmod_updown_numkr.c b0cf7a9044494b5ea9481a1728c710e6 *src/CHOLMOD/Partition/License.txt 8f49eb389e88d200b84b036237f5496c *src/CHOLMOD/Partition/cholmod_camd.c c5808c937ecfca1bcde1ede3fd45e43d *src/CHOLMOD/Partition/cholmod_ccolamd.c f36ad307b9273d2f98bc1602789559ec *src/CHOLMOD/Partition/cholmod_csymamd.c 8a37a4b51d862b98362f4674d0249fbf *src/CHOLMOD/Partition/cholmod_metis.c 77796ab2d4bf244649c898bf704dca1b *src/CHOLMOD/Partition/cholmod_nesdis.c 08629b176847ad848a0327e6fde2210a *src/CHOLMOD/Supernodal/License.txt ba6a4bd87d8bc58cf5d2e54817066851 *src/CHOLMOD/Supernodal/cholmod_super_numeric.c fc2fd5ad84fba605fc22f64c63bbecc6 *src/CHOLMOD/Supernodal/cholmod_super_solve.c 4953c632dbe81cf89d68135e4b340840 *src/CHOLMOD/Supernodal/cholmod_super_symbolic.c 1ad404233a51f38540a959c36d880bda *src/CHOLMOD/Supernodal/t_cholmod_gpu.c daeb3d88ba34180a181e641de5cddbd3 *src/CHOLMOD/Supernodal/t_cholmod_super_numeric.c 30faa10eebe97bdba5f4f88c72b387a7 *src/CHOLMOD/Supernodal/t_cholmod_super_solve.c e14e53d0b36e1d0647348a326e8b3b54 *src/COLAMD/Include/colamd.h 44b5e7133f7f818d07d17637c8410c51 *src/COLAMD/Makefile b56b67fa4e3e8bc168f5ad98d27f207a *src/COLAMD/Source/Makefile 561ff6512783cc2af5b343ff3630267d *src/COLAMD/Source/colamd.c 8f9d70daa9adafe39e555573d974d17e *src/COLAMD/Source/colamd_global.c 2a8243b6acd0d1fabb6208923a562c05 *src/Csparse.c 83401a56dbbf08169618c5df821f2889 *src/Csparse.h e879c68d033040e33a588710797323b5 *src/Makevars eae29395545aaf8fcb39a6f2967b9adb *src/Mutils.c 2711368ec642984e0770f2950d46d3be *src/Mutils.h 34a94c6db1f395da28ca4e94dd9cf9ca *src/SuiteSparse_config/Makefile e9b2be5ad0056f588187cf504cf60764 *src/SuiteSparse_config/SuiteSparse_config.c ff586155b86948cc5b4eec822b8670e2 *src/SuiteSparse_config/SuiteSparse_config.h d41d8cd98f00b204e9800998ecf8427e *src/SuiteSparse_config/SuiteSparse_config.mk b08d523906ab962f8e0729cb4d3d2f15 *src/Syms.h 166c3d16d89ff57476c221bc110a4f5f *src/TMatrix_as.c 0ef00bab2b7ffb79f64b25311decd236 *src/TMatrix_as.h a8c3b912525a7821f1ecd5a4ecdc2976 *src/Tsparse.c 20c550b57138bf22290ea759dfcb1c3e *src/Tsparse.h 3714d37c755fbf0b5b2a88362b651390 *src/abIndex.c ea6bdd1b33f38c8c2913eeef6eb21be3 *src/abIndex.h 2061c43130bb4a8cb00fc8dadb5e43a3 *src/chm_common.c b6ea652eed1988974dec16b9cb9a35c1 *src/chm_common.h 4893273047274b21bfa8542880de3fa6 *src/cs.c 2d48f8b8f4e1eb4598302396f70e8c89 *src/cs.h 3cb2f68bfc301a9c3d8ee8837e18ef16 *src/cs_utils.c 0b6112e86dab4fcececbadd2e84582ea *src/cs_utils.h 70da65a71998c2cc3e7715d06c72d745 *src/dense.c f14d4d8cd3b94ab5e95c8c9bff9630f1 *src/dense.h 154b6b7bf101fb061a5f7966a3fc2b63 *src/dgCMatrix.c 2392fd374cf7d259fedbef27f0a13e7f *src/dgCMatrix.h ac220a48611391156d99f0b1de9ce685 *src/dgTMatrix.c 341e051982a88f9c4d9a02c1376978fc *src/dgTMatrix.h 6744b8c946b46db043bdc56322060ed5 *src/dgeMatrix.c fdd9e01ae6f24fc59d821db2c984da53 *src/dgeMatrix.h f26dfaf602ce007c04be535e921313c9 *src/dpoMatrix.c b58f1f64d6141e98de9eaf6d953e7f6d *src/dpoMatrix.h cf1e54516cd78c8d4093b5ffd500ba27 *src/dppMatrix.c 4cb570fdeeab6cd03ba14db58efeddce *src/dppMatrix.h 02e8b3cb9bba80b9b98f6180514b15e9 *src/dsCMatrix.c dadce6c58bc388ff5f6501f4c3cafab1 *src/dsCMatrix.h cd15e6f11bdd68f37d54a699b802af30 *src/dspMatrix.c 461e5e7cafb6a6cc4e466f124c0ef54e *src/dspMatrix.h 79e9fb7c2d0abd92f9d7e8fb1b8d91c5 *src/dsyMatrix.c cf331499d9904a6569c326515bb75aef *src/dsyMatrix.h 5b5cbd05aae78f6f3e92b922b6bf191c *src/dtCMatrix.c 0eab9c4475b8630bb8f2a3ebb782530e *src/dtCMatrix.h 88a53b25ad8a93bd8f30b9df6d999d9c *src/dtTMatrix.c fac7ed66a9097104e94c3d91c01fcdc7 *src/dtTMatrix.h 85a7997785b68496a227b300268ed5d4 *src/dtpMatrix.c ca00a8f2c785b0b4e3ead5cb888dc330 *src/dtpMatrix.h e8d8112741a6cd2878b8597a2126a72e *src/dtrMatrix.c feba4a84f226246a992cc103f3da8874 *src/dtrMatrix.h a24bffe980c9084d0b373655ff6f01b4 *src/factorizations.c 37fd937251ae9f1c68d974bd6169ade3 *src/factorizations.h 342e2ea137e98ddbfbc060f41764f0d9 *src/init.c 2582450ecf52d4e9d9fece3695fa7af2 *src/ldense.c d8522bb27a18eea16d17c411d8da9e38 *src/ldense.h 0b0a474b5b19cb09637063134a0ba203 *src/lgCMatrix.c dc61a6a68eab8320a5616f4714d137d5 *src/lgCMatrix.h 1936bcd15e8986e60f7f8c325a4414dd *src/scripts/0get-SuiteSparse.sh c7de3001573dad52e9fa7803a017163c *src/scripts/DEPS.mkf c036f547022e52101ab279b9df5a6645 *src/scripts/DEPS.mkf_make.sh 15eb76d731d373a415312098f6f707e5 *src/scripts/SOURCES_C.mkf f1d325ea608f75622777bef1fbe55611 *src/scripts/fixup-fn.R e617b0cfca1c9bb2567c0ee3057a0128 *src/sparseQR.c 68c429cbb92387ef9ce70dac75a6e934 *src/sparseQR.h da2b2c88610bab26d98db9b74e4cffea *src/t_Csparse_subassign.c 2394f5def013c7e571231935320fa6c3 *src/t_Csparse_validate.c c55fe12890cabcf61d562a4969825c02 *src/t_Matrix_rle.c d165cd3ef5e5e38d1cbfaf69ca1e27fd *src/t_gCMatrix_colSums.c e6de21ff3bf0908eaca620d9b868b4f1 *src/t_sparseVector.c 3dcc9418cfcbd6ec989b16a91b2b945a *tests/Class+Meth.R b038d02f799e842887e6dff692db8d1f *tests/Simple.R 4966b9ac5a23de46814439a84174973b *tests/abIndex-tsts.R ce85ee2aba7d78e88fef738a0d1c7118 *tests/base-matrix-fun.R 78d7038fa6dfd7401a6a20efae58ab1e *tests/bind.R 3a6e13a116f96d3c40d848ecb3e32e0f *tests/bind.Rout.save 6c9c116a56b152bf266f226b7b8b19a1 *tests/dg_Matrix.R 1a73c0f18ce4faee64591ea826eed8d1 *tests/dpo-test.R 25542600eadca4e8af5261e98e3b3c5d *tests/dtpMatrix.R 6372f022083d24893c7da4e2283100a1 *tests/factorizing.R 7b067e1bbbd35aa572bb7588ff6515cc *tests/group-methods.R 66fb87b33cf41f863bed03260ab76613 *tests/indexing.R 04fee1bf10109ce42d53cfa7ecce3444 *tests/indexing.Rout.save 09c7ec5ce0968605d66419548e29e6af *tests/matprod.R 06d9de87597574aff0aa03776011bfa8 *tests/matr-exp.R 128ccccdfe84c2dbed42bdce86258491 *tests/other-pkgs.R 2787ae0732f209eee2a0965c196c3363 *tests/spModel.matrix.R 4f5e9afa397be40c4da06ea25e2f6f95 *tests/validObj.R eca424b43492f27bcb4ba5a1fdb0a0c7 *tests/write-read.R 09e13507b9832a30aa92e8aff0dc96a0 *vignettes/Comparisons.Rnw 7bf6c80a144d27b6baece257c69bd800 *vignettes/Design-issues.Rnw a6d6903590a8f5ac036fdeb74b48bb89 *vignettes/Intro2Matrix.Rnw c39a26dfe7ccaafd044e88468155b153 *vignettes/Introduction.Rnw f64681e48c222aad57f4d43cad34d68d *vignettes/Matrix.bib 74ca9e8b3e91ace4ee3f9e85506bcdfa *vignettes/myVignette.sty 491d961ca64f8da569c817b82daa9c58 *vignettes/sparseModels.Rnw Matrix/build/0000755000176200001440000000000013203323427012614 5ustar liggesusersMatrix/build/vignette.rds0000644000176200001440000000057613203323427015163 0ustar liggesusersS=O0uJb`AU REXZ,R;Dq8ݽww}!!!W^C:z<⫌*9[.$]s*e)'!Q|<+aʰQ3?%! *CN',uXqFMd}g㨨%OmΒm=mn5iwΘƐKV;^ V*&׿^5V;OU5M Maintainer: Martin Maechler Authors@R: c(person("Douglas","Bates", role="aut") , person("Martin","Maechler", email="mmaechler+Matrix@gmail.com", role = c("aut","cre")) , person("Timothy A.", "Davis", role="ctb", comment = c("SuiteSparse and 'cs' C libraries, notably CHOLMOD, AMD; collaborators listed in dir(pattern = '^[A-Z]+[.]txt$', full.names=TRUE, system.file('doc', 'SuiteSparse', package='Matrix'))")) , person("Jens", "Oehlschlägel", role="ctb", comment="initial nearPD()") , person("Jason", "Riedy", role="ctb", comment = c("condest() and onenormest() for octave", "Copyright: Regents of the University of California")) , person("R Core Team", role = "ctb", comment="base R matrix implementation") ) Description: A rich hierarchy of matrix classes, including triangular, symmetric, and diagonal matrices, both dense and sparse and with pattern, logical and numeric entries. Numerous methods for and operations on these matrices, using 'LAPACK' and 'SuiteSparse' libraries. Depends: R (>= 3.0.1) Imports: methods, graphics, grid, stats, utils, lattice Suggests: expm, MASS Enhances: MatrixModels, graph, SparseM, sfsmisc Encoding: UTF-8 LazyData: no LazyDataNote: not possible, since we use data/*.R *and* our classes BuildResaveData: no License: GPL (>= 2) | file LICENCE URL: http://Matrix.R-forge.R-project.org/ NeedsCompilation: yes Packaged: 2017-11-16 14:56:25 UTC; maechler Author: Douglas Bates [aut], Martin Maechler [aut, cre], Timothy A. Davis [ctb] (SuiteSparse and 'cs' C libraries, notably CHOLMOD, AMD; collaborators listed in dir(pattern = '^[A-Z]+[.]txt$', full.names=TRUE, system.file('doc', 'SuiteSparse', package='Matrix'))), Jens Oehlschlägel [ctb] (initial nearPD()), Jason Riedy [ctb] (condest() and onenormest() for octave, Copyright: Regents of the University of California), R Core Team [ctb] (base R matrix implementation) Repository: CRAN Date/Publication: 2017-11-16 16:04:57 Matrix/LICENCE0000644000176200001440000010714112702273622012512 0ustar liggesusersCopyrights ========== The Matrix package, an R package, available from CRAN or R-forge, consists of basically two parts. 1. Matrix' own C code in src/*.[ch] (apart from cs.h and cs.c), R code in R/*.R, including more in ./inst/ and ./tests/ and other directories including vignettes, documentation etc. All these have been created by Douglas Bates and Martin Maechler and hence are Copyright (C) 1999-2016 Douglas Bates and Martin Maechler 2. The Matrix package includes libraries AMD, CHOLMOD, COLAMD, CSparse and SPQR from the SuiteSparse collection of Tim Davis. All sections of that code are covered by the GPL or LGPL licenses. See the directory (inst/) doc/SuiteSparse/ for details. Douglas M. Bates, University of Wisconsin, Madison, bates@stat.wisc.edu Martin Maechler ETH Zurich, maechler@stat.math.ethz.ch | maechler@r-project.org Licences ======== 1. The Matrix package itself is licenced under "GPL-3", the GNU GENERAL PUBLIC LICENCE Version 3, see "GPL-3" below. 2. The licences of the libraries from the SuiteSparse collection mentioned are included in the respective source directories. ------------------ GPL-3 : the following is == http://www.gnu.org/licenses/gpl-3.0.txt --------------------------------------- GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . Matrix/ChangeLog0000644000176200001440000051232112520201600013260 0ustar liggesusers2015-04-01 Martin Maechler * inst/NEWS.Rd: Moving ChangeLog to new (markup) NEWS file 2015-03-16 Martin Maechler * R/Auxiliaries.R (anyDuplicatedT): renamed from is_duplicatedT(), and exported. uniqTsparse(): exported too. 2014-06-15 Martin Maechler * DESCRIPTION (Version): 1.1-4, released to CRAN on 2014-06-14 * src/dsyMatrix.c (dsyMatrix_matrix_mm): fix crossprod(, ) bug 2014-04-26 Martin Maechler * new rsparsematrix() 2014-03-30 Martin Maechler * DESCRIPTION (Version): 1.1-3, released to CRAN on 2014-03-30 2014-03-12 Martin Maechler * R/dgTMatrix.R (image): fix bug in default ylim computation. 2014-01-28 Martin Maechler * R/products.R: matrix products overhauled; should work with sparseVectors; speedup of crossprod(v, ), thanks to nudge by Niels Richard Hansen. * man/matrix-products.Rd: all matrix products documented in one file. * tests/matprod.R: more extensive testing 2014-01-20 Martin Maechler * DESCRIPTION (Version): 1.1-2, released to CRAN on 2014-01-28 * NAMESPACE: export fast power-user coercion utilities .dsy2mat(), .dxC2mat(), .T2Cmat(), ..2dge(). 2013-12-23 Martin Maechler * R/dgTMatrix.R (image): (xlim, ylim) get a slightly changed default, plus ylim := sort(ylim, "decreasing"). This is strictly not back-compatible but should never harm. 2013-09-26 Martin Maechler * R/spModels.R (fac2sparse, fac2Sparse): newly exported; plus 'giveCsparse' option. 2013-09-16 Martin Maechler * src/scripts/0get-SuiteSparse.sh: new download script, for * src/CHOLMOD/*, src/AMD/*, ...: getting SuiteSparse version 4.2.1 * R/zzz.R (.SuiteSparse_version): new function 2013-09-13 Martin Maechler * R/dsCMatrix.R (solve.dsC.*): finally fix the long-lasting undetected solve() bug (only in case Cholmod fails) [r2908]. * DESCRIPTION (Version): 1.0-15, CRAN-*non*-released 2013-09-26 2013-09-12 Martin Maechler * DESCRIPTION (Version): 1.0-14, CRAN-released 2013-09-12 * R/dgCMatrix.R: "stop gap fix" for R 3.0.2: partly revert solve(,*) changes in 1.0-13. 2013-08-27 Fabian Scheipl * man/indMatrix-class.Rd: new "indMatrix" class, a natural superclass of "pMatrix". Many methods moved from "pMatrix" to "indMatrix". 2013-05-09 Martin Maechler * DESCRIPTION (Version): 1.0-13, CRAN-released 2013-09-10 * R/KhatriRao.R: Efficient KhatriRao() by Michael Cysouw 2013-03-26 Martin Maechler * DESCRIPTION (Version): 1.0-12, CRAN-released 2013-03-26 2012-11-10 Martin Maechler * DESCRIPTION (Version): 1.0-11, CRAN-released 2013-02-02 * R/SparseM-conv.R: as(, "dgCMatrix") now works again * tests/other-pkgs.R: test that. * src/Mutils.c: do *not* use '#if R_VERSION < ..' so this also *runs* in older R when installed in R >= 2.15.2. 2012-10-15 Martin Maechler * src/Mutils.c (Mmatrix): new, to be used by .External() in order to replace .Internal(matrix(....)) 2012-10-05 Martin Maechler * R/diagMatrix.R (.sparseDiagonal): new 'unitri' argument; more flexibility; new: solve(, ) 2012-09-10 Martin Maechler * DESCRIPTION (Version): 1.0-10, CRAN-released: 2012-10-16, r2845 2012-09-01 Martin Maechler * R/sparseVector.R (sparseVector): new constructor * inst/test-tools-Matrix.R (rspMat): smarter; also useful for large dimensions. 2012-07-23 Martin Maechler * tests/group-methods.R: now do much more testing, notably of pairs of matrices ... however only when 'doExtras' is true, which it is not by default, e.g., on CRAN. 2012-07-21 Martin Maechler * R/Ops.R, R/diagMatrix.R: many fixes, notably for rare operations that were not triggered before. * R/Auxiliaries.R (allTrueMat): new utility. 2012-07-20 Martin Maechler * R/dsparseMatrix.R, R/sparseVector.R, ...: Newly defined is.finite() and is.infinite() methods for all our *Matrix and *sparseVector. 2012-07-14 Martin Maechler * R/d??Matrix.R (diag<-): many "diag<-" methods, which preserve symmetricity, triangularity (even uni-triangularity sometimes); Partly by also making A[cbind(i,i)] preserve such properties. * src/Mutils.c (SET_packed_setDiag) {and similar}: *_setDiag() C functions implementing "diag<-" R methods. 2012-06-30 Martin Maechler * R/Ops.R (Ops.x.x): now, dense symmetric and triangular matrices are preserved for many arithmetic and logic binary operators. * src/ldense.c (lsyMatrix_as_lspMatrix, ..): more coercions keep the dimnames(). * R/symmetricMatrix.R (pack, unpack): new pack() {"inverse" of unpack(), including pack()}; new unpack() methods. 2012-06-20 Douglas Bates * src/scripts/DEPS.mkf, ... * src/*.c: Update to version 4.0.0 of SuiteSparse 2012-06-19 Martin Maechler * DESCRIPTION (Version): 1.0-8, CRAN-released: 2012-06-20, r2789 * R/CHMfactor.R (update): *DO* allow non-symmetric parent. * man/CHMfactor-class.Rd: be more clear about the two ways. * tests/factorizing.R: more update() testing 2012-06-12 Martin Maechler * tests/matprod.R (chkDnProd): new testing function 2012-06-08 Martin Maechler * R/CHMfactor.R (update): now *warn* when parent is not formally symmetric and coerce it. 2012-06-05 Martin Maechler * R/Auxiliaries.R (chk.s): "check dots" - new utility -- possibly for base R ? 2012-04-16 Martin Maechler * R/sparseMatrix.R (sparseMatrix): now also works for 'symmetric=TRUE' and lower triangular indices. 2012-04-15 Martin Maechler * R/CHMfactor.R (updown): new generic and methods, * man/updown.Rd: provided by Nicholas Nagle. 2012-03-30 Martin Maechler * DESCRIPTION (Version): 1.0-7, CRAN-released: for a few days only. 2012-03-16 Martin Maechler * DESCRIPTION (Version): 1.0-6, CRAN-released: 2012-03-30, r2775 * DESCRIPTION (Depends): R >= 2.15.0 2012-03-15 Martin Maechler * R/spModels.R (sparseInt.r): recursion free (which does not help much). 2012-03-05 Martin Maechler * src/dtCMatrix.c (dtCMatrix_sparse_solve): no longer use Alloca() here. * tests/factorizing.R (checkSchur): check against segfault example. * R/Matrix.R (chol2inv()) new method. 2012-03-01 Martin Maechler * R/spModels.R (sparse.model.matrix, model.spmatrix): add 'verbose' argument in order to show to the user what's going on. * man/sparse.model.matrix.Rd: ditto 2012-02-27 Martin Maechler * R/Ops.R (A.M.n, A.n.M): o now correct, newly via sparseVector. 2012-02-25 Martin Maechler * DESCRIPTION (Version): 1.0-5, CRAN-released: 2012-03-15, r2773 * src/chm_common.c (chm_factor_to_SEXP): in case of failure, * src/dsCMatrix.c (internal_chm_factor): ensure memory cleanup; memory leak reported by Kasper Kristensen at dtu.dk. 2012-02-17 Martin Maechler * DESCRIPTION (Version): 1.0-4, CRAN-released: 2012-02-21, r2765 * R/Ops.R: Fix "-" method for diagonalMatrix types. 2012-01-12 Martin Maechler * DESCRIPTION (Suggests): MASS, as we use a data set in a vignette 2011-12-09 Martin Maechler * DESCRIPTION (Version): 1.0-3, CRAN-released: 2012-01-12, r2749 * R/diagMatrix.R (.bdiag): now works correctly when all blocks are "lMatrix" 2011-11-02 Martin Maechler * R/zzz.R (.onLoad): when R version >= 2.15.0, no longer need to assignInNamespace( ns = "base"), methods provides S4 generic. 2011-10-30 Martin Maechler * DESCRIPTION (Version): 1.0-2, CRAN-released: 2011-11-19, r2739 * tests/other-pkgs.R: print more, don't run SparseM on Solaris for now. * tests/Simple.R: encoding warning should not be promoted to error. 2011-10-22 Martin Maechler * R/rankMatrix.R (rankMatrix): 'method = "qrLINPACK"' now also works for sparse matrices, but using \code{sparseQR()}. * man/sparseQR-class.Rd: document options "Matrix.quiet" (old) and new "Matrix.quiet.qr.R" for suppressiong the permutation warning. * R/sparseQR.R: 2011-10-17 Douglas Bates * src/Csparse.c (Csparse_submatrix): plugging memory leak 2011-10-08 Martin Maechler * R/bind2.R (cbind2Sparse, rbind2Sparse): auxiliaries, used, also in new methods for . * tests/bind.R: testing some of these. * R/Matrix.R, man/Matrix.Rd: optional argument 'doDiag'. * DESCRIPTION (Version): 1.0-1, CRAN-released: 2011-10-18, r2732 2011-09-27 Martin Maechler * DESCRIPTION (Version): 1.0-0 -- to be released for R 2.14.0 2011-09-16 Martin Maechler * R/dsCMatrix.R (solve.dsC.mat): new utility which calls lu() if CHOLMOD'S Cholesky() errors (when matrix is not pos.def.). 2011-09-15 Martin Maechler * R/bandSparse.R (bandSparse): and * R/sparseMatrix.R (sparseMatrix): add 'giveCsparse = TRUE' argument and allow returning Tsparse*, useful e.g. when used in bdiag(). 2011-08-17 Martin Maechler * NAMESPACE: export diagN2U() & diagU2N(). They were "missing" for at least one user (GG). * man/diagU2N.Rd: docu + example. * DESCRIPTION (Version): 0.9996875-4 (*not* yet released) 2011-08-12 Martin Maechler * DESCRIPTION (Version): 0.9996875-3, for CRAN 2011-08-05 Martin Maechler * R/sparseVector.R (head): method; used in a few cases, eliminating two FIXMEs. * DESCRIPTION (Version): 0.9996875-1 * R/ngTMatrix.R: stop() instead of warning() when NA's are coerced. * R/Csparse.R, R/Tsparse.R * src/t_Csparse_subassign.c, src/Csparse.c: [..] <- val now works via .Call(*Csparse_subassign, ...) and no longer suffers from unnecessary memory-blowup. 2011-07-29 Martin Maechler * R/dgTMatrix.R (image): add 'useRaster = FALSE' argument, providing the possibility of using raster (instead of rectangle drawing vector) images. 2011-07-27 Martin Maechler * R/nearPD.R: allow 'ensureSymmetry' argument for speedup. 2011-06-10 Martin Maechler * R/diagMatrix.R (Cspdiagprod, diagCspprod): fixup for symmetric sparse, and non constant-diagonal. 2011-05-20 Martin Maechler * R/dsCMatrix.R (determinant(): fix for Matrix(0, 1) case. 2011-05-18 Martin Maechler * R/sparseMatrix.R (sparseMatrix): add 'symmetric' argument. 2011-04-04 Martin Maechler * src/Csparse.c (Csparse_subassign): unfinished prototype * src/....: Finally no longer hack "UFlong := int", but rather * src/UFconfig/UFconfig.h: use standard CHOLMOD headers * DESCRIPTION (Version): 0.9996875-0 2011-03-31 Martin Maechler * DESCRIPTION (Version): 0.999375-49 2011-03-30 Douglas Bates * Matrix/src/chm_common.c: [r2658] Install symbols first - {preventing seg.fault under -gct} 2011-03-17 Martin Maechler * DESCRIPTION (Version): 0.999375-48 *only* difference to CRAN released *-47, is the work around Sweave bug in inst/doc/sparseModels.Rnw. 2011-02-23 Martin Maechler * src/factorizations.c (LU_expand): now also works for non-square (m x n) * tests/factorizing.R: testing that 2011-02-22 Martin Maechler * R/Auxiliaries.R (t_geMatrix): drop 'factors', as they can be wrong. 2011-02-18 Martin Maechler * R/Tsparse.R (replTmat): fix bug for M[i,j] <- v, when j had duplicated entries. * tests/indexing.R (chkAssign): new function; testing the above. 2011-02-17 Martin Maechler * R/AllClass.R, R/sparseVector.R, man/sparseVector-class.Rd: now require explicitly that i-slot must be sorted for sparseVectors. 2011-02-16 Martin Maechler * R/sparseMatrix.R (formatSparseM): align="right" accidentally did not use zero.print at all. print/format sparse Matrix: fix align="right" and improve docu 2011-02-17 Douglas Bates * DESCRIPTION: Remove Encoding: directive. 2011-02-10 Martin Maechler * inst/doc/sparseModels.Rnw: use png for large graphics (suggestion from Brian) 2011-02-05 Martin Maechler * man/symmpart.Rd: update, thanks to Spencer Graves' prompting. 2011-01-07 Martin Maechler * R/CHMfactor.R (determinant()): no longer warn about incompatible change of 2009-09-01. 2011-01-04 Martin Maechler * R/nearPD.R (nearPD): better error message when all eigenvalues are (at least close to) negative. 2010-12-18 Martin Maechler * DESCRIPTION (Version): 0.999375-47, CRAN-released: 2011-02-23, r2653 * R/spModels.R, NAMESPACE: remove model.Matrix(); we had deprecated it for about four months now. 2010-12-12 Martin Maechler * R/eigen.R,...: use full argument names; * R/*.R: get rid of more from checkUsagePackage("Matrix", suppressPartialMatchArgs = FALSE) 2010-12-11 Martin Maechler * DESCRIPTION (Version): 0.999375-46, CRAN-released: 2010-12-14, r2633 * R/products.R: dimension fixing in some Matrix o vector [t]crossprod()s. * src/Csparse.c (nz2Csparse, nz_pattern_to_Csparse): new utilities, callable from C and R. (Csparse_dense_prod): check pattern matrix and coerce to "d..". * tests/Simple.R: testing %*% * R/ngCMatrix.R, R/nsCMatrix.R, .. : use the new fast coercions. 2010-10-08 Martin Maechler * DESCRIPTION (Version): 0.999375-45, CRAN-released: 2010-11-10, r2624 * R/sparseMatrix.R (graph.wgtMatrix): add 'graph::' in a few places; as 'graph' package is not imported and may well be loaded only. 2010-09-09 Martin Maechler * R/sparseMatrix.R (setAs): graph |-> Matrix: via CsparseMatrix 2010-08-21 Martin Maechler * R/spModels.R (sparse.model.matrix): argument 'drop.unused.levels = FALSE' NB: was *true* implicitly, before. Compatibility with model.matrix(). * R/sparseMatrix.R (formatSpMatrix, formatSparseM): factored out of printSpMatrix(); export as potentially useful for standard matrices, even. 2010-08-11 Martin Maechler * R/eigen.R (Schur): correct setMethod() such that Schur() works. 2010-08-10 Martin Maechler * R/diagMatrix.R, man/bdiag.Rd, NAMESPACE: export .bdiag() as well. 2010-08-09 Martin Maechler * DESCRIPTION (Version): 0.999375-44, CRAN-released: 2010-09-11, r2618 * R/diagMatrix.R (diagCspprod, Cspdiagprod): drop (possibly wrong) @factors * R/Ops.R (.Arith.CM.atom, .Arith.atom.CM, A.M.n, A.n.M): ditto * tests/factorizing.R: check some of the above. 2010-08-04 Douglas Bates * R/spModels.R (fac2sparse): Fix name resolution problem (R-SIG-Mixed-Models post by Florent Duyme). 2010-07-25 Martin Maechler * DESCRIPTION (Depends): require R >= 2.10.0 --> can clean up * R/spModels.R: prepare to move most parts to new package MatrixModels 2010-07-23 Martin Maechler * R/Auxiliaries.R (prMatrix): add " (unitriangular)" as we already have for sparse matrices. 2010-07-22 Martin Maechler * R/Auxiliaries.R (.diagU2N): implement for "dtpMatrix" = old 'FIXME'; (.dense.diagU2N): new utility, called from .diagU2N() 2010-07-19 Martin Maechler * src/dtrMatrix.c (dtrMatrix_dtrMatrix_mm): new for tri %*% tri * R/products.R (%*%): ditto * tests/matprod.R: test it 2010-07-16 Martin Maechler * R/spModels.R (do.defaults): add 'nonMatched.action' with default ensuring that typos are caught. 2010-07-16 Douglas Bates * R/spModels.R (do.defaults): utility function; TODO: move to R 2010-07-16 Martin Maechler * DESCRIPTION (Version): 0.999375-43, CRAN-released: 2010-08-05, r 2599 * R/AllClass.R (Model): as mother class (of "glpModel") * R/spModels.R (IRLS): more options() (updateModel): update() 2010-07-13 Martin Maechler * DESCRIPTION (Version): 0.999375-42, CRAN-released: 2010-07-15, r 2566 * R/spModels.R (glm4, IRLS): glm4 [was 'glm1']; tweaks. 2010-07-12 Martin Maechler * NAMESPACE: rename, export and * man/glpModel-class.Rd: document Doug's new "glpModel" class. 2010-07-08 Douglas Bates * R/AllClass.R: new "lpMod" class (-> later =: "glpModel"), and working function: * R/spModels.R (glm1): using linear pred.Model class, and Bates-Watts convergence criterion. 2010-07-06 Martin Maechler * R/lMatrix.R (whichDense): use arrayInd() * R/zzz.R (arrayInd): provide for older R versions 2010-07-05 Martin Maechler * src/chm_common.c (chm_triplet_to_SEXP): deal more carefully with NAs, needed e.g., on Solaris; thanks to Ruth and Brian Ripley. * R/Ops.R (Compare ): fix bug uncovered by "alongside" the above. 2010-07-02 Martin Maechler * R/sparseMatrix.R (x[] <- 0): fix shortcut code. * tests/indexing.R: and test * R/nearPD.R (nearPD): 'doDykstra = TRUE' and *do* use Dykstra's correction which was *not* used in Jens' code; thanks to Bernhard Spangl for a report 2010-06-26 Martin Maechler * R/Matrix.R: fix mean() method; add sparse one, remaining sparse at least for trim = 0. 2010-06-08 Martin Maechler * DESCRIPTION (Version): 0.999375-41, CRAN-released: 2010-07-03, r 2555 * R/sparseVector.R (spV2M): enable sparseVector -> (sparse)Matrix as(*,.) coercion. 2010-06-07 Martin Maechler * R/Tsparse.R (.TM.repl.i.mat): renamed from .TM.repl.i.2col(). * R/Matrix.R (.repl.i.lSMat): implement logical sparse sub-assignment: M[] <- v; ditto for dense & nsparse. * R/Csparse.R (.CM.repl.i.lSMat, ..): direct logical sparse sub-assignment for "Csparse". 2010-06-04 Martin Maechler * R/sparseMatrix.R (sparseMatrix): re-enable 'dimnames' argument. 2010-06-03 Martin Maechler * R/spModels.R (model.Matrix): tweak for NULL contrasts in dense case. 2010-06-02 Martin Maechler * tests/spModel.matrix.R (Sparse.model.matrix): adapt to the fact, that sparse.model.matrix() returns not just a dgCMatrix. 2010-05-29 Martin Maechler * DESCRIPTION (Version): 0.999375-40, CRAN-released: 2010-06-04, r 2546 * R/AllClass.R: new classes "ModelMatrix", "sparseModelMatrix", etc. * R/spModels.R (sparse.model.matrix): now return "dsparseModelMatrix" object, notably with 'assign' slot. * R/spModels.R (model.spmatrix): faster, using lower level cbind2/rbind2 directly. * R/spModels.R (model.Matrix): new function, returning "ddenseModelMatrix". * NAMESPACE: export new classes. 2010-05-18 Martin Maechler * src/Csparse.c (Csparse_horzcat, Csparse_vertcat): ensure that rBind()/cBind() i.e., rbind2()/cbind2() return logical sparse matrices when the components are. * tests/bind.R: test 2010-05-15 Martin Maechler * R/sparseMatrix.R: A[] <- v ; differentiate dense & sparse * R/pMatrix.R: disallow [] <- v more consequently * tests/indexing.R: test above 2010-05-08 Martin Maechler * R/spModels.R (model.spmatrix): deal with "AsIs" components * tests/spModel.matrix.R: test that 2010-05-01 Martin Maechler * R/condest.R (onenormest, condest): allow to estimate condition number for large sparse matrices. * condest.Rd: docu * R/pMatrix.R (.inv.perm): utility; add [t]crossprod() methods * man/sparseLU-class.Rd: A = P'LUQ; add examples, with "identities" * R/Auxiliaries.R (mmultCheck): new arg. 'kind' 2010-04-28 Martin Maechler * DESCRIPTION (Version): 0.999375-39, CRAN-released: 2010-05-19, r 2540 * R/spModels.R (fac2sparse): using names(formals(new))[[1]] to adapt to a future change in new()'s first argument *name*. 2010-03-31 Martin Maechler * R/spModels.R (lm.fit.sparse): update, allowing weights; also return residuals, notably for "cholesky" case. * man/lm.fit.sparse.Rd: examples; comparing with dense case. * src/dgCMatrix.c (dgCMatrix_cholsol): comments; also compute residuals. 2010-03-30 Martin Maechler * R/spModels.R (sparse.model.matrix, model.spmatrix): border case '~ 1' should also work. Add 'transpose = FALSE' argument. * tests/spModel.matrix.R: test that. 2010-03-27 Martin Maechler * R/sparseMatrix.R (printSpMatrix): ensure returning original argument 2010-03-26 Martin Maechler * R/sparseVector.R (coercion from TsparseMatrix): diagU2N() when needed. * inst/test-tools.R (checkMatrix): explicit which() test for "l" and "nMatrix". New sparseVector (coercion "and back") check. 2010-03-25 Martin Maechler * R/lMatrix.R (which): define methods for which(<[ln]Matrix>). * inst/test-tools.R (Q.eq.symmpart): new utility, now called in checkMatrix(). * R/nearPD.R: use symmpart() for non-symmetric x * man/nearPD.Rd: improve title 2010-03-24 Martin Maechler * R/colSums.R (.diag.Mean): define methods for "diagonalMatrix" * src/Mutils.c (m_encodeInd, do_ii_FILL): coerce ij to integer if necessary; check that ij are within "dim[]" values. Parametrize do_ii_FILL() to be used in m_encodeInd2() as well: * src/Mutils.c (m_encodeInd2): also check bounds (if desired). * tests/indexing.R: test the above. 2010-03-19 Martin Maechler * src/dgeMatrix.c (dgeMatrix_solve): compute the recip.cond.number and also bail out for *computational* singularity {as "base R" does}, from (code) suggestion by Daniel Sabanés Bové. * tests/dg_Matrix.R: "test" the above. 2010-03-01 Martin Maechler * man/rep2abI.Rd: rep2abI() utility is exported now. * R/Csparse.R (subCsp_cols, subCsp_rows, subCsp_ij): dimnames() <- fix for character subsetting. * tests/indexing.R: testing it. 2010-02-26 Martin Maechler * R/spModels.R (model.spmatrix): warn and coerce to sparseMatrix if result would end up dense (e.g., in case of *no* factors in formula). * tests/spModel.matrix.R: test the above. 2010-02-12 Martin Maechler * R/dtrMatrix.R: add solve(, ): e.g., for solve(, ) in lme4. 2010-02-09 Martin Maechler * DESCRIPTION (Version): 0.999375-38, CRAN-released: 2010-03-31, r 2529 * NAMESPACE, R/AllGeneric.R, R/zzz.R: change det() into a regularly exported function (masking base::det) instead of load-time hack. * man/Matrix-class.Rd: \alias, docu 2010-02-05 Martin Maechler * DESCRIPTION (Version): 0.999375-37, CRAN-released: 2010-02-05 * inst/test-tools.R (Qidentical.DN): new (Qidentical): all Qidentical.DN() * R/Csparse.R (subCsp_ij, subCsp_cols, subCsp_rows): use CHOLMOD's submatrix C code, instead of matrix multiplication; now *do* keep dimnames of result, wherever classical matrix subsetting does. 2010-02-04 Martin Maechler * DESCRIPTION (Version): 0.999375-36, CRAN-released: 2010-02-04 * R/Csparse.R (subCsp_ij): Fix [0,0] bug 2010-02-03 Martin Maechler * R/Tsparse.R (.TM.repl.i.2col): [ ] <- FALSE fix * tests/indexing.R, *.Rout.save: test that 2010-01-28 Martin Maechler * src/Csparse.c (Csparse_crossprod): PROTECT() Tsparse_diagU2N() result, from a suggestion by Andrew Runnalls. 2010-01-22 Martin Maechler * R/SparseM-conv.R (setAs(., "matrix.csc")): fix typo in method. 2010-01-20 Martin Maechler * R/AllGeneric.R: nnzero() is now generic, * R/nnzero.R: newly containing all nnzero() methods. * R/zzz.R (det): assign base::det such that it uses S4 generic kronecker. 2010-01-18 Martin Maechler * R/spModels.R (contr.poly): [the back-compatible-only version]: do not use a default for 'scores'; rather rely on stats::contr.poly. * tests/spModel.matrix.R: test that case 2009-12-28 Douglas Bates * DESCRIPTION (Version): 0.999375-35, CRAN-released: 2010-02-03 * src/init.c, inst/include/Matrix_stubs.c: cholmod_band_inplace() exported. 2009-12-23 Martin Maechler * tests/indexing.R: slightly adapt to the very slight [] changes. * inst/test-tools.R (Q.C.identical): + checkClass * R/Tsparse.R ([-methods): for now go via "Csparse" and drop all the sophisticated code dealing with the many cases. * R/Csparse.R (subCsp_cols, etc): faster [i,j] via matrix multiplication, thanks to suggestions by Greg Jorstad. * R/Auxiliaries.R (paste0): more use of paste0() 2009-12-22 Martin Maechler * R/diagMatrix.R (.sparseDiagonal): made more general, allowing to directly build the equivalent of Diagonal(n)[, j] * man/Diagonal.Rd: document .sparseDiagonal() as well. 2009-12-21 Martin Maechler * R/AllClass.R: abIndex@x and rleDiff@first are now "numLike", such that also logical can be converted to "abIndex". * R/abIndex.R (.diff): new utility, used in num2abI() 2009-12-19 Martin Maechler * src/abIndex.c: include new * src/t_Matrix_rle.c (Matrix_RLE_): is template for Matrix_rle_i() and Matrix_rle_d(); now obeys a 'force' argument. * R/abIndex.R: implement methods, at least with scalars. (all.equal.abI): add also all.equal() methods. * tests/abIndex-tsts.R: testing , using all.equal(). * R/AllClass.R: classUnion "numLike" := {"numeric", "logical"} 2009-12-18 Martin Maechler * src/abIndex.c (Matrix_int_rle): UNPROTECT() needed in trivial case. * R/abIndex.R (abIseq1, abIseq): new functions for building "abIndex" vectors. * tests/abIndex-tsts.R (tst.c.abI): test new c("") method. * DESCRIPTION (Version): 0.999375-34, CRAN-released: -never- * R/Ops.R: use prod(d) instead of d[1]*d[2], as the latter may integer overflow; fixes o * tests/Simple.R: test that. 2009-12-11 Martin Maechler * R/sparseVector.R (TsparseM* -> sparseV): symmetricMatrix needs to be expanded. This fixes a bug reported by Yu-Sung Su. * tests/indexing.R: testing the fix. * inst/test-tools.R (all.equalX): new util 2009-12-09 Martin Maechler * R/Ops.R (A.n.M, A.n.M): o : remain sparse also when *majority* (instead of all) of 0 o v is 0. * tests/group-methods.R: test one such case. 2009-12-06 Martin Maechler * DESCRIPTION (Version): 0.999375-33, CRAN-released: 2009-12-11 * R/Ops.R (Compare): fix case with NA x. * R/not.R: fix "typo" in ! * R/Ops.R (Ops.spV.spV): fix thinko 2009-12-05 Martin Maechler * R/sparseVector.R: setAs(nsparseV*, lsparseV*) etc * R/Ops.R (Ops.spM.spV, Ops.spV.spM): sparseVec. o sparseMat. 2009-11-20 Martin Maechler * R/Ops.R (Ops.spV.spV): enable sparseVector operations in more cases. * R/sparseVector.R (is.na): methods defined. * R/sparseVector.R (intIv): also accept "sparseVector"s * tests/Simple.R: check the above 2009-11-19 Martin Maechler * R/sparseVector.R (newSpV, newSpVec): new utility, dropping 0 "on the fly". * R/sparseVector.R (atomic -> sparse*): fix for NA case. * R/Ops.R (): using newSpVec() * R/not.R: fix thinko in ! 2009-11-17 Martin Maechler * tests/other-pkgs.R: detach(*, unload) Rgraphviz too 2009-11-14 Martin Maechler * R/AllClass.R: "abIndex" (and "rleDiff") class * R/abIndex.R: with some methods; commit these finally, even if it's mostly unfinished. * src/abIndex.[ch]: new: currently only for .Call(Matrix_int_rle,*) * tests/abIndex-tsts.R: basic consistency checks for "abIndex". * R/diagMatrix.R (diagOdiag): "exploding" Matrix.msg() only level 2; * tests/indexing.Rout.save: update 2009-11-11 Martin Maechler * DESCRIPTION (Version): 0.999375-32, CRAN-released: 2009-11-20 * src/Csparse.c (Csparse_Csparse_prod, Csparse_Csparse_crossprod): PROTECT(.) the dimnames; thanks to Kaspar Kristensen 2009-10-24 Martin Maechler * R/Ops.R (Logic.lCMat): to be used for lsC* and ltC* as well, effectively replacing previous suboptimal methods. * src/chm_common.c (chm2Ralloc): Fix unidiagonal ntC segfault: assign 'x' only when non-pattern. * src/chm_common.c (as_cholmod_triplet): reallocate now in a way that works; fix documentation about return value in diagU2N case; ditto for * src/chm_common.c (as_cholmod_sparse): * R/sparseMatrix.R (printSpMatrix): add 'cld' argument, typically passed from printSpMatrix2; and indicate "unit-diagonal" 2009-10-22 Martin Maechler * R/lsparseMatrix.R (C2l): fix for case with NA. * R/Csparse.R (replCmat): drop "stale" cached @factors factorizations after sub-assignments. * R/Tsparse.R (replTmat, .TM.repl.i.2col): ditto 2009-10-19 Martin Maechler * src/dgCMatrix.c (dgCMatrix_LU): new boolean argument 'error_on_sing' to allow no error in case of singularity; needed for determinant(), e.g. * R/Auxiliaries.R (detSparseLU): using lu(*, errSing=FALSE) * R/dgCMatrix.R, R/dsparseMatrix.R: lu() methods, using 'errSing' * R/sparseMatrix.R (printSpMatrix): fix bug introduced on *-09-10 * tests/Simple.R: test for that. 2009-10-18 Martin Maechler * src/dgeMatrix.c (dgeMatrix_crossprod): do not fail in 0-column case. * inst/test-tools.R (Q.eq): new utility (checkMatrix): minimally check %*%, crossprod() and tcrossprod() * R/products.R: more '%*%' methods for "[ln]?Matrix", "missing" 2009-10-06 Martin Maechler * DESCRIPTION (Version): 0.999375-31, CRAN-released: 2009-10-06 * inst/include/Matrix_stubs.c (M_R_cholmod_error): revert (2009-09-18), i.e., no longer restore cholmod_common. {{M_cholmod_defaults() still seems not usable from lme4's init.c}} 2009-10-05 Martin Maechler * src/dtrMatrix.c (dtrMatrix_chol2inv): use "dpoMatrix" instead of "dsy" * R/dtrMatrix.R: make use of implicit generic for chol2inv() in newer R versions. 2009-09-30 Martin Maechler * R/CHMfactor.R (solve): fix methods for "ddiMatrix" and "missing" RHS. * tests/factorizing.R: test these * R/Matrix.R (image): fix Matrix method to work for "ddiMatrix" * R/diagMatrix.R: coercion to "dsparse*" * tests/Simple.R: test image() 2009-09-29 Martin Maechler * R/AllGeneric.R: rcond is implicit generic in latest versions of R 2009-09-22 Martin Maechler * R/Ops.R (A.M.n,A.n.M): replace "Ops" methods by explicit "Arith", "Logic", etc, getting rid of ambiguity (notes), and of infinite recursions. * tests/group-methods.R: test these systematically. 2009-09-18 Martin Maechler * inst/include/Matrix_stubs.c (M_R_cholmod_start): print_function = NULL as in src/chm_common.c (2009-07-20) (M_R_cholmod_error): ditto, using new M_cholmod_default(), declared in * inst/include/cholmod.h * R/Tsparse.R (intI): do *not* allow logical subscript (row or column) to be too long, compatibly with traditional matrix indexing. * tests/indexing.R: and assert the error. 2009-09-17 Martin Maechler * R/pMatrix.R: as(sparseMatrix, pMatrix) * R/CHMfactor.R (solve): method for (CHMfactor, missing) * inst/test-tools.R (assertError): use tryCatch() * R/diagMatrix.R (.sparseDiagonal): fix shape "g" case. * R/Auxiliaries.R (isTriC): do not wrongly return TRUE for a *sCMatrix. * man/chol2inv-methods.Rd: document & example 2009-09-16 Douglas Bates * NAMESPACE, R/dtrMatrix.R, src/dtrMatrix.[ch]: add chol2inv() method for dtrMatrix. 2009-09-12 Martin Maechler * R/sparseVector.R ([): allow *indexing* with "lsparseVector" 2009-09-11 Martin Maechler * R/sparseVector.R (prSpVector): using ":" as in printSpMatrix() (Summary): add "Summary" group methods * man/sparseVector-class.Rd: and test a bit 2009-09-10 Martin Maechler * R/sparseMatrix.R (printSpMatrix): visually differentiate non-structural zeros in *logical* sparse matrices, using ":" * R/Auxiliaries.R (setparts): new utility, for * R/Ops.R (Ops.spV.spV): start implementing sparseVector arithmetic etc 2009-09-08 Martin Maechler * R/dgCMatrix.R (qr): for sparseMatrix must coerce to "dgCMatrix". * tests/factorizing.R: test qr() 2009-09-01 Martin Maechler * R/CHMfactor.R (determinant): divide previous log(det(.)) by 2; now returning det(L); and modify the "CHMfactor.warn" message. * man/CHMfactor-class.Rd: modify documentation accordingly. 2009-08-21 Martin Maechler * R/spModels.R (`contrasts<-`): a version that can also work with a "sparseMatrix" value. This is put into R 2.10.0 (devel) as well. * src/Mutils.h: rename any_NA to any_NA_in_x * src/Mutils.c (check_scalar_string): add doxygen doc 2009-08-15 Martin Maechler * R/spModels.R (fac2Sparse): make also work for 'contrasts.arg' = matrix; 2009-07-28 Martin Maechler * R/spModels.R (contr.sum): need also to define contr.*() as long as we document (./man/) them. 2009-07-27 Martin Maechler * DESCRIPTION (Version): 0.999375-30, CRAN-released: 2009-07-28 * R/Matrix.R (all.equal_Mat): add factorsCheck=FALSE argument * R/Auxiliaries.R (attr.all_Mat, attrSlots): ditto 2009-07-25 Martin Maechler * R/Auxiliaries.R (attr.all_Mat): fix checking of non-content slots. * R/Matrix.R (all.equal_Mat): thinko needed s/&&/&/ * R/sparseMatrix.R (all.equal(.) methods): ditto ===> Note: all.equal() is more stringent for "Matrix" arguments now! 2009-07-23 Martin Maechler * R/spModels.R (model.spmatrix, sparse2int): "complete" re-write * tests/spModel.matrix.R: many tests added 2009-07-20 Martin Maechler * src/chm_common.c (R_cholmod_l_start): set print_function to NULL, as we have long suggested ==> get rid of random strings seen in some cholmod warnings. (R_cholmod_error): call cholmod_l_defaults() before error(), so we restore the Cholmod global in case of errors. * R/ldenseMatrix.R (.rcond_via_d): fix thinko 2009-07-18 Martin Maechler * R/CHMfactor.R (isLDL): need a "!" as 'type' is "is_ll" * src/dsCMatrix.c (dsCMatrix_Cholesky): update, notably when caching. * tests/indexing.R: test col.names printing of sparseMatrix 2009-07-16 Martin Maechler * inst/test-tools.R (allCholesky): new testing function 2009-07-15 Martin Maechler * src/dsCMatrix.c (dsCMatrix_Cholesky): add possibility to set each of 'perm', 'LDL', and 'super' to NA (in addition to TRUE / FALSE). in these case, a CHOLMOD-heuristic choses the option "sensibly". * man/Cholesky.Rd: document the new possibility. 2009-07-14 Martin Maechler * R/rankMatrix.R (rankMatrix): diff(sval) <= 0 * R/spModels.R (model.spmatrix): fix case of missing main effect * tests/spModel.matrix.R: new file 2009-07-11 Martin Maechler * R/sparseMatrix.R (show, printSpMatrix2): both print() and show() now use printSpMatrix2(), and that now already prints " x sparse Matrix of class ...". * R/CHMfactor.R (isLDL): fix and * NAMESPACE: export isLDL() 2009-07-10 Martin Maechler * R/spModels.R (model.spmatrix): mf may be simple data.frame 2009-07-09 Martin Maechler * NAMESPACE: export sparse.model.matrix() and * man/sparse.model.matrix.Rd: document it 2009-07-08 Martin Maechler * R/Tsparse.R (intI): also work for integer dimnames (well ..) 2009-07-07 Martin Maechler * R/sparseMatrix.R: "factor out" sparse model things into * R/spModels.R (sparse.model.matrix): new model matrix functions 2009-06-20 Douglas Bates * src/CHMfactor.c: Ensure updated LL stays LL 2009-06-10 Martin Maechler * DESCRIPTION (Version): 0.999375-29, CRAN-released: 2009-06-11 2009-06-10 Douglas Bates * [r2404] src/Mutils.c: Change value of set_factor to be the cached factor * [r2403] src/dgCMatrix.c, src/dgCMatrix.h, src/init.c: Comment out unused dgCMatrix_lusol function * [r2402] R/dgCMatrix.R: R-level implementation of solve("dgCMatrix", "missing") * [r2401] src/dgCMatrix.c: Re-arrange LU factorization to always use the cached value. 2009-06-09 Douglas Bates * [r2399] src/dgCMatrix.c: PROTECT the result from dgCMatrix_LU in dgCMatrix_matrix_solve 2009-06-06 Martin Maechler * R/Tsparse.R: add numeric -> Tsparse* coercion 2009-06-05 Martin Maechler * src/Mutils.h, src/dgeMatrix.c: using dngettext(.) only on future versions of R. 2009-06-04 Martin Maechler * DESCRIPTION (Version): 0.999375-28, CRAN-released: 2009-06-08 * po/de.po, po/R-de.po: German translations from Chris Leick. * inst/po/de/: ditto, via po/update-me.sh 2009-05-28 Martin Maechler * src/chm_common.c, src/cs_utils.c, etc: internationalize more messages; fix some; thanks to feedback from Chris Leick. 2009-05-27 Martin Maechler * man/denseMatrix-class.Rd, etc: 'factors' is *not* a slot in this class; found by the upcoming R 2.10.0 codocClasses(). 2009-05-25 Martin Maechler * po/update-me.sh, Matrix.pot, etc: updated *.pot / *.po files * DESCRIPTION (Version, Date): 0.999375-27, CRAN-released today. * R/sparseVector.R: add as(, "dsparseVector") (spV2M): now works (again!?) for "isparseVector" (-> "dgTMatrix"). * tests/matprod.R: tcrossprod(), sparseVector multiplications, i.e., features of next paragraph. 2009-05-23 Martin Maechler * R/products.R: move almost all %*%, crossprod(), tcrossprod() methods to a new file. tcrossprod() compatibility with *fixed* base-R; enable operations with "sparseVector"s; some extra methods to avoid ambiguity messages. 2009-05-20 Martin Maechler * R/Auxiliaries.R (.M.v, .v.M): slight speedup, and *use* them in * R/Matrix.R (crossprod) 2009-05-18 Martin Maechler * R/sparseVector.R (dim<-): prod(as.integer(.)) may overflow! * R/Matrix.R (Matrix): Matrix(sv, ..) now works for a sparseVector * R/sparseVector.R (spV2M): allow zero nrow or ncol. 2009-05-16 Martin Maechler * R/sparseMatrix.R (dim<-): should also work for diagonalMatrix. * inst/test-tools.R (vec): add test for dim(x) <- c(n, 1) 2009-05-13 Martin Maechler * R/rankMatrix.R (rankMatrix): new function for matrix rank; "to be discussed". 2009-05-07 Doug Bates and Martin Maechler * src/Mutils.c (Matrix_check_class_etc): diverse smallish improvements, stuffing a small leak, adding PROTECT()ion, but, alas, not enough. 2009-05-06 Martin Maechler * R/HBMM.R (readMM): add checkIJ() to produce nicer error messages, on malformed input. * tests/write-read.R: and test that.. 2009-04-18 Martin Maechler * DESCRIPTION (Version, Date): 0.999375-26, CRAN-released on 2009-04-29 * src/Mutils.h (Matrix_check_class_etc): try to ensure it works also when Matrix is loaded but not attached. * src/init.c (R_init_Matrix): get Matrix namespace in C. * R/zzz.R (.onLoad): a *working* fix aka "hack" 2009-04-15 Martin Maechler * DESCRIPTION (Version): 0.999375-25 packaged --> CRAN 2009-04-09 Martin Maechler * R/Auxiliaries.R (Matrix.msg): new utility (.M.vectorSub): ditto, for vector-indexing; in * R/Matrix.R ([): M[i, drop=] should do *vector*-indexing. * R/Tsparse.R ([): ditto; * R/diagMatrix.R ([, subDiag): ditto. * R/Tsparse.R ([): more careful indexing of (triangular) TsparseMatrix. * tests/indexing.R: testing the above * R/Auxiliaries.R (gT2tT, check.gT2tT): consistency and efficiency improvement, using 'do.n' argument. 2009-04-08 Martin Maechler * R/Matrix.R: add as(., "vector") etc * man/Matrix-class.Rd: ditto * inst/test-tools.R (checkMatrix): and check them 2009-04-07 Martin Maechler * DESCRIPTION (Version, Date): 0.999375-24 ... released to CRAN * R/sparseVector.R: fix coercion from xsparse* * tests/Simple.R: and check it. * man/lu.Rd: document 'warnSing' argument * tests/dg_Matrix.R: and test it * src/dgeMatrix.c (dgeMatrix_LU): missing 'return' 2009-04-06 Martin Maechler * DESCRIPTION (Version, Date): 0.999375-24 only for 2.9.0 (and newer) 2009-03-30 Martin Maechler * src/Mutils.h (Matrix_check_class_etc): new version that *computes* the environment to be used. * src/Tsparse.c, src/cs_utils.c, src/chm_common.c, src/dgCMatrix.c: use the above in place of Matrix_check_class_and_super(). 2009-03-26 Martin Maechler * R/Auxiliaries.R (MatrixClass): use cld@package, not packageSlot(.) ! 2009-03-25 Martin Maechler * DESCRIPTION (Version, Date): 0.999375-23 * tests/Class+Meth.R (dotestMat): use getClassDef() for speed; adaptions to also work with "Matrix-extensions". * inst/test-tools.R (checkMatrix): similar adaptions. 2009-03-24 Martin Maechler * R/Auxiliaries.R (MatrixClass, l2d_meth, ...): make use of MatrixClass(): functionality for setClass("foo", contains="dgCMatrix") * src/Mutils.h (Matrix_check_class_and_super): new utility, to be used in lieu of Matrix_check_class() in most cases. * src/Tsparse.c, src/cs_utils.c, src/chm_common.c, src/dgCMatrix.c: use it, currently only with R_GlobalEnv {otherwise: API change} 2009-03-12 Martin Maechler * man/band.Rd: note and example about band() |-> dense * R/ddenseMatrix.R (.bandDense): fix typo in argument check. * R/Csparse.R: ditto * src/dense.c (dense_band): limit index range; thanks to Bill Dunlap. * tests/Simple.R (band): check it 2009-03-11 Martin Maechler * R/dMatrix.R (Summary): (dsparseMatrix): new logic, fixing prod(). * inst/test-tools.R (eqDeterminant): improve after suggestions from Doug * inst/test-tools.R (checkMatrix): message(), not warning(), for differing prod(). * src/dgeMatrix.h, src/init.c: dgeMatrix_LU(x, warn_singularity) * src/dgeMatrix.c (dgeMatrix_LU): allow to suppress singularity warning. (dgeMatrix_determinant, dgeMatrix_rcond): do *not* warn on exact singularity 2009-03-10 Martin Maechler * R/Matrix.R (Summary.l, Summary.np): no conversion to "dMatrix" for all()/any() * tests/Simple.R: do not use memory-expensive all(I.. == Diagonal(n)) for R >= 2.9.0, keep option 'warn = 2', i.e. warnings producing errors ==> * R/Ops.R: small fixes, getting rid of warnings in tests/Simple.R * TODO: think about providing something like allCompare(.,., "==") 2009-03-02 Martin Maechler * DESCRIPTION (Version): 0.999375-22, ready but not submitted 2009-03-01 Martin Maechler * inst/test-tools.R (eqDeterminant): fix for NAs 2009-02-28 Martin Maechler * R/diagMatrix.R (prod, all): fix methods (cut & paste remnant); for NA. * R/Auxiliaries.R (detSparseLU): determinant(<..NA..>) now gives NaN * R/sparseMatrix.R (printSpMatrix): workaround format.info() R bug * tests/Simple.R: test that 2009-02-27 Martin Maechler * R/Matrix.R (Matrix): Matrix(x,*) returns x unaltered when is(x, "diagonalMatrix"); OTOH, Matrix(x,1,1) should typically *not* return a diagonalMatrix. * R/diagMatrix.R (setAs(matrix, *)): fix for NAs. * tests/Simple.R: test things like Matrix(NA, 1,1) 2009-02-25 Martin Maechler * NAMESPACE: add bandSparse() "properly" * man/bandSparse.Rd: doc including examples 2009-02-20 Martin Maechler * R/bandSparse.R (bandSparse): constructor for band(diagonal) sparse matrices. 2009-02-13 Martin Maechler * DESCRIPTION (Version): 0.999375-21, released to CRAN * src/Mutils.h (Matrix_with_SPQR): #define (or #undef), in order to allow easy building "SPQR-free version" of Matrix. 2009-02-11 Martin Maechler * R/Csparse.R (replCmat): another check for 'has.x' * tests/indexing.R: very large (very sparse) sub-indexing. 2009-01-30 Martin Maechler * DESCRIPTION (Version): 0.999375-20 * man/spqr.Rd: disable example on Windows for now * inst/test-tools.R (checkMatrix): simpler for "logical" pMatrix. * R/ngTMatrix.R: fix ngT -> nge / lge coercion, and * tests/Simple.R: adapt test. * R/pMatrix.R: coercion to "matrix": more sensical to coerce to logical instead of 0/1 integer. This a mild back-compatibility breach. * man/pMatrix-class.Rd: adapt, including example * R/sparseMatrix.R (printSpMatrix): print as logical, too. 2009-01-29 Martin Maechler * R/Auxiliaries.R (geClass): define for "pMatrix" * R/pMatrix.R: pMatrix -> ngeMatrix coercion * man/pMatrix-class.Rd: * DESCRIPTION (Version): 0.999375-19 considering release. * R/ngTMatrix.R: coercing correctly to ngeMatrix via lge*. * man/dgTMatrix-class.Rd: remove no-more-existing coercion method; mention a bit less, and note. * R/diagMatrix.R: ensure that * is diagonal even with new method dispatch * R/Matrix.R (.M.sub.i.logical): change comments only, and extend error message which is never called currently. * R/Ops.R (Ops.x.x): fix for new "inherited method" dispatch 2009-01-28 Martin Maechler * R/spqr.R: put spqr() / class "SPQR" related code in one file for now. * NAMESPACE: export "SPQR" class * man/SPQR-class.Rd: document it 2009-01-27 Martin Maechler * R/Auxiliaries.R (is.na_nsp): should produce "nsCMatrix" only when dimnames are symmetric too. * R/sparseQR.R (solve): method for (, ) 2009-01-26 Douglas Bates * src/cs_utils.c (Matrix_as_cs): in diagU2N case: Force sorted columns after expanding unit diagonal. 2009-01-21 Martin Maechler * R/Tsparse.R (intI): for now give intelligible error on NA indices. * R/Matrix.R (subset.ij): should deal correctly with NA indices in the 2-column-matrix index case. * src/Mutils.c (m_encodeInd, m_encodeInd2): prepare to deal better with NA in indices. 2009-01-20 Martin Maechler * inst/doc/Intro2Matrix.Rnw: mention sparseMatrix * man/sparseMatrix.Rd: fix typos found by parse_Rd 2009-01-19 Martin Maechler * DESCRIPTION (Version,Date): release 0.999375-18 (as of yesterday) 2009-01-18 Douglas Bates * [r2319] src/Csparse.c, src/Csparse.h: Added an untested create_Csparse function 2009-01-17 Martin Maechler * R/sparseMatrix.R (sparseMatrix): recycle 'x' if necessary; use 'index1' rather than 'index0' {as proposed by Doug}. * R/dgeMatrix.R: drop two unnecessary (maybe very very slightly faster) methods for %*%. 2009-01-12 Douglas Bates * [r2313] R/sparseMatrix.R, man/sparseMatrix.rd: Use intermediate triplet rep in sparseMatrix. 2009-01-07 Martin Maechler * R/sparseMatrix.R (sparseMatrix): new function to be used in place of new(), notably for CsparseMatrix objects. * man/sparseMatrix.Rd: its doc; plus examples * man/CsparseMatrix-class.Rd: fix long-standing thinko; update the \note{} to reflect the fact that the validity method no longer modifies its argument. * R/Csparse.R (.validateCsparse): new utility accessing * src/Csparse.c (Csparse_validate_, Csparse_validate2): new utilities allowing the "sort-in-place" that used to be part of former Csparse_validate(). 2008-12-10 Douglas Bates * [r2309] DESCRIPTION: Release 0.99375-17 2008-12-05 Douglas Bates * [r2308] inst/include/Matrix_stubs.c, inst/include/cholmod.h: Adding const for picky compilers; Using CHM_FR typedef 2008-11-17 Martin Maechler * [r2307] ChangeLog, tests/validObj.R: update (as of Oct.26) 2008-10-31 Douglas Bates * [r2306] inst/include/Matrix_stubs.c: Consistency with cholmod.h re const qualifier 2008-10-26 Douglas Bates * src/Csparse.c (Csparse_validate): do not sort, but report error on unsorted row-indices within column. * tests/validObj.R: adapt the regression test. 2008-10-17 Douglas Bates * [r2300] inst/include/Matrix_stubs.c: Consistency with SparseSuite names * [r2299] src/AMD/Source/Makefile, src/CHMfactor.c, src/CHOLMOD/Lib/Makefile, src/COLAMD/Source/Makefile, src/Csparse.c, src/Tsparse.c, src/UFconfig/UFconfig.h, src/chm_common.c, src/chm_common.h, src/dense.c, src/dgCMatrix.c, src/dsCMatrix.c, src/init.c, src/t_gCMatrix_colSums.c: Compile only the UF_long version of SparseSuite but setting UF_long to be int 2008-10-17 Martin Maechler * src/Mutils.h: include also for AIX 2008-10-16 Martin Maechler * src/scripts/ : move *.sh, *.mkf and *.mk files from src/ to src/scripts/ * src/*/{Lib|Source}/Makefile: change to non-GNU-make style, and other improvements from Brian Ripley. 2008-10-15 Martin Maechler * src/Makevars, src/Makevars.win: replacing * src/Makefile, src/Makefile.win which are no longer needed 2008-10-14 Martin Maechler * src/Makefile, src/*/Makefile: changes from Brian Ripley enabling parallel make. 2008-10-13 Douglas Bates * [r2285] src/SPQR/Include/spqr.hpp: Include the C string declarations. 2008-10-06 Douglas Bates * [r2284] src/Makefile, src/SPQR/Lib/Makefile_SPQR, src/SPQR/Makefile, src/Win.mk: Modifications for compilation under Windows * [r2283] tests/validObj.R: remove reference to undefined object * [r2282] inst/doc/UFsparse/SPQR.txt: SPQR license information 2008-10-04 Douglas Bates * [r2281] src/Makefile, src/chm_common.c, src/chm_common.h, src/dgCMatrix.c, src/init.c: SparseSuiteQR interface 2008-10-03 Martin Maechler * src/Csparse.c (isValid_Csparse): new utility * src/chm_common.c (as_cholmod_sparse): add validity check early * tests/validObj.R: test the above 2008-10-02 Douglas Bates * [r2277] TODO: Think of a better way of structuring include files * [r2276] src/AMD/Source/Makefile, src/CHOLMOD/Lib/Makefile, src/COLAMD/Source/Makefile, src/Makefile, src/SPQR/Include/SuiteSparseQR_C.h, src/chm_common.h, src/dgCMatrix.c, src/dgCMatrix.h, src/init.c, src/sparseQR.h: Add dgCMatrix_SPQR and modify other code to allow its compilation and linkage 2008-10-02 Martin Maechler * R/sparseMatrix.R (printSpMatrix2): another validObject(.) call * src/Makefile: getting rid of SUBSTAMP etc, thanks to Simon U. 2008-10-01 Douglas Bates * src/Makefile, inst/doc/UFsparse/, inst/include/: Adjustments for SuiteSparse configuration. * src/CHOLMOD, src/UFconfig: update versions of SuiteSparse libraries. * src/SPQR/* add "SPQR", from Tim Davis' "SuiteSparse" collection, not yet with an R interface. 2008-09-25 Martin Maechler * Release 0.999375-15 to CRAN. 2008-09-23 Martin Maechler * src/dsyMatrix.c (dsyMatrix_as_dspMatrix): copy 'factors' slot * tests/dpo-test.R: test for it * R/Tsparse.R (intI): improve one error message. 2008-09-22 Martin Maechler * DESCRIPTION (Version): 0.999375-15 to be released * R/diagMatrix.R (diag o ): explicit setMethods, in order to keep result diagonal in many more cases. (coerce) to denseMatrix now *does* coerce. * man/diagonalMatrix-class.Rd: \alias{} for these. * R/Auxiliaries.R (.dense.prefixes): ".diMatrix" has not been dense anymore! * R/dMatrix.R: as(, ): enable Cholesky/BunchKaufman 2008-09-20 Martin Maechler * R/lsparseMatrix.R (C2l): as(, "lMatrix") should preserve NAs. * R/Ops.R (Arith, Compare): keep diag="U" in more cases when sensible 2008-09-19 Martin Maechler * R/Ops.R (Arith): better o which preserves symmetry / triangularity in "obvious" cases. * R/dpoMatrix.R: setAs(., "lMatrix") and setAs(., "nMatrix") * R/dppMatrix.R: ditto * man/dpoMatrix-class.Rd: * inst/test-tools.R (checkMatrix): add [dln]Matrix <-> [dln]Matrix coercion checks. * tests/indexing.Rout.save: more ambiguity warnings from the new checks. * R/dMatrix.R: dMatrix -> nMatrix: fix dense case. 2008-09-18 Martin Maechler * tests/factorizing.R: test expand() * src/dgCMatrix.c (dgCMatrix_LU): fill @Dim slot correctly. * R/Tsparse.R (replTmat): also optionally warn when sub-assignment loses symmetry of Matrix. 2008-09-17 Martin Maechler * R/Tsparse.R (.TM.repl.i.2col): fix sub-assignment of "dsCMatrix"; bug reported by Jacob van Etten. * tests/indexing.R, tests/indexing.Rout.save: testing it 2008-09-10 Douglas Bates * [r2260] src/Mutils.h, src/chm_common.c, src/cs_utils.c, src/dsCMatrix.c: Update doxygen comments 2008-09-10 Martin Maechler * man/ddiMatrix-class.Rd: docu update : sparse, not dense (see 2008-07-28). * man/ldiMatrix-class.Rd , man/diagonalMatrix-class.Rd: ditto. 2008-09-08 Martin Maechler * DESCRIPTION (Version): 0.999375-14 to be released to CRAN, in order to comply to to pending changes in R-devel (2.8.0). 2008-09-05 Martin Maechler * R/Matrix.R (solve,..): use (Matrix,ANY)... instead of (Matrix,Matrix) * R/Ops.R: ditto; most of these from John Chambers. * man/Matrix-class.Rd * R/Auxiliaries.R (.diagU2N): fix for Rsparse* * tests/Simple.R: test it 2008-09-02 Martin Maechler * man/drop0.Rd: * R/Auxiliaries.R (drop0): new argument 'tol = 0' (and 'is.Csparse'); entails updates in * R/Csparse.R, R/lMatrix.R, R/dMatrix.R 2008-08-30 Martin Maechler * DESCRIPTION (Version): 0.999375-13 released to CRAN 2008-08-29 Martin Maechler * R/Auxiliaries.R (attrSlotNames, attrSlots, attr.all_Mat): new utilities, for now to be used in all.equal() methods. * R/Matrix.R (all.equal_Mat): be more careful (less tolerant) in all.equal() methods. * R/sparseMatrix.R: ditto 2008-08-28 Martin Maechler * DESCRIPTION (Version): 0.999375-12 released to CRAN * R/Ops.R (Compare(,): fix for nsparseMatrix 2008-08-27 Douglas Bates * R/sparseMatrix.R: fac2sparse() for NA's 2008-08-26 Martin Maechler * R/sparseVector.R (all.equal.sparseV): make work for nsparseVector's 2008-08-25 Martin Maechler * src/dgCMatrix.c (dgCMatrix_LU): partially revert change r2175 (2008-04-23) and do give an error for a singular matrix. * man/lu.Rd, R/Auxiliaries.R (detSparseLU): adapt to that. * R/LU.R: expand( ) * NAMESPACE, man/all.equal-methods.Rd: * R/Matrix.R (all.equal): methods for Matrices, * R/sparseMatrix.R, R/sparseVector.R: sparseMatrices and -Vectors 2008-08-23 Douglas Bates * [r2243] R/CHMfactor.R, man/CHMfactor-class.Rd: Added expand method and documentation for CHMfactor class * [r2241] R/CHMfactor.R: Added trivial coercion method for CHMfactor -> pMatrix 2008-08-19 Martin Maechler * R/nsCMatrix.R (setAs(., dgTMatrix))): remove unused method 2008-08-18 Martin Maechler * R/Ops.R (.Ops2dge.via.x, and many others): eliminate never-used variable assignments {from "next version" codetools}. * R/Csparse.R, R/Tsparse.R: ditto 2008-08-17 Martin Maechler * R/sparseVector.R (sp2vec, coerce to sparseVector): make sure no integer overflows happen, and use double precision (n, index) where appropriate. * tests/Simple.R: test "large" sparse vectors. 2008-08-14 Martin Maechler * R/AllClass.R (sparseVector): 'length' and 'i' are "numeric", not just integer (allowing much longer length). 2008-07-28 Martin Maechler * R/AllClass.R (diagonalMatrix): extend "sparseMatrix" instead of "denseMatrix". This renders "scarceMatrix" dispensable and invalidates part of MM's presentations on "space of Matrix classes", but seems cleaner overall. * R/diagMatrix.R, etc: eliminate "scarceMatrix", replacing it by "sparseMatrix" in method signatures; further, instead of coercing to "sparseMatrix", coerce to "TsparseMatrix" now. 2008-07-26 Martin Maechler * src/dgCMatrix.c (dgCMatrix_qrsol): allow third argument 'order' in .Call(.) * R/sparseMatrix.R (lm.fit.sparse), src/dgCMatrix.h, src/init.c: ditto 2008-07-24 Martin Maechler * R/dgeMatrix.R: need solve(, ) against infinite recursion in new test in * tests/matprod.R: testing the above and another solve() case, below * R/sparseMatrix.R (lm.fit.sparse): slightly more efficient for e.g. triangular 'x'. * src/dgCMatrix.c (dgCMatrix_qrsol): use AS_CSP() hence allowing dtC* * src/dgCMatrix.c (dgCMatrix_cholsol): use AS_CHM_SP() to work correctly with unit-triangular x * src/dsCMatrix.c (dsCMatrix_Csparse_solve): use AS_CHM_SP() instead of not checking diagU. * R/diagMatrix.R, R/Auxiliaries.R: tweaks to allow later experiments where diagonalMatrix would extend sparse*. 2008-07-23 Martin Maechler * src/dgCMatrix.c (compressed_non_0_ij): for nnzero(), use "x@p[ncol(x)]" instead of length(x@i). * R/Auxiliaries.R (nnzero): ditto * src/chm_common.c (as_cholmod_sparse): Do not use LENGTH(islot) since that fails for over-allocated i. * tests/validObj.R: more testing of over-allocated (i,x) slots 2008-07-23 Martin Maechler * src/chm_common.c (as_cholmod_sparse): Add 4th argument 'sort_in_place' and set it to TRUE in call from * src/Csparse.c (Csparse_validate): sort in place, making sure that validObject() continues sort the columns if needed. * tests/validObj.R: now tests that more thoroughly, and * man/CsparseMatrix-class.Rd: documents it. 2008-07-22 Douglas Bates * [r2233] src/chm_common.c: sort columns more carefully in as_cholmod_sparse * [r2231] src/chm_common.c: check for sorted columns in as_cholmod_sparse instead of assuming it * [r2228] src/cs_utils.c: Use R_alloc for semi-permanent storage when expanding diagonal 2008-07-21 Martin Maechler * src/cs_utils.c (Matrix_as_cs): add check_Udiag switch * src/cs_utils.h (AS_CSP & AS_CSP__): two versions * src/dtCMatrix.c (dtCMatrix_sparse_solve): no longer needs diagU2N(). * R/diagMatrix.R (.sparseDiagonal): new utility, used in "old" .spDiagonal() and new .trDiagonal(). * R/dtCMatrix.R (solve): make use of .trDiagonal() 2008-07-19 Martin Maechler * R/Auxiliaries.R (dimNamesCheck): fix very long standing buglet, stumbled upon by Michael H. * tests/validObj.R: testing the bug-fix * src/chm_common.h (AS_CHM_SP__, AS_CHM_TR__): the non-diagU2N versions. * src/chm_common.c (as_cholmod_sparse, as_cholmod_triplet): new boolean argument 'check_Udiag' (formerly implicitly was FALSE). * src/Csparse.c (Csparse_Csparse_prod, ...): etc: use the new AS_CHM_SP() which includes diagU2N. * inst/include/Matrix_stubs.c (M_as_cholmod_sparse): similarly adapt to 3 arguments. 2008-07-17 Douglas Bates * [r2220] src/dtCMatrix.c: Correct number of columns for rhs in dtCMatrix_sparse_solve * [r2219] src/cs_utils.c: eye->nz should be -1 for compressed column storage * [r2217] R/dtCMatrix.R, src/dtCMatrix.c, src/dtCMatrix.h, src/init.c: Replace dtCMatrix_solve by more general dtCMatrix_sparse_solve and add new solve method * [r2216] src/cs_utils.c: Utility csp_eye in case we want to fold Csparse_diagU2N functionality into Matrix_as_cs 2008-07-17 Martin Maechler * inst/doc/factor2sparse.Rnw: revive a year-old unfinished vignette 2008-07-16 Douglas Bates * [r2212] R/sparseMatrix.R: fac2sparse gets a drop.unused.levels argument with default TRUE * [r2211] inst/include/Matrix.h, inst/include/Matrix_stubs.c: Export Csparse_diagU2N * [r2210] R/dtCMatrix.R, man/dtCMatrix-class.Rd, src/dtCMatrix.c, src/dtCMatrix.h, src/init.c: Remove vestigial methods based on the parent array; new solve method for signature(a = "dtCMatrix", b = "sparseMatrix") 2008-07-14 Martin Maechler * R/diagMatrix.R (.bdiag): also keep result triangular 2008-07-13 Douglas Bates * [r2208] src/dtCMatrix.c, src/dtTMatrix.c: Revise wording in error messages 2008-07-12 Martin Maechler * R/diagMatrix.R (.bdiag): make more sophisticated, keeping symmetric- or nsparse-Matrix, also fixing the bug introduced with the new version (.999375-10). * tests/Simple.R: regression test for the bugs. 2008-07-07 Martin Maechler * R/sparseVector.R (spV2M): fix for "isparseVector". Further, fix -> coercion (repSpV): add rep(, .) method * R/sparseMatrix.R ([<-): when the RHS is a "scarce"Matrix, do *not* use as.vector(.). * R/Tsparse.R ([<-): & [CR]sparse.R: methods for value = "sparseVector" * R/AllClass.R: new (hidden) class union "scarceMatrix" * R/AllClass.R: sparseVector: add prototype * src/dsCMatrix.c (chk_nm): fix "Cholesky" check, thanks to Kasper Kristensen 2008-06-28 Martin Maechler * tests/other-pkgs.R: add more interesting Matrix -> graph 2008-06-27 Martin Maechler * R/sparseMatrix.R (Tsp2grNEL): add 'need.uniq' argument for speed improvement in "[CR]sparseMatrix" -> "graphNEL" coercion. 2008-06-25 Martin Maechler * DESCRIPTION: release 0.999375-10 to CRAN * R/diagMatrix.R (.bdiag): use more efficient Bates-algorithm for .bdiag(). * man/bdiag.Rd: update, including test. 2008-06-24 Martin Maechler * tests/Simple.R: add minimal bdiag() checks * R/diagMatrix.R (bdiag): fix bdiag(diag(4:5)) case; factor out the Tsparse - internal computation into new .bdiag() 2008-06-14 Martin Maechler * R/nsparseMatrix.R: specific fast all() and any() methods. * src/dgTMatrix.c (MAKE_gTMatrix_to_geMatrix): better error message when trying to produce too large result. * inst/test-tools.R (checkMatrix): add 'do.matrix' with a check for very large matrices. * R/sparseMatrix.R (printSpMatrix2): new function, used by show(). * R/diagMatrix.R (show): print only diagonal entries when nrow(.) >= 50. 2008-06-13 Martin Maechler * src/Mutils.c (m_encodeInd, m_encodeInd2): * R/*.R: .Call(m_encodeInd2?, ..) instead of encodeInd2?(..). * R/Auxiliaries.R (encodeInd2?): care against integer overflow (for big matrices): -> 2nd argument 'di' instead of 'nr' ! 2008-06-09 Martin Maechler * R/dtCMatrix.R: faster dgC* -> dtC* method * tests/Simple.R: (hence removed "FIXME") * R/Auxiliaries.R (copyClass): add 'check = .copyClass.check' which can be be turned off for possible speed gains. 2008-06-02 Martin Maechler * R/dMatrix.R, R/Tsparse.R: get rid of some disambiguation warnings * R/not.R: fix ! implement two old "FIXME"s: ! & ! * R/diagMatrix.R (Ops): fix one-off thinko in o methods * inst/test-tools.R: checkMatrix(): drop0(m12) unconditionally 2008-05-30 Martin Maechler * R/diagMatrix.R (Ops): more o methods * tests/Simple.R: testing the above 2008-05-07 Martin Maechler * NAMESPACE: also import "Ops" {found via new tools:::get_S4_generics_with_methods()} 2008-05-03 Martin Maechler * R/Matrix.R (dimnames<-): dimnames(.) <- NULL works with a message; * NAMESPACE (unname): finally exported 2008-04-28 Martin Maechler * R/Auxiliaries.R (cholMat): possibly keep packed * inst/test-tools.R (checkMatrix): add fixed determinant.matrix() for R < 2.7.0. * R/Tsparse.R ([): for triangularMatrix, check if result may be triangular. * tests/indexing.R: regression test 2008-04-26 Martin Maechler * inst/test-tools.R (checkMatrix): test not only for dMatrix * R/Ops.R: more methods, for lMatrix/nMatrix 2008-04-24 Martin Maechler * R/expm.R: new file for all expm() methods; notably new ones for diagonal*, triangular*, symmetric* and also simple "matrix". 2008-04-23 Martin Maechler * R/dsyMatrix.R: setAs(.) rather than setIs(.) "to dpoMatrix" * inst/test-tools.R (assert.EQ.mat): better message when not equal * src/dgeMatrix.c (dgeMatrix_matrix_crossprod): allow integer RHS. * R/AllClass.R (ddiMatrix,ldiMatrix): extend [dl]Matrix instead of [dl]denseMatrix {identical slots; but more logical method dispatch} 2008-04-23 Martin Maechler * R/sparseMatrix.R (summary): use length() instead of nnzero() * R/diagMatrix.R (determinant): method 2008-04-22 Martin Maechler * src/dsCMatrix.c (dsCMatrix_Cholesky): suppress CHOLMOD printing too * R/Rsparse.R (.viaC.to.R): uplo fix for symmetric & triangular * R/dsCMatrix.R (determinant): switch to use Cholesky( 'LDL' ) and its diagonal 2008-04-21 Martin Maechler * R/dMatrix.R (Summary): short-cut for prod() * R/not.R: fix !<"U"-diag-ltrMatrix> ; drop {R < 2.6.0}-branch * R/Auxiliaries.R (tT2gT): fix for "U"-diag-ltTMatrix * R/AllClass.R: ltTMatrix validity: call (more stringent) tTMatrix_validate 2008-04-19 Martin Maechler * R/Ops.R (Ops.x.x): aux.function, not just for (dMatrix,dMatrix) * R/Ops.R (.do.Logic.lsparse): fix NA case * R/Tsparse.R (replTmat): fix r.sym case, using indTri() * R/Auxiliaries.R (nnzero): fix special cases, using * R/Auxiliaries.R (indDiag): new utility * R/Auxiliaries.R (indTri): new argument 'diag' * R/dMatrix.R: Summmary(): different branch for dsy* 2008-04-18 Martin Maechler * R/diagMatrix.R: "Summary" methods, and more "Arith" / "Ops" * src/Csparse.c (Csparse_drop): preserve (uplo,diag) for ".tCMatrix" triangular matrix. * R/Auxiliaries.R (drop0): use diagU2N(); according to helpfile, 'clx' can be class *or* class representation. (nnzSparse): new. (non0ind): new 'xtendSymm' argument; used in * R/Ops.R: * R/pMatrix.R: more efficient determinant() method 2008-04-17 Martin Maechler * [deactivated] R/Matrix.R (det): det() as base::det(), but with Matrix environment * [deactivated] NAMESPACE: export(det) * R/diagMatrix.R (mkDiag): new substitute for diag() * R/Auxiliaries.R (nnzero): fix for "diagU2N"-case (as0, as1): new utility. * R/Csparse.R (diag, band): need diagU2N() * src/dgeMatrix.c (get_norm): return NA when 'x' slot has NA/NaN. * R/lMatrix.R: coerce(nMatrix |-> lMatrix) fix * R/Ops.R (Compare): fix o case * R/nsparseMatrix.R, R/pMatrix.R: is.na() method 2008-04-16 Martin Maechler * R/Auxiliaries.R (signPerm): new utility for * R/Auxiliaries.R (detSparseLU): determinant() via sparseLU * src/dsCMatrix.c (dsCMatrix_LDL_D): suppress 'CHOLMOD warning'; since we have our own error handler (and can use tryCatch() from R). 2008-04-15 Martin Maechler * R/dgTMatrix.R (image): ha! set col=NA if lwd is small -- very nice! * R/dsCMatrix.R (determinant): use tryCatch() and switch to lu() when not positive definite. * R/Auxiliaries.R (asTri): new auxiliary (non0.i): make *much* faster for Tsparse with many non-zero entries; add 'uniqT = TRUE' argument to be used when sorting is undesired. * tests/Class+Meth.R (dotestMat): now build on checkMatrix() from test-tools.R , see below * R/dMatrix.R: fix "Summary" method: + diagU2N() * NAMESPACE, R/Matrix.R: add mean() method 2008-04-12 Martin Maechler * R/dgTMatrix.R (image): allow to *not* take abs(), and use cold-hot colors; try *changed* default useAbs = FALSE * man/image-methods.Rd: nice examples 2008-04-11 Martin Maechler * inst/test-tools.R (checkMatrix): new function for modularizing part of tstMatrixClass() in tests/Class+Meth.R * R/dsCMatrix.R: coercion from "matrix" * R/ltTMatrix.R, R/ntTMatrix.R: ditto (change it). * tests/Class+Meth.R (tstMatrixClass): some cleanup; add test for as(matrix(,0,0), ) 2008-04-09 Martin Maechler * src/dgeMatrix.c (dgeMatrix_determinant): for n == 0, work as determinant(matrix(,0,0)). * src/dgCMatrix.c (dgCMatrix_LU): return {L,U} as dtCMatrix * man/sparseLU-class.Rd: ditto * R/dgCMatrix.R (determinant): method building on lu() * R/sparseMatrix.R, Matrix.R, ...: ditto * R/Auxiliaries.R (mkDet): auxiliary for determinant() 2008-04-07 Martin Maechler * R/sparseMatrix.R (summary): no 'x' column for pattern matrices. 2008-04-02 Martin Maechler * src/dense.c (dense_to_Csparse): all declarations *before* R_CheckStack(); needed e.g. for ancient gcc 2.96. 2008-03-29 Martin Maechler * DESCRIPTION (Version): 0.999375-9 --- need to release for R-devel (and R 2.7.0 alpha soon). * R/AllClass.R: drop "double" from "atomicVector" class union * R/AllGeneric.R (rcond): check for base::rcond instead of R version * R/dgeMatrix.R: ditto * R/sparseMatrix.R (summary): count NAs * inst/doc/Intro2Matrix.Rnw: changes, aim for *one* introduction. 2008-03-28 Martin Maechler * R/AllGeneric.R: rcond(., norm) instead of rcond(., type), in order to become compatible to new R 2.7.0 base::rcond(). 2008-03-25 Martin Maechler * DESCRIPTION (Version,Date): 0.999375-8 --- released to CRAN * R/diagMatrix.R (Ops): fix newly introduce bug in <.di> o * inst/test-tools.R (isValid): new utility, used much in * tests/simple.R: * man/BunchKaufman-methods.Rd: added too 2008-03-24 Martin Maechler * R/dsyMatrix.R: add BunchKaufman() methods. * R/dspMatrix.R: * src/init.c: add dsyMatrix_trf 2008-03-23 Douglas Bates * DESCRIPTION (Version): release 0.999375-7 * src/CHMfactor.c (CHMfactor_update): fix 2008-03-22 Martin Maechler * src/dsCMatrix.c (dsCMatrix_LDL_D): cleanup, also using internal_chm_factor(). * R/AllGeneric.R: do *not* define a "chol" generic (but rather use the implicit one *without* making pivot part of the signature) * R/*.R: drop the 'pivot' from chol's signature and make 'pivot=FALSE' a default argument of method definitions. * .Rbuildignore: add 'wrld_1deg': I.e. do not put it into released version of Matrix 2008-03-18 Martin Maechler * R/Tsparse.R (.T.2.n): drop 0's before coercion to "nMatrix" * R/sparseMatrix.R (is.na): new simple method * R/denseMatrix.R (is.na): ditto. * R/diagMatrix.R (.symDiagonal): newly exported utility. * R/diagMatrix.R (Ops): * should not become dgeMatrix! * src/UFsparse_download.sh: --> * src/CHOLMOD/: update to CHOLMOD version 1.6 (Nov.2007) 2008-03-17 Martin Maechler * src/dsCMatrix.c (dsCMatrix_LDL_D): even faster utility with same functionality; barely tested in * tests/factorizing.R * src/Csparse.c (diag_tC): new functionality to enable faster determinant(, .) in * R/dsCMatrix.R 2008-03-17 18:53 Douglas Bates * R/CHMfactor.R, inst/include/Matrix.h, inst/include/Matrix_stubs.c, src/CHMfactor.c, src/CHMfactor.h, man/CHMfactor-class.Rd, src/init.c, tests/factorizing.R: Log-determinant of the parent matrix from a CHMfactor object as chm_factor_ldetL2; documentation and support 2008-03-15 Martin Maechler * R/dsCMatrix.R: enable determinant(, .) via chol(.) 2008-03-14 Martin Maechler * R/dsCMatrix.R: setAs(., "dsCMatrix") but with a deprecation warning. 2008-03-13 Martin Maechler * DESCRIPTION (Version, Date): bug-fix release 0.999375-6 * R/diagMatrix.R (diag2tT.u): utility to be smarter in o setAs(., "nMatrix") added. * R/diagMatrix.R (Diagonal): Diagonal(4, x=3) now works too * R/Auxiliaries.R (.diagU2N): more careful coercion in 2 steps new argument 'checkDense = FALSE'. 2008-03-07 Martin Maechler * src/dgeMatrix.c (dgeMatrix_exp): fix the octave-origin bug in the back-permutation of the matrix exponential. * tests/matr-exp.R: test the fix (for an example where expm() was wrong). * DESCRIPTION (Date,Version): ready to release 0.999375-5 * tests/simple.R: testing diagN2U 2008-03-06 Martin Maechler * R/Auxiliaries.R (diagN2U): interface to * src/Csparse.c (Csparse_diagN2U): .Call()able SEXP version of chm_diagN2U() * tests/matprod.R: test for triangularity preserving %*% 2008-03-05 Martin Maechler * src/chm_common.c (chm_diagN2U): new utility. * src/Csparse.c (Csparse_Csparse_crossprod, Csparse_Csparse_prod): make use of chm_diagN2U() and hence now preserve triangularity and unit-triangularity. * DESCRIPTION (LicenseDetails): new; such that 'License:' becomes "canonical" 2008-03-04 Martin Maechler * R/diagMatrix.R (subDiag): fix when x[..] became a vector * src/Tsparse.c (Tsparse_diagU2N): new utility, necessary for e.g. * src/Csparse.c (Csparse_crossprod): use [CT]sparse_diagU2N() !! * R/Auxiliaries.R (.diagU2N): make use of new Tsparse_diagU2N * R/Ops.R ("-" ()): use diagU2N() * src/chm_common.c (AS_CHM_FINISH): add note about problem for triangular (diag = "U"). 2008-02-21 Martin Maechler * R/Auxiliaries.R (as_Csparse2): drop this, replacing by * R/bind.R: .Call(dense_to_Csparse, *) 2008-02-20 Martin Maechler * R/Matrix.R (Matrix): no longer use coercions to specific classes (since we are discouraging them in user code). * tests/*.R: also replaces coercions to specific classes by coercions to super classes. * R/denseMatrix.R (.dense2C): simplified by using forceSymmetric() 2008-02-19 Martin Maechler * man/CAex.Rd: example: coerce to symmetric*, not dsC* * src/dense.c (dense_band): generalized from ddense_band * R/ddenseMatrix.R (.trilDense,.triuDense, .bandDense): now for "denseMatrix" (instead of just "ddense*"); much simplified setMethod()s for these. * src/dense.c (dense_to_symmetric): generalized from ddense_* 2008-02-18 Martin Maechler * R/AllGeneric.R: forceSymmetric() generic: fast no-checking version of as(*, "symmetricMatric"). * src/dense.c (ddense_to_symmetric): add 'symm_test' argument, and * R/symmetricMatrix.R: set it TRUE in coercion to "symmetricMatrix" 2008-02-16 Martin Maechler * R/Matrix.R (subset.ij): utility, as first step to faster M [ ] indexing. * R/Matrix.R (.M.sub.i.logical): M[ ] : try better. * src/dense.c (ddense_symmpart, ddense_skewpart): new functions for more efficient symmpart() and skewpart() methods. * src/Mutils.c (equal_string_vectors): utility * src/dense.c (ddense_to_symmetric): new function used in * R/symmetricMatrix.R: setAs(., "symmetricMatrix") * R/sparseMatrix.R, et_al (isSymmetric): add '...' to formals, in order to match the generic (and evade .local(..)). * R/dsCMatrix.R: dgC -> dsC: use C code! * NAMESPACE, R/AllGeneric.R (symmpart, skewpart): new functions as per TODO * R/Auxiliaries.R (setZero, all0Matrix): new utilities * R/symmetricMatrix.R: obvious symmpart(), skewpart() methods 2008-02-15 Martin Maechler * R/Ops.R (.Arith.Csparse): use diagU2N when needed in triangular * R/Auxiliaries.R (non0.i): take out of non0ind * R/ddenseMatrix.R (.trilDense, .triuDense, .bandDense): make tril(), triu(), band() work for "matrix" and all "dense*" * R/triangularMatrix.R (.tri[lu].tr): need .diagU2N(*) * tests/simple.R: test the fix above * R/sparseMatrix.R ([): simplification: no coerce to before we use as(., )[...] anyway * R/Rsparse.R (.viaC.to.R): mostly instead of .viaC.to.dgR() * R/triangularMatrix.R (isTriangular): methods for all subclasses instead of "triangularMatrix" -- just to disambiguate 2008-02-14 Martin Maechler * tests/Class+Meth.R (dotestMat): add m[FALSE, FALSE] { <-> TODO} * tests/indexing.R: example that fails above 2008-01-26 Martin Maechler * R/Matrix.R (.M.sub.i.2col): fix for logical matrix indexing * R/Tsparse.R (.TM.sub.i.2col, .TM.repl.i.2col): ditto; now, M[lower.tri(M)] and M[lower.tri(M)] <- v work better * src/Tsparse.c (Tsparse_to_tCsparse): new fast utility. * src/Tsparse.h, init.c: ditto * R/Auxiliaries.R (isTriT): new; faster than going via Csparse both isTriC() and isTriT() now return TRUE with "kind" or FALSE. * R/sparseMatrix.R (isTriangular): hence simplified 2008-01-24 Martin Maechler * R/Ops.R (.Arith.Csparse): new utility factored out of former o , extended for triangular and also used in o . 2008-01-23 Martin Maechler * tests/factorizing.R (checkSchur): and more tests for checking Schur() * inst/test-tools.R (isOrthogonal): new function; also file restructured 2008-01-22 Martin Maechler * R/ngTMatrix.R: allow as(, "ngTMatrix") and hence coercion to "nMatrix" and "pMatrix" * R/AllClass.R: "Schur" class; "number" class union * man/number-class.Rd: * man/Schur-class.Rd: * R/eigen.R (.dgeSchur): utility, and return "Schur" class (.simpleSchur): Schur() method for diagonal matrices (.triSchur): Schur() method for triangular matrices (Schur.sym): Schur() for symmetric matrices {building on eigen()}. 2008-01-21 Martin Maechler * src/dgCMatrix.c (dgCMatrix_QR): set @Dim slot (as per doc) 2008-01-15 Martin Maechler * R/CHMfactor.R (solve): method for b="numeric", but also b="ANY" in order to ensure 'system = *' is not lost; formals()$system instead of cut&paste. * tests/factorizing.R: test solve(, ) 2008-01-11 Martin Maechler * DESCRIPTION (Date): make ready for release --> 0.999375-4 * R/dgeMatrix.R: fix rcond() method for "dgeMatrix". 2007-12-08 Martin Maechler * R/pMatrix.R: as(*, "matrix") now returns 0/1 *integer* matrix, and hence does as.vector(.). * man/pMatrix-class.Rd: docs * R/sparseMatrix.R: fix for printing "integer sparse" * tests/Class+Meth.R (tstMatrixClass): test M[FALSE], M[2] etc * R/Matrix.R and others: use "exact" function argument list for both "[" : (x, i,j, ..., drop) and "[<-" : (x, i,j, ..., value) * R/denseMatrix.R: M[i] and M[i] <- v (i vector) now work * R/Tsparse.R (replTmat): ditto * R/diagMatrix.R (replDiag): ditto * R/Csparse.R (replCmat): ditto {was it worth the pain?} * tests/indexing.R: testing the above 2007-12-07 Martin Maechler * R/sparseMatrix.R (cov2cor): method for sparse matrices * R/diagMatrix.R ([<-): fix D[ cbind(i,j) ] <- v * R/bind2.R: fix for Rsparse* and rbind2(dense,dense) * tests/Class+Meth.R: test cbind2, rbind2 and diag<- 2007-12-06 Martin Maechler * R/Matrix.R: "generic" cov2cor() method * R/nearPD.R: new 'only.values', 'keepDiag' arguments; speed up Q %*% D %*% t(Q) * tests/dpoMatrix.R: test nearPD() 2007-12-05 Doug Bates and Martin Maechler * R/sparseMatrix.R: xtabs(*, sparse=.) function; an extention of stats::xtabs() allowing to create sparse matrices. 2007-10-08 Martin Maechler * DESCRIPTION (Version): *-4 (released *-3 two days ago) 2007-10-06 Martin Maechler * R/pMatrix.R: solve(, ) 2007-10-05 Martin Maechler * R/LU.R: solve() method for "denseLU" 2007-10-01 Martin Maechler * DESCRIPTION (Version): 0.999375-3 preparing for release * R/AllGeneric.R: simplify if(.) .. else .. for R <= 2.5.1 * R/Matrix.R (Matrix): .Internal(matrix(..)) different for R >= 2.7.0 2007-09-26 Martin Maechler * R/pMatrix.R (.m.mult.pMat): fix %*% , thanks to Kasper Kristensen. * tests/matprod.R: regression test for that. 2007-09-23 17:32 Douglas Bates * [r4778] R/AllGeneric.R: Check R version before defining generics for primitives 2007-09-13 Martin Maechler * R/denseMatrix.R (rcond): method * R/sparseQR.R (rcond): method, use x or t(x) 2007-09-12 Martin Maechler * R/dgeMatrix.R (rcond): method: work via qr.R() for non-square matrices. * R/sparseMatrix.R: Ditto for all other rcond() method definitions. * man/rcond.Rd: mention the more general definition, and add example for non-square matrices. * man/chol.Rd: new file, for the S4 chol() generic and all methods. 2007-09-11 Martin Maechler * R/sparseQR.R: add qr.R() method [to be used for rcond()] 2007-09-01 Martin Maechler * R/Matrix.R ([<-): add (Matrix,missing,ANY,Matrix) etc * tests/indexing.R: add new regression for the above cases. 2007-08-30 Martin Maechler * src/Mutils.h (__sun): clause for alloca.h on Solaris 2007-08-16 Martin Maechler * DESCRIPTION (Date, Version): 0.999375-2 2007-08-15 Martin Maechler * R/HBMM.R (readMM): make work for pattern matrices as well 2007-08-14 13:07 Douglas Bates * [r4730] src/Mutils.h: declare alloca * [r4734] NAMESPACE, R/AllGeneric.R, R/Csparse.R, R/HBMM.R, R/Tsparse.R, R/dgCMatrix.R, R/dgTMatrix.R, R/dsCMatrix.R, R/dsTMatrix.R, man/externalFormats.Rd, src/Csparse.c, src/Csparse.h, src/DEPS.mkf, src/HBMM.c, src/HBMM.h, src/Mutils.h, src/SOURCES_C.mkf, src/init.c, src/mmio.c, src/mmio.h: Remove deprecated function writeHB and its methods; switch writeMM to use CHOLMOD code; repair readMM 2007-08-14 Martin Maechler * R/nearPD.R, man/nearPD.Rd (nearPD): new function built on Jens Oehlschlaegel's ... result type still to be discussed! 2007-08-10 Martin Maechler * man/image-methods.Rd: new, combining all image() methods 2007-08-09 Martin Maechler * R/dgCMatrix.R: define qr() and lu() methods for "sparseMatrix" to work via dgC... * R/Matrix.R (Matrix): special treatment for "table" (S3) 2007-08-07 Martin Maechler * R/dgTMatrix.R (image): change defaults to aspect = "iso", colorkey = FALSE 2007-08-06 Martin Maechler * src/dsyMatrix.c (dsyMatrix_matrix_mm): 'b' might be matrix; must copy its *expanded* x slot before LAPACK call. * tests/matprod.R: test the last days' changes. 2007-08-06 16:43 Douglas Bates * [r4712] inst/include/Matrix_stubs.c: Change R_cholmod_printf in stubs as well as in sources * [r4713] src/dsyMatrix.c: Duplicate the contents of the RHS before Lapack call 2007-08-03 Martin Maechler * R/Matrix.R (%*%, crossprod, tcrossprod): add method for ("Matrix", "matrix") which is needed in some cases. Ditto for solve(). * R/colSums.R (.as.dge.Fun): need ddenseMatrix methods to avoid infinite recursion in dispatch for some cases. 2007-08-02 08:48 Martin Maechler * [r4693] src/chm_common.c: R_cholmod_printf() instead of Rprintf() just so pointers match 2007-08-02 Martin Maechler * DESCRIPTION (Date): set ready for release -- 0.999375-1 2007-08-01 15:44 Douglas Bates * [r4686] inst/include/Matrix.h, inst/include/Matrix_stubs.c, src/chm_common.c, src/chm_common.h: Change API for numeric_as_chm_dense and N_AS_CHM_DN 2007-08-01 Martin Maechler * src/dtrMatrix.c (dtrMatrix_matrix_mm): fix dimensionality check (!) * tests/matprod.R: regr.test for it 2007-07-20 Martin Maechler * R/dMatrix.R: fix from Brian for Math2(., digits = "missing") * tests/group-methods.R: and regression-test it 2007-07-19 19:45 Douglas Bates * [r4642] inst/include/Matrix.h, inst/include/Matrix_stubs.c, inst/include/cholmod.h, src/chm_common.c, src/init.c: Export triplet_to_sparse, documentation, use typedefs 2007-07-18 Martin Maechler * man/dpoMatrix-class.Rd: added 'corMatrix' example * src/dsyMatrix.[ch] (dsyMatrix_as_matrix): new 'keep_dimnames' arg * src/dtrMatrix.[ch] (dtrMatrix_as_matrix): ditto * src/init.c, R/dsyMatrix.R, R/dtrMatrix.R, R/lgTMatrix.R: ditto * R/lsparseMatrix.R: bug fix in "all" method * R/Ops.R (.do.Logic.lsparse): "|" bug in borderline case * R/dsyMatrix.R (coerce->dsTMatrix): (i,j) slots should *not* have names * R/ngTMatrix.R (coerce->ngTMatrix): ditto; + matrix |-> nMatrix coercion * R/pMatrix.R: + setAs() to dMatrix and from nMatrix * man/pMatrix-class.Rd: ditto * R/Matrix.R (Summary): method for non-dMatrix * tests/Class+Meth.R (extraValid): new check about "dirty" slots * tests/Class+Meth.R (tstMatrixClass): test norm(.); test all Summary methods. 2007-07-16 Martin Maechler * R/dgeMatrix.R (norm, rcond): methods for 'matrix' 2007-07-14 Martin Maechler * R/sparseMatrix.R (norm): simple methods for sparseMatrix * R/pMatrix.R (t?crossprod): methods for pMatrix 2007-07-10 Douglas Bates * src/dgeMatrix.c (dgeMatrix_colsums): Get the logic straight. 2007-07-09 20:45 Douglas Bates * [r4579] src/dgeMatrix.c: Untangle horrible code in dgeMatrix_colsums trying to fix a subtle bug - which has been somewhere else. 2007-07-09 19:43 Martin Maechler * [r4578] src/dgeMatrix.c: "cleaned" dgeMatrix_colsums() - but did not solve the bug 2007-07-08 Martin Maechler * src/dgCMatrix.c (compressed_to_TMatrix): 2007-07-07 Martin Maechler * src/Csparse.c (Rsparse_validate): new, to have some validity checking for RsparseMatrix * src/dgCMatrix.c (xRMatrix_validate): ditto * src/dtCMatrix.c (tRMatrix_validate): ditto 2007-07-07 Douglas Bates * [r4567] R/AllClass.R: Slots already in RsparseMatrix were redefined in lgRMatrix * [r4568] DESCRIPTION: Prepare for bug-fix release * [r4570] src/CHOLMOD/Check/cholmod_write.c: Include cholmod_matrixops.h for declaration of cholmod_symmetry 2007-07-06 Martin Maechler * DESCRIPTION (Version): 0.999375 merged into the trunk; ready for release. 2007-07-06 14:11 Douglas Bates * [r4559] src/iohb.c, src/iohb.h: Remove Harwell-Boeing input/output functions - no longer used * [r4560] src/HBMM.c, src/Mutils.c, src/dgTMatrix.c, src/dgeMatrix.c, src/dspMatrix.c, src/dsyMatrix.c, src/dtCMatrix.c, src/factorizations.c, src/sparseQR.c: Replace most calls to Calloc by Alloca 2007-07-06 13:14 Martin Maechler * [r4558] inst/doc/Comparisons.Rnw, src/CHMfactor.c, src/Csparse.c, src/Tsparse.c, src/chm_common.c, src/chm_common.h, src/dense.c, src/dgCMatrix.c, src/dsCMatrix.c, src/dtTMatrix.c, src/sparseQR.c, src/t_gCMatrix_colSums.c: more R_CheckStack()s 2007-07-05 18:12 Douglas Bates * [r4550] inst/include/Matrix.h: Add the macro N_AS_CHM_DN to "alloca" the required amount of memory then call M_numeric_as_chm_dense. * [r4556] src/Mutils.h, src/dgCMatrix.c: Define and use the Alloca macro (like Calloc but calling alloca) 2007-07-05 Martin Maechler * R/sparseMatrix.R (printSpMatrix): renamed from prSpMatrix() and extended with more sophisticated 'col.names' option. * NAMESPACE: export printSparseMatrix() * man/printSpMatrix.Rd: document, incl. examples 2007-07-04 16:21 Douglas Bates * [r4543] src/cs_utils.c, src/cs_utils.h, src/dgCMatrix.c, src/dtCMatrix.c, src/sparseQR.c: CSP typedef for *cs and macro AS_CSP. API change - pass the empty structure to Matrix_as_cs. 2007-07-04 Martin Maechler * DESCRIPTION (Version): 0.99875-4 * tests/Class+Meth.R (tstMatrixClass): add dimnames, and hence test some dimnames perservation. * R/dsTMatrix.R (t-method): keep dimnames * R/dtTMatrix.R: ditto * R/sparseMatrix.R (prSpMatrix): print colnames when non-trivial and ncol(.) < 10 * src/cs_utils.c: drop check_class() and use Matrix_check_class() from Mutils.h * src/lgCMatrix.c ([ln]csc_to_matrix): no longer lose dimnames, e.g. in as(, "matrix") 2007-07-01 13:27 Douglas Bates * [r4529] .: Create a branch for the API changes from the 0.99875 series to the 0.999375 series * [r4530] DESCRIPTION, inst/include/Matrix.h, inst/include/Matrix_stubs.c, src/CHMfactor.c, src/Csparse.c, src/Mutils.h, src/Tsparse.c, src/chm_common.c, src/chm_common.h, src/dense.c, src/dgCMatrix.c, src/dsCMatrix.c, src/dtTMatrix.c, src/t_gCMatrix_colSums.c: API change - pass the empty structure to the as_cholmod_x functions 2007-06-30 09:05 Martin Maechler * [r4527] trunk/Matrix/DESCRIPTION, trunk/Matrix/NAMESPACE, trunk/Matrix/inst/doc/Comparisons.Rnw: add session- and hardware-info to Comparisons >>>>>>> .merge-right.r4561 2007-06-29 Martin Maechler * DESCRIPTION (Version): 0.99875-3 ready to be released. * R/sparseMatrix.R (spMatrix): make spMatrix(3,4) working * R/AllGeneric.R: set "Math" (and "Math2") group generics in a way that should also work in a future version of R. 2007-06-21 Martin Maechler * NAMESPACE, R/AllClass.R: "xsparseVector" class union. * R/sparseVector.R: more *sparseVector coercions, notably for non - double ones. 2007-06-19 Martin Maechler * R/colSums.R: new file for all (col|row)(Sums|Means) methods, notably the new ones building on the new .Call(.)s: * src/dgCMatrix.c (DEF_gCMatrix_COLSUMS): use to define all 4 of [dlin]gCMatrix_colSums(). 2007-06-18 16:12 Douglas Bates * [r4472] src/Syms.h, src/init.c: Added Matrix_lengthSym * [r4473] src/dgCMatrix.c: Modified dgCMatrix_colSums for sparseVector result 2007-06-16 Martin Maechler * R/kronecker.R: fix typo (could lead to inf.recursion) * test/simple.R: testing that * R/sparseMatrix.R (prSpMatrix): change to be used as print() method as well (which can have arguments, show() can't). 2007-06-16 15:52 Douglas Bates * [r4466] R/dgCMatrix.R, src/dgCMatrix.c, src/dgCMatrix.h, src/init.c: added dgCMatrix_colSums for [col,row][Sums,Means] 2007-06-15 23:15 Douglas Bates * [r4460] R/sparseMatrix.R, man/dgCMatrix-class.Rd, src/dgCMatrix.c, src/dgCMatrix.h, src/init.c: added lm.fit.sparse (unexported), coercion of "factor" to "dgCMatrix" and dgCMatrix_cholsol * [r4461] R/AllClass.R, man/sparseMatrix-class.Rd: draft "indicators" class * [r4463] R/sparseMatrix.R, man/dgCMatrix-class.Rd, man/sparseMatrix-class.Rd: Don't need an "indicators" class - use the row names to store the levels - duh! Added an example. 2007-06-14 Martin Maechler * src/Csparse.c (Csparse_validate): check for *repeated* entries thanks to example from Christian Buchta; with a test here: * tests/simple.R: 2007-06-07 Martin Maechler * R/Auxiliaries.R (callGeneric): another fix, needed for some cases of colSums(*, sparseResult = TRUE) 2007-06-06 Martin Maechler * R/lsparseMatrix.R, R/ldenseMatrix.R (all, any): change default to 'na.rm = FALSE' as "everywhere" else in R. 2007-06-05 Douglas Bates * [r4421] src/CSparse_install.sh: Modify for new organization of CSparse package * [r4425] src/UFsparse_download.sh: Update to version 3.0.0 of SuiteSparse * [r4426] src/Makefile: add ./UFconfig to the include path for compilation * [r4427] src/cs.[ch]: update to CSparse version 2.2.0 * [r4428] inst/doc/UFsparse/* src/{AMD,CHOLMOD,COLAMD}/* src/UFconfig/UFconfig.h: Update to version 3.0.0 of SuiteSparse 2007-06-05 Martin Maechler * R/Auxiliaries.R (emptyColnames): + argument msg.if.not.empty, used in * R/sparseMatrix.R (prSpMatrix): now gives a message about suppressed column names. 2007-06-04 17:13 Douglas Bates * [r4418] src/Csparse.c, src/HBMM.c, src/Mutils.c, src/Mutils.h, src/Tsparse.c, src/chm_common.c, src/chm_common.h, src/dgCMatrix.c, src/dgeMatrix.c, src/dpoMatrix.c, src/dpoMatrix.h, src/dppMatrix.c, src/dppMatrix.h, src/dsCMatrix.c, src/dspMatrix.c, src/dspMatrix.h, src/dsyMatrix.c, src/dsyMatrix.h, src/dtpMatrix.c, src/dtrMatrix.c: Remove warnings after change to const char* CHAR 2007-06-04 17:11 Douglas Bates * [r4417] inst/include/Matrix_stubs.c, inst/include/cholmod.h: Corrected type of M_cholmod_ssmult 2007-06-03 14:42 Douglas Bates * [r4412] inst/include/Matrix_stubs.c, inst/include/cholmod.h, src/init.c: Yet another cholmod export - cholmod_ssmult 2007-05-23 Martin Maechler * NAMESPACE: exported drop0(), since * man/drop0.Rd: I have seen several cases, I really wanted to use it, so our users may want too. 2007-05-22 Martin Maechler * man/colSums.Rd: separately document colSums() etc, since these have the extra argument 'sparseResult'. 2007-05-21 Martin Maechler * R/sparseMatrix.R (spMatrix): utility (T)sparse Matrix constructor; * man/spMatrix.Rd: docu., including examples * R/Auxiliaries.R (sp.colMeans): etc, using a patched callGeneric(), in order to make colMeans() etc fast *and* correct. * R/sparseVector.R (replSPvec): "[<-" functionality for sparseVectors; tested in * tests/simple.R: 2007-05-19 Martin Maechler * R/sparseMatrix.R (print.sparseSummary): and summary() method for (very) sparse Matrices; output similar to Matlab's print(). 2007-05-17 Douglas Bates * src/HBMM.c (Matrix_writeMatrixMarket): Write 1-based, not 0-based, indices (Jose Quesada ). 2007-05-16 Douglas Bates * R/CHMfactor.R: Added solve methods for a CHMfactor object. 2007-05-16 Martin Maechler * R/Auxiliaries.R (sparsapply): new utility, much faster than tapply1() for large sparse matrices. 2007-05-15 Martin Maechler * R/Matrix.R (dim<-): reshape now via sparseVector. * R/sparseVector.R: methods and function for * R/AllClass.R: new "sparseVector" class and daughters. * NAMESPACE: export new classes 2007-05-14 Martin Maechler * DESCRIPTION (Version): 0.99875-1 * src/Makefile.win: also remove Lapack code from here (cf. 04-25). 2007-05-11 Martin Maechler * R/Tsparse.R ([, Tsparse): fix last case: *duplicated*, symmetric indexing * tests/indexing.R: test set for that. 2007-05-08 Martin Maechler * R/Tsparse.R (replTmat): fix the case of *duplicated* index entries. * tests/indexing.R(out): add regression test for it 2007-04-30 Martin Maechler * R/(l(dense|sparse))?Matrix.R (!): use 'x', not 'e1' as argument name for "!" method definitions. 2007-04-26 Martin Maechler * R/Tsparse.R (intI): new utility, used for "[" : Cleanup up there, and fixes for duplicated indices - more TODO! * tests/indexing.R(out): more tests 2007-04-25 Douglas Bates * DESCRIPTION,src/Makefile: require R>= 2.5.0 and remove Lapack code that is now part of the R Lapack library. * src/init.c,inst/include/{Matrix_stubs.c,cholmod.h}:export cholmod_factorize_p (used in lme4 for GLMMs and NLMMs). 2007-04-21 Martin Maechler * R/Matrix.R (image): method for all Matrices, not just sparse ones. 2007-04-17 Martin Maechler * R/Auxiliaries.R (tapply1): unname(.) -> colSums() etc don't end up with extraneous names '0'...'' 2007-04-12 Martin Maechler * R/dgTMatrix.R (mat2dgT): care about NAs 2007-04-11 Martin Maechler * R/kronecker.R: triangularity preserving methods 2007-03-27 Martin Maechler * R/kronecker.R: new file collecting kronecker() methods in one place. Goal: become much faster! 2007-03-23 Martin Maechler * src/dtCMatrix.c (dtCMatrix_solve): use the new code from Kasper Kristensen based cs_spsolve() instead of _lsolve & _usolve which can be much faster. * tests/matprod.R: add regression tests for these (upper & lower). 2007-03-19 Martin Maechler * R/Matrix.R (diff): method for our Matrices. * R/sparseMatrix.R (isDiagonal): check dim()! 2007-03-17 Martin Maechler * R/Matrix.R (dim<-): new method for "reshape()" built on a proposal from Tamas Papp. 2007-03-16 Martin Maechler * R/AllGeneric.R: remove all if(!isGeneric(.)) clauses * R/zzz.R (.onLoad, .onUnload): do *not* leave bind_activation(TRUE); rather define and export cBind() and rBind() only. --> useRs *must* change code that used to have cbind()/rbind() !! * R/bind.R: change tests from cbind() to cBind() and similarly to rBind() * R/bind.Rout.save: ditto 2007-02-16 Douglas Bates * DESCRIPTION (Date, Version): 0.9975-11 with new date * src/dgCMatrix.c (R_to_CMatrix, compressed_to_TMatrix): remove const modifier on declaration of the array 'valid' 2007-02-12 Douglas Bates * R/CHMfactor.R: Add image method (coercion to sparseMatrix). 2007-02-05 Martin Maechler * DESCRIPTION (Date, Version): 0.9975-10 with new date. * R/Ops.R (Arith): make sure Csparse o Csparse also works for e.g. ntCMatrix * tests/simple.R: test the above and some of these coercions: * R/nsparseMatrix.R: coercing "Csparse" to "lsparseMatrix"; be careful to avoid infinite recursion, using new coercions in * R/ngCMatrix.R and nsC... and ntC... * R/lsparseMatrix.R: ditto * R/SparseM-conv.R: more conversion, notably for triplet matrices. * src/dgCMatrix.c (R_to_C_Matrix): port Doug's fix and * R/Rsparse.R: reactivate .Call()s * tests/Class+Meth.R: a bit more on actual classes 2007-02-04 Douglas Bates * src/dgCMatrix.c (compressed_to_TMatrix): fix memory bug using strdup() 2007-02-03 Martin Maechler * DESCRIPTION (Version): 0.9975-10 to upload * tests/Class+Meth.R (tstMatrixClass): require coercions to specific classes less unconditionally. * R/Auxiliaries.R: get rid of as_Tsparse() and as_Rsparse() * R/Tsparse.R (triu): etc, use as(*, "TsparseMatrix") instead of as_Tsparse() * R/Rsparse.R (.R.2.T): R-level workaround using compressed_to_TMatrix. * R/Rsparse.R (.R.2.C): R-level workaround since C-level R_to_CMatrix segfaults on one platform. Eliminate most coercion method to *specific* classes, and replace with virtual classes coercions. 2007-02-01 Martin Maechler * src/init.c: export the CHM...._validate() placeholders, since they *are* called. * tests/Class+Meth.R (classCanCoerce): and starting to test all as(, ) 2007-01-30 Martin Maechler * R/Tsparse.R ([): more care when subsetting triangular Tsparse * tests/indexing.R: tested now * tests/indexing.Rout.save: updated * src/Csparse.c (Csparse_to_dense): use Rkind = -1 for PATTERN to * src/chm_common.c (chm_dense_to_SEXP): return "ngeMatrix" when appropriate. * NAMESPACE: export a trivial * R/Matrix.R: drop() Matrix-method * R/AllClass.R: moved all prototypes to virtual super classes. * R/Rsparse.R: many more coercions to have less exceptions in * tests/Class+Meth.R: * R/Ops.R (Compare): tweak for case with NA * tests/simpl.R: hence another 'FIXME' eliminated 2007-01-29 Martin Maechler * R/diagMatrix.R (solve): the obvious methods for diagonalMatrix objects. * tests/Class+Meth.R (tstMatrixClass): now testing diag(), nnzero(), and more of "!", "&", "|", all, any; coercions * R/Rsparse.R: many coercions (which enable quite a few other methods), thanks to enhancements in * src/dgCMatrix.c (R_to_CMatrix): new, and * src/dgCMatrix.c (compressed_to_TMatrix): now for (d,l,n) , symmetric & triangular and ..RMatrix objects. * src/TMatrix_as.c (Matrix_T_as_DENSE,Matrix_T_as_GENERAL): renamed file from src/dsTMatrix.c; now dealing with symmetric and triangular Tsparse coercions, both to dense and general. 2007-01-27 Martin Maechler * src/dsTMatrix.c: has now "l" and "n" methods besides the "d" ones. * R/Ops.R (Arith): o now remains sparse where sensible when the is of length > 1. 2007-01-26 Martin Maechler * R/Matrix.R ([<-): for M[] <- value: fix length 2007-01-25 Martin Maechler * R/Auxiliaries.R (n2l_Matrix): new, to be used in * R/ndenseMatrix.R: new coercions n* -> l* 2007-01-22 Martin Maechler * R/triangularMatrix.R: new file; simple triu() and tril() methods. * R/Ops.R ("Logic"): and other "Ops", many updates 2007-01-18 Martin Maechler * src/Mutils.h (SET_DimNames): new utility * R/Auxiliaries.R (nnzero): improved and now exported via * NAMESPACE: + nnzero(); length() == prod(dim(.)) method for all "Matrix" objects 2007-01-17 Martin Maechler * R/diagMatrix.R (!): fix typo. 2007-01-16 Martin Maechler * R/Auxiliaries.R (as_Csparse): and quite a few others: allow to pass class definition --> speedup * R/sparseMatrix.R: apply the above * R/Csparse.R: coercion Csparse* to dense* now preserves shape properties. * src/Mutils.h (mMatrix_as_geMatrix): new, based on * src/Mutils.c (dup_mMatrix_as_geMatrix): new; generalization of old dup_mMatrix_as_dgeMatrix), eliminating a long-standing "FIXME". * src/dense.c (dense_to_Csparse): use new mMatrix_as_geMatrix() * R/denseMatrix.R (.dense2C): based on dense_to_Csparse: name it, and use it for "sparse*" as well, since it's faster than the as_Csparse(.) way. 2007-01-15 Martin Maechler * R/Ops.R ("Logic"): more methods, notably an o one. 2007-01-12 Martin Maechler * R/Tsparse.R (.TM.repl.i.2col): new internal function to be used as method for M[ ij ] <- v * R/Csparse.R:: go via Tsparse for "M[ij] <- v" * R/Ops.R: "Compare" for (C|R)sparse: need pointer slot for all FALSE answer * R/Csparse.R (replCmat): fix the "all non-zero" case with reordering * tests/indexing.R: test it, and some of the above 2007-01-05 Martin Maechler * R/Auxiliaries.R (is_duplicatedT): new utility 2007-01-05 Douglas Bates * src/init.c (R_init_Matrix): export cholmod_scale 2006-12-30 Martin Maechler * R/zzz.R (tmp): for R >= 2.5.0, extend formals of our base::as.matrix to (x, ...) 2006-12-28 Martin Maechler * R/Ops.R ("Arith" etc): move almost all "Ops" methods to new R file; start using "Logic", hence * DESCRIPTION (Depends): R >= 2.4.1 (since we want "Logic") * NAMESPACE: import and export "Logic" 2006-12-27 Martin Maechler * src/zpotfr.f and dependencies: use LAPACK 3.1 version only needed previously to R version 2.5.0. 2006-12-26 Martin Maechler * DESCRIPTION (Date, Version): 0.9975-8, ready for release * R/Tsparse.R (replTmat): fix subassignment of triangular * R/Csparse.R (replCmat): ditto * tests/indexing.R: more tests, incl the above fix 2006-12-23 Martin Maechler * R/Auxiliaries.R (drop0): extend for non CSparse * R/Auxiliaries.R (diagU2N): should work for all sparseMatrix * src/Csparse.c (Csparse_to_Tsparse, Csparse_general_to_symmetric): use uplo correctly (!); other places: use uplo_P() macro * R/Csparse.R (replCmat): call diagU2N() when needed * R/Tsparse.R (replTmat): ditto * src/dtCMatrix.c (tCMatrix_validate): new * src/dtTMatrix.c (tTMatrix_validate): new, used in * R/AllClass.R: for validity of dtC, dsC, and dtT, dsT. * R/diagMatrix.R (replDiag): to use in [<- 2006-12-22 Martin Maechler * R/Auxiliaries.R (as_Csparse2, as_geSimpl): new functions; also more general diagU2N(). 2006-12-21 Martin Maechler * R/bind2.R: new file for all cbind2(), rbind() methods moved here from R/Matrix.R files. Better diagonal & improved sparse methods. 2006-12-20 Martin Maechler * tests/bind.R: a few more cases * R/Auxiliaries.R (.M.kind): also work for atomic vectors * R/denseMatrix.R (cbind2/rbind2): moved here (and generalized) from * R/ddenseMatrix.R (cbind2/rbind2) * R/Tsparse.R (replTmat): final(?!) fix for "[<-" .. * tests/indexing.R * tests/indexing.Rout.save: updated 2006-12-18 Martin Maechler * R/Tsparse.R (replTmat): fixed a remaining "[<-" bug in * tests/indexing.R 2006-12-15 Martin Maechler * R/sparseMatrix.R (prSpMatrix): "." alignment much improved: align with proper position of "0", i.e., right for integers. argument 'align' by default is "fancy". 2006-12-14 Martin Maechler * R/sparseMatrix.R: delegate "Compare" to "Csparse.." * R/Csparse.R: and fix "Compare" for more cases. * tests/Class+Meth.R: test some of these (m == m, m != m) 2006-12-13 Martin Maechler * R/lsparseMatrix.R: all() and any() methods * R/ldenseMatrix.R: ditto * NAMESPACE, R/Matrix.R: ditto * man/all-methods.Rd: document them minimally * tests/simple.R: add a few examples for these 2006-12-11 Martin Maechler * R/Tsparse.R ([): fix long standing typo in symmetric case * man/dsCMatrix-class.Rd: add example exhibiting the above case 2006-12-10 Douglas Bates * src/CHMfactor.c (CHMfactor_to_sparse): change LDL factorization to LL before converting to a sparse matrix. (The LDL form can be converted to a sparse matrix but it is implicitly a unit triangular matrix and a diagonal matrix overwritten on the diagonal.) 2006-12-09 Douglas Bates * src/chm_common.c (chm_factor_to_SEXP): allocate and fill the Dim slot. 2006-12-08 Douglas Bates * DESCRIPTION (Version): updated -> release 0.9975-7 * src/{init.c,chm_common.c}, inst/include/*: export cholmod_analyze_p 2006-11-30 Martin Maechler * R/diagMatrix.R (%*%): write a direct [diag o Csparse] method 2006-11-29 Douglas Bates * src/dgeMatrix.c (dgeMatrix_solve): Check error code from dgetri. * tests/dg_Matrix.R: Add Barry Rowlingson's test of a matrix that is exactly singular. 2006-11-07 Martin Maechler * DESCRIPTION (Date): updated -> release 0.9975-6 2006-11-06 Martin Maechler * R/Csparse.R (replCmat): symmetric indexing of symmetric matrix now returns symmetric. * R/zzz.R ("diag<-"): replace "diag<-" in base for R <= 2.4.x * R/Matrix.R (.M.sub.i.2col): new, for M[ cbind(i,j) ] indexing. * R/Matrix.R (.M.repl.i.2col): new, for M[ cbind(i,j) ] <- value * R/Auxiliaries.R (.type.kind): added 2006-11-04 Martin Maechler * src/cs.[ch]: updated to CSparse Version 2.0.3 by simply running src/CSparse_install.sh * R/denseMatrix.R: "[": keep symmetric on symmetric indexing. 2006-11-03 Martin Maechler * src/dsCMatrix.c (dsCMatrix_Csparse_solve): new * R/dsCMatrix.R (solve): "fully-sparse" using the above. * R/AllClass.R: "pMatrix" now also inherits from "generalMatrix" * tests/Class+Meth.R (tstMatrixClass): now assure the (important in method programming) property : ###>> Every "Matrix" is either ###>> "general*", "symmetric*", "triangular*" or "diagonal*" (where "*" stands for "Matrix") * R/Auxiliaries.R (diagU2N): now .Call()s Csparse_diagU2N for * R/dMatrix.R (Compare(,): update and * tests/validObj.R: checks for "comparison" * R/sparseMatrix.R ([): improved indexing for sparse; trying to keep [ n, n] symmmetric * tests/indexing.R: indexing for logical sparse now ok 2006-11-02 Martin Maechler * src/Tsparse.c: use xTsparse_validate() , and hence remove * src/{ltC,lsC,lgT}Matrix.[ch]: removed 2006-11-02 Martin Maechler * R/AllClass.R (Matrix-class): check length of dimnames in validity. * tests/simple.R: validObject() checking the above. * src/dgCMatrix.c (xCMatrix_validate): new, small and simple, replacing both dgCMatrix_validate and lgCM*. * src/Csparse.c (Csparse_dense_prod, etc): do not lose dimnames; fix dimnames setting in other places. * src/chm_common.c (chm_dense_to_SEXP): now can pass dimnames 2006-11-01 Martin Maechler * R/Csparse.R,src/Csparse.c, etc: tcrossprod(,) * R/sparseMatrix.R (isSymmetric): drop 'factors' slot for symmetry test, via * R/Auxiliaries.R (.as.dgC.0.factors): 2006-11-01 Douglas Bates * R/Csparse.R,src/Csparse.c,tests/matprod.R, man/CsparseMatrix-class.Rd: crossprod(, ) added 2006-10-30 Martin Maechler * tests/matprod.R: add a variation of Harri's example * R/dsparseMatrix.R: fix crossprod(, ) to *not* recursive infinitely. * R/dgCMatrix.R: + solve(, ) * tests/indexing.R: add test for the "<" bug fixed 10-27 in R/dMatrix.R 2006-10-28 Martin Maechler * tests/Class+Meth.R (tstMatrixClass): more: use non-trivial matrix if possible; test m+m == 2*m; now test dgRMatrix. * R/dgRMatrix.R (.to.dgR): a few more coercions, in order to satisfy the above test. 2006-10-27 Martin Maechler * R/Matrix.R (Ops): o method added * R/dgCMatrix.R: solve(a, b="missing") based on * src/dgCMatrix.c (dgCMatrix_matrix_solve): extend to work with RHS = NULL. * R/diagMatrix.R (diagdiagprod): extend %*% etc to ldiMatrix; add more (needed) [t]crossprod() methods. * man/ddiMatrix-class.Rd: more info, notably on 'diag' * R/Auxiliaries.R (as_CspClass): cleanup (drop0): internal utility for "Csparse_drop(*, 0)" (.bail.out.2): encourage active feedback 2006-10-26 Martin Maechler * R/dMatrix.R(Compare): new(), then slots [no validity check] * src/Csparse.c (Csparse_validate): fixed (and more efficient in non-valid or 'sorted' case). * R/dsparseMatrix.R: add "chol" method. * R/ddenseMatrix.R: ditto * R/diagMatrix.R (Ops): group methods for o * NAMESPACE (Ops) * R/diagMatrix.R (diag2T): simple utility used "higher level" coercion; deprecating direct lower level coercions. * R/*.R (seq): use seq_len() and seq_along() where possible. 2006-10-23 Martin Maechler * DESCRIPTION (Version): 0.9975-5 ready for release 2006-10-20 Douglas Bates * src/init.c (R_init_Matrix): export more cholmod CCallable functions. 2006-10-20 Martin Maechler * R/AllClass.R (corMatrix): add 'validity' check; comment out unused "LDL" class definition * NAMESPACE: mention, but do not export "LDL" class * R/corMatrix.R: new (simple), needed for R-devel with * tests/Class+Meth.R (tstMatrixClass): 1 exception for corMatrix coerce and t() exceptions for all 5 'Mat.MatFact' classes. 2006-10-19 Douglas Bates * src/chm_common.h: Add R_cholmod_start to initialize cholmod to use Rprintf and R's error handling. 2006-10-17 Martin Maechler * R/diagMatrix.R (%*%): rep(*, each = .) in Matrix %*% diagonal. * tests/matprod.R: add tests for the bug fixed. 2006-10-11 Douglas Bates * src/HBMM.[ch]: remove HarwellBoeing format for writing. * src/SOURCES_C.mkf (SOURCES_C): no longer compile iohb.c 2006-10-06 Douglas Bates * R/d[gs]CMatrix.R: deprecate the writeHB function. Use writeMM instead. 2006-10-06 Martin Maechler * DESCRIPTION (Version): 0.9975-3 * R/diagMatrix.R (bdiag): new function constructing block diagonal (sparse) matrices. * man/bdiag.Rd: docu + examples * R/Csparse.R (replCmat): calling new Csparse_drop() now. * src/Csparse.c (Csparse_general_to_symmetric, Csparse_drop): new functions * R/lsCMatrix.R: three more coercions to lsC (thanks to the above) * R/diagMatrix.R (Diagonal): '[<-' method for diag.matrices such that result is sparse or diagonal (and not dense). * man/Subassign-methods.Rd: fix examples * R/Matrix.R (Matrix): Matrix(0, *) or Matrix(*, sparse=TRUE) should always return a sparse (and not sometimes a diagonal) matrix. 2006-10-05 Martin Maechler * R/Matrix.R ([<-): also for value "Matrix" or "matrix" 2006-10-04 Douglas Bates * DESCRIPTION (Version): 0.9975-2 * inst/include/Matrix_stubs.c (M_cholmod_sparse_to_triplet): export more symbols 2006-10-02 Douglas Bates * tests/dg_Matrix.R: Simplify test taking into account new code. 2006-09-29 Martin Maechler * R/Csparse.R (replCmat): improve for missing i / j in non-simple cases * R/lsTMatrix.R: new files w/ missing methods * R/nsTMatrix.R: " 'for completeness' * tests/Class+Meth.R: a bit less 'not.ok.classes' * R/Tsparse.R (t): generalized "t" method from "dgT*" to "Tsparse*" 2006-09-28 Douglas Bates * src/dppMatrix.h: Ensure definition of dspMatrix_validate is included. * src/init.c, inst/include/{Matrix.h,Matrix_stubs.h,cholmod.h}: Export C-callable functions used in Zt_create in lme4. 2006-09-28 Martin Maechler * DESCRIPTION (Version): 0.9975-1 * tests/simple.R: less checks fail; using NA, found that our kronecker() is not base-compatible with NA's. * R/dMatrix.R: "Compare" method now implemented for all cases * R/Auxiliaries.R (indTri): == which([lower/upper].tri( * )) new utility * man/dtpMatrix-class.Rd: mention length of 'x' slot * src/dtpMatrix.c (dtpMatrix_validate): fix check * src/dspMatrix.c (dspMatrix_validate): ditto * R/dtTMatrix.R (gt2tT): fix ("l" -> "n") including coercion to [nl]tTMatrix. * R/diagMatrix.R (show): print a header line as for other classes. 2006-09-27 Martin Maechler * src/Makefile.win (SUBDIRS): fix typo 2006-09-19 Martin Maechler * DESCRIPTION (Date): ready to release 0.9975-0 to CRAN 2006-09-18 Douglas Bates * R/[CT]sparse.R (crossprod and tcrossprod): Handle the cases for x symmetric and y missing in R code using %*% (cholmod_aat doesn't accept a symmetric matrix). * tests/group-methods.R: Uncomment test of crossprod applied to lsCMatrix objects. 2006-09-18 Martin Maechler * R/AllClass.R (symmetricMatrix): add validity method (available in C for a long time). Many "n..Matrix": drop (wrong) validity arg. * src/lgCMatrix.c (lgCMatrix_validate): check 'x' slot (!) * tests/indexing.Rout.save: * tests/indexing.R: additions, mainly for 'lsparse' * R/diagMatrix.R (Diagonal) & coercion to lgTMatrix: fixes for NA case. * R/Auxiliaries.R (nz.NA): new utility now used in nnzero() 2006-09-16 Martin Maechler * R/sparseMatrix.R (prSpMatrix): print logical NAs "visibly" as 'N' (1-letter - Ok?) * tests/group-methods.R: add test for logical + NAs * R/dMatrix.R ("Compare"): fix to work with NA's * R/AllClass.R: "Cholesky" etc now inherit from MatrixFactorization. * src/lgCMatrix.c (ncsc_to_matrix): renamed from lcsc_to_matrix() which is implemented. 2006-09-15 Martin Maechler * src/chm_common.c: coerce logical <-> double instead of typecasting; needed for "l" matrix handling in cholmod. * tests/other-pkgs.R (graph): small extension in "graph" checks. * R/sparseMatrix.R (graphNEL -> Tsparse): method for weight case. (Tsp2grNEL): other fixes needed 2006-09-11 Martin Maechler * R/AllClass.R ("nMatrix"): and subclasses for "nonzero pattern" Matrices, since "lMatrix", also "lsparseM" can have NA * R/ndenseMatrix.R, etc: new source files * man/nsparseMatrix-classes.Rd, etc: new help files * tests/: adaptions * src/chm_common.c (chm_dense_to_SEXP): and others: new 'Rkind' argument: "l*" and "d*" both use CHOLMOD_REAL * src/Csparse.c, etc: ditto 2006-09-11 Douglas Bates * src/Mutils.[ch],init.c inst/include/*.h: Move the alloc_d**Matrix functions to the lme4 package. 2006-09-09 Douglas Bates * src/dsCMatrix.c (dsCMatrix_Cholesky): igoring LDL = FALSE now fixed 2006-09-09 Martin Maechler * R/lMatrix.R: new * R/sparseMatrix.R (Tsp2grNEL): do not yet use graph::foo() * R/dgeMatrix.R: do not define tcrossprod() methods for "matrix" * man/tcrossprod.Rd: ditto 2006-09-08 Douglas Bates * inst/include/Matrix_stubs.c,Matrix.h: Add declarations and stubs for exported functions * src/Makefile, src/CHOLMOD/Lib/Makefile, src/Metis,CAMD,CCOLAMD: Remove partitioning algorithms for sparse matrix reordering. The copyright on the Metis code was problematic and the methods were rarely used. * src/triplet_to_col.[ch],MMHB.[ch]: Remove triplet_to_col. Such operations are now done entirely in CHOLMOD code. 2006-09-06 Douglas Bates * src/Mutils.h: Remove functions that are no longer used. 2006-09-04 Douglas Bates * src/dtCMatrix.c (dtCMatrix_validate): rename functions. * src/DEPS.mkf: update 2006-09-02 Martin Maechler * created branches/Matrix-for-R-2.3.x; on trunk: do * DESCRIPTION (Version): 0.9975-0 (Depends): R (>= 2.4.0) 2006-09-01 Douglas Bates * R/sparseMatrix.R: Added direct method to CsparseMatrix from graphNEL 2006-09-01 Martin Maechler * R/sparseMatrix.R: add coercion from "ANY" to "sparseMatrix" * R/denseMatrix.R: add coercion from "ANY" to "denseMatrix" * R/Matrix.R ([): use nargs() to disambiguate M[i] and M[i,] 2006-08-31 Martin Maechler * R/sparseMatrix.R (Arith): moved Arith group method one-level up from "dsparse" to "sparse" and now go via "Csparse" instead of "dgC" * R/dsparseMatrix.R: ditto * R/Csparse.R: ditto 2006-08-31 Martin Maechler * R/dMatrix.R (Compare): improve availability of "<", etc * R/Auxiliaries.R (asTuniq): new; also make use of R 2.4.x print(*,max) 2006-08-30 Martin Maechler * R/dgCMatrix.R: aargh: "Arith(, numeric)" was wrong because of a 0-index which was used as 1-index (..hmm) * R/sparseMatrix.R (prSpMatrix): fix printing an all-0 sparse Matrix * R/Auxiliaries.R (all0, is0): for 0-testing in presence of NA's * R/Auxiliaries.R (isTriMat): use all0() for 0-testing. (.is.diagonal): ditto * R/lgTMatrix.R: as("matrix", "lgTMatrix"): warn about NA's * R/Matrix.R (Matrix): also work for NA data 2006-08-28 Martin Maechler * R/Matrix.R (Matrix): + 'forceCheck' argument; dimnames setting in all cases. 2006-08-27 Douglas Bates * src/dense.[ch],init.c, R/ddenseMatrix.R, man/band.Rd (ddense_band): Added triu, tril and band for ddenseMatrix objects. 2006-08-25 Martin Maechler * src/Mutils.c (dup_mMatrix_as_dgeMatrix): added all subclasses of subclasses of "ddenseMatrix" * src/init.c et al: outcomment dtrM*_as_dge* and dsyM*_as_dge*_ * R/ddenseMatrix.R et al: setAs("ddenseMatrix", "dgeMatrix", ..) instead of half dozen specialized ones. 2006-08-25 Douglas Bates * R/lmer.R (qqmath method): Bug fix provided by Emmanuel Tillard - ordering standard errors to match effects. 2006-08-24 Douglas Bates * src/lsCMatrix.c (lsCMatrix_trans): Remove lsCMatrix_chol based on R_ldl. * R/lCholCMatrix.R, src/[dl]CholCMatrix.[ch],R_ldl.[ch],Metis_utils.[ch]: removed * src/dsCMatrix.c (dsCMatrix_to_dgTMatrix): use CHOLMOD * many files in ./R and ./src: Use more general version of dup_mMatrix_as_dgeMatrix to simplify method definitions. * src/Mutils.c (dup_mMatrix_as_dgeMatrix): Add ddiMatrix, dtpMatrix, dspMatrix and dppMatrix conversions. 2006-08-23 Douglas Bates * R/AllClass.R,lCholCMatrix.R,src/SOURCES_C.mkf,init.c,NAMESPACE: Remove classes lCholCMatrix and dCholCMatrix based on R_ldl code. * src/dgeMatrix.c: Ensure 'factors' slot exists in result of dgeMatrix_crossprod (may need to do this in other places). * R/AllGeneric.R,dsCMatrix.R, src/dscMatrix.[ch]: Add Cholesky generic and method for dsCMatrix. Use CHOLMOD for chol(). 2006-08-22 Douglas Bates * src/Mutils.c (dup_mMatrix_as_dgeMatrix): updated for general types of classed Matrices, matrices or numeric or logical vectors. * src/init.c: register dup_mMatrix_as_dgeMatrix for coercions. * src/chm_common.c,Mutils.h (as_cholmod_factor): Move check_class to Mutils.h (as an inline) and change name to Matrix_check_class; fixes in as_cholmod_factor and chm_factor_to_SEXP. * src/dsCMatrix.[ch]: Use CHOLMOD for dsCMatrix_chol and dsCMatrix_matrix_solve. Comment out vestigial functions. * src/Csparse.c: use diag_P and uplo_P macros. 2006-08-21 Douglas Bates * src/lmer.c (internal_mer_RZXinv): Fix memory leak caught by valgrind. * tests/matprod.R: Add tests to verify that 'solve' and '%*%' are inverses. * src/sparseQR.c (sparseQR_validate): add new validation test, fix -Wall warnings. * src/dppMatrix.c,dtrMatrix.c,dgCMatrix.c,dgeMatrix.c,dspMatrix.c: Use dup_mMatrix_as_dgeMatrix. 2006-08-20 Douglas Bates * src/sparseQR.c: Fix thinko in sparseQR_resid_fitted. * tests/sparseQR.R: Added * man/sparseQR-class.Rd: Document methods for qr.* generics * R/sparseQR.R: Return correct # of coefs; fix cut-and-paste errors 2006-08-19 Douglas Bates * NAMESPACE, R/sparseQR.R, src/init.c,sparseQR.[ch],SOURCES_C.mkf: Added methods for sparseQR for qr.qy, qr.qty, qr.coef, qr.resid and qr.fitted. * src/Mutils.[ch]: Added dup_mMatrix_as_dgeMatrix utility * src/dgCMatrix.c: Check for ordering before storing q in dgCMatrix_QR 2006-08-18 Martin Maechler * R/AllGeneric.R: add "qr" and "chol" generics; via 'trick' since the base version has no "..." argument. * R/sparseMatrix.R (prSpMatrix): fix the triangular unit diagonal case. * R/Matrix.R: define and * NAMESPACE: export as.numeric() and as.logical() methods. Let's hope these do not badly slow down something... Finally export the zapsmall() method. 2006-08-17 Douglas Bates * src/dgCMatrix.[ch] (dgCMatrix_matrix_solve), src/init.c, R/dgCMatrix.R: solve methods for dgCMatrix and dense RHS. * src/dtCMatrix.c :Remove code that is no longer used * R/dtCMatrix.R: Use C code for diagU2N in CsparseMatrix classes 2006-08-14 Douglas Bates * src/Csparse.[ch],init.c (Csparse_to_logical): Added utilities Csparse_to_logical and Csparse_symmetric_to_general. * R/dgCMatrix.R,dsCMatrix.R,Csparse.R : Consolidate general coercion methods between CsparseMatrix and TsparseMatrix. 2006-08-14 Douglas Bates * R/dtCMatrix.R,dgCMatrix.R,Csparse.R src/init.c,dgCMatrix.[ch], Csparse.[ch],chm_common.c,dense.c : Use CHOLMOD code and methods for CsparseMatrix, TsparseMatrix, denseMatrix or matrix when possible. 2006-08-12 Douglas Bates * src/chm_common.[ch],Csparse.[ch],Tsparse.[ch],CHMfactor.c,dtTMatrix.c, dgTMatrix.c,dgCMatrix.c,dsCMatrix.c,dtTMatrix.c, R/dsTMatrix.R, Tsparse.R,Csparse.R,dgTMatrix.R,dsCMatrix.R,lsCMatrix.R: generalize conversions between TsparseMatrix, CsparseMatrix, denseMatrix and matrix. Preserve triangularity property and propagate Dimnames in the easy cases. 2006-08-10 Douglas Bates * src/lmer.c: adjust checks in glmer_init for S4SXP * tests/validObj.R: check of all(eq) should be all(eq@x) - worked before S4SXP but for the wrong reasons. 2006-08-08 Douglas Bates * src/Csparse.c (Csparse_crossprod): tcrossprod result has stype = -1. Later modified to return the upper triangle only. * R/dgTMatrix.R: Remove vestigial crossprod and tcrossprod methods. 2006-08-07 Douglas Bates * src/Csparse.c (Csparse_crossprod): Set stype on result to avoid R-level conversion to a sparse symmetric class. * R/Tsparse.R,R/Csparse.R (crossprod and tcrossprod methods): Remove conversion to sparse symmetric classes (now done in C code). 2006-08-07 Martin Maechler * R/dgCMatrix.R: disable old crossprod and tcrossprod methods * man/band.Rd: adapt the \dontshow{} unit test. 2006-08-07 Martin Maechler * DESCRIPTION (Version): 0.995-14 for CRAN * tests/other-pkgs.R: oops: library(Matrix) outside *if* ! * R/sparseMatrix.R (Tsp2grNEL): fixed Tsparse -> graph coercion * tests/other-pkgs.R: more checks, sparseMatrix -> graph * R/Auxiliaries.R (as_Tsparse, as_Rsparse): new * R/Tsparse.R (tril, triu, band): methods * R/dgRMatrix.R (tril, ...): ditto * man/band.Rd: ditto 2006-08-04 Martin Maechler * R/Matrix.R (head, tail): directly use utils:::head.matrix to be up-to-date automatically. 2006-08-03 Martin Maechler * DESCRIPTION (Version): 0.995-13 to be released to CRAN * DESCRIPTION (Lazydata): no, instead of 'yes' because it fails for: * data/CAex.R, inst/external/CAex_slots.rda: replacing data/CAex.rda * data/KNex.R, inst/external/KNex_slots.rda: replacing data/KNex.rda such that the S4 objects are always created by the current version of R and 'Matrix' class definitions. 2006-08-01 Douglas Bates * R/lmer.R (LMEoptimize method), tests/lmer.R, inst/external/test3comp.rda: Added warnings for convergence on boundary and test cases. * src/lmer.c (mer_postVar): Modified to return the variances that are marginal to the fixed effects, not conditional on them (which is what the bVar slot contents represent). 2006-07-31 Douglas Bates * NAMESPACE, src/lmer.c, R/lmer.R (hatTrace): Add the hatTrace function which calls the C function mer_hat_trace2. * man/ranef.Rd: Include description of "postVar" argument and producing a caterpillar plot. 2006-07-31 Martin Maechler * NAMESPACE: change "correlation" to "corMatrix" * R/AllClass.R: to avoid clash with S3 class in 'nlme'. * R/dpoMatrix.R: ditto * R/lmer.R: ditto 2006-07-28 Douglas Bates * src/lmer.c (internal_mer_RZXinv): Split the calculation of the RZXinv slot's contents into a separate internal function that can be used in mer_hat_trace. 2006-07-22 Martin Maechler * R/Matrix.R: Coercions "Matrix" -> (sparse|dense)Matrix via new smart * R/Auxiliaries.R (as_Csparse, as_dense, .M.shapse): new utility functions. 2006-07-21 Martin Maechler * R/Csparse.R (tril, triu, band): do return *triangular* classed matrices when appropriate; band() even symmetric ones. (replCmat): extend to potentially all "CsparseMatrix" * R/Tsparse.R (replTmat): extend to all "TsparseMatrix"; hence allow subassignment for special sparse matrices. * R/Auxiliaries.R (as_geClass): factor out the .M.kind() functionality * src/lmer.c (mer_MCMCsamp, glmer_MCMCsamp): new 'verbose' argument; in glmer_*(): print only if(verbose). speed-optimize a few places by moving REAL(.) out of loops. * src/lmer.h, src/init.h, R/lmer.R: related to above. 2006-07-20 Martin Maechler * R/Matrix.R("["): disable ("Matrix", i = "logical", j = "missing"), since that wrongly triggers also for M[ logi , ] * R/denseMatrix.R: "[" methods now also work e.g. when indexing a symmetric matrix that results in a non-symmetric one. * R/Auxiliaries.R (as_geClass): new function used in "[" above. * R/dMatrix.R: make round(M) work as round(M, 0) * R/dgTMatrix.R (image): coordinate system and axis now use 1-based indices, not 0-based ones. * R/Tsparse.R (.ind.prep for "["): get rid of max() warning. * tests/indexing.R: test it. * NAMESPACE: export isSymmetric(); has been a generic in "base" for a while; * man/isSymmetric-methods.Rd: and document it. * R/SparseM-conv.R: added coercion methods for some 'SparseM' matrices. * man/SparseM-conv.Rd: docu them * tests/other-pkgs.R: renamed from tests/graph.R and add example for 'SparseM' conversions 2006-07-17 Douglas Bates * R/Matrix.R (head): added head() and tail() methods. 2006-07-17 Martin Maechler * DESCRIPTION (Version): 0.995-12 released to CRAN 2006-07-15 Martin Maechler * tests/simple.R: add check for correct dsT -> dgT coercion; add check for correct printing of symmetric sparse matrices. * R/Auxiliaries.R (non0ind): return *all* non-0 entry indices also for sparse symmetric matrices. * src/dsTMatrix.c (dsTMatrix_as_dgTMatrix): do not copy the diagonal twice. 2006-07-11 Douglas Bates * src/dsTMatrix.c (dsTMatrix_as_dgTMatrix): Fix a case of INTEGER being applied to the x slot (detected by Brian Ripley). 2006-07-10 Martin Maechler * src/dgCMatrix.c (dgCMatrix_validate): 'p' slot must have correct length. * R/Auxiliaries.R (isTriC): fix buglet (we were 1-based!) 2006-07-08 Martin Maechler * src/lgCMatrix.c (lgCMatrix_diag): new function * R/lgCMatrix.R (diag): for new method * R/AllClass.R (TsparseMatrix): do use Tsparse_validate ==> construction of illegal "*gTMatrix" via new() should now be much less easy: * tests/Class+Meth.R: assertError() for some illegal "dgT*" * R/Matrix.R (Matrix): Matrix(0, nrow,ncol) now "goes sparse" directly. * man/Matrix.Rd: documents it. 2006-07-06 Douglas Bates * src/pedigree.c (pedigree_inbreeding): Correction in initialization. This function is not currently being used and is not fully tested. * NAMESPACE, R/{AllClass.R,lmer.R}, src/{init.c,lmer.c}: Introduced the glmer class. Added code for mcmcmsamp on glmer objects. Modified validity check on pedigree objects to account for nonparallel patterns of missingness of parents. * man/{lmer-class.Rd,mcmcsamp.Rd}: Update documentation for glmer class. 2006-07-01 Martin Maechler * R/pMatrix.R: coercion pMatrix -> Tsparse 2006-06-12 Douglas Bates * DESCRIPTION (Version): 0.995-11 released to CRAN * R/lmer.R (mcmcsamp method): Corrected arrangments of names on the output from mcmcsamp. 2006-06-10 Douglas Bates * R/lmer.R (simulestimate): added C code for calculating the trace of the hat matrix. 2006-06-09 Martin Maechler * R/diagMatrix.R (setAs): define coercion methods to sparse matrix classes. * R/sparseMatrix.R etc: multiplication of diagonal and sparse 2006-06-08 Martin Maechler * R/dgTMatrix.R (colSums): etc. All four of colSums(), rowSums(), colMeans(), rowMeans() now should work for all "Matrices". 2006-06-01 Douglas Bates * R/lmer.R (panel.ci): Add a reference line at zero and a background grid to the qqmath plot of ranef.lmer. 2006-05-30 Douglas Bates * R/lmer.R (expandSlash): Functions (non-exported) to allow nested grouping factors to be specified in the formula as (1|foo/bar). 2006-05-27 Douglas Bates * R/lmer.R (findbars and others): Change check of is.numeric to !is.language to resolve the bug reported by Jacob Wegelin. * src/pedigree.c (pedigree_inbreeding): Initial implementation of code to evaluate inbreeding coefficients without calculating T, based on code in Sargolzaei and Iwaisaki's paper. 2006-05-27 Douglas Bates * R/{lmer.R,AllGeneric.R}, src/{init.c,lmer.[ch]}: Added local generic and mer methods for isNested and denomDF. This denomDF was an attempt to emulate that in lme but I don't think that makes sense. Use the trace of the hat matrix instead. 2006-05-17 Martin Maechler * R/sparseMatrix.R: Matrix <-> graph methods: can no longer use the C code depending on a slot structure that's no longer valid. * src/dgTMatrix.c: ditto (also: src/init.c src/dgTMatrix.h) 2006-05-17 Douglas Bates * R/{AllGeneric.R,Csparse.R},man/band.Rd,NAMESPACE: changed name of lowerTriMatrix generic and methods to tril (also upper to triu) and added a general band extractor. 2006-05-16 Douglas Bates * R/pedigree.R (pedigree): Replace sire and dam values outside the allowable range with NAs. Added a corresponding check in the validity check for the pedigree class. * R/[CT]sparse.R ([t]crossprod): The result of single-argument crossprod methods now inherits from symmetricMatrix. 2006-05-15 Douglas Bates * R/AllGeneric.R (lowerTriMatrix): Added (but did not export) generics lowerTriMatrix and upperTriMatrix along with methods for the Csparse virtual class. Also added a C function Csparse_band that implements these methods by calling cholmod_band. 2006-05-15 Martin Maechler * R/Tsparse.R ("["): column or row subsetting; @Dimnames[k] got erased when it was NULL. This led to invalid subselections! 2006-04-25 Douglas Bates * R/dtCMatrix.R: avoid coercion of dtCMatrix object to dgCMatrix in method for "t" so as not to lose the unit diagonal property. 2006-04-19 Douglas Bates * R/lmer.R, R/AllGeneric.R, NAMESPACE: Remove the postVar generic and methods. This is now an option to the ranef method for the mer class. * src/cs_utils.c: Ensure that the nz component is -1 for a compressed column-oriented matrix. Minor formatting cleanup. * man/lmer-class.Rd: Document the qqmath method for ranef.lmer objects. 2006-04-19 Martin Maechler * R/Auxiliaries.R (diagU2N): new for the solve() methods in * R/dtCMatrix.R: where dgC -> dgT coercion now preserves diag = "U". 2006-04-15 Douglas Bates * src/cs.[ch],src/cs_utils.[ch] : Added Tim Davis' CSparse library in cs.[ch] and utilities to interface to that code in cs_utils.[ch]. * R/dtCMatrix.R, src/dtCMatrix.[ch] : CSparse-based solve methods for the dtCMatrix class. 2006-04-12 Douglas Bates * R/pedigree.R, R/AllClass.R, NAMESPACE: added a pedigree class and methods for it. 2006-04-12 Martin Maechler * R/dgCMatrix.R: add storage.mode(.) <- "double" for "matrix" arguments, such that M %*% 1:6 now works * Tests/matprod.R: test the above 2006-04-03 Douglas Bates * R/lmer.R (qqmath,ranef.lmer-method): added a qqmath method for the ranef.lmer class. * R/AllClass.R, NAMESPACE, R/lmer.R: Added a postVar generic and methods to extract the posterior variances from the bVar slot. 2006-03-30 Martin Maechler * R/dtCMatrix.R: allow coercion from dgC* to triangular (dtC*) * R/dsCMatrix.R: and symmetric (dsC*) 'Csparse' matrices. * R/Tsparse.R: Tsparse* -> Csparse* coercion now works and is tested in * tests/simple: (extended) * R/sparseMatrix.R (isTriangular): now using much improved * R/Auxiliaries.R (isTriC): new triangularity check for *CMatrix 2006-03-23 Douglas Bates * src/dsyMatrix.c (dsyMatrix_as_dspMatrix): Propagate DimNames (problem report from Franklin Parlamis). This should be done generally. 2006-03-21 Douglas Bates * R/AllClass.R,lmer.R: Change the name of the lmer.ranef class to ranef.lmer (like summary.lmer). Add the coef.lmer class and update the plot methods. 2006-03-20 Douglas Bates * R/lmer.R (resid and ranef methods): Added methods for the "residuals" and "resid" generic but only for linear mixed model fits. Changed the ranef method to return a list of data frames so that the plot methods now work. 2006-03-16 Douglas Bates * src/dpoMatrix.c (dpoMatrix_chol): Require n > 0 in call to dpotrf - otherwise the BLAS on Mac OS X complains and quits. * DESCRIPTION (Date): New release 2006-03-15 Martin Maechler * DESCRIPTION (Version): 0.995-6 -- to be released to CRAN * data/KNex.rda: replacing 'mm' and 'y' by KNex <- list(mm=mm, y=y) * man/KNex.Rd: and other help files * tests/*.R: several ones needed adaption * inst/doc/Comparisons.Rnw: ditto 2006-03-11 Martin Maechler * R/dgCMatrix.R (replCmat): "[<-" methods for dgCMatrix * tests/indexing.R: tests for new [<- methods for sparse matrices. 2006-03-10 Martin Maechler * R/dgTMatrix.R (replTmat): "[<-" methods for dgTMatrix * R/Tsparse.R (.ind.prep): fix out-of-range indexing 2006-03-08 Martin Maechler * R/dMatrix.R: enable things like M [ M < 10 ] * R/dgeMatrix.R: implement it 2006-03-06 Martin Maechler * R/AllClass.R: define "summary.mer" and "*.lmer" * R/lmer.R (summary): summary() computes & returns the above; * R/lmer.R (show): now works with summary() 2006-03-04 Martin Maechler * R/dgCMatrix.R: finally direct "Arith" dgC o dgC * R/Auxiliaries.R (WhichintersectInd): and other utilities to support the above 2006-02-07 Douglas Bates * R/lmer.R (lmer): fix initial values of offset and weights for glm.fit. Use glmFit$prior.weights for weights in a glmm. Allow an option usePQL = FALSE to skip the PQL steps for the Laplace method (and, in time, the AGQ method). * src/lmer.c (mer_factor): Move downdating and factoring of XtX into a separate function internal_mer_Xfactor to be able to call it from internal_bhat. 2006-01-23 Martin Maechler * tests/Class+Meth.R (tstMatrixClass): function for much better testing; now again of all actual classes. * src/Mutils.c (MAKE_TRIANGULAR_BODY, MAKE_SYMMETRIC_BODY): use macros and define make_d_matrix_* and make_i_matrix_* where _i_ is for the ldense routines: * src/ldense.c (ltrMatrix_as_lgeMatrix): provide functions * src/ldense.c (lsyMatrix_as_lgeMatrix): * R/ldenseMatrix.R: use the above in setAs(*,"lgeMatrix") 2006-01-16 Martin Maechler * R/Matrix.R (Matrix): has become much "smarter" now auto-producing many different kinds of matrices. * R/*.R: quite a few new methods were needed for R CMD check with new Matrix(). Very good for users playing around. 2006-01-15 Martin Maechler * src/dgeMatrix.c (dMatrix_validate): new * src/Mutils.c (dense_nonpacked_validate): new * src/dtrMatrix.c (dtrMatrix_validate): improved/fixed 2006-01-14 Douglas Bates * R/AllClass.R (compMatrix), (generalMatrix): new virtual classes 2006-01-07 Douglas Bates * DESCRIPTION (Version): 0.99-6 released to CRAN * src/dgBCMatrix.c (cscb_trcbsm): Fix due to Peter Dalgaard for segfault in cases with multiple non-nested grouping factors. 2006-01-03 Martin Maechler * DESCRIPTION (Version): 0.99-4 to be released to CRAN (Depends): also on 'utils' * R/AllClass.R (diagonalMatrix): new class with "ddi*" and "ldi*" * R/diagMatrix.R (Diagonal): constructor and methods for diagonal matrices * R/ltTMatrix.R: new "minimal methods" 2005-12-12 Martin Maechler * R/AllGeneric.R (tcrossprod): 2-argument version; here, and for all methods (and help files). 2005-12-09 Martin Maechler * R/Auxiliaries.R (dimNamesCheck): fixed thinko -> bug for case (dimn. op no_dimn.) 2005-11-14 Douglas Bates * DESCRIPTION (Version): 0.99-2 released to CRAN 2005-10-21 Douglas Bates * R/lmer.R (simulate method): Fixed a drop=FALSE problem reported by Julian Faraway. 2005-10-06 Martin Maechler * R/Auxiliaries.R (try_as): new utility * R/sparseMatrix.R: use try_as() in coercion to original class 2005-09-30 Martin Maechler * src/dgCMatrix.c (double_to_csc): and dgeMatrix_to_csc() 2005-09-29 Martin Maechler * R/Auxiliaries.R (dimNamesCheck): added * R/Matrix.R (as.array), (as.vector): new 2005-09-28 Martin Maechler * R/Matrix.R (Matrix): get logical argument 'sparse' with a smart default. * R/AllClass.R: move 'factors' slot toplevel "Matrix"; "pMatrix" now contains "sparseMatrix" 2005-09-26 Martin Maechler * tests/Class+Meth.R: new tests; t(t(m)) == m * src/dtCMatrix.c (tsc_transpose): add forgotten "diag" slot * src/dsTMatrix.c (dsTMatrix_as_dsCMatrix): bad typo (segfault!) * src/dtTMatrix.c (dtTMatrix_as_dtCMatrix): new * R/dspMatrix.R: typo in "t" method 2005-09-18 Douglas Bates * R/AllClass.R (TsparseMatrix), CsparseM* and RsparseM* * R/Tsparse.R: instead of R/gTMatrix.R * R/Csparse.R: new * src/Tsparse.c (Tsparse_to_Csparse): new; -> cholmod_() * src/Tsparse.c: new; many trivial methods calling cholmod_() * src/Csparse.c (Csparse_to_Tsparse), transpose, (mat|cross)prod: via cholmod 2005-09-16 Martin Maechler * R/Auxiliaries.R (non0ind): new function using new C code * src/dgCMatrix.c (compressed_non_0_ij): new utility 2005-09-15 Douglas Bates * src/chm_common.h: header file required by all C sources that call CHOLMOD functions. It defines a cholmod_common structure called 'c' whose address is passed as the last argument to (virtually) every CHOLMOD function. * src/Pattern.c: Simple example of the use of CHOLMOD. * src/init.c: initialize and finalize the cholmod_common structure. * src/Makefile: Added source packages CHOLMOD UMFPACK AMD COLAMD LDL and CCOLAMD from the U. of Florida sparse matrix library. 2005-09-08 Martin Maechler * inst/test-tools.R: new file collecting the utility functions used in ./tests/*.R * R/ddenseMatrix.R (cbind2): new methods for "numeric" and "matrix" * R/Matrix.R (cbind2): methods for NULL and missing 2005-08-31 Martin Maechler * R/AllClass.R: new "index" class for "[" and "[<-": First cut at "symmetricMatrix" and "triangularMatrix" * R/gTMatrix.R (.ind.prep): new function; Logical and character indexing now work too. * R/Matrix.R: cheap "[<-" methods for denseMatrix now work * tests/indexing.R: new, including *.Rout.save * tests/dgTMatrix.R: new 2005-08-29 Douglas Bates * src/dgTMatrix.c (graphNEL_as_dgTMatrix): Corrected the position indicator pos not being updated. Also enforced upper triangular for symmetric case. Need to coerce edges component of elements of edge list - grr! (Why don't they define their classes cleanly?) 2005-08-26 Martin Maechler * R/Matrix.R: added first "[<-" methods; not yet functional * R/denseMatrix.R: ditto * man/Subassign-methods.Rd: new help file for these 2005-08-25 Martin Maechler * DESCRIPTION (Version): 0.98-6 * R/denseMatrix.R: new file for "[" fallback methods for all dense matrices. 2005-08-19 Martin Maechler * src/lgCMatrix.c (lcsc_to_matrix): new; need for as( , "matrix") * R/pMatrix.R: coercion to "lgTMatrix" * R/gTMatrix.R: new virtual class to define "[" methods for. * man/gTMatrix-class.Rd: * General slight re-organization of where "[" methods are defined. more to come. 2005-08-18 Douglas Bates * DESCRIPTION (Version): 0.98-5 released to CRAN * src/dgTMatrix.c (graphNEL_as_dgTMatrix): add first graphNEL methods * ..... 2005-08-18 Douglas Bates * R/lmer.R: Corrected naming scheme in mcmcsamp to work with lmer or glmer objects. 2005-08-17 Martin Maechler * DESCRIPTION (Version): 0.98-4 : upload to CRAN 2005-08-16 Douglas Bates * R/HBMM.R: finish re-writing R-only code. 2005-08-15 Douglas Bates * man/externalFormats.Rd: move documentation for writeHB and writeMM here. * src/mmio.c: replace inclusion of by (suggested by Paul Roecker). * tests/validObj.R (assertError): Comment out test that is failing after recent changes in r-devel. 2005-08-11 Martin Maechler * R/AllClass.R: intermediate virtual class "denseMatrix" * man/denseMatrix-class.Rd * NAMESPACE: export it, and also export * man/unused-classes.Rd: "iMatrix", "zMatrix" and "ldenseMatrix" 2005-08-10 Douglas Bates * DESCRIPTION (Version): 0.98-3 to CRAN * src/dtrMatrix.c (dtrMatrix_validate): fixed up validation and matrix_solve code (which was really, really wrong). 2005-08-07 Douglas Bates * DESCRIPTION (Version): 0.98-2 * R/HBMM.R (readHB), (readMM): read Matrix Market formats * R/lmer.R (abbrvNms): new * R/lmer.R (mcmcsamp): allow transformed parameters * src/HBMM.c (Matrix_writeMatrixMarket): Added read/write routines for the Harwell-Boeing and the MatrixMarket formats. 2005-08-04 Martin Maechler * man/dtrMatrix-class.Rd: add examples * man/dtpMatrix-class.Rd: ditto; plus note about PROBLEM * TODO: note the dtpMatrix (docu) bug * R/zzz.R (.onLoad): assignInNamespace("as.matrix", *, "base") in order to ensure that new as.matrix() is used by old functions, e.g., svd(), qr(), eigen(), dist(),..; apply(), also matplot() or pairs(). 2005-08-03 Martin Maechler * R/lmer.R: add 'fixme' comments and move the linear vs glm check; add comments about 'control' / lmerControl() arguments 2005-07-27 Douglas Bates * man/sleepstudy.Rd: Added the sleep data set. * DESCRIPTION (Version): 0.98-1 released to CRAN 2005-07-12 Douglas Bates * man/sleepstudy.Rd: Added the sleep data set. * R/lmer.R (glmmMCMC): Added PACKAGE = "Matrix" in a couple of .Call calls that were producing spurious output. 2005-07-05 Douglas Bates * R/lmer.R (lmer): stored updated variance component estimates in mer object for the generalized model. (Bug reported by Renaud Lancelot). 2005-07-03 Douglas Bates * src/lmer.c (glmer_devAGQ): Added AGQ for single grouping factor, unidimensional case. 2005-06-08 Douglas Bates * DESCRIPTION (Version): 0.96-1 * moved lmer-class' R and C code moved from lme4 to here 2005-06-04 Douglas Bates * R/dgCMatrix.R: Call to csc_matrix_mm used undefined arguments (reported by Guissepe Ragusa ) 2005-06-02 Douglas Bates * src/Makefile.win: Forgot to update this when Makefile changed. 2005-05-11 Douglas Bates * src/dgCMatrix.c (csc_transpose): Simplified function fixing a bug reported by Kurt Hornik and Michael Hahsler. 2005-05-10 Douglas Bates * src/lgCMatrix.c (Matrix_lgClgCmm): Implementation of methods for logical sparse matrices. These will also be used in the symbolic analysis for lmer objects. * src/dsCMatrix.c (dsCMatrix_matrix_solve): Copied the dimensions of b to the result. Fixes bug reported by Jean.Coursol@math.u-psud.fr 2005-05-06 Douglas Bates * src/dgeMatrix.c (dgeMatrix_colsums): Added an implementation of colMeans, colSums, rowMeans and rowSums. 2005-04-18 Douglas Bates * src/lgCMatrix.[ch]: code for _validate method and stub for multiplication operation. * src/dgeMatrix.c (dgeMatrix_matrix_solve): Passing wrong argument to dgetrs. * src/init.c: Fix cut-and-paste error in definition of dgeMatrix_matrix_solve * src/{many files}: Tighten code by using ALLOC_SLOT. 2005-04-15 Douglas Bates * R/AllClass.R: Add lgTMatrix and lgCMatrix classes * DESCRIPTION: Eliminate import of stats. 2005-04-06 Douglas Bates * R/AllClass.R : add logical sparse matrix classes 2005-04-01 Martin Maechler * R/dgTMatrix.R: add "[" method for triplet matrices * R/sparseMatrix.R: and other sparse ones; --> add show() for sparse 2005-03-31 Douglas Bates * DESCRIPTION (Version): release 0.95-5 to CRAN * R/dMatrix.R: add %*%, crossprod and solve "fallback" methods * R/sparseMatrix.R: %*%, crossprod() * R/dgeMatrix.R: more "fallback" methods for numeric/dense matrices * man/*.Rd: move method definitions to 'Matrix' and 'dMatrix' * src/lmer.c (lmer_fitted): fix thinko 2005-03-26 Martin Maechler * R/AllClass.R: add two virtual sparse classes ``on top'' 2005-03-24 Martin Maechler * R/AllClass.R (setClass): use "VIRTUAL" for the virtual classes; correspondingly fix examples and tests/ since new() doesn't work for virtual classes. 2005-03-17 Martin Maechler * R/Matrix.R (as.matrix): method and one for unname() * tests/dpoMatrix.R: tests should now be less platform dependent; also run for R 2.1.0; using as.matrix() 2005-03-15 Douglas Bates * R/pMatrix.R: "pMatrix" class added * .... 2005-03-14 Douglas Bates * R/dtpMatrix.R: Add unpack method and an example. * src/dsyMatrix.c (dsyMatrix_trf): Add BunchKaufman factorization of general symmetric matrices and associated S4 methods. 2005-03-10 Martin Maechler + 2005-03-05 Martin Maechler * R/dgeMatrix.R (setAs): and many other files: more coercion, crossprod() and "%*%" methods added; tests, too. * tests/matprod.R: new, for testing these 2005-03-03 Douglas Bates * src/lmer.c (lmer_fitted): Added. 2005-03-02 Douglas Bates * R/dsTMatrix.R: Conversion from dsTMatrix to dsCMatrix 2005-02-28 Douglas Bates * src/*.c,po/,inst/po: Internationalization and localization of the package. * src/ldl.[ch]: Removed these as their contents are referenced in the R_ldl.c file. * src/flame.[ch]: Removed these source files. * src/dtrMatrix.c (make_array_triangular): Move to Mutils * src/LU.[ch],src/init.c: absorb in factorizations * src/Mutils.h: prepare for internationalization * src/cblas.h: move the enum definitions to Mutils.h and remove this file 2005-02-26 Martin Maechler * R/dgeMatrix.R: provide "dimnames" and "dimnames<-" methods * R/dtrMatrix.R: fix t() method * R/dgeMatrix.R: define group methods "Arith", "Math", "Math2" * NAMESPACE: export them (and import generics from "methods") * tests/group-methods.R : and test them. * src/dtrMatrix.c (dtrMatrix_as_dgeMatrix): prevent seg.fault in border case 2005-02-24 Douglas Bates * DESCRIPTION (Version): 0.95-2 released to CRAN * src/dgBCMatrix.c: * src/lmer.c: many changes * ... 2005-02-04 Martin Maechler * R/Matrix.R: add more sophisticated show() method. 2005-02-02 Douglas Bates * */* : almost complete reorganization of classes. 2005-01-26 Douglas Bates * R/AllGeneric.R: Added matrix exponential generic expm and a method for the geMatrix class. 2005-01-24 Douglas Bates * src/Makefile (clean): Remove *.a and *.so * man/cscBlocked-class.Rd: Remove reference to the lmer-class. 2005-01-23 Douglas Bates * src/lmer.c (Lind): Definition of Lind was backwards. This only had an effect in cases with more than 2 grouping factors. 2005-01-03 Douglas Bates * src/lmeRep.c (lmer_variances): change from lmeRep to lmer 2004-12-23 Douglas Bates * src/init.c (R_init_Matrix): Reorder calls to R_registerRoutines and R_useDynamicSymbols (suggested by B.D.Ripley). 2004-12-14 Douglas Bates * R/sscMatrix.R: Add determinant methods * src/triplet.[ch],src/init.c (triplet_to_matrix): Add a coercion for tripletMatrix to matrix. 2004-12-13 Douglas Bates * R/AllClass.R (.onLoad): Eliminate the bbCrosstab class, which is no longer used. * src/R_ldl.c: Created an R-specific version of the ldl.[ch] files with dynamic allocation of scratch arrays. * src/ssclme.c (ssclme_copy_ctab): Fixed bug in creation of ZtZ for multivariate random effects with multiple grouping factors. Fixes part but not all of #15. 2004-12-03 Douglas Bates * src/lmeRep.c (lmeRep_factor): order of operations for multiple scalar grouping factors corrected. 2004-11-29 Douglas Bates * src/bCrosstab.c: remove diag_update which is no longer used 2004-11-16 Douglas Bates * src/Metis_utils.c: Move metis.h include to C sources so that the .h file can be included. 2004-11-12 Douglas Bates * src/LU.c,geMatrix.c,trMatrix.c, etc.: Complete allocation of slots in NEW_OBJECT. * src/Mutils.h: Moved list of symbols to an include file 2004-11-11 Douglas Bates * src/geMutils.c (Matrix_init): remove unused function 2004-11-10 Douglas Bates * src/cscMatrix.c (csc_to_imagemat): removed unused function 2004-11-05 Douglas Bates * src/Makefile.win (SOURCES_C): Keep consistent with Makefile 2004-10-27 Douglas Bates * R/pdmatrix.R: remove PACKAGE="Matrix" in .Call calls 2004-10-04 Douglas Bates * src/init.c: Created R_init_Matrix and added registration of C routines. 2004-10-02 Douglas Bates * R/tripletMatrix.R: Force a require(lattice) for the image methods. 2004-06-15 Douglas Bates * man/trMatrix-class.Rd: Escape the % chars in .Rd files. 2004-04-20 Douglas Bates * src/Makefile.win ($(SHLIB)): Modifications per Uwe Ligges. 2004-04-19 Douglas Bates * src/ssclme.c (ssclme_update_mm): fix logic error in ssclme_update_mm 2004-04-18 Douglas Bates * src/ssclme.c (ssclme_coef, ssclme_coefGets): Create consistency in the order of unconstrained and constrained parameters. (ssclme_gradient): Added the gradients (not yet correct for multidimensional, unconstrained case). 2004-04-14 Douglas Bates * src/ssclme.c (ssclme_EMsteps): Fix logic in REML update * src/Makefile.win: Remove unneeded ranlib call 2004-04-12 Douglas Bates * DESCRIPTION (Version): New release * src/Makefile.win: Update Makefile.win to umfpack removal. 2004-04-05 Douglas Bates * src/triplet_to_col.c: Create triplet_to_col as a native function, not the version from umfpack. There were problems with the configuration of UMFPACK for 64-bit processors and there was only one umfpack routine being used so I moved it here. 2004-04-04 Douglas Bates * src/ssclme.c (ssclme_variances): New function. 2004-03-28 Douglas Bates * src/ssclme.c (ssclme_fitted): Added function. 2004-03-27 Douglas Bates * src/ssclme.c (ssclme_transfer_dimnames): Add new function to store the dimnames in the XtX and bVar slots (ssclme_update_mm): Change the dimensions of the bVar slot components and the returned value from ssclme_ranef. 2004-03-18 Douglas Bates * R/{pdMat.R,pdIdent.R,pdLogChol.R,pdMatrixLog.R,pdNatural.R}, src/{pdMat.c,pdIdent.c,pdLogChol.c,pdNatural.c}, tests/{pdCompSymm.R,pdDiag.R,pdIdent.R,pdLogChol.R,pdNatural.R}, man/{pdMat-class.Rd,pdmatrix-class.Rd,corrmatrix-class.Rd, pdDiag-class.Rd,pdIdent-class.Rd,pdNatural-class.Rd, pdLogChol-class.Rd,coefGets.Rd,pdCompSymm-class.Rd, pdfactor-class.Rd,pdFactor.Rd,pdMatrix.Rd, pdBlocked-class.Rd},AllClass.R,AllGeneric.R: Moved the pdMat classes from the lme4 package. 2004-03-02 Douglas Bates * man/ssclme-class.Rd: Update definition and documentation of the ssclme class to include the DIsqrt slot. * src/ssclme.c (ssclme_deviance): Modify order of computation (much faster using dsyrk, a level 3 BLAS routine). * src/Makefile (SUBLIBS): Change definition (K. Hornik) 2004-02-28 Douglas Bates * tests/ssclme.R: Modify the test to account for the permutation of the levels of the grouping factors. 2004-02-23 Douglas Bates * R/ssclme.R,src/ssclme.c (ssclme): Move slots of sscCrosstab slot directly into the ssclme class definition. 2004-02-22 Douglas Bates * DESCRIPTION (Date): New release * man/ssclme-class.Rd: new file. * src/ssclme.c (ssclme_loglik): major revisions in design. It works and it's fast! 2004-02-17 Douglas Bates * src/taucs/Makefile.win (lib): Change "ar" to "$(AR)" (B.Ripley) 2004-02-16 Douglas Bates * DESCRIPTION (Date): New release * NAMESPACE: Don't export ssclme. * data/ScotsSec.rda, man/ScotsSec.Rd: Add Scottish secondary school data. 2004-02-11 Douglas Bates * src/sscCrosstab.c (sscCrosstab): Added a row to the incidence to keep track of the fixed-effects and the response. Counts also gets an extra element, which is always one. * src/ldl.c: Include these routines from Tim Davis' LDL package. 2004-02-10 Douglas Bates * src/cscMatrix.c (csc_transpose): new function * src/Mutils.c (csc_sort_columns): perm/iperm confusion corrected (csc_components_transpose): new function 2004-02-06 Douglas Bates * src/triplet.c (triplet_validate): Fix Dim slot on generated triplets 2004-01-30 Douglas Bates * R/sscCrosstab.R (sscCrosstab): Added sscCrosstab generator function. * src/LU.h (MATRIX_LU_H): Add #ifndef #define ... #endif to this and all other .h files in src. * src/Makefile.win: This and other Makefile.win files contributed by Brian Ripley. 2004-01-27 Douglas Bates * R/syMatrix.R: Added methods for "%*%". * R/Hilbert.R (Hilbert): Changed Hilbert function to return a poMatrix object. 2004-01-26 Douglas Bates * man/sscChol-class.Rd,man/mm.Rd,man/y.Rd: Added man pages. 2004-01-25 Douglas Bates * inst/doc/Introduction.Rnw,Comparisons.Rnw: Added vignettes. * R/csc.R: Convert all cscMatrix classes to use Dim slot instead of nrow. 2003-12-31 Douglas Bates * src/taucs/taucs.h: Moved taucs.h, amd.h, and umfpack.h into subdirectories. 2003-12-08 Douglas Bates * src/taucs.h: Accidently referred to global header files instead of local files. 2003-12-04 Douglas Bates * R/AllClass.R: Lots of changes. Removed all the lapack++ code and methods and replaced all classes with S4 classes. 2003-04-19 Douglas Bates * R/det.R,man/det.Rd: Change name of det generic to determinant * src/R_LapackPP.cc: Change method of calculating determinants 2003-02-03 Douglas Bates * DESCRIPTION (Version): removed empty data directory as requested by CRAN maintainers. Changed version number and date. 2002-10-23 Douglas Bates * src/laindex.h: Applied patches from Brian Ripley for compilation under Windows. * Added configure.win and src/Makevars.win as requested by Brian Ripley. 2002-05-03 Douglas Bates * src/lamatrix.h: Removing pre-1.2.0 compatibility code per Kurt Hornik. 2002-04-24 Douglas Bates * configure.ac: Replaced configure.in with configure.ac contributed by Kurt Hornik. * aclocal.m4 (ac_clean_files): Replaced this with Kurt Hornik's version for R-1.5.0 2001-12-10 Douglas Bates * man/eigen.Rd: Removed the .Alias in the example Matrix/man/0000755000176200001440000000000013203323431012263 5ustar liggesusersMatrix/man/nMatrix-class.Rd0000644000176200001440000000750012507176717015324 0ustar liggesusers\name{nMatrix-class} \docType{class} \alias{nMatrix-class} \alias{show,nMatrix-method} \alias{coerce,matrix,nMatrix-method} \alias{coerce,nMatrix,matrix-method} \alias{coerce,nMatrix,dMatrix-method} \alias{coerce,dMatrix,nMatrix-method} \alias{coerce,nMatrix,lMatrix-method} \alias{coerce,lMatrix,nMatrix-method} % %\alias{coerce,dMatrix,dgeMatrix-method} % %% Group methods \alias{Arith,logical,nMatrix-method} \alias{Arith,nMatrix,logical-method} \alias{Arith,nMatrix,numeric-method} \alias{Arith,numeric,nMatrix-method} \alias{Compare,logical,nMatrix-method} \alias{Compare,nMatrix,logical-method} \alias{Compare,nMatrix,nMatrix-method} \alias{Compare,nMatrix,numeric-method} \alias{Compare,numeric,nMatrix-method} \alias{Logic,Matrix,nMatrix-method} \alias{Logic,nMatrix,Matrix-method} \alias{Logic,nMatrix,nMatrix-method} \alias{Logic,nMatrix,logical-method} \alias{Logic,nMatrix,numeric-method} \alias{Logic,logical,nMatrix-method} \alias{Logic,numeric,nMatrix-method} \alias{Ops,lMatrix,nMatrix-method} \alias{Ops,nMatrix,lMatrix-method} \alias{Ops,nMatrix,numeric-method} \alias{Ops,numeric,nMatrix-method} \alias{Summary,nMatrix-method} %\alias{which,nMatrix-method} % \title{Class "nMatrix" of Non-zero Pattern Matrices} \description{ The \code{nMatrix} class is the virtual \dQuote{mother} class of all \emph{\bold{n}on-zero pattern} (or simply \emph{patter\bold{n}}) matrices in the \pkg{Matrix} package. } %\section{Objects from the Class}{A virtual Class: No objects may be % created from it. %} \section{Slots}{ Common to \emph{all} matrix object in the package: \describe{ \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.} \item{\code{Dimnames}:}{list of length two; each component containing NULL or a \code{\link{character}} vector length equal the corresponding \code{Dim} element.} } } \section{Methods}{ There is a bunch of coercion methods (for \code{\link{as}(..)}), e.g., \describe{ \item{coerce}{\code{signature(from = "matrix", to = "nMatrix")}: Note that these coercions (must) coerce \code{\link{NA}}s to non-zero, hence conceptually \code{TRUE}. This is particularly important when \code{\linkS4class{sparseMatrix}} objects are coerced to \code{"nMatrix"} and hence to \code{\linkS4class{nsparseMatrix}}. } \item{coerce}{\code{signature(from = "dMatrix", to = "nMatrix")}, and} \item{coerce}{\code{signature(from = "lMatrix", to = "nMatrix")}: For dense matrices with \code{\link{NA}}s, these coercions are valid since \pkg{Matrix} version 1.2.0 (still with a \code{\link{warning}} or a \code{\link{message}} if \code{"Matrix.warn"}, or \code{"Matrix.verbose"} \code{\link{options}} are set.)} \item{coerce}{\code{signature(from = "nMatrix", to = "matrix")}: ... } \item{coerce}{\code{signature(from = "nMatrix", to = "dMatrix")}: ... } \item{coerce}{\code{signature(from = "nMatrix", to = "lMatrix")}: ... } } --- --- --- Additional methods contain group methods, such as \describe{ \item{Ops}{\code{signature(e1 = "nMatrix", e2 = "....")}, \dots} \item{Arith}{\code{signature(e1 = "nMatrix", e2 = "....")}, \dots} \item{Compare}{\code{signature(e1 = "nMatrix", e2 = "....")}, \dots} \item{Logic}{\code{signature(e1 = "nMatrix", e2 = "....")}, \dots} \item{Summary}{\code{signature(x = "nMatrix", "....")}, \dots} } } \seealso{ The classes \code{\linkS4class{lMatrix}}, \code{\linkS4class{nsparseMatrix}}, and the mother class, \code{\linkS4class{Matrix}}. } \examples{ getClass("nMatrix") L3 <- Matrix(upper.tri(diag(3))) L3 # an "ltCMatrix" as(L3, "nMatrix") # -> ntC* ## similar, not using Matrix() as(upper.tri(diag(3)), "nMatrix")# currently "ngTMatrix" } \keyword{classes} \keyword{algebra} Matrix/man/MatrixFactorization-class.Rd0000644000176200001440000000364712210462526017676 0ustar liggesusers\name{MatrixFactorization-class} \alias{MatrixFactorization-class} \alias{CholeskyFactorization-class} \docType{class} \title{Class "MatrixFactorization" of Matrix Factorizations} % \alias{dim,MatrixFactorization-method} \alias{expand,MatrixFactorization-method} \alias{show,MatrixFactorization-method} %\alias{solve,MatrixFactorization,ANY-method}--> solve-methods.Rd \description{ The class \code{"MatrixFactorization"} is the virtual (super) class of (potentially) all matrix factorizations of matrices from package \pkg{Matrix}. The class \code{"CholeskyFactorization"} is the virtual class of all Cholesky decompositions from \pkg{Matrix} (and trivial sub class of \code{"MatrixFactorization"}). } \section{Objects from the Class}{A virtual Class: No objects may be created from it.} \section{Slots}{ \describe{ \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the original matrix - must be an integer vector with exactly two non-negative values.} } } \section{Methods}{ \describe{ \item{dim}{\code{(x)} simply returns \code{x@Dim}, see above.} \item{expand}{\code{signature(x = "MatrixFactorization")}: this has not been implemented yet for all matrix factorizations. It should return a list whose components are matrices which when multiplied return the original \code{\linkS4class{Matrix}} object.} \item{show}{\code{signature(object = "MatrixFactorization")}: simple printing, see \code{\link{show}}.} \item{solve}{\code{signature(a = "MatrixFactorization", b= .)}: solve \eqn{A x = b} for \eqn{x}; see \code{\link{solve-methods}}.} } } \seealso{ classes inheriting from \code{"MatrixFactorization"}, such as \code{\linkS4class{LU}}, \code{\linkS4class{Cholesky}}, \code{\linkS4class{CHMfactor}}, and \code{\linkS4class{sparseQR}}. } \examples{ showClass("MatrixFactorization") getClass("CholeskyFactorization") } \keyword{classes} Matrix/man/facmul.Rd0000644000176200001440000000352610027645165014043 0ustar liggesusers\name{facmul} \title{Multiplication by Decomposition Factors} \usage{ facmul(x, factor, y, transpose, left, \dots) } \alias{facmul} \alias{facmul.default} \description{ Performs multiplication by factors for certain decompositions (and allows explicit formation of those factors). } \arguments{ \item{x}{ a matrix decomposition. No missing values or IEEE special values are allowed. } \item{factor}{ an indicator for selecting a particular factor for multiplication. } \item{y}{ a matrix or vector to be multiplied by the factor or its transpose. No missing values or IEEE special values are allowed. } \item{transpose}{ a logical value. When \code{FALSE} (the default) the factor is applied. When \code{TRUE} the transpose of the factor is applied. } \item{left}{ a logical value. When \code{TRUE} (the default) the factor is applied from the left. When \code{FALSE} the factor is applied from the right. } \item{...}{ the method for \code{"qr.Matrix"} has additional arguments. } } \value{ the product of the selected factor (or its transpose) and \code{y} } \section{NOTE}{ Factors for decompositions such as \code{lu} and \code{qr} can be stored in a compact form. The function \code{facmul} allows multiplication without explicit formation of the factors, saving both storage and operations. } \references{ Golub, G., and Van Loan, C. F. (1989). \emph{Matrix Computations,} 2nd edition, Johns Hopkins, Baltimore. } % \seealso{ % \code{\link{facmul.lu.Matrix}}, \code{\link{facmul.lu.Hermitian}}, \code{\link{facmul.qr.Matrix}}, \code{\link{expand}}. % } \examples{ library(Matrix) x <- Matrix(rnorm(9), 3, 3) \dontrun{ qrx <- qr(x) # QR factorization of x y <- rnorm(3) facmul( qr(x), factor = "Q", y) # form Q y } } \keyword{array} \keyword{algebra} Matrix/man/lsparseMatrix-classes.Rd0000644000176200001440000002116313057762217017066 0ustar liggesusers\name{lsparseMatrix-classes} \title{Sparse logical matrices} \docType{class} \alias{lsparseMatrix-class} \alias{lgCMatrix-class} \alias{ltCMatrix-class} \alias{lsCMatrix-class} \alias{lgRMatrix-class} \alias{ltRMatrix-class} \alias{lsRMatrix-class} \alias{lgTMatrix-class} \alias{ltTMatrix-class} \alias{lsTMatrix-class} % Group(like) \alias{Ops,lsparseMatrix,lsparseMatrix-method} \alias{Arith,lsparseMatrix,Matrix-method} \alias{Arith,Matrix,lsparseMatrix-method} \alias{Arith,lgCMatrix,lgCMatrix-method} \alias{Arith,lgTMatrix,lgTMatrix-method} \alias{Compare,lsparseMatrix,lsparseMatrix-method} \alias{Logic,lsparseMatrix,lsparseMatrix-method} \alias{Logic,lgCMatrix,lgCMatrix-method} \alias{Logic,lgTMatrix,lgTMatrix-method} \alias{Logic,lsCMatrix,lsCMatrix-method} \alias{Logic,ltCMatrix,ltCMatrix-method} \alias{-,lsparseMatrix,missing-method} \alias{!,lsparseMatrix-method} % \alias{coerce,lsparseMatrix,matrix-method} \alias{coerce,lsparseMatrix,dsparseMatrix-method} \alias{coerce,lgCMatrix,dgCMatrix-method} \alias{coerce,lgCMatrix,lgTMatrix-method} \alias{coerce,lgCMatrix,lgeMatrix-method} \alias{coerce,lgCMatrix,lsCMatrix-method} \alias{coerce,lgCMatrix,ltCMatrix-method} \alias{coerce,lgCMatrix,matrix-method} \alias{coerce,lgTMatrix,dgTMatrix-method} \alias{coerce,lgTMatrix,lgCMatrix-method} \alias{coerce,lgTMatrix,lgeMatrix-method} \alias{coerce,lgTMatrix,lsCMatrix-method} \alias{coerce,lgTMatrix,triangularMatrix-method} \alias{coerce,lgTMatrix,symmetricMatrix-method} \alias{coerce,lgTMatrix,ltTMatrix-method} \alias{coerce,lgTMatrix,matrix-method} \alias{coerce,lsCMatrix,dgTMatrix-method} \alias{coerce,lsCMatrix,dsCMatrix-method} \alias{coerce,lsCMatrix,generalMatrix-method} \alias{coerce,lsCMatrix,lgCMatrix-method} \alias{coerce,lsCMatrix,lgTMatrix-method} \alias{coerce,lsCMatrix,lsTMatrix-method} \alias{coerce,lsCMatrix,matrix-method} \alias{coerce,lsTMatrix,dsTMatrix-method} \alias{coerce,lsTMatrix,lgCMatrix-method} \alias{coerce,lsTMatrix,lgTMatrix-method} \alias{coerce,lsTMatrix,lsCMatrix-method} \alias{coerce,lsTMatrix,lsyMatrix-method} \alias{coerce,lsTMatrix,matrix-method} \alias{coerce,ltCMatrix,dMatrix-method} \alias{coerce,ltCMatrix,dtCMatrix-method} \alias{coerce,ltCMatrix,lgCMatrix-method} \alias{coerce,ltCMatrix,ltTMatrix-method} \alias{coerce,ltCMatrix,matrix-method} \alias{coerce,ltTMatrix,dtTMatrix-method} \alias{coerce,ltTMatrix,generalMatrix-method} \alias{coerce,ltTMatrix,lgCMatrix-method} \alias{coerce,ltTMatrix,lgTMatrix-method} \alias{coerce,ltTMatrix,ltCMatrix-method} \alias{coerce,ltTMatrix,ltrMatrix-method} \alias{coerce,ltTMatrix,matrix-method} \alias{coerce,matrix,lgCMatrix-method} \alias{coerce,matrix,lgTMatrix-method} \alias{coerce,matrix,lsCMatrix-method} \alias{coerce,matrix,ltCMatrix-method} \alias{coerce,matrix,ltTMatrix-method} % \alias{t,lgCMatrix-method} \alias{t,lgTMatrix-method} \alias{t,lsCMatrix-method} \alias{t,ltCMatrix-method} \alias{t,lsTMatrix-method} \alias{t,ltTMatrix-method} \alias{which,lgTMatrix-method} \alias{which,lsparseMatrix-method} \alias{which,lsTMatrix-method} \alias{which,ltTMatrix-method} % \description{The \code{lsparseMatrix} class is a virtual class of sparse matrices with \code{TRUE}/\code{FALSE} or \code{NA} entries. Only the positions of the elements that are \code{TRUE} are stored. These can be stored in the \dQuote{triplet} form (class \code{\linkS4class{TsparseMatrix}}, subclasses \code{lgTMatrix}, \code{lsTMatrix}, and \code{ltTMatrix}) or in compressed column-oriented form (class \code{\linkS4class{CsparseMatrix}}, subclasses \code{lgCMatrix}, \code{lsCMatrix}, and \code{ltCMatrix}) or--\emph{rarely}--in compressed row-oriented form (class \code{\linkS4class{RsparseMatrix}}, subclasses \code{lgRMatrix}, \code{lsRMatrix}, and \code{ltRMatrix}). The second letter in the name of these non-virtual classes indicates \code{g}eneral, \code{s}ymmetric, or \code{t}riangular. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("lgCMatrix", ...)} and so on. More frequently objects are created by coercion of a numeric sparse matrix to the logical form, e.g. in an expression \code{x != 0}. The logical form is also used in the symbolic analysis phase of an algorithm involving sparse matrices. Such algorithms often involve two phases: a symbolic phase wherein the positions of the non-zeros in the result are determined and a numeric phase wherein the actual results are calculated. During the symbolic phase only the positions of the non-zero elements in any operands are of interest, hence any numeric sparse matrices can be treated as logical sparse matrices. } \details{ Note that triplet stored (\code{\linkS4class{TsparseMatrix}}) matrices such as \code{lgTMatrix} may contain duplicated pairs of indices \eqn{(i,j)} as for the corresponding numeric class \code{\linkS4class{dgTMatrix}} where for such pairs, the corresponding \code{x} slot entries are added. For logical matrices, the \code{x} entries corresponding to duplicated index pairs \eqn{(i,j)} are \dQuote{added} as well if the addition is defined as logical \eqn{or}, i.e., \dQuote{\code{TRUE + TRUE |-> TRUE}} and \dQuote{\code{TRUE + FALSE |-> TRUE}}. Note the use of \code{\link{uniqTsparse}()} for getting an internally unique representation without duplicated \eqn{(i,j)} entries. } \section{Slots}{ \describe{ \item{\code{x}:}{Object of class \code{"logical"}, i.e., either \code{TRUE}, \code{\link{NA}}, or \code{FALSE}.} \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular. Present in the triangular and symmetric classes but not in the general class.} \item{\code{diag}:}{Object of class \code{"character"}. Must be either \code{"U"}, for unit triangular (diagonal is all ones), or \code{"N"} for non-unit. The implicit diagonal elements are not explicitly stored when \code{diag} is \code{"U"}. Present in the triangular classes only.} \item{\code{p}:}{Object of class \code{"integer"} of pointers, one for each column (row), to the initial (zero-based) index of elements in the column. Present in compressed column-oriented and compressed row-oriented forms only.} \item{\code{i}:}{Object of class \code{"integer"} of length nnzero (number of non-zero elements). These are the row numbers for each TRUE element in the matrix. All other elements are FALSE. Present in triplet and compressed column-oriented forms only.} \item{\code{j}:}{Object of class \code{"integer"} of length nnzero (number of non-zero elements). These are the column numbers for each TRUE element in the matrix. All other elements are FALSE. Present in triplet and compressed row-oriented forms only.} \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix.} } } \section{Methods}{ \describe{ \item{coerce}{\code{signature(from = "dgCMatrix", to = "lgCMatrix")}} \item{t}{\code{signature(x = "lgCMatrix")}: returns the transpose of \code{x}} \item{which}{\code{signature(x = "lsparseMatrix")}, semantically equivalent to \pkg{base} function \code{\link{which}(x, arr.ind)}; for details, see the \code{\linkS4class{lMatrix}} class documentation.} } } \seealso{ the class \code{\linkS4class{dgCMatrix}} and \code{\linkS4class{dgTMatrix}} } \examples{ (m <- Matrix(c(0,0,2:0), 3,5, dimnames=list(LETTERS[1:3],NULL))) (lm <- (m > 1)) # lgC !lm # no longer sparse stopifnot(is(lm,"lsparseMatrix"), identical(!lm, m <= 1)) data(KNex) str(mmG.1 <- (KNex $ mm) > 0.1)# "lgC..." table(mmG.1@x)# however with many ``non-structural zeros'' ## from logical to nz_pattern -- okay when there are no NA's : nmG.1 <- as(mmG.1, "nMatrix") # <<< has "TRUE" also where mmG.1 had FALSE ## from logical to "double" dmG.1 <- as(mmG.1, "dMatrix") # has '0' and back: lmG.1 <- as(dmG.1, "lMatrix") # has no extra FALSE, i.e. drop0() included stopifnot(identical(nmG.1, as((KNex $ mm) != 0,"nMatrix")), validObject(lmG.1), all(lmG.1@x), # same "logical" but lmG.1 has no 'FALSE' in x slot: all(lmG.1 == mmG.1)) class(xnx <- crossprod(nmG.1))# "nsC.." class(xlx <- crossprod(mmG.1))# "dsC.." : numeric is0 <- (xlx == 0) mean(as.vector(is0))# 99.3\% zeros: quite sparse, but table(xlx@x == 0)# more than half of the entries are (non-structural!) 0 stopifnot(isSymmetric(xlx), isSymmetric(xnx), ## compare xnx and xlx : have the *same* non-structural 0s : sapply(slotNames(xnx), function(n) identical(slot(xnx, n), slot(xlx, n)))) } \keyword{classes} \keyword{algebra} Matrix/man/dtpMatrix-class.Rd0000644000176200001440000000755012271746775015670 0ustar liggesusers\name{dtpMatrix-class} \title{Packed Triangular Dense Matrices - "dtpMatrix"} \docType{class} \alias{dtpMatrix-class} \alias{coerce,dtpMatrix,dtTMatrix-method} \alias{coerce,dtpMatrix,dtrMatrix-method} \alias{coerce,dtpMatrix,ltpMatrix-method} \alias{coerce,dtpMatrix,matrix-method} \alias{coerce,matrix,dtpMatrix-method} \alias{determinant,dtpMatrix,missing-method} \alias{determinant,dtpMatrix,logical-method} \alias{diag,dtpMatrix-method} \alias{diag<-,dtpMatrix-method} \alias{norm,dtpMatrix,character-method} \alias{norm,dtpMatrix,missing-method} \alias{rcond,dtpMatrix,character-method} \alias{rcond,dtpMatrix,missing-method} %\alias{solve,dtpMatrix,...-method}%--> solve-methods.Rd \alias{t,dtpMatrix-method} \description{The \code{"dtpMatrix"} class is the class of triangular, dense, numeric matrices in packed storage. The \code{"dtrMatrix"} class is the same except in nonpacked storage.} \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dtpMatrix", ...)} or by coercion from other classes of matrices. } \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{diag}:}{Object of class \code{"character"}. Must be either \code{"U"}, for unit triangular (diagonal is all ones), or \code{"N"}; see \code{\linkS4class{triangularMatrix}}.} \item{\code{x}:}{Object of class \code{"numeric"}. The numeric values that constitute the matrix, stored in column-major order. For a packed square matrix of dimension \eqn{d \times d}{d * d}, \code{length(x)} is of length \eqn{d(d+1)/2} (also when \code{diag == "U"}!).} \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), inherited from the \code{\linkS4class{Matrix}}, see there.} } } \section{Extends}{ Class \code{"ddenseMatrix"}, directly. Class \code{"triangularMatrix"}, directly. Class \code{"dMatrix"} and more by class \code{"ddenseMatrix"} etc, see the examples. } \section{Methods}{ \describe{ \item{\%*\%}{\code{signature(x = "dtpMatrix", y = "dgeMatrix")}: Matrix multiplication; ditto for several other signature combinations, see \code{showMethods("\%*\%", class = "dtpMatrix")}.} \item{coerce}{\code{signature(from = "dtpMatrix", to = "dtrMatrix")}} \item{coerce}{\code{signature(from = "dtpMatrix", to = "matrix")}} \item{determinant}{\code{signature(x = "dtpMatrix", logarithm = "logical")}: the \code{\link{determinant}(x)} trivially is \code{prod(diag(x))}, but computed on log scale to prevent over- and underflow.} \item{diag}{\code{signature(x = "dtpMatrix")}: ... } \item{norm}{\code{signature(x = "dtpMatrix", type = "character")}: ... } \item{rcond}{\code{signature(x = "dtpMatrix", norm = "character")}: ... } \item{solve}{\code{signature(a = "dtpMatrix", b = "...")}: efficiently using internal backsolve or forwardsolve, see \code{\link{solve-methods}}.} \item{t}{\code{signature(x = "dtpMatrix")}: \code{t(x)} remains a \code{"dtpMatrix"}, lower triangular if \code{x} is upper triangular, and vice versa.} } } \seealso{ Class \code{\linkS4class{dtrMatrix}} } \examples{ showClass("dtrMatrix") example("dtrMatrix-class", echo=FALSE) (p1 <- as(T2, "dtpMatrix")) str(p1) (pp <- as(T, "dtpMatrix")) ip1 <- solve(p1) stopifnot(length(p1@x) == 3, length(pp@x) == 3, p1 @ uplo == T2 @ uplo, pp @ uplo == T @ uplo, identical(t(pp), p1), identical(t(p1), pp), all((l.d <- p1 - T2) == 0), is(l.d, "dtpMatrix"), all((u.d <- pp - T ) == 0), is(u.d, "dtpMatrix"), l.d@uplo == T2@uplo, u.d@uplo == T@uplo, identical(t(ip1), solve(pp)), is(ip1, "dtpMatrix"), all.equal(as(solve(p1,p1), "diagonalMatrix"), Diagonal(2))) } \keyword{classes} Matrix/man/ldenseMatrix-class.Rd0000644000176200001440000000365712622367447016352 0ustar liggesusers\name{ldenseMatrix-class} \title{Virtual Class "ldenseMatrix" of Dense Logical Matrices} \docType{class} \alias{ldenseMatrix-class} % Group \alias{!,ldenseMatrix-method} \alias{Ops,ldenseMatrix,ldenseMatrix-method} \alias{Logic,ldenseMatrix,lsparseMatrix-method} \alias{Logic,lsparseMatrix,ldenseMatrix-method} \alias{Summary,ldenseMatrix-method} % purely "sparse" are in ./lsparseMatrix-classes.Rd %%-- Matrix products: ---> ./matrix-products.Rd \alias{as.logical,ldenseMatrix-method} \alias{as.vector,ldenseMatrix-method} \alias{coerce,matrix,ldenseMatrix-method} \alias{coerce,ldenseMatrix,matrix-method} \alias{diag,ldenseMatrix-method} \alias{norm,ldenseMatrix,character-method} \alias{which,ldenseMatrix-method} \description{ \code{ldenseMatrix} is the virtual class of all dense \bold{l}ogical (S4) matrices. It extends both \code{\linkS4class{denseMatrix}} and \code{\linkS4class{lMatrix}} directly. } \section{Slots}{ \describe{ \item{\code{x}:}{logical vector containing the entries of the matrix.} \item{\code{Dim}, \code{Dimnames}:}{see \code{\linkS4class{Matrix}}.} } } \section{Extends}{ Class \code{"lMatrix"}, directly. Class \code{"denseMatrix"}, directly. Class \code{"Matrix"}, by class \code{"lMatrix"}. Class \code{"Matrix"}, by class \code{"denseMatrix"}. } \section{Methods}{ \describe{ \item{coerce}{\code{signature(from = "matrix", to = "ldenseMatrix")}: ... } \item{coerce}{\code{signature(from = "ldenseMatrix", to = "matrix")}: ... } \item{as.vector}{\code{signature(x = "ldenseMatrix", mode = "missing")}: ...} \item{which}{\code{signature(x = "ndenseMatrix")}, semantically equivalent to \pkg{base} function \code{\link{which}(x, arr.ind)}; for details, see the \code{\linkS4class{lMatrix}} class documentation.} } } \seealso{ Class \code{\linkS4class{lgeMatrix}} and the other subclasses. } \examples{ showClass("ldenseMatrix") as(diag(3) > 0, "ldenseMatrix") } \keyword{classes} Matrix/man/dtCMatrix-class.Rd0000644000176200001440000001327412501122043015557 0ustar liggesusers\name{dtCMatrix-class} \title{Triangular, (compressed) sparse column matrices} \docType{class} \alias{dtCMatrix-class}% C and \alias{dtTMatrix-class}% T % \alias{coerce,dtCMatrix,dgCMatrix-method} \alias{coerce,dtCMatrix,dgeMatrix-method} \alias{coerce,dtCMatrix,dgTMatrix-method} \alias{coerce,dtCMatrix,dsCMatrix-method} \alias{coerce,dtCMatrix,dtTMatrix-method} \alias{coerce,dtCMatrix,dtrMatrix-method} \alias{coerce,dtCMatrix,ltCMatrix-method} \alias{coerce,dtCMatrix,ntCMatrix-method} \alias{coerce,dtCMatrix,TsparseMatrix-method} \alias{coerce,dtCMatrix,denseMatrix-method} \alias{coerce,dtCMatrix,matrix-method} \alias{coerce,dtTMatrix,dgTMatrix-method} \alias{coerce,dtTMatrix,dgeMatrix-method} \alias{coerce,dtTMatrix,dtCMatrix-method} \alias{coerce,dtTMatrix,dtrMatrix-method} %no longer\alias{coerce,dtTMatrix,ltTMatrix-method} %no longer\alias{coerce,dtTMatrix,ntTMatrix-method} \alias{coerce,dtTMatrix,generalMatrix-method} \alias{coerce,dtTMatrix,matrix-method} \alias{coerce,matrix,dtCMatrix-method} \alias{coerce,matrix,dtTMatrix-method} %% Group methods \alias{Arith,dtCMatrix,dtCMatrix-method} % %\alias{solve,dtCMatrix,...-method}%--> solve-methods.Rd \alias{t,dtCMatrix-method} \alias{t,dtTMatrix-method} \description{The \code{"dtCMatrix"} class is a class of triangular, sparse matrices in the compressed, column-oriented format. In this implementation the non-zero elements in the columns are sorted into increasing row order. The \code{"dtTMatrix"} class is a class of triangular, sparse matrices in triplet format. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dtCMatrix", ...)} or calls of the form \code{new("dtTMatrix", ...)}, but more typically automatically via \code{\link{Matrix}()} or coercion such as \code{as(x, "triangularMatrix")}, or \code{as(x, "dtCMatrix")}. } \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{diag}:}{Object of class \code{"character"}. Must be either \code{"U"}, for unit triangular (diagonal is all ones), or \code{"N"}; see \code{\linkS4class{triangularMatrix}}.} \item{\code{p}:}{(only present in \code{"dtCMatrix"}:) an \code{\link{integer}} vector for providing pointers, one for each column, see the detailed description in \code{\linkS4class{CsparseMatrix}}.} \item{\code{i}:}{Object of class \code{"integer"} of length nnzero (number of non-zero elements). These are the row numbers for each non-zero element in the matrix.} \item{\code{j}:}{Object of class \code{"integer"} of length nnzero (number of non-zero elements). These are the column numbers for each non-zero element in the matrix. (Only present in the \code{dtTMatrix} class.)} \item{\code{x}:}{Object of class \code{"numeric"} - the non-zero elements of the matrix.} \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), inherited from the \code{\linkS4class{Matrix}}, see there.} } } \section{Extends}{ Class \code{"dgCMatrix"}, directly. Class \code{"triangularMatrix"}, directly. Class \code{"dMatrix"}, \code{"sparseMatrix"}, and more by class \code{"dgCMatrix"} etc, see the examples. } \section{Methods}{ \describe{ \item{coerce}{\code{signature(from = "dtCMatrix", to = "dgTMatrix")}} \item{coerce}{\code{signature(from = "dtCMatrix", to = "dgeMatrix")}} \item{coerce}{\code{signature(from = "dtTMatrix", to = "dgeMatrix")}} \item{coerce}{\code{signature(from = "dtTMatrix", to = "dtrMatrix")}} \item{coerce}{\code{signature(from = "dtTMatrix", to = "matrix")}} \item{solve}{\code{signature(a = "dtCMatrix", b = "....")}: sparse triangular solve (aka \dQuote{backsolve} or \dQuote{forwardsolve}), see \code{\link{solve-methods}}.} \item{t}{\code{signature(x = "dtCMatrix")}: returns the transpose of \code{x}} \item{t}{\code{signature(x = "dtTMatrix")}: returns the transpose of \code{x}} } } %\references{} %\author{} %\note{} \seealso{ Classes \code{\linkS4class{dgCMatrix}}, \code{\linkS4class{dgTMatrix}}, \code{\linkS4class{dgeMatrix}}, and \code{\linkS4class{dtrMatrix}}. } \examples{ showClass("dtCMatrix") showClass("dtTMatrix") t1 <- new("dtTMatrix", x= c(3,7), i= 0:1, j=3:2, Dim= as.integer(c(4,4))) t1 ## from 0-diagonal to unit-diagonal {low-level step}: tu <- t1 ; tu@diag <- "U" tu (cu <- as(tu, "dtCMatrix")) str(cu)# only two entries in @i and @x stopifnot(cu@i == 1:0, all(2 * symmpart(cu) == Diagonal(4) + forceSymmetric(cu))) t1[1,2:3] <- -1:-2 diag(t1) <- 10*c(1:2,3:2) t1 # still triangular (it1 <- solve(t1)) t1. <- solve(it1) all(abs(t1 - t1.) < 10 * .Machine$double.eps) ## 2nd example U5 <- new("dtCMatrix", i= c(1L, 0:3), p=c(0L,0L,0:2, 5L), Dim = c(5L, 5L), x = rep(1, 5), diag = "U") U5 (iu <- solve(U5)) # contains one '0' validObject(iu2 <- solve(U5, Diagonal(5)))# failed in earlier versions I5 <- iu \%*\% U5 # should equal the identity matrix i5 <- iu2 \%*\% U5 m53 <- matrix(1:15, 5,3, dimnames=list(NULL,letters[1:3])) asDiag <- function(M) as(drop0(M), "diagonalMatrix") stopifnot( all.equal(Diagonal(5), asDiag(I5), tolerance=1e-14) , all.equal(Diagonal(5), asDiag(i5), tolerance=1e-14) , identical(list(NULL, dimnames(m53)[[2]]), dimnames(solve(U5, m53))) ) \dontshow{% i5. <- I5; colnames(i5.) <- LETTERS[11:15] M53 <- as(m53, "dgeMatrix") stopifnot( identical((dns <- dimnames(solve(i5., M53))), dimnames(solve(as.matrix(i5.), as.matrix(M53)))) , identical(dns, dimnames(solve(i5., as.matrix(M53)))) ) }%dont } \keyword{classes} \keyword{algebra} Matrix/man/symmetricMatrix-class.Rd0000644000176200001440000000731713153267746017112 0ustar liggesusers\name{symmetricMatrix-class} \docType{class} \alias{symmetricMatrix-class} \alias{coerce,matrix,symmetricMatrix-method} \alias{coerce,denseMatrix,symmetricMatrix-method} \alias{coerce,CsparseMatrix,symmetricMatrix-method} \alias{dimnames,symmetricMatrix-method} % \title{Virtual Class of Symmetric Matrices in Package Matrix} \description{ The virtual class of symmetric matrices, \code{"symmetricMatrix"}, from the package \pkg{Matrix} contains numeric and logical, dense and sparse matrices, e.g., see the examples with the \dQuote{actual} subclasses. The main use is in methods (and C functions) that can deal with all symmetric matrices, and in \code{as(*, "symmetricMatrix")}. } % \section{Objects from the Class}{A virtual Class: No objects may be created from it.} \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} %% below {Dim, Dimnames} work around Slot parsing buglet (< 2.2.0) %% \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \item{\code{Dim, Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), inherited from the \code{\linkS4class{Matrix}}, see there. See below, about storing only one of the two \code{Dimnames} components.} \item{\code{factors}:}{a list of matrix factorizations, also from the \code{Matrix} class.} } } \section{Extends}{ Class \code{"Matrix"}, directly. } \section{Methods}{ \describe{ \item{coerce}{\code{signature(from = "ddiMatrix", to = "symmetricMatrix")}: and many other coercion methods, some of which are particularly optimized.} \item{dimnames}{\code{signature(object = "symmetricMatrix")}: returns \emph{symmetric} \code{\link{dimnames}}, even when the \code{Dimnames} slot only has row or column names. This allows to save storage for large (typically sparse) symmetric matrices.} \item{isSymmetric}{\code{signature(object = "symmetricMatrix")}: returns \code{TRUE} trivially.} } There's a C function \code{symmetricMatrix_validate()}% in ../src/dsyMatrix.c called by the internal validity checking functions, and also from \code{\link{getValidity}(getClass("symmetricMatrix"))}. } \section{Validity and \code{\link{dimnames}}}{ The validity checks do not require a symmetric \code{Dimnames} slot, so it can be \code{list(NULL, )}, e.g., for efficiency. However, \code{\link{dimnames}()} and other functions and methods should behave as if the dimnames were symmetric, i.e., with both list components identical. } \seealso{ \code{\link{isSymmetric}} which has efficient methods (\link{isSymmetric-methods}) for the \pkg{Matrix} classes. Classes \code{\linkS4class{triangularMatrix}}, and, e.g., \code{\linkS4class{dsyMatrix}} for numeric \emph{dense} matrices, or \code{\linkS4class{lsCMatrix}} for a logical \emph{sparse} matrix class. } \examples{ ## An example about the symmetric Dimnames: sy <- sparseMatrix(i= c(2,4,3:5), j= c(4,7:5,5), x = 1:5, dims = c(7,7), symmetric=TRUE, dimnames = list(NULL, letters[1:7])) sy # shows symmetrical dimnames sy@Dimnames # internally only one part is stored dimnames(sy) # both parts - as sy *is* symmetrical \dontshow{ local({ nm <- letters[1:7] stopifnot(identical(dimnames(sy), list( nm, nm)), identical(sy@Dimnames , list(NULL, nm))) }) }%dont showClass("symmetricMatrix") ## The names of direct subclasses: scl <- getClass("symmetricMatrix")@subclasses directly <- sapply(lapply(scl, slot, "by"), length) == 0 names(scl)[directly] ## Methods -- applicaple to all subclasses above: showMethods(classes = "symmetricMatrix") } \keyword{classes} Matrix/man/solve-methods.Rd0000644000176200001440000002745312271746775015406 0ustar liggesusers\name{solve-methods} \title{Methods in Package Matrix for Function \code{solve()}} \docType{methods} \alias{solve}%- catch ?solve too (is important enough) \alias{solve-methods} \alias{solve,ANY,Matrix-method} \alias{solve,CHMfactor,ANY-method} \alias{solve,CHMfactor,ddenseMatrix-method} \alias{solve,CHMfactor,diagonalMatrix-method} \alias{solve,CHMfactor,dsparseMatrix-method} \alias{solve,CHMfactor,matrix-method} \alias{solve,CHMfactor,missing-method} \alias{solve,CHMfactor,numeric-method} \alias{solve,ddenseMatrix,ANY-method} \alias{solve,ddenseMatrix,matrix-method} \alias{solve,ddenseMatrix,Matrix-method} \alias{solve,ddenseMatrix,missing-method} \alias{solve,ddenseMatrix,numeric-method} \alias{solve,denseLU,missing-method} \alias{solve,dgCMatrix,ddenseMatrix-method} \alias{solve,dgCMatrix,dsparseMatrix-method} \alias{solve,dgCMatrix,matrix-method} \alias{solve,dgCMatrix,missing-method} \alias{solve,dgeMatrix,ddenseMatrix-method} \alias{solve,dgeMatrix,matrix-method} \alias{solve,dgeMatrix,missing-method} \alias{solve,dgeMatrix,sparseMatrix-method} \alias{solve,diagonalMatrix,matrix-method} \alias{solve,diagonalMatrix,Matrix-method} \alias{solve,diagonalMatrix,missing-method} \alias{solve,dpoMatrix,dgeMatrix-method} \alias{solve,dpoMatrix,matrix-method} \alias{solve,dpoMatrix,missing-method} \alias{solve,dppMatrix,dgeMatrix-method} \alias{solve,dppMatrix,integer-method} \alias{solve,dppMatrix,matrix-method} \alias{solve,dppMatrix,missing-method} \alias{solve,dsCMatrix,ddenseMatrix-method} \alias{solve,dsCMatrix,denseMatrix-method} \alias{solve,dsCMatrix,dsparseMatrix-method} \alias{solve,dsCMatrix,matrix-method} \alias{solve,dsCMatrix,missing-method} \alias{solve,dsCMatrix,numeric-method} \alias{solve,dspMatrix,ddenseMatrix-method} \alias{solve,dspMatrix,matrix-method} \alias{solve,dspMatrix,missing-method} \alias{solve,dsyMatrix,ddenseMatrix-method} \alias{solve,dsyMatrix,denseMatrix-method} \alias{solve,dsyMatrix,matrix-method} \alias{solve,dsyMatrix,missing-method} \alias{solve,dtCMatrix,CsparseMatrix-method} \alias{solve,dtCMatrix,dgeMatrix-method} \alias{solve,dtCMatrix,matrix-method} \alias{solve,dtCMatrix,missing-method} \alias{solve,dtCMatrix,numeric-method} \alias{solve,dtpMatrix,ddenseMatrix-method} \alias{solve,dtpMatrix,matrix-method} \alias{solve,dtpMatrix,missing-method} \alias{solve,dtrMatrix,ddenseMatrix-method} \alias{solve,dtrMatrix,dMatrix-method} \alias{solve,dtrMatrix,matrix-method} \alias{solve,dtrMatrix,Matrix-method} \alias{solve,dtrMatrix,missing-method} \alias{solve,Matrix,ANY-method} \alias{solve,Matrix,diagonalMatrix-method} \alias{solve,matrix,Matrix-method} \alias{solve,Matrix,matrix-method} \alias{solve,Matrix,missing-method} \alias{solve,Matrix,numeric-method} \alias{solve,Matrix,pMatrix-method} \alias{solve,Matrix,sparseVector-method} \alias{solve,MatrixFactorization,ANY-method} \alias{solve,MatrixFactorization,missing-method} \alias{solve,MatrixFactorization,numeric-method} \alias{solve,pMatrix,matrix-method} \alias{solve,pMatrix,Matrix-method} \alias{solve,pMatrix,missing-method} \alias{solve,sparseQR,ANY-method} \alias{solve,TsparseMatrix,ANY-method} \alias{solve,TsparseMatrix,missing-method} \description{ Methods for function \code{\link{solve}} to solve a linear system of equations, or equivalently, solve for \eqn{X} in \deqn{A X = B} where \eqn{A} is a square matrix, and \eqn{X}, \eqn{B} are matrices or vectors (which are treated as 1-column matrices), and the \R syntax is \preformatted{ X <- solve(A,B) } In \code{solve(a,b)} in the \pkg{Matrix} package, \code{a} may also be a \code{\linkS4class{MatrixFactorization}} instead of directly a matrix. } \usage{% usage for those methods which have "surprising arguments" \S4method{solve}{CHMfactor,ddenseMatrix}(a, b, system = c("A", "LDLt", "LD", "DLt", "L", "Lt", "D", "P", "Pt"), \dots) \S4method{solve}{dgCMatrix,matrix}(a, b, sparse = FALSE, tol = .Machine$double.eps, \dots) solve(a, b, ...) ## *the* two-argument version, almost always preferred to # solve(a) ## the *rarely* needed one-argument version % ^ must comment the above; otherwise 'R CMD check' waffles ... } \arguments{ \item{a}{a square numeric matrix, \eqn{A}, typically of one of the classes in \pkg{Matrix}. Logical matrices are coerced to corresponding numeric ones.} \item{b}{numeric vector or matrix (dense or sparse) as RHS of the linear system \eqn{Ax = b}.} \item{system}{only if \code{a} is a \code{\linkS4class{CHMfactor}}: character string indicating the kind of linear system to be solved, see below. Note that the default, \code{"A"}, does \emph{not} solve the triangular system (but \code{"L"} does).} \item{sparse}{only when \code{a} is a \code{\linkS4class{sparseMatrix}}, i.e., typically a \code{\linkS4class{dgCMatrix}}: logical specifying if the result should be a (formally) sparse matrix.}%% FIXME: mention %% pos.definite etc \item{tol}{only used when \code{a} is sparse, in the \code{\link{isSymmetric}(a, tol=*)} test, where that applies.} \item{\dots}{potentially further arguments to the methods.} } \section{Methods}{ \describe{ \item{\code{signature(a = "ANY", b = "ANY")}}{is simply the \pkg{base} package's S3 generic \code{\link{solve}}.} %% This is copy-paste in CHMfactor-class.Rd {FIXME ?} \item{\code{signature(a = "CHMfactor", b = "...."), system= *}}{The \code{solve} methods for a \code{"\linkS4class{CHMfactor}"} object take an optional third argument \code{system} whose value can be one of the character strings \code{"A"}, \code{"LDLt"}, \code{"LD"}, \code{"DLt"}, \code{"L"}, \code{"Lt"}, \code{"D"}, \code{"P"} or \code{"Pt"}. This argument describes the system to be solved. The default, \code{"A"}, is to solve \eqn{Ax = b} for \eqn{x} where \code{A} is sparse, positive-definite matrix that was factored to produce \code{a}. Analogously, \code{system = "L"} returns the solution \eqn{x}, of \eqn{Lx = b}; similarly, for all system codes \bold{but} \code{"P"} and \code{"Pt"} where, e.g., \code{x <- solve(a, b,system="P")} is equivalent to \code{x <- P \%*\% b}. If \code{b} is a \code{\linkS4class{sparseMatrix}}, \code{system} is used as above the corresponding sparse CHOLMOD algorithm is called. } \item{\code{signature(a = "ddenseMatrix", b = "....")}}{(for all \code{b}) work via \code{as(a, "dgeMatrix")}, using the its methods, see below.} \item{\code{signature(a = "denseLU", b = "missing")}}{ basically computes uses triangular forward- and back-solve.} \item{\code{signature(a = "dgCMatrix", b = "matrix")}}{, and} %% -> ../R/dgCMatrix.R \item{\code{signature(a = "dgCMatrix", b = "ddenseMatrix")}}{with extra argument list \code{( sparse = FALSE, tol = .Machine$double.eps ) }: Uses the sparse \code{\link{lu}(a)} decomposition (which is cached in \code{a}'s \code{factor} slot). By default, \code{sparse=FALSE}, returns a \code{\linkS4class{denseMatrix}}, since \eqn{U^{-1} L^{-1} B} may not be sparse at all, even when \eqn{L} and \eqn{U} are. If \code{sparse=TRUE}, returns a \code{\linkS4class{sparseMatrix}} (which may not be very sparse at all, even if \code{a} \emph{was} sparse). } \item{\code{signature(a = "dgCMatrix", b = "dsparseMatrix")}}{, and} \item{\code{signature(a = "dgCMatrix", b = "missing")}}{with extra argument list \code{( sparse=FALSE, tol = .Machine$double.eps ) }: Checks if \code{a} is symmetric, and in that case, coerces it to \code{"\linkS4class{symmetricMatrix}"}, and then computes a \emph{sparse} solution via sparse Cholesky factorization, independently of the \code{sparse} argument. If \code{a} is not symmetric, the sparse \code{\link{lu}} decomposition is used and the result will be sparse or dense, depending on the \code{sparse} argument, exactly as for the above (\code{b = "ddenseMatrix"}) case. } \item{\code{signature(a = "dgeMatrix", b = ".....")}}{ solve the system via internal LU, calling LAPACK routines \code{dgetri} or \code{dgetrs}. } \item{\code{signature(a = "diagonalMatrix", b = "matrix")}}{and other \code{b}s: Of course this is trivially implemented, as \eqn{D^{-1}} is diagonal with entries \eqn{1 / D[i,i]}.} \item{\code{signature(a = "dpoMatrix", b = "....Matrix")}}{, and} \item{\code{signature(a = "dppMatrix", b = "....Matrix")}}{ The Cholesky decomposition of \code{a} is calculated (if needed) while solving the system.} \item{\code{signature(a = "dsCMatrix", b = "....")}}{% ../R/dsCMatrix.R All these methods first try Cholmod's Cholesky factorization; if that works, i.e., typically if \code{a} is positive semi-definite, it is made use of. Otherwise, the sparse LU decomposition is used as for the \dQuote{general} matrices of class \code{"dgCMatrix"}.} \item{\code{signature(a = "dspMatrix", b = "....")}}{, and} \item{\code{signature(a = "dsyMatrix", b = "....")}}{% ../R/dsyMatrix.R all end up calling LAPACK routines \code{dsptri}, \code{dsptrs}, \code{dsytrs} and \code{dsytri}. } \item{\code{signature(a = "dtCMatrix", b = "CsparseMatrix")}}{,} \item{\code{signature(a = "dtCMatrix", b = "dgeMatrix")}}{, etc sparse triangular solve, in traditional S/\R also known as \code{\link{backsolve}}, or \code{\link{forwardsolve}}. \code{solve(a,b)} is a \code{\linkS4class{sparseMatrix}} if \code{b} is, and hence a \code{\linkS4class{denseMatrix}} otherwise. } \item{\code{signature(a = "dtrMatrix", b = "ddenseMatrix")}}{, and} \item{\code{signature(a = "dtpMatrix", b = "matrix")}}{, and% ../R/dtrMatrix.R similar \code{b}, including \code{"missing"}, and \code{"diagonalMatrix"}: all use LAPACK based versions of efficient triangular \code{\link{backsolve}}, or \code{\link{forwardsolve}}. } \item{\code{signature(a = "Matrix", b = "diagonalMatrix")}}{ works via \code{as(b, "CsparseMatrix")}.} \item{\code{signature(a = "sparseQR", b = "ANY")}}{ simply uses \code{\link{qr.coef}(a, b)}.} \item{\code{signature(a = "pMatrix", b = ".....")}}{ these methods typically use \code{\link{crossprod}(a,b)}, as the inverse of a permutation matrix is the same as its transpose.} \item{\code{signature(a = "TsparseMatrix", b = "ANY")}}{ all work via \code{as(a, "CsparseMatrix")}.} } }%{Methods} \seealso{ \code{\link{solve}}, \code{\link{lu}}, and class documentations \code{\linkS4class{CHMfactor}}, \code{\linkS4class{sparseLU}}, and \code{\linkS4class{MatrixFactorization}}. } \examples{ ## A close to symmetric example with "quite sparse" inverse: n1 <- 7; n2 <- 3 dd <- data.frame(a = gl(n1,n2), b = gl(n2,1,n1*n2))# balanced 2-way X <- sparse.model.matrix(~ -1+ a + b, dd)# no intercept --> even sparser XXt <- tcrossprod(X) diag(XXt) <- rep(c(0,0,1,0), length.out = nrow(XXt)) n <- nrow(ZZ <- kronecker(XXt, Diagonal(x=c(4,1)))) image(a <- 2*Diagonal(n) + ZZ \%*\% Diagonal(x=c(10, rep(1, n-1)))) isSymmetric(a) # FALSE image(drop0(skewpart(a))) image(ia0 <- solve(a)) # checker board, dense [but really, a is singular!] try(solve(a, sparse=TRUE))##-> error [ TODO: assertError ] ia. <- solve(a, sparse=TRUE, tol = 1e-19)##-> *no* error if(R.version$arch == "x86_64") ## Fails on 32-bit [Fedora 19, R 3.0.2] from Matrix 1.1-0 on [FIXME ??] only stopifnot(all.equal(as.matrix(ia.), as.matrix(ia0))) a <- a + Diagonal(n) iad <- solve(a) ias <- solve(a, sparse=TRUE) stopifnot(all.equal(as(ias,"denseMatrix"), iad, tolerance=1e-14)) I. <- iad \%*\% a ; image(I.) I0 <- drop0(zapsmall(I.)); image(I0) .I <- a \%*\% iad .I0 <- drop0(zapsmall(.I)) stopifnot( all.equal(as(I0, "diagonalMatrix"), Diagonal(n)), all.equal(as(.I0,"diagonalMatrix"), Diagonal(n)) ) } \keyword{methods} Matrix/man/sparseVector.Rd0000644000176200001440000000275213057576763015271 0ustar liggesusers\name{sparseVector} \alias{sparseVector} \title{Sparse Vector Construction from Nonzero Entries} \description{ User friendly construction of sparse vectors, i.e., objects inheriting from \code{\link{class}} \code{\linkS4class{sparseVector}}, from indices and values of its non-zero entries. } \details{ zero entries in \code{x} are dropped automatically, analogously as \code{\link{drop0}()} acts on sparse matrices. } \usage{ sparseVector(x, i, length) } \arguments{ \item{x}{vector of the non zero entries; may be missing in which case a \code{"nsparseVector"} will be returned.} \item{i}{integer vector (of the same length as \code{x}) specifying the indices of the non-zero (or non-\code{TRUE}) entries of the sparse vector.} \item{length}{length of the sparse vector.} } \value{ a sparse vector, i.e., inheriting from \code{\link{class}} \code{\linkS4class{sparseVector}}. } \author{Martin Maechler} \seealso{ \code{\link{sparseMatrix}()} constructor for sparse matrices; the class \code{\linkS4class{sparseVector}}. } \examples{ str(sv <- sparseVector(x = 1:10, i = sample(999, 10), length=1000)) sx <- c(0,0,3, 3.2, 0,0,0,-3:1,0,0,2,0,0,5,0,0) ss <- as(sx, "sparseVector") stopifnot(identical(ss, sparseVector(x = c(2, -1, -2, 3, 1, -3, 5, 3.2), i = c(15L, 10:9, 3L,12L,8L,18L, 4L), length = 20L))) (ns <- sparseVector(i= c(7, 3, 2), length = 10)) stopifnot(identical(ns, new("nsparseVector", length = 10, i = c(2, 3, 7)))) } \keyword{array} Matrix/man/chol.Rd0000644000176200001440000001224212322331041013475 0ustar liggesusers\name{chol} \title{Choleski Decomposition - 'Matrix' S4 Generic and Methods} \alias{chol} \alias{chol-methods} \alias{chol,Matrix-method} % dense methods \alias{chol,ddenseMatrix-method} \alias{chol,dgeMatrix-method} \alias{chol,dpoMatrix-method} \alias{chol,dppMatrix-method} % diagonal \alias{chol,ddiMatrix-method} \alias{chol,ldiMatrix-method} % sparse methods \alias{chol,dsparseMatrix-method} \alias{chol,dsCMatrix-method} \alias{chol,dsCMatrix-method} \alias{chol,lsCMatrix-method} \alias{chol,lsCMatrix-method} \alias{chol,nsCMatrix-method} \alias{chol,nsCMatrix-method} % \description{ Compute the Choleski factorization of a real symmetric positive-definite square matrix. } \usage{ chol(x, \dots) \S4method{chol}{dsCMatrix}(x, pivot = FALSE, \dots) \S4method{chol}{dsparseMatrix}(x, pivot = FALSE, cache = TRUE, \dots) } \arguments{ \item{x}{a (sparse or dense) square matrix, here inheriting from class \code{\linkS4class{Matrix}}; if \code{x} is not positive definite, an error is signalled.} \item{pivot}{logical indicating if pivoting is to be used. Currently, this is \emph{not} made use of for dense matrices.} \item{cache}{logical indicating if the result should be cashed in \code{x@factors}; note that this argument is experimental and only available for some sparse matrices.} \item{\dots}{potentially further arguments passed to methods.} } \details{ Note that these Cholesky factorizations are typically \emph{cached} with \code{x} currently, and these caches are available in \code{x@factors}, which may be useful for the sparse case when \code{pivot = TRUE}, where the permutation can be retrieved; see also the examples. However, this should not be considered part of the API and made use of. Rather consider \code{\link{Cholesky}()} in such situations, since \code{chol(x, pivot=TRUE)} uses the same algorithm (but not the same return value!) as \code{\link{Cholesky}(x, LDL=FALSE)} and \code{chol(x)} corresponds to \code{\link{Cholesky}(x, perm=FALSE, LDL=FALSE)}. } \section{Methods}{ Use \code{\link{showMethods}(chol)} to see all; some are worth mentioning here: \describe{ \item{chol}{\code{signature(x = "dgeMatrix")}: works via \code{"dpoMatrix"}, see class \code{\linkS4class{dpoMatrix}}.} \item{chol}{\code{signature(x = "dpoMatrix")}: Returns (and stores) the Cholesky decomposition of \code{x}, via LAPACK routines \code{dlacpy} and \code{dpotrf}.} \item{chol}{\code{signature(x = "dppMatrix")}: Returns (and stores) the Cholesky decomposition via LAPACK routine \code{dpptrf}.} \item{chol}{\code{signature(x = "dsCMatrix", pivot = "logical")}: Returns (and stores) the Cholesky decomposition of \code{x}. If \code{pivot} is true, the Approximate Minimal Degree (AMD) algorithm is used to create a reordering of the rows and columns of \code{x} so as to reduce fill-in.} } } \value{ a matrix of class \code{\linkS4class{Cholesky}}, i.e., upper triangular: \eqn{R} such that \eqn{R'R = x} (if \code{pivot=FALSE}) \emph{or} \eqn{P' R'R P = x} (if \code{pivot=TRUE} and \eqn{P} is the corresponding permutation matrix). } \references{ Timothy A. Davis (2006) \emph{Direct Methods for Sparse Linear Systems}, SIAM Series \dQuote{Fundamentals of Algorithms}. Tim Davis (1996), An approximate minimal degree ordering algorithm, \emph{SIAM J. Matrix Analysis and Applications}, \bold{17}, 4, 886--905. } \seealso{The default from \pkg{base}, \code{\link[base]{chol}}; for more flexibility (but not returning a matrix!) \code{\link{Cholesky}}. } \examples{ showMethods(chol, inherited = FALSE) # show different methods sy2 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, NA,32,77)) (c2 <- chol(sy2))#-> "Cholesky" matrix stopifnot(all.equal(c2, chol(as(sy2, "dpoMatrix")), tolerance= 1e-13)) str(c2) ## An example where chol() can't work (sy3 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, -1, 2, -7))) try(chol(sy3)) # error, since it is not positive definite ## A sparse example --- exemplifying 'pivot' (mm <- toeplitz(as(c(10, 0, 1, 0, 3), "sparseVector"))) # 5 x 5 (R <- chol(mm)) ## default: pivot = FALSE R2 <- chol(mm, pivot=FALSE) stopifnot( identical(R, R2), all.equal(crossprod(R), mm) ) (R. <- chol(mm, pivot=TRUE))# nice band structure, ## but of course crossprod(R.) is *NOT* equal to mm ## --> see Cholesky() and its examples, for the pivot structure & factorization stopifnot(all.equal(sqrt(det(mm)), det(R)), all.equal(prod(diag(R)), det(R)), all.equal(prod(diag(R.)), det(R))) ## a second, even sparser example: (M2 <- toeplitz(as(c(1,.5, rep(0,12), -.1), "sparseVector"))) c2 <- chol(M2) C2 <- chol(M2, pivot=TRUE) ## For the experts, check the caching of the factorizations: ff <- M2@factors[["spdCholesky"]] FF <- M2@factors[["sPdCholesky"]] L1 <- as(ff, "Matrix")# pivot=FALSE: no perm. L2 <- as(FF, "Matrix"); P2 <- as(FF, "pMatrix") stopifnot(identical(t(L1), c2), all.equal(t(L2), C2, tolerance=0),#-- why not identical()? all.equal(M2, tcrossprod(L1)), # M = LL' all.equal(M2, crossprod(crossprod(L2, P2)))# M = P'L L'P ) } \keyword{algebra} \keyword{array} Matrix/man/index-class.Rd0000644000176200001440000000147713141330160014773 0ustar liggesusers\name{index-class} \docType{class} \alias{index-class} %% The "[" and "[<-" methods are %% in ./Xtrct-methods.Rd and ./Subassign-methods.Rd \title{Virtual Class "index" - Simple Class for Matrix Indices} \description{The class \code{"index"} is a virtual class used for indices (in signatures) for matrix indexing and sub-assignment of \pkg{Matrix} matrices. In fact, it is currently implemented as a simple class union (\code{\link{setClassUnion}}) of \code{"numeric"}, \code{"logical"} and \code{"character"}. } \section{Objects from the Class}{Since it is a virtual Class, no objects may be created from it.} \seealso{ \code{\link{[-methods}}, and %% FIXME: bug in Rdconv needs '[Matrix]' below: \code{\link[Matrix]{Subassign-methods}}, also for examples. } \examples{ showClass("index") } \keyword{classes} Matrix/man/atomicVector-class.Rd0000644000176200001440000000231211252551775016332 0ustar liggesusers\name{atomicVector-class} \docType{class} \alias{atomicVector-class} \title{Virtual Class "atomicVector" of Atomic Vectors} \description{ The \code{\link{class}} \code{"atomicVector"} is a \emph{virtual} class containing all atomic vector classes of base \R, as also implicitly defined via \code{\link{is.atomic}}. } \section{Objects from the Class}{A virtual Class: No objects may be created from it.} \section{Methods}{ In the \pkg{Matrix} package, the "atomicVector" is used in signatures where typically \dQuote{old-style} "matrix" objects can be used and can be substituted by simple vectors. } \section{Extends}{%% FIXME: promptClass() should show the direct subclasses ! The atomic classes \code{"logical"}, \code{"integer"}, \code{"double"}, \code{"numeric"}, \code{"complex"}, \code{"raw"} and \code{"character"} are extended directly. Note that \code{"numeric"} already contains \code{"integer"} and \code{"double"}, but we want all of them to be direct subclasses of \code{"atomicVector"}. } \author{Martin Maechler} \seealso{ \code{\link{is.atomic}}, \code{\link{integer}}, \code{\link{numeric}}, \code{\link{complex}}, etc. } \examples{ showClass("atomicVector") } \keyword{classes} Matrix/man/rep2abI.Rd0000644000176200001440000000125211352372065014050 0ustar liggesusers\name{rep2abI} \alias{rep2abI} \title{Replicate Vectors into 'abIndex' Result} \description{ \code{rep2abI(x, times)} conceptually computes \code{\link{rep.int}(x, times)} but with an \code{\linkS4class{abIndex}} class result. } \usage{ rep2abI(x, times) } \arguments{ \item{x}{numeric vector} \item{times}{integer (valued) scalar: the number of repetitions} } % \details{ % } \value{ a vector of \code{\link{class}} \code{\linkS4class{abIndex}} } \seealso{ \code{\link{rep.int}()}, the base function; \code{\link{abIseq}}, \code{\linkS4class{abIndex}}. } \examples{ (ab <- rep2abI(2:7, 4)) stopifnot(identical(as(ab, "numeric"), rep(2:7, 4))) } \keyword{manip} Matrix/man/pMatrix-class.Rd0000644000176200001440000001370212322331041015301 0ustar liggesusers\name{pMatrix-class} \docType{class} \alias{pMatrix-class} \alias{-,pMatrix,missing-method} \alias{coerce,integer,pMatrix-method} \alias{coerce,numeric,pMatrix-method} \alias{coerce,matrix,pMatrix-method} \alias{coerce,sparseMatrix,pMatrix-method} \alias{coerce,pMatrix,matrix-method} \alias{coerce,pMatrix,ngeMatrix-method} \alias{coerce,pMatrix,ngTMatrix-method} \alias{coerce,pMatrix,lMatrix-method} \alias{coerce,pMatrix,dMatrix-method} \alias{coerce,pMatrix,nMatrix-method} \alias{coerce,pMatrix,CsparseMatrix-method} \alias{coerce,pMatrix,TsparseMatrix-method} \alias{coerce,pMatrix,dsparseMatrix-method} \alias{coerce,pMatrix,nsparseMatrix-method} \alias{coerce,nMatrix,pMatrix-method} \alias{determinant,pMatrix,logical-method} \alias{Summary,pMatrix-method} %\alias{solve,pMatrix,missing-method}--> solve-methods.Rd \alias{t,pMatrix-method} % \title{Permutation matrices} \description{The \code{"pMatrix"} class is the class of permutation matrices, stored as 1-based integer permutation vectors. Matrix (vector) multiplication with permutation matrices is equivalent to row or column permutation, and is implemented that way in the \pkg{Matrix} package, see the \sQuote{Details} below. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("pMatrix", ...)} or by coercion from an integer permutation vector, see below. } \section{Slots}{ \describe{ \item{\code{perm}:}{An integer, 1-based permutation vector, i.e. an integer vector of length \code{Dim[1]} whose elements form a permutation of \code{1:Dim[1]}.} \item{\code{Dim}:}{Object of class \code{"integer"}. The dimensions of the matrix which must be a two-element vector of equal, non-negative integers.} \item{\code{Dimnames}:}{list of length two; each component containing NULL or a \code{\link{character}} vector length equal the corresponding \code{Dim} element.} } } \section{Extends}{ Class \code{"\linkS4class{indMatrix}"}, directly. } \section{Methods}{ \describe{ \item{\%*\%}{\code{signature(x = "matrix", y = "pMatrix")} and other signatures (use \code{showMethods("\%*\%", class="pMatrix")}): ... } \item{coerce}{\code{signature(from = "integer", to = "pMatrix")}: This is enables typical \code{"pMatrix"} construction, given a permutation vector of \code{1:n}, see the first example.} \item{coerce}{\code{signature(from = "numeric", to = "pMatrix")}: a user convenience, to allow \code{as(perm, "pMatrix")} for numeric \code{perm} with integer values.} \item{coerce}{\code{signature(from = "pMatrix", to = "matrix")}: coercion to a traditional FALSE/TRUE \code{\link{matrix}} of \code{\link{mode}} \code{logical}. (in earlier version of \pkg{Matrix}, it resulted in a 0/1-integer matrix; \code{logical} makes slightly more sense, corresponding better to the \dQuote{natural} sparseMatrix counterpart, \code{"ngTMatrix"}.)} \item{coerce}{\code{signature(from = "pMatrix", to = "ngTMatrix")}: coercion to sparse logical matrix of class \code{\linkS4class{ngTMatrix}}.} \item{determinant}{\code{signature(x = "pMatrix", logarithm="logical")}: Since permutation matrices are orthogonal, the determinant must be +1 or -1. In fact, it is exactly the \emph{sign of the permutation}.} \item{solve}{\code{signature(a = "pMatrix", b = "missing")}: return the inverse permutation matrix; note that \code{solve(P)} is identical to \code{t(P)} for permutation matrices. See \code{\link{solve-methods}} for other methods.} \item{t}{\code{signature(x = "pMatrix")}: return the transpose of the permutation matrix (which is also the inverse of the permutation matrix).} } } \details{ Matrix multiplication with permutation matrices is equivalent to row or column permutation. Here are the four different cases for an arbitrary matrix \eqn{M} and a permutation matrix \eqn{P} (where we assume matching dimensions): \tabular{lclcl}{ \eqn{MP }\tab= \tab\code{M \%*\% P} \tab= \tab\code{M[, i(p)]}\cr \eqn{PM }\tab= \tab\code{P \%*\% M} \tab= \tab\code{M[ p , ]} \cr \eqn{P'M}\tab= \tab\code{crossprod(P,M)} (\eqn{\approx}{~=}\code{t(P) \%*\% M})\tab= \tab\code{M[i(p), ]}\cr \eqn{MP'}\tab= \tab\code{tcrossprod(M,P)} (\eqn{\approx}{~=}\code{M \%*\% t(P)})\tab= \tab\code{M[ , p ]} \cr } where \code{p} is the \dQuote{permutation vector} corresponding to the permutation matrix \code{P} (see first note), and \code{i(p)} is short for \code{\link{invPerm}(p)}. Also one could argue that these are really only two cases if you take into account that inversion (\code{\link{solve}}) and transposition (\code{\link{t}}) are the same for permutation matrices \eqn{P}. } \note{ For every permutation matrix \code{P}, there is a corresponding permutation vector \code{p} (of indices, 1:n), and these are related by \preformatted{ P <- as(p, "pMatrix") p <- P@perm } see also the \sQuote{Examples}. \dQuote{Row-indexing} a permutation matrix typically returns an \code{"indMatrix"}. See \code{"\linkS4class{indMatrix}"} for all other subsetting/indexing and subassignment (\code{A[..] <- v}) operations. } \seealso{\code{\link{invPerm}(p)} computes the inverse permutation of an integer (index) vector \code{p}. } \examples{ (pm1 <- as(as.integer(c(2,3,1)), "pMatrix")) t(pm1) # is the same as solve(pm1) pm1 \%*\% t(pm1) # check that the transpose is the inverse stopifnot(all(diag(3) == as(pm1 \%*\% t(pm1), "matrix")), is.logical(as(pm1, "matrix"))) set.seed(11) ## random permutation matrix : (p10 <- as(sample(10),"pMatrix")) ## Permute rows / columns of a numeric matrix : (mm <- round(array(rnorm(3 * 3), c(3, 3)), 2)) mm \%*\% pm1 pm1 \%*\% mm try(as(as.integer(c(3,3,1)), "pMatrix"))# Error: not a permutation as(pm1, "ngTMatrix") p10[1:7, 1:4] # gives an "ngTMatrix" (most economic!) ## row-indexing of a keeps it as an : p10[1:3, ] } \keyword{classes} Matrix/man/forceSymmetric.Rd0000644000176200001440000000712412417245712015564 0ustar liggesusers\name{forceSymmetric} \alias{forceSymmetric} \alias{forceSymmetric,matrix,ANY-method} \alias{forceSymmetric,Matrix,missing-method} \alias{forceSymmetric,denseMatrix,character-method} \alias{forceSymmetric,denseMatrix,missing-method} \alias{forceSymmetric,sparseMatrix,ANY-method} \alias{forceSymmetric,CsparseMatrix,ANY-method} % all the loop-generated "symmetricMatrix" methods: \alias{forceSymmetric,dsyMatrix,missing-method} \alias{forceSymmetric,dsyMatrix,character-method} \alias{forceSymmetric,dspMatrix,missing-method} \alias{forceSymmetric,dspMatrix,character-method} \alias{forceSymmetric,lsyMatrix,missing-method} \alias{forceSymmetric,lsyMatrix,character-method} \alias{forceSymmetric,lspMatrix,missing-method} \alias{forceSymmetric,lspMatrix,character-method} \alias{forceSymmetric,nsyMatrix,missing-method} \alias{forceSymmetric,nsyMatrix,character-method} \alias{forceSymmetric,nspMatrix,missing-method} \alias{forceSymmetric,nspMatrix,character-method} \alias{forceSymmetric,dsTMatrix,missing-method} \alias{forceSymmetric,dsTMatrix,character-method} \alias{forceSymmetric,dsCMatrix,missing-method} \alias{forceSymmetric,dsCMatrix,character-method} \alias{forceSymmetric,dsRMatrix,missing-method} \alias{forceSymmetric,dsRMatrix,character-method} \alias{forceSymmetric,lsTMatrix,missing-method} \alias{forceSymmetric,lsTMatrix,character-method} \alias{forceSymmetric,lsCMatrix,missing-method} \alias{forceSymmetric,lsCMatrix,character-method} \alias{forceSymmetric,lsRMatrix,missing-method} \alias{forceSymmetric,lsRMatrix,character-method} \alias{forceSymmetric,nsTMatrix,missing-method} \alias{forceSymmetric,nsTMatrix,character-method} \alias{forceSymmetric,nsCMatrix,missing-method} \alias{forceSymmetric,nsCMatrix,character-method} \alias{forceSymmetric,nsRMatrix,missing-method} \alias{forceSymmetric,nsRMatrix,character-method} \alias{forceSymmetric,dpoMatrix,missing-method} \alias{forceSymmetric,dpoMatrix,character-method} \alias{forceSymmetric,corMatrix,missing-method} \alias{forceSymmetric,corMatrix,character-method} \alias{forceSymmetric,dppMatrix,missing-method} \alias{forceSymmetric,dppMatrix,character-method} % \title{Force a Matrix to 'symmetricMatrix' Without Symmetry Checks} \description{ Force a square matrix \code{x} to a \code{\linkS4class{symmetricMatrix}}, \bold{without} a symmetry check as it would be applied for \code{as(x, "symmetricMatrix")}. } \usage{ forceSymmetric(x, uplo) } \arguments{ \item{x}{any square matrix (of numbers), either \dQuote{"traditional"} (\code{\link{matrix}}) or inheriting from \code{\linkS4class{Matrix}}.} \item{uplo}{optional string, \code{"U"} or \code{"L"} indicating which \dQuote{triangle} half of \code{x} should determine the result. The default is \code{"U"} unless \code{x} already has a \code{uplo} slot (i.e., when it is \code{\linkS4class{symmetricMatrix}}, or \code{\linkS4class{triangularMatrix}}), where the default will be \code{x@uplo}.} } % \details{ % % } \value{ a square matrix inheriting from class \code{\linkS4class{symmetricMatrix}}. } \seealso{\code{\link{symmpart}} for the symmetric part of a matrix, or the coercions \code{as(x, )}. } \examples{ ## Hilbert matrix i <- 1:6 h6 <- 1/outer(i - 1L, i, "+") sd <- sqrt(diag(h6)) hh <- t(h6/sd)/sd # theoretically symmetric isSymmetric(hh, tol=0) # FALSE; hence try( as(hh, "symmetricMatrix") ) # fails, but this works fine: H6 <- forceSymmetric(hh) ## result can be pretty surprising: (M <- Matrix(1:36, 6)) forceSymmetric(M) # symmetric, hence very different in lower triangle (tm <- tril(M)) forceSymmetric(tm) } \keyword{array} Matrix/man/Xtrct-methods.Rd0000644000176200001440000000566412211567675015354 0ustar liggesusers\name{[-methods} \docType{methods} \alias{[-methods} \title{Methods for "[": Extraction or Subsetting in Package 'Matrix'} % NB: "[<-" are in ./Subassign-methods.Rd % ~~~~~~~~~~~~~~~~~~~~~~ \alias{[,Matrix,missing,missing,ANY-method} \alias{[,Matrix,missing,index,missing-method} \alias{[,Matrix,index,missing,missing-method} \alias{[,Matrix,index,index,missing-method} \alias{[,Matrix,lMatrix,missing,ANY-method} \alias{[,Matrix,logical,missing,ANY-method} \alias{[,Matrix,matrix,missing,ANY-method} \alias{[,Matrix,lMatrix,missing,missing-method} \alias{[,Matrix,logical,missing,missing-method} \alias{[,Matrix,matrix,missing,missing-method} \alias{[,Matrix,ANY,ANY,ANY-method}% bail out if no explicit method % \alias{[,denseMatrix,matrix,missing,ANY-method} \alias{[,denseMatrix,matrix,missing,missing-method} \alias{[,denseMatrix,index,missing,logical-method} \alias{[,denseMatrix,index,index,logical-method} \alias{[,denseMatrix,missing,index,logical-method} \alias{[,diagonalMatrix,index,missing,logical-method} \alias{[,diagonalMatrix,index,index,logical-method} \alias{[,diagonalMatrix,missing,index,logical-method} % \alias{[,CsparseMatrix,missing,index,logical-method} \alias{[,CsparseMatrix,index,missing,logical-method} \alias{[,CsparseMatrix,index,index,logical-method} % \alias{[,TsparseTMatrix,missing,missing,ANY-method} \alias{[,TsparseMatrix,index,missing,logical-method} \alias{[,TsparseMatrix,missing,index,logical-method} \alias{[,TsparseMatrix,index,index,logical-method} % \alias{[,sparseMatrix,missing,index,logical-method} \alias{[,sparseMatrix,index,missing,logical-method} \alias{[,sparseMatrix,index,index,logical-method} % \alias{[,indMatrix,index,missing,logical-method} %------- \description{ Methods for \code{"["}, i.e., extraction or subsetting mostly of matrices, in package \pkg{Matrix}. } \section{Methods}{ There are more than these: \describe{ \item{x = "Matrix", i = "missing", j = "missing", drop= "ANY"}{ ... } \item{x = "Matrix", i = "numeric", j = "missing", drop= "missing"}{ ... } \item{x = "Matrix", i = "missing", j = "numeric", drop= "missing"}{ ... } \item{x = "dsparseMatrix", i = "missing", j = "numeric", drop= "logical"}{ ... } \item{x = "dsparseMatrix", i = "numeric", j = "missing", drop= "logical"}{ ... } \item{x = "dsparseMatrix", i = "numeric", j = "numeric", drop= "logical"}{ ... } } } \seealso{ \code{\link{[<--methods}} for sub\emph{assign}ment to \code{"Matrix"} objects. \code{\link{Extract}} about the standard extraction. } \examples{ % regression tests are in ../tests/indexing.R str(m <- Matrix(round(rnorm(7*4),2), nrow = 7)) stopifnot(identical(m, m[])) m[2, 3] # simple number m[2, 3:4] # simple numeric of length 2 m[2, 3:4, drop=FALSE] # sub matrix of class 'dgeMatrix' ## rows or columns only: m[1,] # first row, as simple numeric vector m[,1:2] # sub matrix of first two columns showMethods("[", inherited = FALSE) } \keyword{methods} \keyword{array} Matrix/man/triangularMatrix-class.Rd0000644000176200001440000000500212501122043017203 0ustar liggesusers\name{triangularMatrix-class} \docType{class} \alias{triangularMatrix-class} \alias{coerce,triangularMatrix,symmetricMatrix-method} \alias{coerce,lgeMatrix,triangularMatrix-method} \alias{coerce,ngeMatrix,triangularMatrix-method} \alias{coerce,matrix,triangularMatrix-method} % \title{Virtual Class of Triangular Matrices in Package Matrix} \description{ The virtual class of triangular matrices,\code{"triangularMatrix"}, the package \pkg{Matrix} contains \emph{square} (\code{\link{nrow} == \link{ncol}}) numeric and logical, dense and sparse matrices, e.g., see the examples. A main use of the virtual class is in methods (and C functions) that can deal with all triangular matrices. } % \section{Objects from the Class}{A virtual Class: No objects may be created from it.} \section{Slots}{ \describe{ \item{\code{uplo}:}{String (of class \code{"character"}). Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{diag}:}{String (of class \code{"character"}). Must be either \code{"U"}, for unit triangular (diagonal is all ones), or \code{"N"} for non-unit. The diagonal elements are not accessed internally when \code{diag} is \code{"U"}. For \code{\linkS4class{denseMatrix}} classes, they need to be allocated though, i.e., the length of the \code{x} slot does not depend on \code{diag}.} \item{\code{Dim}, \code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), inherited from the \code{\linkS4class{Matrix}}, see there.} } } \section{Extends}{ Class \code{"Matrix"}, directly. } \section{Methods}{ There's a C function \code{triangularMatrix_validity()} called by the internal validity checking functions. Currently, \code{\link{Schur}}, \code{\link{isSymmetric}} and \code{as()} (i.e. \code{\link{coerce}}) have methods with \code{triangularMatrix} in their signature. } \seealso{ \code{\link{isTriangular}()} for testing any matrix for triangularity; classes \code{\linkS4class{symmetricMatrix}}, and, e.g., \code{\linkS4class{dtrMatrix}} for numeric \emph{dense} matrices, or \code{\linkS4class{ltCMatrix}} for a logical \emph{sparse} matrix subclass of \code{"triangularMatrix"}. } \examples{ showClass("triangularMatrix") ## The names of direct subclasses: scl <- getClass("triangularMatrix")@subclasses directly <- sapply(lapply(scl, slot, "by"), length) == 0 names(scl)[directly] (m <- matrix(c(5,1,0,3), 2)) as(m, "triangularMatrix") } \keyword{classes} Matrix/man/ldiMatrix-class.Rd0000644000176200001440000000312111061674131015615 0ustar liggesusers\name{ldiMatrix-class} \docType{class} \alias{ldiMatrix-class} \alias{!,ldiMatrix-method} %%----> put almost all methods into ./diagonalMatrix-class.Rd % Deprecated: \alias{coerce,ldiMatrix,lgCMatrix-method} \alias{coerce,ldiMatrix,lgTMatrix-method} \title{Class "ldiMatrix" of Diagonal Logical Matrices} \description{The class \code{"ldiMatrix"} of logical diagonal matrices. %% FIXME add more } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("ldiMatrix", ...)} but typically rather via \code{\link{Diagonal}}. } \section{Slots}{ \describe{ \item{\code{x}:}{\code{"logical"} vector.} \item{\code{diag}:}{\code{"character"} string, either "U" or "N", see \code{\linkS4class{ddiMatrix}}.} \item{\code{Dim},\code{Dimnames}:}{matrix dimension and \code{\link{dimnames}}, see the \code{\linkS4class{Matrix}} class description.} } } \section{Extends}{ Class \code{"\linkS4class{diagonalMatrix}"} and class \code{"\linkS4class{lMatrix}"}, directly. Class \code{"\linkS4class{sparseMatrix}"}, by class \code{"diagonalMatrix"}. } % \section{Methods}{ % No methods defined with class "ldiMatrix" in the signature. % } % \references{ ~put references to the literature/web site here ~ } \seealso{ Classes \code{\linkS4class{ddiMatrix}} and \code{\linkS4class{diagonalMatrix}}; function \code{\link{Diagonal}}. } \examples{ (lM <- Diagonal(x = c(TRUE,FALSE,FALSE))) str(lM)#> gory details (slots) crossprod(lM) # numeric (nM <- as(lM, "nMatrix"))# -> sparse (not formally ``diagonal'') crossprod(nM) # logical sparse } \keyword{classes} Matrix/man/lgeMatrix-class.Rd0000644000176200001440000000435312622367447015641 0ustar liggesusers\name{lgeMatrix-class} \docType{class} \title{Class "lgeMatrix" of General Dense Logical Matrices} \alias{lgeMatrix-class} % \alias{!,lgeMatrix-method} \alias{Arith,lgeMatrix,lgeMatrix-method} \alias{Compare,lgeMatrix,lgeMatrix-method} \alias{Logic,lgeMatrix,lgeMatrix-method} \alias{as.vector,lgeMatrix-method} \alias{coerce,matrix,lgeMatrix-method} \alias{coerce,lgeMatrix,dgeMatrix-method} \alias{coerce,lgeMatrix,matrix-method} \alias{coerce,lgeMatrix,lgCMatrix-method} \alias{coerce,lgeMatrix,lgTMatrix-method} \alias{coerce,lgeMatrix,lsyMatrix-method} \alias{coerce,lgeMatrix,ltrMatrix-method} \alias{coerce,lgeMatrix,ltpMatrix-method} \alias{coerce,lgeMatrix,lspMatrix-method} \alias{diag,lgeMatrix-method} \alias{diag<-,lgeMatrix-method} \alias{t,lgeMatrix-method} % \description{This is the class of general dense \code{\link{logical}} matrices. } \section{Slots}{ \describe{ \item{\code{x}:}{Object of class \code{"logical"}. The logical values that constitute the matrix, stored in column-major order.} \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), see the \code{\linkS4class{Matrix}} class.} \item{\code{factors}:}{Object of class \code{"list"}. A named list of factorizations that have been computed for the matrix.} } } \section{Extends}{ Class \code{"ldenseMatrix"}, directly. Class \code{"lMatrix"}, by class \code{"ldenseMatrix"}. Class \code{"denseMatrix"}, by class \code{"ldenseMatrix"}. Class \code{"Matrix"}, by class \code{"ldenseMatrix"}. Class \code{"Matrix"}, by class \code{"ldenseMatrix"}. } \section{Methods}{ Currently, mainly \code{\link{t}()} and coercion methods (for \code{\link{as}(.)}); use, e.g., \code{\link{showMethods}(class="lgeMatrix")} for details. } \seealso{ Non-general logical dense matrix classes such as \code{\linkS4class{ltrMatrix}}, or \code{\linkS4class{lsyMatrix}}; \emph{sparse} logical classes such as \code{\linkS4class{lgCMatrix}}. } \examples{ showClass("lgeMatrix") str(new("lgeMatrix")) set.seed(1) (lM <- Matrix(matrix(rnorm(28), 4,7) > 0))# a simple random lgeMatrix set.seed(11) (lC <- Matrix(matrix(rnorm(28), 4,7) > 0))# a simple random lgCMatrix as(lM, "lgCMatrix") } \keyword{classes} Matrix/man/all-methods.Rd0000644000176200001440000000314010647423674015004 0ustar liggesusers\name{all-methods} \docType{methods} \alias{all-methods} \alias{all,Matrix-method} \alias{any,Matrix-method} % \alias{all,lMatrix-method} \alias{all,ldenseMatrix-method} \alias{all,lsparseMatrix-method} \alias{all,lsyMatrix-method} % \alias{any,lMatrix-method} % \alias{any,ldenseMatrix-method} % \alias{any,lsparseMatrix-method} % \title{"Matrix" Methods for Functions all() and any()} \description{ The basic \R functions \code{\link{all}} and \code{\link{any}} now have methods for \code{\linkS4class{Matrix}} objects and should behave as for \code{\link{matrix}} ones. } \section{Methods}{ %% FIXME: write more \describe{ \item{all}{\code{signature(x = "Matrix", ..., na.rm = FALSE)}: ...} \item{any}{\code{signature(x = "Matrix", ..., na.rm = FALSE)}: ...} \item{all}{\code{signature(x = "ldenseMatrix", ..., na.rm = FALSE)}: ...} \item{all}{\code{signature(x = "lsparseMatrix", ..., na.rm = FALSE)}: ...} } } \keyword{methods} \examples{ M <- Matrix(1:12 +0, 3,4) all(M >= 1) # TRUE any(M < 0 ) # FALSE MN <- M; MN[2,3] <- NA; MN all(MN >= 0) # NA any(MN < 0) # NA any(MN < 0, na.rm = TRUE) # -> FALSE \dontshow{ sM <- as(MN, "sparseMatrix") stopifnot(all(M >= 1), !any(M < 0), all.equal((sM >= 1), as(MN >= 1, "sparseMatrix")), ## MN: any(MN < 2), !all(MN < 5), is.na(all(MN >= 0)), is.na(any(MN < 0)), all(MN >= 0, na.rm=TRUE), !any(MN < 0, na.rm=TRUE), ## same for sM : any(sM < 2), !all(sM < 5), is.na(all(sM >= 0)), is.na(any(sM < 0)), all(sM >= 0, na.rm=TRUE), !any(sM < 0, na.rm=TRUE) ) } } Matrix/man/norm.Rd0000644000176200001440000000552013141330160013525 0ustar liggesusers\name{norm} \title{Matrix Norms} \alias{norm} \alias{norm,ANY,missing-method} \alias{norm,matrix,character-method} \alias{norm,Matrix,character-method} \usage{ norm(x, type, \dots) } \description{ Computes a matrix norm of \code{x}, using Lapack for dense matrices. The norm can be the one (\code{"O"}, or \code{"1"}) norm, the infinity (\code{"I"}) norm, the Frobenius (\code{"F"}) norm, the maximum modulus (\code{"M"}) among elements of a matrix, or the spectral norm or 2-norm (\code{"2"}), as determined by the value of \code{type}. } \arguments{ \item{x}{ a real or complex matrix. } \item{type}{ A character indicating the type of norm desired. \describe{ \item{\code{"O"}, \code{"o"} or \code{"1"}}{specifies the one norm, (maximum absolute column sum);} \item{\code{"I"} or \code{"i"}}{specifies the infinity norm (maximum absolute row sum);} \item{\code{"F"} or \code{"f"}}{specifies the Frobenius norm (the Euclidean norm of \code{x} treated as if it were a vector);} \item{\code{"M"} or \code{"m"}}{specifies the maximum modulus of all the elements in \code{x}; and} \item{\code{"2"}}{specifies the \dQuote{spectral norm} or {2-norm}, which is the largest singular value (\code{\link{svd}}) of \code{x}.} } The default is \code{"O"}. Only the first character of \code{type[1]} is used. } \item{\dots}{further arguments passed to or from other methods.} } \value{ A numeric value of class \code{"norm"}, representing the quantity chosen according to \code{type}. } \details{ For dense matrices, the methods eventually call the Lapack functions \code{dlange}, \code{dlansy}, \code{dlantr}, \code{zlange}, \code{zlansy}, and \code{zlantr}. } \seealso{ \code{\link{onenormest}()}, an \emph{approximate} randomized estimate of the 1-norm condition number, efficient for large sparse matrices. The \code{\link[base]{norm}()} function from \R's \pkg{base} package. } \references{ Anderson, E., et al. (1994). \emph{LAPACK User's Guide,} 2nd edition, SIAM, Philadelphia. } \examples{ x <- Hilbert(9) norm(x)# = "O" = "1" stopifnot(identical(norm(x), norm(x, "1"))) norm(x, "I")# the same, because 'x' is symmetric allnorms <- function(d) vapply(c("1","I","F","M","2"), norm, x = d, double(1)) allnorms(x) allnorms(Hilbert(10)) i <- c(1,3:8); j <- c(2,9,6:10); x <- 7 * (1:7) A <- sparseMatrix(i, j, x = x) ## 8 x 10 "dgCMatrix" (sA <- sparseMatrix(i, j, x = x, symmetric = TRUE)) ## 10 x 10 "dsCMatrix" (tA <- sparseMatrix(i, j, x = x, triangular= TRUE)) ## 10 x 10 "dtCMatrix" (allnorms(A) -> nA) allnorms(sA) allnorms(tA) stopifnot(all.equal(nA, allnorms(as(A, "matrix"))), all.equal(nA, allnorms(tA))) # because tA == rbind(A, 0, 0) A. <- A; A.[1,3] <- NA stopifnot(is.na(allnorms(A.))) # gave error } \keyword{algebra} Matrix/man/Hilbert.Rd0000644000176200001440000000107010435070553014151 0ustar liggesusers\name{Hilbert} \alias{Hilbert} \title{Generate a Hilbert matrix} \description{ Generate the \code{n} by \code{n} symmetric Hilbert matrix. Because these matrices are ill-conditioned for moderate to large \code{n}, they are often used for testing numerical linear algebra code. } \usage{ Hilbert(n) } \arguments{ \item{n}{a non-negative integer.} } \value{ the \code{n} by \code{n} symmetric Hilbert matrix as a \code{"dpoMatrix"} object. } \seealso{the class \code{\linkS4class{dpoMatrix}}} \examples{ Hilbert(6) } \keyword{array} \keyword{algebra} Matrix/man/rsparsematrix.Rd0000644000176200001440000000557312506221706015477 0ustar liggesusers\name{rsparsematrix} \alias{rsparsematrix} \title{Random Sparse Matrix} \description{ Generate a Random Sparse Matrix Efficiently. } \usage{ rsparsematrix(nrow, ncol, density, nnz = round(density * maxE), symmetric = FALSE, rand.x = function(n) signif(rnorm(nnz), 2), \dots) } \arguments{ \item{nrow, ncol}{number of rows and columns, i.e., the matrix dimension (\code{\link{dim}}).} \item{density}{optional number in \eqn{[0,1]}, the density is the proportion of non-zero entries among all matrix entries. If specified it determines the default for \code{nnz}, otherwise \code{nnz} needs to be specified.} \item{nnz}{number of non-zero entries, for a sparse matrix typically considerably smaller than \code{nrow*ncol}. Must be specified if \code{density} is not.} \item{symmetric}{logical indicating if result should be a matrix of class \code{\linkS4class{symmetricMatrix}}. Note that in the symmetric case, \code{nnz} denotes the number of non zero entries of the upper (or lower) part of the matrix, including the diagonal.} \item{rand.x}{\code{\link{NULL}} or the random number generator for the \code{x} slot, a \code{\link{function}} such that \code{rand.x(n)} generates a numeric vector of length \code{n}. Typical examples are \code{rand.x = rnorm}, or \code{rand.x = runif}; the default is nice for didactical purposes.} \item{\dots}{optionally further arguments passed to \code{\link{sparseMatrix}()}, notably \code{giveCsparse}.} } \details{ The algorithm first samples \dQuote{encoded} \eqn{(i,j)}s without replacement, via one dimensional indices, if not \code{symmetric} \code{\link{sample.int}(nrow*ncol, nnz)}, then---if \code{rand.x} is not \code{NULL}---gets \code{x <- rand.x(nnz)} and calls \code{\link{sparseMatrix}(i=i, j=j, x=x, ..)}. When \code{rand.x=NULL}, \code{\link{sparseMatrix}(i=i, j=j, ..)} will return a patter\bold{n} matrix (i.e., inheriting from \code{\linkS4class{nsparseMatrix}}). } \value{ a \code{\linkS4class{sparseMatrix}}, say \code{M} of dimension (nrow, ncol), i.e., with \code{dim(M) == c(nrow, ncol)}, if \code{symmetric} is not true, with \code{nzM <- \link{nnzero}(M)} fulfilling \code{nzM <= nnz} and typically, \code{nzM == nnz}. } \author{Martin Maechler} \examples{ set.seed(17)# to be reproducible M <- rsparsematrix(8, 12, nnz = 30) # small example, not very sparse M M1 <- rsparsematrix(1000, 20, nnz = 123, rand.x = runif) summary(M1) ## a random *symmetric* Matrix (S9 <- rsparsematrix(9, 9, nnz = 10, symmetric=TRUE)) # dsCMatrix nnzero(S9)# ~ 20: as 'nnz' only counts one "triangle" ## a random patter*n* aka boolean Matrix (no 'x' slot): (n7 <- rsparsematrix(5, 12, nnz = 10, rand.x = NULL)) ## a [T]riplet representation sparseMatrix: T2 <- rsparsematrix(40, 12, nnz = 99, giveCsparse=FALSE) head(T2) } \keyword{array} \keyword{distribution} Matrix/man/nnzero.Rd0000644000176200001440000000614412521705645014107 0ustar liggesusers\name{nnzero} \title{The Number of Non-Zero Values of a Matrix} \alias{nnzero} \alias{nnzero,ANY-method} \alias{nnzero,denseMatrix-method} \alias{nnzero,diagonalMatrix-method} \alias{nnzero,indMatrix-method} \alias{nnzero,sparseMatrix-method} \alias{nnzero,CHMfactor-method} \description{ Returns the number of non-zero values of a numeric-like \R object, and in particular an object \code{x} inheriting from class \code{\linkS4class{Matrix}}. } \usage{ nnzero(x, na.counted = NA) } \arguments{ \item{x}{an \R object, typically inheriting from class \code{\linkS4class{Matrix}} or \code{\link{numeric}}.} \item{na.counted}{a \code{\link{logical}} describing how \code{\link{NA}}s should be counted. There are three possible settings for \code{na.counted}: \describe{ \item{TRUE}{\code{NA}s \emph{are} counted as non-zero (since \dQuote{they are not zero}).} \item{NA}{(default)the result will be \code{NA} if there are \code{NA}'s in \code{x} (since \dQuote{NA's are not known, i.e., \emph{may be} zero}).} \item{FALSE}{\code{NA}s are \emph{omitted} from \code{x} before the non-zero entries are counted.} } For sparse matrices, you may often want to use \code{na.counted = TRUE}. } } % \details{ % } \section{Methods}{ \describe{ \item{\code{signature(x = "ANY")}}{the default method for non-\code{\linkS4class{Matrix}} class objects, simply counts the number \code{0}s in \code{x}, counting \code{NA}'s depending on the \code{na.counted} argument, see above.} \item{\code{signature(x = "denseMatrix")}}{conceptually the same as for traditional \code{\link{matrix}} objects, care has to be taken for \code{"\linkS4class{symmetricMatrix}"} objects.} \item{\code{signature(x = "diagonalMatrix")}, and \code{signature(x = "indMatrix")}}{fast simple methods for these special \code{"sparseMatrix"} classes.} \item{\code{signature(x = "sparseMatrix")}}{typically, the most interesting method, also carefully taking \code{"\linkS4class{symmetricMatrix}"} objects into account.} } } \value{ the number of non zero entries in \code{x} (typically \code{\link{integer}}). Note that for a \emph{symmetric} sparse matrix \code{S} (i.e., inheriting from class \code{\linkS4class{symmetricMatrix}}), \code{nnzero(S)} is typically \emph{twice} the \code{length(S@x)}. } %\author{Martin} \seealso{The \code{\linkS4class{Matrix}} class also has a \code{\link{length}} method; typically, \code{length(M)} is much larger than \code{nnzero(M)} for a sparse matrix M, and the latter is a better indication of the \emph{size} of \code{M}. \code{\link{drop0}}, \code{\link{zapsmall}}. } \examples{ m <- Matrix(0+1:28, nrow = 4) m[-3,c(2,4:5,7)] <- m[ 3, 1:4] <- m[1:3, 6] <- 0 (mT <- as(m, "dgTMatrix")) nnzero(mT) (S <- crossprod(mT)) nnzero(S) str(S) # slots are smaller than nnzero() stopifnot(nnzero(S) == sum(as.matrix(S) != 0))# failed earlier data(KNex) M <- KNex$mm class(M) dim(M) length(M); stopifnot(length(M) == prod(dim(M))) nnzero(M) # more relevant than length ## the above are also visible from str(M) } \keyword{attribute} Matrix/man/dtrMatrix-class.Rd0000644000176200001440000000667712271746775015703 0ustar liggesusers\name{dtrMatrix-class} \title{Triangular, dense, numeric matrices} \docType{class} \alias{coerce,dgeMatrix,dtrMatrix-method}% or rather setIs? \alias{coerce,dtrMatrix,dtpMatrix-method} \alias{coerce,dtrMatrix,ltrMatrix-method} \alias{coerce,dtrMatrix,matrix-method} \alias{coerce,dtrMatrix,sparseMatrix-method} \alias{coerce,dtrMatrix,CsparseMatrix-method} \alias{coerce,matrix,dtrMatrix-method} \alias{determinant,dtrMatrix,logical-method} \alias{determinant,dtrMatrix,missing-method} \alias{diag,dtrMatrix-method} \alias{diag<-,dtrMatrix-method} \alias{norm,dtrMatrix,character-method} \alias{norm,dtrMatrix,missing-method} \alias{rcond,dtrMatrix,character-method} \alias{rcond,dtrMatrix,missing-method} \alias{show,dtrMatrix-method} %\alias{solve,dtrMatrix,matrix-method}--> solve-methods.Rd \alias{t,dtrMatrix-method} \alias{dtrMatrix-class} \description{ The \code{"dtrMatrix"} class is the class of triangular, dense, numeric matrices in nonpacked storage. The \code{"dtpMatrix"} class is the same except in packed storage. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dtrMatrix", ...)}. } \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{diag}:}{Object of class \code{"character"}. Must be either \code{"U"}, for unit triangular (diagonal is all ones), or \code{"N"}; see \code{\linkS4class{triangularMatrix}}.} \item{\code{x}:}{Object of class \code{"numeric"}. The numeric values that constitute the matrix, stored in column-major order.} \item{\code{Dim}:}{Object of class \code{"integer"}. The dimensions of the matrix which must be a two-element vector of non-negative integers.} } } \section{Extends}{ Class \code{"ddenseMatrix"}, directly. Class \code{"triangularMatrix"}, directly. Class \code{"Matrix"} and others, by class \code{"ddenseMatrix"}. } \section{Methods}{ Among others (such as matrix products, e.g. \code{?\link{crossprod-methods}}), \describe{ \item{coerce}{\code{signature(from = "dgeMatrix", to = "dtrMatrix")}} \item{coerce}{\code{signature(from = "dtrMatrix", to = "matrix")}} \item{coerce}{\code{signature(from = "dtrMatrix", to = "ltrMatrix")}} \item{coerce}{\code{signature(from = "dtrMatrix", to = "matrix")}} \item{coerce}{\code{signature(from = "matrix", to = "dtrMatrix")}} \item{norm}{\code{signature(x = "dtrMatrix", type = "character")}} \item{rcond}{\code{signature(x = "dtrMatrix", norm = "character")}} \item{solve}{\code{signature(a = "dtrMatrix", b = "....")}}{efficientely use a \dQuote{forwardsolve} or \code{backsolve} for a lower or upper triangular matrix, respectively, see also \code{\link{solve-methods}}.} \item{+, -, *, \dots, ==, >=, \dots}{all the \code{\link{Ops}} group methods are available. When applied to two triangular matrices, these return a triangular matrix when easily possible.} } } %\references{} %\author{} \seealso{ Classes \code{\linkS4class{ddenseMatrix}}, \code{\linkS4class{dtpMatrix}}, \code{\linkS4class{triangularMatrix}} } \examples{%% this is used from ./dtpMatrix-class.Rd (change with care!) (m <- rbind(2:3, 0:-1)) (M <- as(m, "dgeMatrix")) (T <- as(M, "dtrMatrix")) ## upper triangular is default (T2 <- as(t(M), "dtrMatrix")) stopifnot(T@uplo == "U", T2@uplo == "L", identical(T2, t(T))) } \keyword{classes} Matrix/man/abIndex-class.Rd0000644000176200001440000001074212622367447015256 0ustar liggesusers\name{abIndex-class} \title{Class "abIndex" of Abstract Index Vectors} \Rdversion{1.1} \docType{class} % \alias{abIndex-class} % \alias{seqMat-class}% unexported for now % hence, we do not yet mention these further below: \alias{coerce,abIndex,seqMat-method} \alias{coerce,numeric,seqMat-method} \alias{coerce,seqMat,abIndex-method} \alias{coerce,seqMat,numeric-method} % \alias{as.integer,abIndex-method} \alias{as.numeric,abIndex-method} \alias{as.vector,abIndex-method} \alias{[,abIndex,index,ANY,ANY-method} \alias{coerce,logical,abIndex-method} \alias{coerce,numeric,abIndex-method} \alias{coerce,abIndex,integer-method} \alias{coerce,abIndex,numeric-method} \alias{coerce,abIndex,vector-method} \alias{drop,abIndex-method}% not mentioned below {experimental} \alias{length,abIndex-method} \alias{show,abIndex-method} \alias{is.na,abIndex-method} \alias{is.finite,abIndex-method}% not yet mentioned \alias{is.infinite,abIndex-method} % \alias{Ops,numeric,abIndex-method} \alias{Ops,abIndex,abIndex-method} \alias{Ops,abIndex,numeric-method} \alias{Ops,abIndex,ANY-method} \alias{Ops,ANY,abIndex-method} \alias{Arith,abIndex,abIndex-method} \alias{Arith,abIndex,numLike-method}% \alias{Arith,abIndex,numeric-method} \alias{Arith,numLike,abIndex-method}% \alias{Arith,numeric,abIndex-method} % \alias{Summary,abIndex-method} % \description{ The \code{"abIndex"} \code{\link{class}}, short for \dQuote{Abstract Index Vector}, is used for dealing with large index vectors more efficiently, than using integer (or \code{\link{numeric}}) vectors of the kind \code{2:1000000} or \code{c(0:1e5, 1000:1e6)}. Note that the current implementation details are subject to change, and if you consider working with these classes, please contact the package maintainers (\code{packageDescription("Matrix")$Maintainer}). } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("abIndex", ...)}, but more easily and typically either by \code{as(x, "abIndex")} where \code{x} is an integer (valued) vector, or directly by \code{\link{abIseq}()} and combination \code{\link{c}(...)} of such. } \section{Slots}{ \describe{ \item{\code{kind}:}{a \code{\link{character}} string, one of \code{("int32", "double", "rleDiff")}, denoting the internal structure of the abIndex object.} \item{\code{x}:}{Object of class \code{"numLike"}; is used (i.e., not of length \code{0}) only iff the object is \emph{not} compressed, i.e., currently exactly when \code{kind != "rleDiff"}.} \item{\code{rleD}:}{object of class \code{"\linkS4class{rleDiff}"}, used for compression via \code{\link{rle}}.} } } \section{Methods}{ \describe{ \item{as.numeric, as.integer, as.vector}{\code{signature(x = "abIndex")}: ... } \item{[}{\code{signature(x = "abIndex", i = "index", j = "ANY", drop = "ANY")}: ... } \item{coerce}{\code{signature(from = "numeric", to = "abIndex")}: ... } \item{coerce}{\code{signature(from = "abIndex", to = "numeric")}: ... } \item{coerce}{\code{signature(from = "abIndex", to = "integer")}: ... } \item{length}{\code{signature(x = "abIndex")}: ... } \item{Ops}{\code{signature(e1 = "numeric", e2 = "abIndex")}: These and the following arithmetic and logic operations are \bold{not yet implemented}; see \code{\link[methods]{Ops}} for a list of these (S4) group methods.} \item{Ops}{\code{signature(e1 = "abIndex", e2 = "abIndex")}: ... } \item{Ops}{\code{signature(e1 = "abIndex", e2 = "numeric")}: ... } \item{Summary}{\code{signature(x = "abIndex")}: ... } \item{show}{\code{("abIndex")}: simple \code{\link{show}} method, building on \code{show()}.} \item{is.na}{\code{("abIndex")}: works analogously to regular vectors.} \item{is.finite, is.infinite}{\code{("abIndex")}: ditto.} } } \note{ This is currently experimental and not yet used for our own code. Please contact us (\code{packageDescription("Matrix")$Maintainer}), if you plan to make use of this class. Partly builds on ideas and code from Jens Oehlschlaegel, as implemented (around 2008, in the GPL'ed part of) package \pkg{ff}. } %\author{Martin Maechler} \seealso{ \code{\link{rle}} (\pkg{base}) which is used here; \code{\link{numeric}}% ... FIXME } \examples{ showClass("abIndex") ii <- c(-3:40, 20:70) str(ai <- as(ii, "abIndex"))# note ai # -> show() method %% FIXME: add / exchange with ../tests/abIndex-tsts.R stopifnot(identical(-3:20, as(abIseq1(-3,20), "vector"))) } \keyword{classes} Matrix/man/sparseMatrix-class.Rd0000644000176200001440000001535213015274275016361 0ustar liggesusers\name{sparseMatrix-class} \docType{class} \title{Virtual Class "sparseMatrix" --- Mother of Sparse Matrices} \alias{sparseMatrix-class} %% Group methods \alias{Math,sparseMatrix-method} %\alias{Math2,sparseMatrix,numeric-method} \alias{Ops,sparseMatrix,sparseMatrix-method} \alias{Ops,sparseMatrix,numeric-method} \alias{Ops,numeric,sparseMatrix-method} \alias{Ops,diagonalMatrix,sparseMatrix-method} \alias{Ops,sparseMatrix,diagonalMatrix-method} % \alias{cbind2,sparseMatrix,sparseMatrix-method} \alias{cbind2,denseMatrix,sparseMatrix-method} \alias{cbind2,sparseMatrix,denseMatrix-method} \alias{cbind2,sparseMatrix,matrix-method} \alias{cbind2,matrix,sparseMatrix-method} \alias{cbind2,sparseMatrix,numeric-method} \alias{cbind2,numeric,sparseMatrix-method} \alias{rbind2,sparseMatrix,sparseMatrix-method} \alias{rbind2,denseMatrix,sparseMatrix-method} \alias{rbind2,sparseMatrix,denseMatrix-method} \alias{rbind2,sparseMatrix,matrix-method} \alias{rbind2,matrix,sparseMatrix-method} \alias{rbind2,sparseMatrix,numeric-method} \alias{rbind2,numeric,sparseMatrix-method} % \alias{coerce,ANY,sparseMatrix-method} \alias{coerce,table,sparseMatrix-method} \alias{coerce,factor,sparseMatrix-method} \alias{coerce,sparseMatrix,generalMatrix-method} \alias{coerce,sparseMatrix,symmetricMatrix-method} \alias{coerce,sparseMatrix,triangularMatrix-method} \alias{-,sparseMatrix,missing-method} \alias{cov2cor,sparseMatrix-method} \alias{diag,sparseMatrix-method} \alias{dim<-,sparseMatrix-method} \alias{format,sparseMatrix-method} \alias{lu,sparseMatrix-method} \alias{mean,sparseMatrix-method} \alias{print,sparseMatrix-method} \alias{show,sparseMatrix-method} \alias{summary,sparseMatrix-method} \alias{norm,sparseMatrix,character-method} \alias{determinant,dgCMatrix,logical-method} \alias{determinant,dsparseMatrix,logical-method} \alias{determinant,dtCMatrix,logical-method} \alias{determinant,sparseMatrix,missing-method} \alias{determinant,sparseMatrix,logical-method} \alias{rep,sparseMatrix-method} % Fake, just so it is found by the naive user:} \alias{print.sparseMatrix} % "[" are in ./Xtrct-methods.Rd %\alias{colMeans,..} etc are now in ./colSums.Rd % \description{Virtual Mother Class of All Sparse Matrices} \section{Slots}{ \describe{ \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.} \item{\code{Dimnames}:}{a list of length two - inherited from class \code{Matrix}, see \code{\linkS4class{Matrix}}.} } } \section{Extends}{ Class \code{"Matrix"}, directly. } \section{Methods}{ \describe{ \item{show}{\code{(object = "sparseMatrix")}: The \code{\link{show}} method for sparse matrices prints \emph{\dQuote{structural}} zeroes as \code{"."} using \code{\link{printSpMatrix}()} which allows further customization.} \item{print}{\code{signature(x = "sparseMatrix")}, ....\cr The \code{\link{print}} method for sparse matrices by default is the same as \code{show()} but can be called with extra optional arguments, see \code{\link{printSpMatrix}()}.} \item{format}{\code{signature(x = "sparseMatrix")}, ....\cr The \code{\link{format}} method for sparse matrices, see \code{\link{formatSpMatrix}()} for details such as the extra optional arguments.} \item{summary}{\code{(object = "sparseMatrix")}: Returns an object of S3 class \code{"sparseSummary"} which is basically a \code{\link{data.frame}} with columns \code{(i,j,x)} (or just \code{(i,j)} for \code{\linkS4class{nsparseMatrix}} class objects) with the stored (typically non-zero) entries. The \code{\link{print}} method resembles Matlab's way of printing sparse matrices, and also the MatrixMarket format, see \code{\link{writeMM}}.} \item{cbind2}{\code{(x = *, y = *)}: several methods for binding matrices together, column-wise, see the basic \code{\link{cbind}} and \code{\link{rbind}} functions.\cr Note that the result will typically be sparse, even when one argument is dense and larger than the sparse one. } \item{rbind2}{\code{(x = *, y = *)}: binding matrices together row-wise, see \code{cbind2} above.} \item{determinant}{\code{(x = "sparseMatrix", logarithm=TRUE)}: \code{\link{determinant}()} methods for sparse matrices typically work via \code{\link{Cholesky}} or \code{\link{lu}} decompositions.} \item{diag}{\code{(x = "sparseMatrix")}: extracts the diagonal of a sparse matrix.} \item{dim<-}{\code{signature(x = "sparseMatrix", value = "ANY")}: allows to \emph{reshape} a sparse matrix to a sparse matrix with the same entries but different dimensions. \code{value} must be of length two and fulfill \code{prod(value) == prod(dim(x))}.} \item{coerce}{\code{signature(from = "factor", to = "sparseMatrix")}: Coercion of a factor to \code{"sparseMatrix"} produces the matrix of indicator \bold{rows} stored as an object of class \code{"dgCMatrix"}. To obtain columns representing the interaction of the factor and a numeric covariate, replace the \code{"x"} slot of the result by the numeric covariate then take the transpose. Missing values (\code{\link{NA}}) from the factor are translated to columns of all \code{0}s.} } See also \code{\link{colSums}}, \code{\link{norm}}, ... %% FIXME for methods with separate help pages. } \seealso{ \code{\link{sparseMatrix}}, and its references, such as \code{\link{xtabs}(*, sparse=TRUE)}, or \code{\link{sparse.model.matrix}()}, for constructing sparse matrices. \code{\link{T2graph}} for conversion of \code{"graph"} objects (package \pkg{graph}) to and from sparse matrices. } \note{ In method selection for multiplication operations (i.e. \code{\%*\%} and the two-argument form of \code{\link[base]{crossprod}}) the sparseMatrix class takes precedence in the sense that if one operand is a sparse matrix and the other is any type of dense matrix then the dense matrix is coerced to a \code{dgeMatrix} and the appropriate sparse matrix method is used. } %\author{Martin} \examples{ showClass("sparseMatrix") ## and look at the help() of its subclasses M <- Matrix(0, 10000, 100) M[1,1] <- M[2,3] <- 3.14 M ## show(.) method suppresses printing of the majority of rows data(CAex); dim(CAex) # 72 x 72 matrix determinant(CAex) # works via sparse lu(.) ## factor -> t( ) : (fact <- gl(5, 3, 30, labels = LETTERS[1:5])) (Xt <- as(fact, "sparseMatrix")) # indicator rows ## missing values --> all-0 columns: f.mis <- fact i.mis <- c(3:5, 17) is.na(f.mis) <- i.mis Xt != (X. <- as(f.mis, "sparseMatrix")) # differ only in columns 3:5,17 stopifnot(all(X.[,i.mis] == 0), all(Xt[,-i.mis] == X.[,-i.mis])) } \keyword{classes} Matrix/man/bandSparse.Rd0000644000176200001440000000603012755625027014654 0ustar liggesusers\name{bandSparse} \alias{bandSparse} \title{Construct Sparse Banded Matrix from (Sup-/Super-) Diagonals} \description{ Construct a sparse banded matrix by specifying its non-zero sup- and super-diagonals. } \usage{ bandSparse(n, m = n, k, diagonals, symmetric = FALSE, giveCsparse = TRUE) } \arguments{ \item{n,m}{the matrix dimension \eqn{(n,m) = (nrow, ncol)}.} \item{k}{integer vector of \dQuote{diagonal numbers}, with identical meaning as in \code{\link{band}(*, k)}, i.e., relative to the main diagonal, which is \code{k=0}.} \item{diagonals}{optional list of sub-/super- diagonals; if missing, the result will be a patter\bold{n} matrix, i.e., inheriting from class \code{\linkS4class{nMatrix}}. \code{diagonals} can also be \eqn{n' \times d}{n' x d} matrix, where \code{d <- length(k)} and \eqn{n' >= min(n,m)}. In that case, the sub-/super- diagonals are taken from the columns of \code{diagonals}, where only the first several rows will be used (typically) for off-diagonals. } \item{symmetric}{logical; if true the result will be symmetric (inheriting from class \code{\linkS4class{symmetricMatrix}}) and only the upper or lower triangle must be specified (via \code{k} and \code{diagonals}).} \item{giveCsparse}{logical indicating if the result should be a \code{\linkS4class{CsparseMatrix}} or a \code{\linkS4class{TsparseMatrix}}. The default, \code{TRUE} is very often more efficient subsequently, but not always.} } % \details{ __needed ?__ % % } \value{ a sparse matrix (of \code{\link{class}} \code{\linkS4class{CsparseMatrix}}) of dimension \eqn{n \times m}{n x m} with diagonal \dQuote{bands} as specified. } %\author{Martin Maechler} \seealso{ \code{\link{band}}, for \emph{extraction} of matrix bands; \code{\link{bdiag}}, \code{\link{diag}}, \code{\link{sparseMatrix}}, \code{\link{Matrix}}. } \examples{ diags <- list(1:30, 10*(1:20), 100*(1:20)) s1 <- bandSparse(13, k = -c(0:2, 6), diag = c(diags, diags[2]), symm=TRUE) s1 s2 <- bandSparse(13, k = c(0:2, 6), diag = c(diags, diags[2]), symm=TRUE) stopifnot(identical(s1, t(s2)), is(s1,"dsCMatrix")) ## a pattern Matrix of *full* (sub-)diagonals: bk <- c(0:4, 7,9) (s3 <- bandSparse(30, k = bk, symm = TRUE)) ## If you want a pattern matrix, but with "sparse"-diagonals, ## you currently need to go via logical sparse: lLis <- lapply(list(rpois(20, 2), rpois(20,1), rpois(20,3))[c(1:3,2:3,3:2)], as.logical) (s4 <- bandSparse(20, k = bk, symm = TRUE, diag = lLis)) (s4. <- as(drop0(s4), "nsparseMatrix")) n <- 1e4 bk <- c(0:5, 7,11) bMat <- matrix(1:8, n, 8, byrow=TRUE) bLis <- as.data.frame(bMat) B <- bandSparse(n, k = bk, diag = bLis) Bs <- bandSparse(n, k = bk, diag = bLis, symmetric=TRUE) B [1:15, 1:30] Bs[1:15, 1:30] ## can use a list *or* a matrix for specifying the diagonals: stopifnot(identical(B, bandSparse(n, k = bk, diag = bMat)), identical(Bs, bandSparse(n, k = bk, diag = bMat, symmetric=TRUE)) , inherits(B, "dtCMatrix") # triangular! ) } \keyword{array} \keyword{algebra} Matrix/man/graph2T.Rd0000644000176200001440000000735612622365126014107 0ustar liggesusers\name{graph-sparseMatrix} \title{Conversions "graph" <--> (sparse) Matrix} \alias{graph2T} \alias{T2graph} % graph stuff \alias{coerce,graph,Matrix-method} \alias{coerce,graph,sparseMatrix-method} \alias{coerce,graph,CsparseMatrix-method} \alias{coerce,graphAM,sparseMatrix-method} \alias{coerce,graphNEL,CsparseMatrix-method} \alias{coerce,graphNEL,TsparseMatrix-method} \alias{coerce,sparseMatrix,graph-method} \alias{coerce,sparseMatrix,graphNEL-method} \alias{coerce,TsparseMatrix,graphNEL-method} \alias{coerce,dgTMatrix,graphNEL-method} \description{ The \pkg{Matrix} package has supported conversion from and to \code{"\link[graph:graph-class]{graph}"} objects from (Bioconductor) package \pkg{graph} since summer 2005, via the usual \code{\link{as}(., "")} coercion, \preformatted{ as(from, Class) }%pre Since 2013, this functionality is further exposed as the \code{graph2T()} and \code{T2graph()} functions (with further arguments than just \code{from}), which convert graphs to and from the triplet form of sparse matrices (of class \code{"\linkS4class{TsparseMatrix}"}) . } \usage{ graph2T(from, use.weights = ) T2graph(from, need.uniq = is_not_uniqT(from), edgemode = NULL) } \arguments{ \item{from}{for \code{graph2T()}, an \R object of class \code{"graph"}; \cr for \code{T2graph()}, a sparse matrix inheriting from \code{"\linkS4class{TsparseMatrix}"}.} \item{use.weights}{logical indicating if weights should be used, i.e., equivalently the result will be numeric, i.e. of class \code{\linkS4class{dgTMatrix}}; otherwise the result will be \code{\linkS4class{ngTMatrix}} or \code{\linkS4class{nsTMatrix}}, the latter if the graph is undirected. The default looks if there are weights in the graph, and if any differ from \code{1}, weights are used.} \item{need.uniq}{a logical indicating if \code{from} may need to be internally \dQuote{uniqified}; do not set this and hence rather use the default, unless you know what you are doing!} \item{edgemode}{one of \code{NULL}, \code{"directed"}, or \code{"undirected"}. The default \code{NULL} looks if the matrix is symmetric and assumes \code{"undirected"} in that case.} } \value{ For \code{graph2T()}, a sparse matrix inheriting from \code{"\linkS4class{TsparseMatrix}"}. For \code{T2graph()} an \R object of class \code{"graph"}. } \seealso{ Note that the CRAN package \pkg{igraph} also provides conversions from and to sparse matrices (of package \pkg{Matrix}) via its \code{\link[igraph]{graph.adjacency}()} and \code{\link[igraph]{get.adjacency}()}. } \examples{ if(isTRUE(try(require(graph)))) { ## super careful .. for "checking reasons" n4 <- LETTERS[1:4]; dns <- list(n4,n4) show(a1 <- sparseMatrix(i= c(1:4), j=c(2:4,1), x = 2, dimnames=dns)) show(g1 <- as(a1, "graph")) # directed unlist(edgeWeights(g1)) # all '2' show(a2 <- sparseMatrix(i= c(1:4,4), j=c(2:4,1:2), x = TRUE, dimnames=dns)) show(g2 <- as(a2, "graph")) # directed # now if you want it undirected: show(g3 <- T2graph(as(a2,"TsparseMatrix"), edgemode="undirected")) show(m3 <- as(g3,"Matrix")) show( graph2T(g3) ) # a "pattern Matrix" (nsTMatrix) \dontshow{ stopifnot( identical(as(g3,"Matrix"), as(as(a2 + t(a2), "nMatrix"),"symmetricMatrix")) , identical(tg3 <- graph2T(g3), graph2T(g3, use.weights=FALSE)) , identical(as(m3,"TsparseMatrix"), uniqTsparse(tg3)) ) } a. <- sparseMatrix(i= 4:1, j=1:4, dimnames=list(n4,n4), giveC=FALSE) # no 'x' show(a.) # "ngTMatrix" show(g. <- as(a., "graph")) \dontshow{ stopifnot(edgemode(g.) == "undirected", numEdges(g.) == 2, all.equal(as(g., "TsparseMatrix"), as(a., "symmetricMatrix")) ) } }% only if( graph ) } \keyword{graph} \keyword{utilities} Matrix/man/TsparseMatrix-class.Rd0000644000176200001440000000633612501612602016474 0ustar liggesusers\name{TsparseMatrix-class} \title{Class "TsparseMatrix" of Sparse Matrices in Triplet Form} \docType{class} \alias{TsparseMatrix-class} %% Methods: \alias{coerce,TsparseMatrix,CsparseMatrix-method} \alias{coerce,TsparseMatrix,lsparseMatrix-method} \alias{coerce,TsparseMatrix,lMatrix-method} \alias{coerce,TsparseMatrix,nsparseMatrix-method} \alias{coerce,TsparseMatrix,nMatrix-method} \alias{coerce,TsparseMatrix,matrix-method} \alias{coerce,Matrix,TsparseMatrix-method} \alias{coerce,matrix,TsparseMatrix-method} \alias{coerce,numeric,TsparseMatrix-method} % % "[" are in ./Xtrct-methods.Rd; "[<-" in ./Subassign-methods.Rd %\alias{solve,...} --> solve-methods.Rd %\alias{\%*%,... } --> matrix-products.Rd \alias{t,TsparseMatrix-method} % \description{The \code{"TsparseMatrix"} class is the virtual class of all sparse matrices coded in triplet form. Since it is a virtual class, no objects may be created from it. See \code{showClass("TsparseMatrix")} for its subclasses. } \section{Slots}{ \describe{ \item{\code{Dim}, \code{Dimnames}:}{from the \code{"\linkS4class{Matrix}"} class,} \item{\code{i}:}{Object of class \code{"integer"} - the row indices of non-zero entries \emph{in 0-base}, i.e., must be in \code{0:(nrow(.)-1)}.} \item{\code{j}:}{Object of class \code{"integer"} - the column indices of non-zero entries. Must be the same length as slot \code{i} and \emph{0-based} as well, i.e., in \code{0:(ncol(.)-1)}. For numeric Tsparse matrices, \code{(i,j)} pairs can occur more than once, see \code{\linkS4class{dgTMatrix}}. } } } \section{Extends}{ Class \code{"sparseMatrix"}, directly. Class \code{"Matrix"}, by class \code{"sparseMatrix"}. } \section{Methods}{ Extraction (\code{"["}) methods, see \code{\link{[-methods}}.%-> ./Xtrct-methods.Rd } \note{ Most operations with sparse matrices are performed using the compressed, column-oriented or \code{\linkS4class{CsparseMatrix}} representation. The triplet representation is convenient for creating a sparse matrix or for reading and writing such matrices. Once it is created, however, the matrix is generally coerced to a \code{\linkS4class{CsparseMatrix}} for further operations. Note that all \code{new(.)}, \code{\link{spMatrix}} and \code{\link{sparseMatrix}(*, giveCsparse=FALSE)} constructors for \code{"TsparseMatrix"} classes implicitly add \eqn{x_k}'s that belong to identical \eqn{(i_k, j_k)} pairs, see, the example below, or also \code{"\linkS4class{dgTMatrix}"}. For convenience, methods for some operations such as \code{\%*\%} and \code{crossprod} are defined for \code{\linkS4class{TsparseMatrix}} objects. These methods simply coerce the \code{\linkS4class{TsparseMatrix}} object to a \code{\linkS4class{CsparseMatrix}} object then perform the operation. } % \author{Martin Maechler} \seealso{ its superclass, \code{\linkS4class{sparseMatrix}}, and the \code{\linkS4class{dgTMatrix}} class, for the links to other classes. } \examples{ showClass("TsparseMatrix") ## or just the subclasses' names names(getClass("TsparseMatrix")@subclasses) T3 <- spMatrix(3,4, i=c(1,3:1), j=c(2,4:2), x=1:4) T3 # only 3 non-zero entries, 5 = 1+4 ! \dontshow{stopifnot(nnzero(T3) == 3)} } \keyword{classes} Matrix/man/colSums.Rd0000644000176200001440000001132012533262160014202 0ustar liggesusers\name{colSums} \alias{colSums} \alias{colMeans} \alias{rowSums} \alias{rowMeans} \alias{colMeans,diagonalMatrix-method} \alias{colSums,diagonalMatrix-method} \alias{rowMeans,diagonalMatrix-method} \alias{rowSums,diagonalMatrix-method} \alias{colMeans,CsparseMatrix-method} \alias{colSums,CsparseMatrix-method} \alias{rowMeans,CsparseMatrix-method} \alias{rowSums,CsparseMatrix-method} \alias{colMeans,TsparseMatrix-method} \alias{colSums,TsparseMatrix-method} \alias{rowMeans,TsparseMatrix-method} \alias{rowSums,TsparseMatrix-method} \alias{colMeans,RsparseMatrix-method} \alias{colSums,RsparseMatrix-method} \alias{rowMeans,RsparseMatrix-method} \alias{rowSums,RsparseMatrix-method} \alias{colMeans,dgCMatrix-method} \alias{colSums,dgCMatrix-method} \alias{rowMeans,dgCMatrix-method} \alias{rowSums,dgCMatrix-method} \alias{colMeans,igCMatrix-method} \alias{colSums,igCMatrix-method} \alias{rowMeans,igCMatrix-method} \alias{rowSums,igCMatrix-method} \alias{colMeans,lgCMatrix-method} \alias{colSums,lgCMatrix-method} \alias{rowMeans,lgCMatrix-method} \alias{rowSums,lgCMatrix-method} \alias{colMeans,ngCMatrix-method} \alias{colSums,ngCMatrix-method} \alias{rowMeans,ngCMatrix-method} \alias{rowSums,ngCMatrix-method} % dense ones \alias{colMeans,denseMatrix-method} \alias{colSums,denseMatrix-method} \alias{rowMeans,denseMatrix-method} \alias{rowSums,denseMatrix-method} \alias{colMeans,ddenseMatrix-method} \alias{colSums,ddenseMatrix-method} \alias{rowMeans,ddenseMatrix-method} \alias{rowSums,ddenseMatrix-method} % NB: kept those documented in ./dgeMatrix-class.Rd % \title{Form Row and Column Sums and Means} % see also ~/R/D/r-devel/R/src/library/base/man/colSums.Rd \description{ Form row and column sums and means for objects, for \code{\linkS4class{sparseMatrix}} the result may optionally be sparse (\code{\linkS4class{sparseVector}}), too. Row or column names are kept respectively as for \pkg{base} matrices and \code{\link{colSums}} methods, when the result is \code{\link{numeric}} vector. } \usage{ colSums (x, na.rm = FALSE, dims = 1, \dots) rowSums (x, na.rm = FALSE, dims = 1, \dots) colMeans(x, na.rm = FALSE, dims = 1, \dots) rowMeans(x, na.rm = FALSE, dims = 1, \dots) \S4method{colSums}{CsparseMatrix}(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) \S4method{rowSums}{CsparseMatrix}(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) \S4method{colMeans}{CsparseMatrix}(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) \S4method{rowMeans}{CsparseMatrix}(x, na.rm = FALSE, dims = 1, sparseResult = FALSE) } \arguments{ \item{x}{a Matrix, i.e., inheriting from \code{\linkS4class{Matrix}}.} \item{na.rm}{logical. Should missing values (including \code{NaN}) be omitted from the calculations?} \item{dims}{completely ignored by the \code{Matrix} methods.} \item{\dots}{potentially further arguments, for method \code{<->} generic compatibility.} \item{sparseResult}{logical indicating if the result should be sparse, i.e., inheriting from class \code{\linkS4class{sparseVector}}. Only applicable when \code{x} is inheriting from a \code{\linkS4class{sparseMatrix}} class.} } % \details{ % ~~ If necessary, more details than the description above ~~ % } \value{ returns a numeric vector if \code{sparseResult} is \code{FALSE} as per default. Otherwise, returns a \code{\linkS4class{sparseVector}}. \code{\link{dimnames}(x)} are only kept (as \code{\link{names}(v)}) when the resulting \code{v} is \code{\link{numeric}}, since \code{\link{sparseVector}}s do not have names. } %\author{Martin} \seealso{\code{\link[base]{colSums}} and the \code{\linkS4class{sparseVector}} classes. } \examples{ (M <- bdiag(Diagonal(2), matrix(1:3, 3,4), diag(3:2))) # 7 x 8 colSums(M) d <- Diagonal(10, c(0,0,10,0,2,rep(0,5))) MM <- kronecker(d, M) dim(MM) # 70 80 length(MM@x) # 160, but many are '0' ; drop those: MM <- drop0(MM) length(MM@x) # 32 cm <- colSums(MM) (scm <- colSums(MM, sparseResult = TRUE)) stopifnot(is(scm, "sparseVector"), identical(cm, as.numeric(scm))) rowSums (MM, sparseResult = TRUE) # 14 of 70 are not zero colMeans(MM, sparseResult = TRUE) # 16 of 80 are not zero ## Since we have no 'NA's, these two are equivalent : stopifnot(identical(rowMeans(MM, sparseResult = TRUE), rowMeans(MM, sparseResult = TRUE, na.rm = TRUE)), rowMeans(Diagonal(16)) == 1/16, colSums(Diagonal(7)) == 1) ## dimnames(x) --> names( ) : dimnames(M) <- list(paste0("r", 1:7), paste0("V",1:8)) M colSums(M) rowMeans(M) ## Assertions : stopifnot(all.equal(colSums(M), setNames(c(1,1,6,6,6,6,3,2), colnames(M))), all.equal(rowMeans(M), structure(c(1,1,4,8,12,3,2) / 8, .Names = paste0("r", 1:7)))) } \keyword{array} \keyword{algebra} \keyword{arith} Matrix/man/formatSparseM.Rd0000644000176200001440000000667712622365126015370 0ustar liggesusers\name{formatSparseM} \alias{formatSparseM} \alias{.formatSparseSimple} \title{Formatting Sparse Numeric Matrices Utilities} \description{ Utilities for formatting sparse numeric matrices in a flexible way. These functions are used by the \code{\link{format}} and \code{print} methods for sparse matrices and can be applied as well to standard \R matrices. Note that \emph{all} arguments but the first are optional. \code{formatSparseM()} is the main \dQuote{workhorse} of \code{\link{formatSpMatrix}}, the \code{format} method for sparse matrices. \code{.formatSparseSimple()} is a simple helper function, also dealing with (short/empty) column names construction. } \usage{ formatSparseM(x, zero.print = ".", align = c("fancy", "right"), m = as(x,"matrix"), asLogical=NULL, uniDiag=NULL, digits=NULL, cx, iN0, dn = dimnames(m)) .formatSparseSimple(m, asLogical=FALSE, digits=NULL, col.names, note.dropping.colnames = TRUE, dn=dimnames(m)) } \arguments{ \item{x}{an \R object inheriting from class \code{\linkS4class{sparseMatrix}}.} \item{zero.print}{character which should be used for \emph{structural} zeroes. The default \code{"."} may occasionally be replaced by \code{" "} (blank); using \code{"0"} would look almost like \code{print()}ing of non-sparse matrices.} \item{align}{a string specifying how the \code{zero.print} codes should be aligned, see \code{\link{formatSpMatrix}}.} \item{m}{(optional) a (standard \R) \code{\link{matrix}} version of \code{x}.} \item{asLogical}{should the matrix be formatted as a logical matrix (or rather as a numeric one); mostly for \code{formatSparseM()}.} \item{uniDiag}{logical indicating if the diagonal entries of a sparse unit triangular or unit-diagonal matrix should be formatted as \code{"I"} instead of \code{"1"} (to emphasize that the 1's are \dQuote{structural}).} \item{digits}{significant digits to use for printing, see \code{\link{print.default}}.} \item{cx}{(optional) character matrix; a formatted version of \code{x}, still with strings such as \code{"0.00"} for the zeros.} \item{iN0}{(optional) integer vector, specifying the location of the \emph{non}-zeroes of \code{x}.} \item{col.names, note.dropping.colnames}{see \code{\link{formatSpMatrix}}.} \item{dn}{\code{\link{dimnames}} to be used; a list (of length two) with row and column names (or \code{\link{NULL}}).} } \seealso{ \code{\link{formatSpMatrix}} which calls \code{formatSparseM()} and is the \code{\link{format}} method for sparse matrices.\cr \code{\link{printSpMatrix}} which is used by the (typically implicitly called) \code{\link{show}} and \code{\link{print}} methods for sparse matrices. } \value{ a character matrix like \code{cx}, where the zeros have been replaced with (padded versions of) \code{zero.print}. As this is a \emph{dense} matrix, do not use these functions for really large (really) sparse matrices! } \author{Martin Maechler} \examples{ m <- suppressWarnings(matrix(c(0, 3.2, 0,0, 11,0,0,0,0,-7,0), 4,9)) fm <- formatSparseM(m) noquote(fm) ## nice, but this is nicer {with "units" vertically aligned}: print(fm, quote=FALSE, right=TRUE) ## and "the same" as : Matrix(m) ## align = "right" is cheaper --> the "." are not aligned: noquote(f2 <- formatSparseM(m,align="r")) stopifnot(f2 == fm | m == 0, dim(f2) == dim(m), (f2 == ".") == (m == 0)) } \keyword{utilities} \keyword{print} Matrix/man/dsyMatrix-class.Rd0000644000176200001440000001144012322331041015636 0ustar liggesusers\name{dsyMatrix-class} \docType{class} \alias{dspMatrix-class} \alias{dsyMatrix-class} % % \alias{solve, ..} --> solve-methods.Rd % \alias{\%*%, ..} --> matrix-products.Rd \alias{coerce,dspMatrix,dsyMatrix-method} \alias{coerce,dspMatrix,lspMatrix-method} \alias{coerce,dspMatrix,matrix-method} \alias{coerce,dspMatrix,CsparseMatrix-method} \alias{coerce,dspMatrix,sparseMatrix-method} \alias{coerce,dgeMatrix,dspMatrix-method} \alias{coerce,matrix,dspMatrix-method} \alias{coerce,dgeMatrix,dsyMatrix-method}% or rather setIs? \alias{coerce,dsyMatrix,corMatrix-method} \alias{coerce,dsyMatrix,dpoMatrix-method}% instead of setIs \alias{coerce,dsyMatrix,dspMatrix-method} \alias{coerce,dsyMatrix,lsyMatrix-method} \alias{.dsy2mat}% hidden but exported \alias{coerce,dsyMatrix,matrix-method} \alias{coerce,matrix,dsyMatrix-method} \alias{diag,dspMatrix-method} \alias{diag,dsyMatrix-method} \alias{diag<-,dspMatrix-method} \alias{diag<-,dsyMatrix-method} % \alias{show,dsyMatrix-method} \alias{norm,dspMatrix,character-method} \alias{norm,dspMatrix,missing-method} \alias{norm,dsyMatrix,character-method} \alias{norm,dsyMatrix,missing-method} \alias{rcond,dspMatrix,character-method} \alias{rcond,dspMatrix,missing-method} \alias{rcond,dsyMatrix,character-method} \alias{rcond,dsyMatrix,missing-method} \alias{t,dspMatrix-method} \alias{t,dsyMatrix-method} \title{Symmetric Dense Numeric Matrices} \description{ The \code{"dsyMatrix"} class is the class of symmetric, dense matrices in non-packed storage and \code{"dspMatrix"} is the class of symmetric dense matrices in packed storage. Only the upper triangle or the lower triangle is stored. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dsyMatrix", ...)}. } \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{x}:}{Object of class \code{"numeric"}. The numeric values that constitute the matrix, stored in column-major order.} \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), see the \code{\linkS4class{Matrix}}.} \item{\code{factors}:}{Object of class \code{"list"}. A named list of factorizations that have been computed for the matrix.} } } \section{Extends}{ \code{"dsyMatrix"} extends class \code{"dgeMatrix"}, directly, whereas\cr \code{"dspMatrix"} extends class \code{"ddenseMatrix"}, directly. Both extend class \code{"symmetricMatrix"}, directly, and class \code{"Matrix"} and others, \emph{in}directly, use \code{\link{showClass}("dsyMatrix")}, e.g., for details. } \section{Methods}{ \describe{ \item{coerce}{\code{signature(from = "ddenseMatrix", to = "dgeMatrix")}} % \item{coerce}{\code{signature(from = "dspMatrix", to = "matrix")}} \item{coerce}{\code{signature(from = "dsyMatrix", to = "matrix")}} \item{coerce}{\code{signature(from = "dsyMatrix", to = "dspMatrix")}} \item{coerce}{\code{signature(from = "dspMatrix", to = "dsyMatrix")}} \item{norm}{\code{signature(x = "dspMatrix", type = "character")}, or \code{x = "dsyMatrix"} or \code{type = "missing"}: Computes the matrix norm of the desired type, see, \code{\link{norm}}.} \item{rcond}{\code{signature(x = "dspMatrix", type = "character")}, or \code{x = "dsyMatrix"} or \code{type = "missing"}: Computes the reciprocal condition number, \code{\link{rcond}()}.} \item{solve}{\code{signature(a = "dspMatrix", b = "....")}, and} \item{solve}{\code{signature(a = "dsyMatrix", b = "....")}: \code{x <- solve(a,b)} solves \eqn{A x = b} for \eqn{x}; see \code{\link{solve-methods}}.} \item{t}{\code{signature(x = "dsyMatrix")}: Transpose; swaps from upper triangular to lower triangular storage, i.e., the uplo slot from \code{"U"} to \code{"L"} or vice versa, the same as for all symmetric matrices.} } } %\references{} \seealso{ Classes \code{\linkS4class{dgeMatrix}} and \code{\linkS4class{Matrix}}; \code{\link[base]{solve}}, \code{\link{norm}}, \code{\link{rcond}}, \code{\link[base]{t}} } \examples{ ## Only upper triangular part matters (when uplo == "U" as per default) (sy2 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, NA,32,77))) str(t(sy2)) # uplo = "L", and the lower tri. (i.e. NA is replaced). chol(sy2) #-> "Cholesky" matrix (sp2 <- pack(sy2)) # a "dspMatrix" ## Coercing to dpoMatrix gives invalid object: sy3 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, -1, 2, -7)) try(as(sy3, "dpoMatrix")) # -> error: not positive definite \dontshow{ tr <- try(as(sy3, "dpoMatrix"), silent=TRUE) stopifnot(1 == grep("not a positive definite matrix", as.character(tr)), is(sp2, "dspMatrix")) } } \keyword{classes} Matrix/man/chol2inv-methods.Rd0000644000176200001440000000362212023457647015762 0ustar liggesusers\name{chol2inv-methods} \docType{methods} % \alias{chol2inv}% needed, if we want \usage{} \alias{chol2inv-methods} \alias{chol2inv,ANY-method} \alias{chol2inv,dtrMatrix-method} \alias{chol2inv,CHMfactor-method} \alias{chol2inv,denseMatrix-method} \alias{chol2inv,sparseMatrix-method} \title{Inverse from Choleski or QR Decomposition -- Matrix Methods} \description{ Invert a symmetric, positive definite square matrix from its Choleski decomposition. Equivalently, compute \eqn{(X'X)^{-1}}{(X'X)^(-1)} from the (\eqn{R} part) of the QR decomposition of \eqn{X}. \cr Even more generally, given an upper triangular matrix \eqn{R}, compute \eqn{(R'R)^{-1}}{(R'R)^(-1)}. } % \usage{ % chol2inv(x, \dots) % } % \arguments{ % \item{x}{a matrix(-like) object; see below.} % \item{\dots}{not used here; for compatibility with other methods.} % } \section{Methods}{ \describe{ \item{x = "ANY"}{the default method from \pkg{base}, see \code{\link[base]{chol2inv}}, for traditional matrices.} \item{x = "dtrMatrix"}{method for the numeric triangular matrices, built on the same LAPACK \command{DPOTRI} function as the base method.} \item{x = "denseMatrix"}{if \code{x} is coercable to a \code{\linkS4class{triangularMatrix}}, call the \code{"dtrMatrix"} method above.} \item{x = "sparseMatrix"}{if \code{x} is coercable to a \code{\linkS4class{triangularMatrix}}, use \code{\link{solve}()} currently.} %% better algorithms are welcome! } } \seealso{ \code{\link{chol}} (for \code{\linkS4class{Matrix}} objects); further, \code{\link[base]{chol2inv}} (from the \pkg{base} package), \code{\link{solve}}. } \examples{ (M <- Matrix(cbind(1, 1:3, c(1,3,7)))) (cM <- chol(M)) # a "Cholesky" object, inheriting from "dtrMatrix" chol2inv(cM) \%*\% M # the identity stopifnot(all(chol2inv(cM) \%*\% M - Diagonal(nrow(M))) < 1e-10) } \keyword{methods} \keyword{algebra} Matrix/man/number-class.Rd0000644000176200001440000000111510746336135015161 0ustar liggesusers\name{number-class} \docType{class} \alias{number-class} \title{Class "number" of Possibly Complex Numbers} \description{The class \code{"number"} is a virtual class, currently used for vectors of eigen values which can be \code{"numeric"} or \code{"complex"}. It is a simple class union (\code{\link{setClassUnion}}) of \code{"numeric"} and \code{"complex"}. } \section{Objects from the Class}{Since it is a virtual Class, no objects may be created from it.} \examples{ showClass("number") stopifnot( is(1i, "number"), is(pi, "number"), is(1:3, "number") ) } \keyword{classes} Matrix/man/nsyMatrix-class.Rd0000644000176200001440000000475712001034107015662 0ustar liggesusers\name{nsyMatrix-class} \title{Symmetric Dense Nonzero-Pattern Matrices} \docType{class} \alias{nspMatrix-class} \alias{nsyMatrix-class} % \alias{coerce,nspMatrix,dspMatrix-method} \alias{coerce,nspMatrix,nsyMatrix-method} \alias{coerce,nspMatrix,ngeMatrix-method} \alias{coerce,nsyMatrix,dsyMatrix-method} \alias{coerce,nsyMatrix,ngeMatrix-method} \alias{coerce,nsyMatrix,nspMatrix-method} \alias{coerce,matrix,nsyMatrix-method} \alias{coerce,matrix,nspMatrix-method} \alias{diag<-,nspMatrix-method} \alias{diag<-,nsyMatrix-method} \alias{t,nspMatrix-method} \alias{t,nsyMatrix-method} % \description{ The \code{"nsyMatrix"} class is the class of symmetric, dense nonzero-pattern matrices in non-packed storage and \code{"nspMatrix"} is the class of of these in packed storage. Only the upper triangle or the lower triangle is stored. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("nsyMatrix", ...)}. } \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{x}:}{Object of class \code{"logical"}. The logical values that constitute the matrix, stored in column-major order.} \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), see the \code{\linkS4class{Matrix}} class.} \item{\code{factors}:}{Object of class \code{"list"}. A named list of factorizations that have been computed for the matrix.} } } \section{Extends}{ \code{"nsyMatrix"} extends class \code{"ngeMatrix"}, directly, whereas\cr \code{"nspMatrix"} extends class \code{"ndenseMatrix"}, directly. Both extend class \code{"symmetricMatrix"}, directly, and class \code{"Matrix"} and others, \emph{in}directly, use \code{\link{showClass}("nsyMatrix")}, e.g., for details. } \section{Methods}{ Currently, mainly \code{\link{t}()} and coercion methods (for \code{\link{as}(.)}; use, e.g., \code{\link{showMethods}(class="dsyMatrix")} for details. } %\references{} %\author{} \seealso{ \code{\linkS4class{ngeMatrix}}, \code{\linkS4class{Matrix}}, \code{\link[base]{t}} } \examples{ (s0 <- new("nsyMatrix")) (M2 <- Matrix(c(TRUE, NA,FALSE,FALSE), 2,2)) # logical dense (ltr) (sM <- M2 & t(M2)) # "lge" class(sM <- as(sM, "nMatrix")) # -> "nge" (sM <- as(sM, "nsyMatrix")) # -> "nsy" str ( sM <- as(sM, "nspMatrix")) # -> "nsp": packed symmetric } \keyword{classes} Matrix/man/indMatrix-class.Rd0000644000176200001440000001737513153267746015655 0ustar liggesusers\name{indMatrix-class} \title{Index Matrices} \docType{class} \alias{indMatrix-class} \alias{-,indMatrix,missing-method} \alias{coerce,integer,indMatrix-method} \alias{coerce,numeric,indMatrix-method} \alias{coerce,list,indMatrix-method} \alias{coerce,matrix,indMatrix-method} \alias{coerce,sparseMatrix,indMatrix-method} \alias{coerce,indMatrix,matrix-method} \alias{coerce,indMatrix,ngeMatrix-method} \alias{coerce,indMatrix,ngTMatrix-method} \alias{coerce,indMatrix,dMatrix-method} \alias{coerce,indMatrix,lMatrix-method} \alias{coerce,indMatrix,nMatrix-method} \alias{coerce,indMatrix,CsparseMatrix-method} \alias{coerce,indMatrix,TsparseMatrix-method} \alias{coerce,indMatrix,dsparseMatrix-method} \alias{coerce,indMatrix,lsparseMatrix-method} \alias{coerce,indMatrix,nsparseMatrix-method} \alias{coerce,nMatrix,indMatrix-method} \alias{determinant,indMatrix,logical-method} \alias{isSymmetric,indMatrix-method} \alias{Summary,indMatrix-method} %-- see also ./matrix-products.Rd, kronecker-methods.Rd, is.na-methods.Rd, ... \alias{rbind2,indMatrix,indMatrix-method} \alias{t,indMatrix-method} \alias{colSums,indMatrix-method} \alias{colMeans,indMatrix-method} \alias{rowSums,indMatrix-method} \alias{rowMeans,indMatrix-method} % \description{The \code{"indMatrix"} class is the class of index matrices, stored as 1-based integer index vectors. An index matrix is a matrix with exactly one non-zero entry per row. Index matrices are useful for mapping observations to unique covariate values, for example. Matrix (vector) multiplication with index matrices is equivalent to replicating and permuting rows, or \dQuote{sampling rows with replacement}, and is implemented that way in the \pkg{Matrix} package, see the \sQuote{Details} below. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("indMatrix", ...)} or by coercion from an integer index vector, see below. } \section{Slots}{ \describe{ \item{\code{perm}:}{An integer, 1-based index vector, i.e. an integer vector of length \code{Dim[1]} whose elements are taken from \code{1:Dim[2]}.} \item{\code{Dim}:}{\code{\link{integer}} vector of length two. In some applications, the matrix will be skinny, i.e., with at least as many rows as columns.} \item{\code{Dimnames}:}{a \code{\link{list}} of length two where each component is either \code{\link{NULL}} or a \code{\link{character}} vector of length equal to the corresponding \code{Dim} element.} } } \section{Extends}{ Class \code{"\linkS4class{sparseMatrix}"} and \code{"\linkS4class{generalMatrix}"}, directly. } \section{Methods}{ \describe{ \item{\%*\%}{\code{signature(x = "matrix", y = "indMatrix")} and other signatures (use \code{showMethods("\%*\%", class="indMatrix")}): ... } \item{coerce}{\code{signature(from = "integer", to = "indMatrix")}: This enables typical \code{"indMatrix"} construction, given an index vector from elements in \code{1:Dim[2]}, see the first example.} \item{coerce}{\code{signature(from = "numeric", to = "indMatrix")}: a user convenience, to allow \code{as(perm, "indMatrix")} for numeric \code{perm} with integer values.} \item{coerce}{\code{signature(from = "list", to = "indMatrix")}: The list must have two (integer-valued) entries: the first giving the index vector with elements in \code{1:Dim[2]}, the second giving \code{Dim[2]}. This allows \code{"indMatrix"} construction for cases in which the values represented by the rightmost column(s) are not associated with any observations, i.e., in which the index does not contain values \code{Dim[2], Dim[2]-1, Dim[2]-2, ...}} \item{coerce}{\code{signature(from = "indMatrix", to = "matrix")}: coercion to a traditional FALSE/TRUE \code{\link{matrix}} of \code{\link{mode}} \code{logical}.} \item{coerce}{\code{signature(from = "indMatrix", to = "ngTMatrix")}: coercion to sparse logical matrix of class \code{\linkS4class{ngTMatrix}}.} \item{t}{\code{signature(x = "indMatrix")}: return the transpose of the index matrix (which is no longer an \code{indMatrix}, but of class \code{\linkS4class{ngTMatrix}}.} \item{colSums, colMeans, rowSums, rowMeans}{\code{signature(x = "indMatrix")}: return the column or row sums or means.} \item{rbind2}{\code{signature(x = "indMatrix", y = "indMatrix")}: a fast method for rowwise catenation of two index matrices (with the same number of columns).} \item{kronecker}{\code{signature(X = "indMatrix", Y = "indMatrix")}: return the kronecker product of two index matrices, which corresponds to the index matrix of the interaction of the two.} } } \author{Fabian Scheipl, Uni Muenchen, building on existing \code{"\linkS4class{pMatrix}"}, after a nice hike's conversation with Martin Maechler; diverse tweaks by the latter. The \code{\link{crossprod}(x,y)} and \code{\link{kronecker}(x,y)} methods when both arguments are \code{"indMatrix"} have been made considerably faster thanks to a suggestion by Boris Vaillant. } \details{ Matrix (vector) multiplication with index matrices from the left is equivalent to replicating and permuting rows of the matrix on the right hand side. (Similarly, matrix multiplication with the transpose of an index matrix from the right corresponds to selecting \emph{columns}.) The crossproduct of an index matrix \eqn{M} with itself is a diagonal matrix with the number of entries in each column of \eqn{M} on the diagonal, i.e., \eqn{M'M=}\code{Diagonal(x=table(M@perm))}. Permutation matrices (of class \code{\linkS4class{pMatrix}}) are special cases of index matrices: They are square, of dimension, say, \eqn{n \times n}{n * n}, and their index vectors contain exactly all of \code{1:n}. While \dQuote{row-indexing} (of more than one row \emph{or} using \code{drop=FALSE}) stays within the \code{"indMatrix"} class, all other subsetting/indexing operations (\dQuote{column-indexing}, including, \code{\link{diag}}) on \code{"indMatrix"} objects treats them as nonzero-pattern matrices (\code{"\linkS4class{ngTMatrix}"} specifically), such that non-matrix subsetting results in \code{\link{logical}} vectors. Sub-assignment (\code{M[i,j] <- v}) is not sensible and hence an error for these matrices. } \seealso{ The permutation matrices \code{\linkS4class{pMatrix}} are special index matrices. The \dQuote{pattern} matrices, \code{\linkS4class{nMatrix}} and its subclasses. } \examples{ p1 <- as(c(2,3,1), "pMatrix") (sm1 <- as(rep(c(2,3,1), e=3), "indMatrix")) stopifnot(all(sm1 == p1[rep(1:3, each=3),])) ## row-indexing of a turns it into an : class(p1[rep(1:3, each=3),]) set.seed(12) # so we know '10' is in sample ## random index matrix for 30 observations and 10 unique values: (s10 <- as(sample(10, 30, replace=TRUE),"indMatrix")) ## Sample rows of a numeric matrix : (mm <- matrix(1:10, nrow=10, ncol=3)) s10 \%*\% mm set.seed(27) IM1 <- as(sample(1:20, 100, replace=TRUE), "indMatrix") IM2 <- as(sample(1:18, 100, replace=TRUE), "indMatrix") (c12 <- crossprod(IM1,IM2)) ## same as cross-tabulation of the two index vectors: stopifnot(all(c12 - unclass(table(IM1@perm, IM2@perm)) == 0)) # 3 observations, 4 implied values, first does not occur in sample: as(2:4, "indMatrix") # 3 observations, 5 values, first and last do not occur in sample: as(list(2:4, 5), "indMatrix") as(sm1, "ngTMatrix") s10[1:7, 1:4] # gives an "ngTMatrix" (most economic!) s10[1:4, ] # preserves "indMatrix"-class I1 <- as(c(5:1,6:4,7:3), "indMatrix") I2 <- as(7:1, "pMatrix") (I12 <- suppressWarnings(rBind(I1, I2))) stopifnot(is(I12, "indMatrix"), if(getRversion() >= "3.2.0") identical(I12, rbind(I1, I2)) else TRUE, colSums(I12) == c(2L,2:4,4:2)) } \keyword{classes} Matrix/man/lsyMatrix-class.Rd0000644000176200001440000000457612001034107015657 0ustar liggesusers\name{lsyMatrix-class} \title{Symmetric Dense Logical Matrices} \docType{class} \alias{lspMatrix-class} \alias{lsyMatrix-class} % \alias{coerce,lspMatrix,dspMatrix-method} \alias{coerce,lspMatrix,lsyMatrix-method} \alias{coerce,lspMatrix,lgeMatrix-method} \alias{coerce,lsyMatrix,dsyMatrix-method} \alias{coerce,lsyMatrix,lgeMatrix-method} \alias{coerce,lsyMatrix,lspMatrix-method} \alias{coerce,matrix,lsyMatrix-method} \alias{coerce,matrix,lspMatrix-method} \alias{diag,lspMatrix-method} \alias{diag,lsyMatrix-method} \alias{diag<-,lspMatrix-method} \alias{diag<-,lsyMatrix-method} \alias{t,lspMatrix-method} \alias{t,lsyMatrix-method} % \description{ The \code{"lsyMatrix"} class is the class of symmetric, dense logical matrices in non-packed storage and \code{"lspMatrix"} is the class of of these in packed storage. In the packed form, only the upper triangle or the lower triangle is stored. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("lsyMatrix", ...)}. } \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{x}:}{Object of class \code{"logical"}. The logical values that constitute the matrix, stored in column-major order.} \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), see the \code{\linkS4class{Matrix}} class.} \item{\code{factors}:}{Object of class \code{"list"}. A named list of factorizations that have been computed for the matrix.} } } \section{Extends}{ Both extend classes \code{"\linkS4class{ldenseMatrix}"} and \code{"\linkS4class{symmetricMatrix}"}, directly; further, class \code{"Matrix"} and others, \emph{in}directly. Use \code{\link{showClass}("lsyMatrix")}, e.g., for details. } \section{Methods}{ Currently, mainly \code{\link{t}()} and coercion methods (for \code{\link{as}(.)}; use, e.g., \code{\link{showMethods}(class="dsyMatrix")} for details. } %\references{} %\author{} \seealso{ \code{\linkS4class{lgeMatrix}}, \code{\linkS4class{Matrix}}, \code{\link[base]{t}} } \examples{ (M2 <- Matrix(c(TRUE, NA,FALSE,FALSE), 2,2)) # logical dense (ltr) str(M2) # can (sM <- M2 | t(M2)) # "lge" as(sM, "lsyMatrix") str(sM <- as(sM, "lspMatrix")) # packed symmetric } \keyword{classes} Matrix/man/rankMatrix.Rd0000644000176200001440000001573713122311202014700 0ustar liggesusers\name{rankMatrix} \alias{rankMatrix} \title{Rank of a Matrix} \description{ Compute \sQuote{the} matrix rank, a well-defined functional in theory(*), somewhat ambigous in practice. We provide several methods, the default corresponding to Matlab's definition. (*) The rank of a \eqn{n \times m}{n x m} matrix \eqn{A}, \eqn{rk(A)} is the maximal number of linearly independent columns (or rows); hence \eqn{rk(A) \le min(n,m)}{rk(A) <= min(n,m)}. } \usage{ rankMatrix(x, tol = NULL, method = c("tolNorm2", "qr.R", "qrLINPACK", "qr", "useGrad", "maybeGrad"), sval = svd(x, 0, 0)$d, warn.t = TRUE) } \arguments{ \item{x}{numeric matrix, of dimension \eqn{n \times m}{n x m}, say.} \item{tol}{nonnegative number specifying a (relative, \dQuote{scalefree}) tolerance for testing of \dQuote{practically zero} with specific meaning depending on \code{method}; by default, \code{max(dim(x)) * \link{.Machine}$double.eps} is according to Matlab's default (for its only method which is our \code{method="tolNorm2"}).} \item{method}{a character string specifying the computational method for the rank, can be abbreviated: \describe{ \item{\code{"tolNorm2"}:}{the number of singular values \code{>= tol * max(sval)};} \item{\code{"qrLINPACK"}:}{for a dense matrix, this is the rank of \code{\link[base]{qr}(x, tol, LAPACK=FALSE)} (which is \code{qr(...)$rank}); \cr This ("qr*", dense) version used to be \emph{the} recommended way to compute a matrix rank for a while in the past. For sparse \code{x}, this is equivalent to \code{"qr.R"}. } \item{\code{"qr.R"}:}{this is the rank of triangular matrix \eqn{R}, where \code{qr()} uses LAPACK or a "sparseQR" method (see \code{\link{qr-methods}}) to compute the decomposition \eqn{QR}. The rank of \eqn{R} is then defined as the number of \dQuote{non-zero} diagonal entries \eqn{d_i} of \eqn{R}, and \dQuote{non-zero}s fulfill \eqn{|d_i| \ge \mathrm{tol}\cdot\max(|d_i|)}{|d_i| >= tol * max(|d_i|)}. } \item{\code{"qr"}:}{is for back compatibility; for dense \code{x}, it corresponds to \code{"qrLINPACK"}, whereas for sparse \code{x}, it uses \code{"qr.R"}. For all the "qr*" methods, singular values \code{sval} are not used, which may be crucially important for a large sparse matrix \code{x}, as in that case, when \code{sval} is not specified, the default, computing \code{\link{svd}()} currently coerces \code{x} to a dense matrix. } \item{\code{"useGrad"}:}{considering the \dQuote{gradient} of the (decreasing) singular values, the index of the \emph{smallest} gap.} \item{\code{"maybeGrad"}:}{choosing method \code{"useGrad"} only when that seems \emph{reasonable}; otherwise using \code{"tolNorm2"}.} %% FIXME say more } } \item{sval}{numeric vector of non-increasing singular values of \code{x}; typically unspecified and computed from \code{x} when needed, i.e., unless \code{method = "qr"}.} \item{warn.t}{logical indicating if \code{rankMatrix()} should warn when it needs \code{\link{t}(x)} instead of \code{x}. Currently, for \code{method = "qr"} only, gives a warning by default because the caller often could have passed \code{t(x)} directly, more efficiently.} } % \details{ % FIXME % } \note{For large sparse matrices \code{x}, unless you can specify \code{sval} yourself, currently \code{method = "qr"} may be the only feasible one, as the others need \code{sval} and call \code{\link{svd}()} which currently coerces \code{x} to a \code{\linkS4class{denseMatrix}} which may be very slow or impossible, depending on the matrix dimensions. Note that in the case of sparse \code{x}, \code{method = "qr"}, all non-strictly zero diagonal entries \eqn{d_i} where counted, up to including \pkg{Matrix} version 1.1-0, i.e., that method implicitly used \code{tol = 0}, see also the seed(42) example below. } \value{ If \code{x} is a matrix of all \code{0}, the rank is zero; otherwise, a positive integer in \code{1:min(dim(x))} with attributes detailing the method used. } % \references{ % %% ~put references to the literature/web site here ~ % } \author{Martin Maechler; for the "*Grad" methods, building on suggestions by Ravi Varadhan. } \seealso{ \code{\link{qr}}, \code{\link{svd}}. } \examples{ rankMatrix(cbind(1, 0, 1:3)) # 2 (meths <- eval(formals(rankMatrix)$method)) ## a "border" case: H12 <- Hilbert(12) rankMatrix(H12, tol = 1e-20) # 12; but 11 with default method & tol. sapply(meths, function(.m.) rankMatrix(H12, method = .m.)) ## tolNorm2 qr qr.R qrLINPACK useGrad maybeGrad ## 11 12 11 12 11 11 ## The meaning of 'tol' for method="qrLINPACK" and *dense* x is not entirely "scale free" rMQL <- function(ex, M) rankMatrix(M, method="qrLINPACK",tol = 10^-ex) rMQR <- function(ex, M) rankMatrix(M, method="qr.R", tol = 10^-ex) sapply(5:15, rMQL, M = H12) # result is platform dependent ## 7 7 8 10 10 11 11 11 12 12 12 {x86_64} sapply(5:15, rMQL, M = 1000 * H12) # not identical unfortunately ## 7 7 8 10 11 11 12 12 12 12 12 sapply(5:15, rMQR, M = H12) ## 5 6 7 8 8 9 9 10 10 11 11 sapply(5:15, rMQR, M = 1000 * H12) # the *same* \dontshow{ (r12 <- sapply(5:15, rMQR, M = H12)) stopifnot(identical(r12, sapply(5:15, rMQR, M = H12 / 100)), identical(r12, sapply(5:15, rMQR, M = H12 * 1e5))) rM1 <- function(ex, M) rankMatrix(M, tol = 10^-ex) (r12 <- sapply(5:15, rM1, M = H12)) stopifnot(identical(r12, sapply(5:15, rM1, M = H12 / 100)), identical(r12, sapply(5:15, rM1, M = H12 * 1e5))) } ## "sparse" case: M15 <- kronecker(diag(x=c(100,1,10)), Hilbert(5)) sapply(meths, function(.m.) rankMatrix(M15, method = .m.)) #--> all 15, but 'useGrad' has 14. ## "large" sparse n <- 250000; p <- 33; nnz <- 10000 L <- sparseMatrix(i = sample.int(n, nnz, replace=TRUE), j = sample.int(p, nnz, replace=TRUE), x = rnorm(nnz)) (st1 <- system.time(r1 <- rankMatrix(L))) # warning+ ~1.5 sec (2013) (st2 <- system.time(r2 <- rankMatrix(L, method = "qr"))) # considerably faster! r1[[1]] == print(r2[[1]]) ## --> ( 33 TRUE ) \dontshow{ stopifnot(r1[[1]] == 33, 33 == r2[[1]]) if(doExtras <- interactive() || identical("true", unname(Sys.getenv("R_PKG_CHECKING_doExtras")))) stopifnot(st2[[1]] < 0.2) # seeing 0.03 (on ~ 2010-hardware; R 3.0.2) } ## another sparse-"qr" one, which ``failed'' till 2013-11-23: set.seed(42) f1 <- factor(sample(50, 1000, replace=TRUE)) f2 <- factor(sample(50, 1000, replace=TRUE)) f3 <- factor(sample(50, 1000, replace=TRUE)) rbind. <- if(getRversion() < "3.2.0") rBind else rbind D <- t(do.call(rbind., lapply(list(f1,f2,f3), as, 'sparseMatrix'))) dim(D); nnzero(D) ## 1000 x 150 // 3000 non-zeros (= 2\%) stopifnot(rankMatrix(D, method='qr') == 148, rankMatrix(crossprod(D),method='qr') == 148) ## zero matrix has rank 0 : stopifnot(sapply(meths, function(.m.) rankMatrix(matrix(0, 2, 2), method = .m.)) == 0) } \keyword{algebra} \keyword{array} Matrix/man/ntrMatrix-class.Rd0000644000176200001440000000515512001034107015645 0ustar liggesusers\name{ntrMatrix-class} \docType{class} \alias{ntpMatrix-class} \alias{ntrMatrix-class} % \alias{!,ntpMatrix-method} \alias{!,ntrMatrix-method} \alias{coerce,ntpMatrix,dtpMatrix-method} \alias{coerce,ntpMatrix,ngeMatrix-method} \alias{coerce,ntpMatrix,ntrMatrix-method} \alias{coerce,ntrMatrix,dtrMatrix-method} \alias{coerce,ntrMatrix,ngeMatrix-method} \alias{coerce,ntrMatrix,ntpMatrix-method} \alias{coerce,matrix,ntrMatrix-method} \alias{coerce,matrix,ntpMatrix-method} \alias{diag<-,ntpMatrix-method} \alias{diag<-,ntrMatrix-method} \alias{t,ntpMatrix-method} \alias{t,ntrMatrix-method} % \title{Triangular Dense Logical Matrices} \description{ The \code{"ntrMatrix"} class is the class of triangular, dense, logical matrices in nonpacked storage. The \code{"ntpMatrix"} class is the same except in packed storage. } \section{Slots}{ \describe{ \item{\code{x}:}{Object of class \code{"logical"}. The logical values that constitute the matrix, stored in column-major order.} \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{diag}:}{Object of class \code{"character"}. Must be either \code{"U"}, for unit triangular (diagonal is all ones), or \code{"N"}; see \code{\linkS4class{triangularMatrix}}.} \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), see the \code{\linkS4class{Matrix}} class.} \item{\code{factors}:}{Object of class \code{"list"}. A named list of factorizations that have been computed for the matrix.} } } \section{Extends}{ \code{"ntrMatrix"} extends class \code{"ngeMatrix"}, directly, whereas\cr \code{"ntpMatrix"} extends class \code{"ndenseMatrix"}, directly. Both extend Class \code{"triangularMatrix"}, directly, and class \code{"denseMatrix"}, \code{"lMatrix"} and others, \emph{in}directly, use \code{\link{showClass}("nsyMatrix")}, e.g., for details. } \section{Methods}{ Currently, mainly \code{\link{t}()} and coercion methods (for \code{\link{as}(.)}; use, e.g., \code{\link{showMethods}(class="nsyMatrix")} for details. } \seealso{ Classes \code{\linkS4class{ngeMatrix}}, \code{\linkS4class{Matrix}}; function \code{\link[base]{t}} } \examples{ showClass("ntrMatrix") str(new("ntpMatrix")) (nutr <- as(upper.tri(matrix(,4,4)), "ntrMatrix")) str(nutp <- as(nutr, "ntpMatrix"))# packed matrix: only 10 = (4+1)*4/2 entries !nutp ## the logical negation (is *not* logical triangular !) ## but this one is: stopifnot(all.equal(nutp, as(!!nutp, "ntpMatrix"))) } \keyword{classes} Matrix/man/CsparseMatrix-class.Rd0000644000176200001440000001257712271746775016506 0ustar liggesusers\name{CsparseMatrix-class} \docType{class} \alias{CsparseMatrix-class} \alias{coerce,CsparseMatrix,lsparseMatrix-method} \alias{coerce,CsparseMatrix,lMatrix-method} \alias{coerce,CsparseMatrix,nsparseMatrix-method} \alias{coerce,CsparseMatrix,nMatrix-method} \alias{coerce,CsparseMatrix,TsparseMatrix-method} \alias{coerce,CsparseMatrix,denseMatrix-method} \alias{coerce,matrix,CsparseMatrix-method} \alias{coerce,numeric,CsparseMatrix-method} \alias{diag,CsparseMatrix-method} \alias{t,CsparseMatrix-method} % "[" are in ./Xtrct-methods.Rd; "[<-" in ./Subassign-methods.Rd %% Group methods --------- FIXME: not tested yet (or documented) \alias{Compare,CsparseMatrix,CsparseMatrix-method} \alias{Arith,CsparseMatrix,CsparseMatrix-method} \alias{Arith,CsparseMatrix,numeric-method} \alias{Arith,numeric,CsparseMatrix-method} \alias{Logic,CsparseMatrix,CsparseMatrix-method} \alias{Math,CsparseMatrix-method} % \alias{.validateCsparse} % \title{Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form} \description{The \code{"CsparseMatrix"} class is the virtual class of all sparse matrices coded in sorted compressed column-oriented form. Since it is a virtual class, no objects may be created from it. See \code{showClass("CsparseMatrix")} for its subclasses. } \section{Slots}{ \describe{ \item{\code{i}:}{Object of class \code{"integer"} of length nnzero (number of non-zero elements). These are the \emph{0-based} row numbers for each non-zero element in the matrix, i.e., \code{i} must be in \code{0:(nrow(.)-1)}.} \item{\code{p}:}{\code{\link{integer}} vector for providing pointers, one for each column, to the initial (zero-based) index of elements in the column. \code{.@p} is of length \code{ncol(.) + 1}, with \code{p[1] == 0} and \code{p[length(p)] == nnzero}, such that in fact, \code{diff(.@p)} are the number of non-zero elements for each column. In other words, \code{m@p[1:ncol(m)]} contains the indices of those elements in \code{m@x} that are the first elements in the respective column of \code{m}. } \item{\code{Dim}, \code{Dimnames}:}{inherited from the superclass, see the \code{\linkS4class{sparseMatrix}} class.} } } \section{Extends}{ Class \code{"sparseMatrix"}, directly. Class \code{"Matrix"}, by class \code{"sparseMatrix"}. } \section{Methods}{ \describe{ matrix products \code{\link[=crossprod-methods]{\%*\%}}, \code{\link[=crossprod-methods]{crossprod}()} and \code{tcrossprod()}, several \code{\link{solve}} methods, and other matrix methods available: %% The following is generated by promptClass(..) -- %% FIXME: write a script that update all the *-class.Rd files \item{Arith}{\code{signature(e1 = "CsparseMatrix", e2 = "numeric")}: ... } \item{Arith}{\code{signature(e1 = "numeric", e2 = "CsparseMatrix")}: ... } \item{Math}{\code{signature(x = "CsparseMatrix")}: ... } \item{band}{\code{signature(x = "CsparseMatrix")}: ... } \item{-}{\code{signature(e1 = "CsparseMatrix", e2 = "numeric")}: ... } \item{-}{\code{signature(e1 = "numeric", e2 = "CsparseMatrix")}: ... } \item{+}{\code{signature(e1 = "CsparseMatrix", e2 = "numeric")}: ... } \item{+}{\code{signature(e1 = "numeric", e2 = "CsparseMatrix")}: ... } \item{coerce}{\code{signature(from = "CsparseMatrix", to = "TsparseMatrix")}: ... } \item{coerce}{\code{signature(from = "CsparseMatrix", to = "denseMatrix")}: ... } \item{coerce}{\code{signature(from = "CsparseMatrix", to = "matrix")}: ... } \item{coerce}{\code{signature(from = "CsparseMatrix", to = "lsparseMatrix")}: ... } \item{coerce}{\code{signature(from = "CsparseMatrix", to = "nsparseMatrix")}: ... } \item{coerce}{\code{signature(from = "TsparseMatrix", to = "CsparseMatrix")}: ... } \item{coerce}{\code{signature(from = "denseMatrix", to = "CsparseMatrix")}: ... } \item{diag}{\code{signature(x = "CsparseMatrix")}: ... } \item{gamma}{\code{signature(x = "CsparseMatrix")}: ... } \item{lgamma}{\code{signature(x = "CsparseMatrix")}: ... } \item{log}{\code{signature(x = "CsparseMatrix")}: ... } \item{t}{\code{signature(x = "CsparseMatrix")}: ... } \item{tril}{\code{signature(x = "CsparseMatrix")}: ... } \item{triu}{\code{signature(x = "CsparseMatrix")}: ... } } } \note{ All classes extending \code{CsparseMatrix} have a common validity (see \code{\link{validObject}}) check function. That function additionally checks the \code{i} slot for each column to contain increasing row numbers. \cr In earlier versions of \pkg{Matrix} (\code{<= 0.999375-16}), \code{\link{validObject}} automatically re-sorted the entries when necessary, and hence \code{new()} calls with somewhat permuted \code{i} and \code{x} slots worked, as \code{\link{new}(...)} (\emph{with} slot arguments) automatically checks the validity. Now, you have to use \code{\link{sparseMatrix}} to achieve the same functionality or know how to use \code{.validateCsparse()} to do so. } \seealso{ \code{\link{colSums}}, \code{\link{kronecker}}, and other such methods with own help pages. Further, the super class of \code{CsparseMatrix}, \code{\linkS4class{sparseMatrix}}, and, e.g., class \code{\linkS4class{dgCMatrix}} for the links to other classes. } \examples{ getClass("CsparseMatrix") ## The common validity check function (based on C code): getValidity(getClass("CsparseMatrix")) } \keyword{classes} Matrix/man/LU-class.Rd0000644000176200001440000000634012210462526014206 0ustar liggesusers\name{LU-class} \docType{class} \alias{LU-class} \alias{denseLU-class} \alias{expand,denseLU-method} %% \alias{solve,denseLU,missing-method} \title{LU (dense) Matrix Decompositions} \description{ The \code{"LU"} class is the \emph{virtual} class of LU decompositions of real matrices. \code{"denseLU"} the class of LU decompositions of dense real matrices. } \details{ The decomposition is of the form \deqn{A = P L U}{A = P L U} where typically all matrices are of size \eqn{n\times n}{n by n}, and the matrix \eqn{P} is a permutation matrix, \eqn{L} is lower triangular and \eqn{U} is upper triangular (both of class \code{\linkS4class{dtrMatrix}}). Note that the \emph{dense} decomposition is also implemented for a \eqn{m\times n}{m by n} matrix \eqn{A}, when \eqn{m \ne n}{m != n}. If \eqn{m < n} (\dQuote{wide case}), \eqn{U} is \eqn{m\times n}{m by n}, and hence not triangular.\cr If \eqn{m > n} (\dQuote{long case}), \eqn{L} is \eqn{m\times n}{m by n}, and hence not triangular. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("denseLU", ...)}. More commonly the objects are created explicitly from calls of the form \code{\link{lu}(mm)} where \code{mm} is an object that inherits from the \code{"dgeMatrix"} class or as a side-effect of other functions applied to \code{"dgeMatrix"} objects. } \section{Extends}{ \code{"LU"} directly extends the virtual class \code{"\linkS4class{MatrixFactorization}"}. \code{"denseLU"} directly extends \code{"LU"}. } \section{Slots}{ \describe{ \item{\code{x}:}{object of class \code{"numeric"}. The \code{"L"} (unit lower triangular) and \code{"U"} (upper triangular) factors of the original matrix. These are stored in a packed format described in the Lapack manual, and can retrieved by the \code{expand()} method, see below.} \item{\code{perm}:}{Object of class \code{"integer"} - a vector of length \code{min(Dim)} that describes the permutation applied to the rows of the original matrix. The contents of this vector are described in the Lapack manual.} \item{\code{Dim}:}{the dimension of the original matrix; inherited from class \code{\linkS4class{MatrixFactorization}} .} } } \section{Methods}{ \describe{ \item{expand}{\code{signature(x = "denseLU")}: Produce the \code{"L"} and \code{"U"} (and \code{"P"}) factors as a named list of matrices, see also the example below.} \item{solve}{\code{signature(a = "denseLU", b = "missing")}: Compute the inverse of A, \eqn{A^{-1}}{A^(-1)}, \code{solve(A)} using the LU decomposition, see also \code{\link{solve-methods}}.} } } % \references{} \seealso{ class \code{\linkS4class{sparseLU}} for LU decompositions of \emph{sparse} matrices; further, class \code{\linkS4class{dgeMatrix}} and functions \code{\link{lu}}, \code{\link{expand}}. } \examples{ set.seed(1) mm <- Matrix(round(rnorm(9),2), nrow = 3) mm str(lum <- lu(mm)) elu <- expand(lum) elu # three components: "L", "U", and "P", the permutation elu$L \%*\% elu$U (m2 <- with(elu, P \%*\% L \%*\% U)) # the same as 'mm' stopifnot(all.equal(as(mm, "matrix"), as(m2, "matrix"))) } \keyword{classes} \keyword{algebra} Matrix/man/all.equal-methods.Rd0000644000176200001440000000344212272147560016110 0ustar liggesusers\name{all.equal-methods} \title{Matrix Package Methods for Function all.equal()} \docType{methods} \alias{all.equal-methods} % \alias{all.equal,Matrix,Matrix-method} \alias{all.equal,Matrix,ANY-method} \alias{all.equal,ANY,Matrix-method} \alias{all.equal,sparseMatrix,sparseMatrix-method} \alias{all.equal,sparseMatrix,ANY-method} \alias{all.equal,ANY,sparseMatrix-method} \alias{all.equal,sparseVector,sparseVector-method} \alias{all.equal,sparseMatrix,sparseVector-method} \alias{all.equal,sparseVector,sparseMatrix-method} \alias{all.equal,sparseVector,ANY-method} \alias{all.equal,ANY,sparseVector-method} \alias{all.equal,abIndex,abIndex-method} \alias{all.equal,abIndex,numLike-method} \alias{all.equal,numLike,abIndex-method} % \description{ Methods for function \code{\link{all.equal}()} (from \R package \pkg{base}) are defined for all \code{\linkS4class{Matrix}} classes. } \section{Methods}{ \describe{ \item{target = "Matrix", current = "Matrix"}{\ } \item{target = "ANY", current = "Matrix"}{\ } \item{target = "Matrix", current = "ANY"}{these three methods are simply using \code{\link{all.equal.numeric}} directly and work via \code{\link{as.vector}()}.} } There are more methods, notably also for \code{"\linkS4class{sparseVector}"}'s, see \code{showMethods("all.equal")}. } \examples{ showMethods("all.equal") (A <- spMatrix(3,3, i= c(1:3,2:1), j=c(3:1,1:2), x = 1:5)) ex <- expand(lu. <- lu(A)) stopifnot( all.equal(as(A[lu.@p + 1L, lu.@q + 1L], "CsparseMatrix"), lu.@L \%*\% lu.@U), with(ex, all.equal(as(P \%*\% A \%*\% Q, "CsparseMatrix"), L \%*\% U)), with(ex, all.equal(as(A, "CsparseMatrix"), t(P) \%*\% L \%*\% U \%*\% t(Q)))) } \keyword{methods} \keyword{arith} Matrix/man/KNex.Rd0000644000176200001440000000210012271746775013440 0ustar liggesusers\name{KNex} \alias{KNex} \docType{data} \title{Koenker-Ng Example Sparse Model Matrix and Response Vector} \description{ A model matrix \code{mm} and corresponding response vector \code{y} used in an example by Koenker and Ng. The matrix \code{mm} is a sparse matrix with 1850 rows and 712 columns but only 8758 non-zero entries. It is a \code{"dgCMatrix"} object. The vector \code{y} is just \code{\link{numeric}} of length 1850. } \usage{data(KNex)} %\details{} %\source{} \references{ Roger Koenker and Pin Ng (2003). SparseM: A sparse matrix package for R; \emph{J. of Statistical Software}, \bold{8} (6), \url{http://www.jstatsoft.org/} } \examples{ data(KNex) class(KNex$mm) dim(KNex$mm) image(KNex$mm) str(KNex) system.time( # a fraction of a second sparse.sol <- with(KNex, solve(crossprod(mm), crossprod(mm, y)))) head(round(sparse.sol,3)) ## Compare with QR-based solution ("more accurate, but slightly slower"): system.time( sp.sol2 <- with(KNex, qr.coef(qr(mm), y) )) all.equal(sparse.sol, sp.sol2, tolerance = 1e-13) # TRUE } \keyword{datasets} Matrix/man/is.na-methods.Rd0000644000176200001440000000525612314067537015251 0ustar liggesusers\name{is.na-methods} \title{is.na(), is.{in}finite() Methods for 'Matrix' Objects} \docType{methods} \alias{is.finite,ddenseMatrix-method} \alias{is.finite,dgeMatrix-method} \alias{is.finite,dsparseMatrix-method} \alias{is.finite,diagonalMatrix-method} \alias{is.finite,lMatrix-method} \alias{is.finite,nMatrix-method} \alias{is.finite,indMatrix-method} \alias{is.infinite,ddenseMatrix-method} \alias{is.infinite,dsparseMatrix-method} \alias{is.infinite,diagonalMatrix-method} \alias{is.infinite,lMatrix-method} \alias{is.infinite,nMatrix-method} \alias{is.infinite,indMatrix-method} \alias{is.na,denseMatrix-method} \alias{is.na,indMatrix-method} \alias{is.na,sparseMatrix-method} \alias{anyNA,nsparseMatrix-method} \alias{anyNA,nsparseVector-method} \alias{anyNA,sparseVector-method} \alias{anyNA,xMatrix-method} %% xMatrix (classUnion) dispatching failing, --> workaround: \alias{anyNA,dMatrix-method} \alias{anyNA,iMatrix-method} \alias{anyNA,lMatrix-method} \alias{anyNA,zMatrix-method} \alias{anyNA,ndenseMatrix-method} %%end{workaround} \alias{is.na-methods} \description{ Methods for function \code{\link{is.na}()}, \code{\link{is.finite}()}, and \code{\link{is.infinite}()} for all Matrices (objects extending the \code{\linkS4class{Matrix}} class): \describe{ \item{x = "denseMatrix"}{returns a \code{"nMatrix"} object of same dimension as \code{x}, with TRUE's whenever \code{x} is \code{\link{NA}}, finite, or infinite, respectively.} \item{x = "sparseMatrix"}{ditto.} } } \usage{ \S4method{is.na}{sparseMatrix}(x) \S4method{is.finite}{dsparseMatrix}(x) \S4method{is.infinite}{ddenseMatrix}(x) ## ... ## and for other classes \S4method{anyNA}{xMatrix}(x) \S4method{anyNA}{nsparseMatrix}(x) \S4method{anyNA}{sparseVector}(x) \S4method{anyNA}{nsparseVector}(x) } \arguments{ \item{x}{sparse or dense matrix or sparse vector (here; any \R object in general).} } \seealso{ \code{\link{NA}}, \code{\link{is.na}}; \code{\link{is.finite}}, \code{\link{is.infinite}}; \code{\linkS4class{nMatrix}}, \code{\linkS4class{denseMatrix}}, \code{\linkS4class{sparseMatrix}}. The \code{\linkS4class{sparseVector}} class. } \examples{ M <- Matrix(1:6, nrow=4, ncol=3, dimnames = list(c("a", "b", "c", "d"), c("A", "B", "C"))) stopifnot(all(!is.na(M))) M[2:3,2] <- NA is.na(M) if(exists("anyNA", mode="function")) anyNA(M) A <- spMatrix(10,20, i = c(1,3:8), j = c(2,9,6:10), x = 7 * (1:7)) stopifnot(all(!is.na(A))) %TODO stopifnot(all(!is.na(A)), !anyNA(A)) A[2,3] <- A[1,2] <- A[5, 5:9] <- NA inA <- is.na(A) stopifnot(sum(inA) == 1+1+5) \dontshow{ if(exists("anyNA", mode="function")) stopifnot(anyNA(M), anyNA(A)) }% dont.. } \keyword{methods} Matrix/man/nearPD.Rd0000644000176200001440000001713012271746775013755 0ustar liggesusers\name{nearPD} \alias{nearPD} \title{Nearest Positive Definite Matrix} \description{ Compute the nearest positive definite matrix to an approximate one, typically a correlation or variance-covariance matrix. } \usage{ nearPD(x, corr = FALSE, keepDiag = FALSE, do2eigen = TRUE, doSym = FALSE, doDykstra = TRUE, only.values = FALSE, ensureSymmetry = !isSymmetric(x), eig.tol = 1e-06, conv.tol = 1e-07, posd.tol = 1e-08, maxit = 100, conv.norm.type = "I", trace = FALSE) } \arguments{ \item{x}{numeric \eqn{n \times n}{n * n} approximately positive definite matrix, typically an approximation to a correlation or covariance matrix. If \code{x} is not symmetric (and \code{ensureSymmetry} is not false), \code{\link{symmpart}(x)} is used.} \item{corr}{logical indicating if the matrix should be a \emph{correlation} matrix.} \item{keepDiag}{logical, generalizing \code{corr}: if \code{TRUE}, the resulting matrix should have the same diagonal (\code{\link{diag}(x)}) as the input matrix.} \item{do2eigen}{logical indicating if a \code{\link[sfsmisc]{posdefify}()} eigen step should be applied to the result of the Higham algorithm.} \item{doSym}{logical indicating if \code{X <- (X + t(X))/2} should be done, after \code{X <- tcrossprod(Qd, Q)}; some doubt if this is necessary.} \item{doDykstra}{logical indicating if Dykstra's correction should be used; true by default. If false, the algorithm is basically the direct fixpoint iteration \eqn{Y_k = P_U(P_S(Y_{k-1}))}{Y(k) = P_U(P_S(Y(k-1)))}.} \item{only.values}{logical; if \code{TRUE}, the result is just the vector of eigen values of the approximating matrix.} \item{ensureSymmetry}{logical; by default, \code{\link{symmpart}(x)} is used whenever \code{\link{isSymmetric}(x)} is not true. The user can explicitly set this to \code{TRUE} or \code{FALSE}, saving the symmetry test. \emph{Beware} however that setting it \code{FALSE} for an \bold{a}symmetric input \code{x}, is typically nonsense!} \item{eig.tol}{defines relative positiveness of eigenvalues compared to largest one, \eqn{\lambda_1}. Eigen values \eqn{\lambda_k} are treated as if zero when \eqn{\lambda_k / \lambda_1 \le eig.tol}.} \item{conv.tol}{convergence tolerance for Higham algorithm.} \item{posd.tol}{tolerance for enforcing positive definiteness (in the final \code{posdefify} step when \code{do2eigen} is \code{TRUE}).} \item{maxit}{maximum number of iterations allowed.} \item{conv.norm.type}{convergence norm type (\code{\link{norm}(*, type)}) used for Higham algorithm. The default is \code{"I"} (infinity), for reasons of speed (and back compatibility); using \code{"F"} is more in line with Higham's proposal.} \item{trace}{logical or integer specifying if convergence monitoring should be traced.} } \details{ This implements the algorithm of Higham (2002), and then (if \code{do2eigen} is true) forces positive definiteness using code from \code{\link[sfsmisc]{posdefify}}. The algorithm of Knol DL and ten Berge (1989) (not implemented here) is more general in (1) that it allows constraints to fix some rows (and columns) of the matrix and (2) to force the smallest eigenvalue to have a certain value. Note that setting \code{corr = TRUE} just sets \code{diag(.) <- 1} within the algorithm. Higham (2002) uses Dykstra's correction, but the version by Jens Oehlschlaegel did not use it (accidentally), and has still lead to good results; this simplification, now only via \code{doDykstra = FALSE}, was active in \code{nearPD()} upto Matrix version 0.999375-40. } \value{ If \code{only.values = TRUE}, a numeric vector of eigen values of the approximating matrix; Otherwise, as by default, an S3 object of \code{\link{class}} \code{"nearPD"}, basically a list with components \item{mat}{a matrix of class \code{\linkS4class{dpoMatrix}}, the computed positive-definite matrix.} \item{eigenvalues}{numeric vector of eigen values of \code{mat}.} \item{corr}{logical, just the argument \code{corr}.} \item{normF}{the Frobenius norm (\code{\link{norm}(x-X, "F")}) of the difference between the original and the resulting matrix.} \item{iterations}{number of iterations needed.} \item{converged}{logical indicating if iterations converged.} } \references{%% more in /u/maechler/R/Pkgs/sfsmisc/man/posdefify.Rd Cheng, Sheung Hun and Higham, Nick (1998) A Modified Cholesky Algorithm Based on a Symmetric Indefinite Factorization; \emph{SIAM J. Matrix Anal.\ Appl.}, \bold{19}, 1097--1110. Knol DL, ten Berge JMF (1989) Least-squares approximation of an improper correlation matrix by a proper one. \emph{Psychometrika} \bold{54}, 53--61. Higham, Nick (2002) Computing the nearest correlation matrix - a problem from finance; \emph{IMA Journal of Numerical Analysis} \bold{22}, 329--343. } \author{Jens Oehlschlaegel donated a first version. Subsequent changes by the Matrix package authors. } \seealso{A first version of this (with non-optional \code{corr=TRUE}) has been available as \code{\link[sfsmisc]{nearcor}()}; and more simple versions with a similar purpose \code{\link[sfsmisc]{posdefify}()}, both from package \pkg{sfsmisc}. } \examples{ ## Higham(2002), p.334f - simple example A <- matrix(1, 3,3); A[1,3] <- A[3,1] <- 0 n.A <- nearPD(A, corr=TRUE, do2eigen=FALSE) n.A[c("mat", "normF")] stopifnot(all.equal(n.A$mat[1,2], 0.760689917), all.equal(n.A$normF, 0.52779033, tolerance=1e-9) ) set.seed(27) m <- matrix(round(rnorm(25),2), 5, 5) m <- m + t(m) diag(m) <- pmax(0, diag(m)) + 1 (m <- round(cov2cor(m), 2)) str(near.m <- nearPD(m, trace = TRUE)) round(near.m$mat, 2) norm(m - near.m$mat) # 1.102 / 1.08 if(require("sfsmisc")) { m2 <- posdefify(m) # a simpler approach norm(m - m2) # 1.185, i.e., slightly "less near" } round(nearPD(m, only.values=TRUE), 9) ## A longer example, extended from Jens' original, ## showing the effects of some of the options: pr <- Matrix(c(1, 0.477, 0.644, 0.478, 0.651, 0.826, 0.477, 1, 0.516, 0.233, 0.682, 0.75, 0.644, 0.516, 1, 0.599, 0.581, 0.742, 0.478, 0.233, 0.599, 1, 0.741, 0.8, 0.651, 0.682, 0.581, 0.741, 1, 0.798, 0.826, 0.75, 0.742, 0.8, 0.798, 1), nrow = 6, ncol = 6) nc. <- nearPD(pr, conv.tol = 1e-7) # default nc.$iterations # 2 nc.1 <- nearPD(pr, conv.tol = 1e-7, corr = TRUE) nc.1$iterations # 11 / 12 (!) ncr <- nearPD(pr, conv.tol = 1e-15) str(ncr)# still 2 iterations ncr.1 <- nearPD(pr, conv.tol = 1e-15, corr = TRUE) ncr.1 $ iterations # 27 / 30 ! ncF <- nearPD(pr, conv.tol = 1e-15, conv.norm = "F") stopifnot(all.equal(ncr, ncF))# norm type does not matter at all in this example ## But indeed, the 'corr = TRUE' constraint did ensure a better solution; ## cov2cor() does not just fix it up equivalently : norm(pr - cov2cor(ncr$mat)) # = 0.09994 norm(pr - ncr.1$mat) # = 0.08746 / 0.08805 ### 3) a real data example from a 'systemfit' model (3 eq.): (load(system.file("external", "symW.rda", package="Matrix"))) # "symW" dim(symW) # 24 x 24 class(symW)# "dsCMatrix": sparse symmetric if(dev.interactive()) image(symW) EV <- eigen(symW, only=TRUE)$values summary(EV) ## looking more closely {EV sorted decreasingly}: tail(EV)# all 6 are negative EV2 <- eigen(sWpos <- nearPD(symW)$mat, only=TRUE)$values stopifnot(EV2 > 0) if(require("sfsmisc")) { plot(pmax(1e-3,EV), EV2, type="o", log="xy", xaxt="n",yaxt="n") eaxis(1); eaxis(2) } else plot(pmax(1e-3,EV), EV2, type="o", log="xy") abline(0,1, col="red3",lty=2) } \keyword{algebra} \keyword{array} Matrix/man/dsCMatrix-class.Rd0000644000176200001440000001473212622367447015605 0ustar liggesusers\name{dsCMatrix-class} \title{Numeric Symmetric Sparse (column compressed) Matrices} \docType{class} \alias{dsCMatrix-class} \alias{dsTMatrix-class} % %\alias{solve,dsCMatrix,...-method}--> solve-methods.Rd \alias{t,dsCMatrix-method} \alias{t,dsTMatrix-method} \alias{as.vector,dsCMatrix-method} \alias{coerce,dgeMatrix,dsCMatrix-method} \alias{coerce,dgeMatrix,dsTMatrix-method} \alias{coerce,dsCMatrix,dgCMatrix-method} \alias{coerce,dsCMatrix,dgTMatrix-method} \alias{coerce,dsCMatrix,dgeMatrix-method} \alias{coerce,dsCMatrix,dsRMatrix-method} \alias{coerce,dsCMatrix,dsTMatrix-method} \alias{coerce,dsCMatrix,dsyMatrix-method} \alias{coerce,dsCMatrix,lsCMatrix-method} \alias{coerce,dsCMatrix,generalMatrix-method} \alias{coerce,dsCMatrix,denseMatrix-method} \alias{coerce,dsCMatrix,matrix-method} \alias{coerce,dsCMatrix,vector-method} \alias{coerce,dsCMatrix,nsCMatrix-method} \alias{coerce,dsTMatrix,dgTMatrix-method} \alias{coerce,dsTMatrix,dgeMatrix-method} \alias{coerce,dsTMatrix,dsCMatrix-method} \alias{coerce,dsTMatrix,dsyMatrix-method} \alias{coerce,dsTMatrix,lsTMatrix-method} \alias{coerce,dsTMatrix,matrix-method} \alias{coerce,dsyMatrix,dsCMatrix-method} \alias{coerce,dsyMatrix,dsTMatrix-method} \alias{coerce,dtCMatrix,dtRMatrix-method} \alias{coerce,matrix,dsCMatrix-method} \alias{coerce,matrix,dsTMatrix-method} \alias{coerce,graphNEL,dsCMatrix-method} %% Group methods \alias{Arith,dsCMatrix,dsCMatrix-method} \alias{determinant,dsCMatrix,missing-method} \alias{determinant,dsCMatrix,logical-method} \description{The \code{dsCMatrix} class is a class of symmetric, sparse numeric matrices in the compressed, \bold{c}olumn-oriented format. In this implementation the non-zero elements in the columns are sorted into increasing row order. The \code{dsTMatrix} class is the class of symmetric, sparse numeric matrices in \bold{t}riplet format. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dsCMatrix", ...)} or \code{new("dsTMatrix", ...)}, or automatically via e.g., \code{as(*, "symmetricMatrix")}, or (for \code{dsCMatrix}) also from \code{\link{Matrix}(.)}. Creation \dQuote{from scratch} most efficiently happens via \code{\link{sparseMatrix}(*, symmetric=TRUE)}. } \section{Slots}{ \describe{ \item{\code{uplo}:}{A character object indicating if the upper triangle (\code{"U"}) or the lower triangle (\code{"L"}) is stored.} \item{\code{i}:}{Object of class \code{"integer"} of length nnZ (\emph{half} number of non-zero elements). These are the row numbers for each non-zero element in the lower triangle of the matrix.} \item{\code{p}:}{(only in class \code{"dsCMatrix"}:) an \code{\link{integer}} vector for providing pointers, one for each column, see the detailed description in \code{\linkS4class{CsparseMatrix}}.} \item{\code{j}:}{(only in class \code{"dsTMatrix"}:) Object of class \code{"integer"} of length nnZ (as \code{i}). These are the column numbers for each non-zero element in the lower triangle of the matrix.} \item{\code{x}:}{Object of class \code{"numeric"} of length nnZ -- the non-zero elements of the matrix (to be duplicated for full matrix).} \item{\code{factors}:}{Object of class \code{"list"} - a list of factorizations of the matrix. } \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.} } } \section{Extends}{ Both classes extend classes and \code{\linkS4class{symmetricMatrix}} \code{\linkS4class{dsparseMatrix}} directly; \code{dsCMatrix} further directly extends \code{\linkS4class{CsparseMatrix}}, where \code{dsTMatrix} does \code{\linkS4class{TsparseMatrix}}. } \section{Methods}{ \describe{ \item{solve}{\code{signature(a = "dsCMatrix", b = "....")}: \code{x <- solve(a,b)} solves \eqn{A x = b} for \eqn{x}; see \code{\link{solve-methods}}.} \item{chol}{\code{signature(x = "dsCMatrix", pivot = "logical")}: Returns (and stores) the Cholesky decomposition of \code{x}, see \code{\link{chol}}.} \item{Cholesky}{\code{signature(A = "dsCMatrix",...)}: Computes more flexibly Cholesky decompositions, see \code{\link{Cholesky}}.} \item{determinant}{\code{signature(x = "dsCMatrix", logarithm = "missing")}: Evaluate the determinant of \code{x} on the logarithm scale. This creates and stores the Cholesky factorization.} \item{determinant}{\code{signature(x = "dsCMatrix", logarithm = "logical")}: Evaluate the determinant of \code{x} on the logarithm scale or not, according to the \code{logarithm} argument. This creates and stores the Cholesky factorization.} \item{t}{\code{signature(x = "dsCMatrix")}: Transpose. As for all symmetric matrices, a matrix for which the upper triangle is stored produces a matrix for which the lower triangle is stored and vice versa, i.e., the \code{uplo} slot is swapped, and the row and column indices are interchanged.} \item{t}{\code{signature(x = "dsTMatrix")}: Transpose. The \code{uplo} slot is swapped from \code{"U"} to \code{"L"} or vice versa, as for a \code{"dsCMatrix"}, see above.} \item{coerce}{\code{signature(from = "dsCMatrix", to = "dgTMatrix")}} \item{coerce}{\code{signature(from = "dsCMatrix", to = "dgeMatrix")}} \item{coerce}{\code{signature(from = "dsCMatrix", to = "matrix")}} \item{coerce}{\code{signature(from = "dsTMatrix", to = "dgeMatrix")}} \item{coerce}{\code{signature(from = "dsTMatrix", to = "dsCMatrix")}} \item{coerce}{\code{signature(from = "dsTMatrix", to = "dsyMatrix")}} \item{coerce}{\code{signature(from = "dsTMatrix", to = "matrix")}} } } %\references{} %\author{} %\note{} \seealso{ Classes \code{\linkS4class{dgCMatrix}}, \code{\linkS4class{dgTMatrix}}, \code{\linkS4class{dgeMatrix}} and those mentioned above. } \examples{ mm <- Matrix(toeplitz(c(10, 0, 1, 0, 3)), sparse = TRUE) mm # automatically dsCMatrix str(mm) ## how would we go from a manually constructed Tsparse* : mT <- as(mm, "dgTMatrix") ## Either (symM <- as(mT, "symmetricMatrix"))# dsT (symC <- as(symM, "CsparseMatrix"))# dsC ## or sC <- Matrix(mT, sparse=TRUE, forceCheck=TRUE) sym2 <- as(symC, "TsparseMatrix") ## --> the same as 'symM', a "dsTMatrix" \dontshow{ stopifnot(identical(symC, sC), identical(sym2, symM), class(sym2) == "dsTMatrix", identical(sym2[1,], sC[1,]), identical(sym2[,2], sC[,2])) } } \keyword{classes} \keyword{algebra} Matrix/man/BunchKaufman-methods.Rd0000644000176200001440000000376411635064643016605 0ustar liggesusers\name{BunchKaufman-methods} \docType{methods} \alias{BunchKaufman} \alias{BunchKaufman-methods} \alias{BunchKaufman,dspMatrix-method} \alias{BunchKaufman,dsyMatrix-method} \title{Bunch-Kaufman Decomposition Methods} \description{ The Bunch-Kaufman Decomposition of a square symmetric matrix \eqn{A} is \eqn{A = P LDL' P'} where \eqn{P} is a permutation matrix, \eqn{L} is \emph{unit}-lower triangular and \eqn{D} is \emph{block}-diagonal with blocks of dimension \eqn{1\times 1}{1 x 1} or \eqn{2\times2}{2 x 2}. } \usage{ BunchKaufman(x, \dots) } \arguments{ \item{x}{a symmetric square matrix.} \item{\dots}{potentially further arguments passed to methods.} } \section{Methods}{ Currently, only methods for \bold{dense} numeric symmetric matrices are implemented. \describe{ \item{\code{x = "dspMatrix"}}{uses Lapack routine \code{dsptrf},} \item{\code{x = "dsyMatrix"}}{uses Lapack routine \code{dsytrf}, computing the Bunch-Kaufman decomposition.} } } \value{ an object of class \code{\linkS4class{BunchKaufman}}, which can also be used as a (triangular) matrix directly. %% FIXME: Really need an expand() method, in order to *work* with the result! } \references{ The original LAPACK source code, including documentation; \url{http://www.netlib.org/lapack/double/dsytrf.f} and \url{http://www.netlib.org/lapack/double/dsptrf.f} } \seealso{ The resulting class, \code{\linkS4class{BunchKaufman}}. Related decompositions are the LU, \code{\link{lu}}, and the Cholesky, \code{\link{chol}} (and for \emph{sparse} matrices, \code{\link{Cholesky}}). } \examples{ data(CAex) dim(CAex) isSymmetric(CAex)# TRUE CAs <- as(CAex, "symmetricMatrix") if(FALSE) # no method defined yet for *sparse* : bk. <- BunchKaufman(CAs) ## does apply to *dense* symmetric matrices: bkCA <- BunchKaufman(as(CAs, "denseMatrix")) bkCA image(bkCA)# shows how sparse it is, too str(R.CA <- as(bkCA, "sparseMatrix")) ## an upper triangular 72x72 matrix with only 144 non-zero entries } \keyword{methods} Matrix/man/replValue-class.Rd0000644000176200001440000000140613141330160015613 0ustar liggesusers\name{replValue-class} \docType{class} \alias{replValue-class} %% >>>>>>> The "[<-" methods are in ./Subassign-methods.Rd \title{Virtual Class "replValue" - Simple Class for subassignment Values} \description{The class \code{"replValue"} is a virtual class used for values in signatures for sub-assignment of \pkg{Matrix} matrices. In fact, it is a simple class union (\code{\link{setClassUnion}}) of \code{"numeric"} and \code{"logical"} (and maybe \code{"complex"} in the future). } \section{Objects from the Class}{Since it is a virtual Class, no objects may be created from it.} \seealso{ %% FIXME: bug in Rdconv needs '[Matrix]' below: \code{\link[Matrix]{Subassign-methods}}, also for examples. } \examples{ showClass("replValue") } \keyword{classes} Matrix/man/dgCMatrix-class.Rd0000644000176200001440000000712612622367447015570 0ustar liggesusers\name{dgCMatrix-class} \docType{class} \title{Compressed, sparse, column-oriented numeric matrices} \alias{dgCMatrix-class} \alias{as.vector,dgCMatrix-method} \alias{coerce,matrix,dgCMatrix-method} \alias{coerce,dgeMatrix,dgCMatrix-method} \alias{coerce,dgCMatrix,dgTMatrix-method} \alias{coerce,dgCMatrix,dsCMatrix-method}% deprecated \alias{coerce,dgCMatrix,dtCMatrix-method} \alias{coerce,dgCMatrix,lgCMatrix-method} \alias{coerce,dgCMatrix,ngCMatrix-method} \alias{coerce,dgCMatrix,dgeMatrix-method} \alias{coerce,dgCMatrix,matrix-method} \alias{coerce,dgCMatrix,vector-method} \alias{coerce,factor,dgCMatrix-method} \alias{diag,dgCMatrix-method} \alias{dim,dgCMatrix-method} %\alias{lu,dgCMatrix-method}-> ./lu.Rd \alias{isSymmetric,dgCMatrix-method} \alias{t,dgCMatrix-method} %\alias{solve,dgCMatrix,matrix-method}--> solve-methods.Rd %% Group methods --------- FIXME: These are not tested yet (or documented) \alias{Arith,logical,dgCMatrix-method} \alias{Arith,numeric,dgCMatrix-method} \alias{Arith,dgCMatrix,logical-method} \alias{Arith,dgCMatrix,numeric-method} \alias{Arith,dgCMatrix,dgCMatrix-method} %\alias{Math2,dgCMatrix,numeric-method} \alias{Math,dgCMatrix-method} % for silly reasons, need these 2+3 as well: \alias{round,dgCMatrix,numeric-method} \alias{signif,dgCMatrix,numeric-method} \alias{log,dgCMatrix-method} \alias{gamma,dgCMatrix-method} \alias{lgamma,dgCMatrix-method} % \description{The \code{dgCMatrix} class is a class of sparse numeric matrices in the compressed, sparse, column-oriented format. In this implementation the non-zero elements in the columns are sorted into increasing row order. \code{dgCMatrix} is the \emph{\dQuote{standard}} class for sparse numeric matrices in the \pkg{Matrix} package. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dgCMatrix", ...)}, more typically via \code{as(*, "CsparseMatrix")} or similar. Often however, more easily via \code{\link{Matrix}(*, sparse = TRUE)}, or most efficiently via \code{\link{sparseMatrix}()}. } \section{Slots}{ \describe{ \item{\code{x}:}{Object of class \code{"numeric"} - the non-zero elements of the matrix.} \item{\dots}{all other slots are inherited from the superclass \code{"\linkS4class{CsparseMatrix}"}. } } } \section{Methods}{ Matrix products (e.g., \link{crossprod-methods}), and (among other) \describe{ \item{coerce}{\code{signature(from = "matrix", to = "dgCMatrix")}} \item{coerce}{\code{signature(from = "dgCMatrix", to = "matrix")}} \item{coerce}{\code{signature(from = "dgCMatrix", to = "dgTMatrix")}} \item{diag}{\code{signature(x = "dgCMatrix")}: returns the diagonal of \code{x}} \item{dim}{\code{signature(x = "dgCMatrix")}: returns the dimensions of \code{x}} \item{image}{\code{signature(x = "dgCMatrix")}: plots an image of \code{x} using the \code{\link[lattice]{levelplot}} function} \item{solve}{\code{signature(a = "dgCMatrix", b = "...")}: see \code{\link{solve-methods}}, notably the extra argument \code{sparse}.} \item{lu}{\code{signature(x = "dgCMatrix")}: computes the LU decomposition of a square \code{dgCMatrix} object} } } %\references{} %\author{} %\note{} \seealso{ Classes \code{\linkS4class{dsCMatrix}}, \code{\linkS4class{dtCMatrix}}, \code{\link{lu}} } \examples{ (m <- Matrix(c(0,0,2:0), 3,5)) str(m) m[,1] \dontshow{## regression test: this must give a validity-check error: stopifnot(inherits(try(new("dgCMatrix", i = 0:1, p = 0:2, x = c(2,3), Dim = 3:4)), "try-error")) } } \keyword{classes} \keyword{algebra} Matrix/man/Schur.Rd0000644000176200001440000000656112271746775013676 0ustar liggesusers\name{Schur} \title{Schur Decomposition of a Matrix} \usage{ Schur(x, vectors, \dots) } \alias{Schur} \alias{Schur,dgeMatrix,logical-method} \alias{Schur,dgeMatrix,missing-method} \alias{Schur,diagonalMatrix,logical-method} \alias{Schur,diagonalMatrix,missing-method} \alias{Schur,triangularMatrix,logical-method} \alias{Schur,triangularMatrix,missing-method} \alias{Schur,dsyMatrix,ANY-method} \alias{Schur,generalMatrix,logical-method} \alias{Schur,generalMatrix,missing-method} \alias{Schur,symmetricMatrix,logical-method} \alias{Schur,symmetricMatrix,missing-method} % \alias{Schur,matrix,logical-method} \alias{Schur,matrix,missing-method} \description{ Computes the Schur decomposition and eigenvalues of a square matrix; see the BACKGROUND information below. } \arguments{ \item{x}{ numeric %(or complex, in future) square Matrix (inheriting from class \code{"Matrix"}) or traditional \code{\link{matrix}}. Missing values (NAs) are not allowed. } \item{vectors}{logical. When \code{TRUE} (the default), the Schur vectors are computed, and the result is a proper \code{\linkS4class{MatrixFactorization}} of class \code{\linkS4class{Schur}}. } \item{\dots}{further arguments passed to or from other methods.} } \value{ If \code{vectors} are \code{TRUE}, as per default: If \code{x} is a \code{\linkS4class{Matrix}} an object of class \code{\linkS4class{Schur}}, otherwise, for a traditional \code{\link{matrix}} \code{x}, a \code{\link{list}} with components \code{T}, \code{Q}, and \code{EValues}. If \code{vectors} are \code{FALSE}, a list with components \item{T}{the upper quasi-triangular (square) matrix of the Schur decomposition.} \item{EValues}{the vector of \code{\link{numeric}} or \code{\link{complex}} eigen values of \eqn{T} or \eqn{A}.} } \details{ Based on the Lapack subroutine \code{dgees}. } \section{BACKGROUND}{ If \code{A} is a square matrix, then \code{A = Q T t(Q)}, where \code{Q} is orthogonal, and \code{T} is upper block-triangular (nearly triangular with either 1 by 1 or 2 by 2 blocks on the diagonal) where the 2 by 2 blocks correspond to (non-real) complex eigenvalues. The eigenvalues of \code{A} are the same as those of \code{T}, which are easy to compute. The Schur form is used most often for computing non-symmetric eigenvalue decompositions, and for computing functions of matrices such as matrix exponentials. } \references{ Anderson, E., et al. (1994). \emph{LAPACK User's Guide,} 2nd edition, SIAM, Philadelphia. } \examples{ Schur(Hilbert(9)) # Schur factorization (real eigenvalues) (A <- Matrix(round(rnorm(5*5, sd = 100)), nrow = 5)) (Sch.A <- Schur(A)) eTA <- eigen(Sch.A@T) str(SchA <- Schur(A, vectors=FALSE))# no 'T' ==> simple list stopifnot(all.equal(eTA$values, eigen(A)$values, tolerance = 1e-13), all.equal(eTA$values, local({z <- Sch.A@EValues z[order(Mod(z), decreasing=TRUE)]}), tolerance = 1e-13), identical(SchA$T, Sch.A@T), identical(SchA$EValues, Sch.A@EValues)) ## For the faint of heart, we provide Schur() also for traditional matrices: a.m <- function(M) unname(as(M, "matrix")) a <- a.m(A) Sch.a <- Schur(a) stopifnot(identical(Sch.a, list(Q = a.m(Sch.A @ Q), T = a.m(Sch.A @ T), EValues = Sch.A@EValues)), all.equal(a, with(Sch.a, Q \%*\% T \%*\% t(Q))) ) } \keyword{algebra} Matrix/man/condest.Rd0000644000176200001440000001003212322330663014213 0ustar liggesusers\name{condest} \alias{condest} \alias{onenormest} \title{Compute Approximate CONDition number and 1-Norm of (Large) Matrices} \description{ \dQuote{Estimate}, i.e. compute approximately the CONDition number of a (potentially large, often sparse) matrix \code{A}. It works by apply a fast \emph{randomized} approximation of the 1-norm, \code{norm(A,"1")}, through \code{onenormest(.)}. } \usage{ condest(A, t = min(n, 5), normA = norm(A, "1"), silent = FALSE, quiet = TRUE) onenormest(A, t = min(n, 5), A.x, At.x, n, silent = FALSE, quiet = silent, iter.max = 10, eps = 4 * .Machine$double.eps) } \arguments{ \item{A}{a square matrix, optional for \code{onenormest()}, where instead of \code{A}, \code{A.x} and \code{At.x} can be specified, see there.} \item{t}{number of columns to use in the iterations.} \item{normA}{number; (an estimate of) the 1-norm of \code{A}, by default \code{\link{norm}(A, "1")}; may be replaced by an estimate.} \item{silent}{logical indicating if warning and (by default) convergence messages should be displayed.} \item{quiet}{logical indicating if convergence messages should be displayed.} \item{A.x, At.x}{when \code{A} is missing, these two must be given as functions which compute \code{A \%\% x}, or \code{t(A) \%\% x}, respectively.} \item{n}{\code{ == nrow(A)}, only needed when \code{A} is not specified.} \item{iter.max}{maximal number of iterations for the 1-norm estimator.} \item{eps}{the relative change that is deemed irrelevant.} } \details{ \code{\link{condest}()} calls \code{\link{lu}(A)}, and subsequently \code{onenormest(A.x = , At.x = )} to compute an approximate norm of the \emph{inverse} of \code{A}, \eqn{A^{-1}}, in a way which keeps using sparse matrices efficiently when \code{A} is sparse. Note that \code{onenormest()} uses random vectors and hence \emph{both} functions' results are random, i.e., depend on the random seed, see, e.g., \code{\link{set.seed}()}. } \value{Both functions return a \code{\link{list}}; \code{condest()} with components, \item{est}{a number \eqn{> 0}, the estimated (1-norm) condition number \eqn{\hat\kappa}{k.}; when \eqn{r :=}\code{rcond(A)}, \eqn{1/\hat\kappa \approx r}{1/k. ~= r}.} \item{v}{the maximal \eqn{A x} column, scaled to norm(v) = 1. Consequently, \eqn{norm(A v) = norm(A) / est}; when \code{est} is large, \code{v} is an approximate null vector.} The function \code{onenormest()} returns a list with components, \item{est}{a number \eqn{> 0}, the estimated \code{norm(A, "1")}.} \item{v}{0-1 integer vector length \code{n}, with an \code{1} at the index \code{j} with maximal column \code{A[,j]} in \eqn{A}.} \item{w}{numeric vector, the largest \eqn{A x} found.} \item{iter}{the number of iterations used.} } \references{ %% See also Tim Davis(2006, p.96): Nicholas J. Higham and Françoise Tisseur (2000). A Block Algorithm for Matrix 1-Norm Estimation, with an Application to 1-Norm Pseudospectra. \emph{SIAM J. Matrix Anal. Appl.} \bold{21}, 4, 1185--1201. \url{http://dx.doi.org/10.1137/S0895479899356080} %% and \url{http://citeseer.ist.psu.edu/223007.html} William W. Hager (1984). Condition Estimates. \emph{SIAM J. Sci. Stat. Comput.} \bold{5}, 311--316. } \author{This is based on octave's \code{condest()} and \code{onenormest()} implementations with original author Jason Riedy, U Berkeley; translation to \R and adaption by Martin Maechler. } \seealso{ \code{\link{norm}}, \code{\link{rcond}}. } \examples{ data(KNex) mtm <- with(KNex, crossprod(mm)) system.time(ce <- condest(mtm)) sum(abs(ce$v)) ## || v ||_1 == 1 ## Prove that || A v || = || A || / est (as ||v|| = 1): stopifnot(all.equal(norm(mtm \%*\% ce$v), norm(mtm) / ce$est)) ## reciprocal 1 / ce$est system.time(rc <- rcond(mtm)) # takes ca 3 x longer rc all.equal(rc, 1/ce$est) # TRUE -- the approxmation was good one <- onenormest(mtm) str(one) ## est = 12.3 ## the maximal column: which(one$v == 1) # mostly 4, rarely 1, depending on random seed } Matrix/man/SparseM-conv.Rd0000644000176200001440000000474012764547531015120 0ustar liggesusers\name{SparseM-conversions} %% only as long as not requiring R >= 3.2.0: \newcommand{\CRANpkg}{\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}} \title{Sparse Matrix Coercion from and to those from package \pkg{SparseM}} \docType{methods} \alias{SparseM-coerce-methods} % \alias{coerce,matrix.coo,CsparseMatrix-method} \alias{coerce,matrix.coo,TsparseMatrix-method} \alias{coerce,matrix.csc,CsparseMatrix-method} \alias{coerce,matrix.csc,TsparseMatrix-method} \alias{coerce,matrix.csr,CsparseMatrix-method} \alias{coerce,matrix.csr,RsparseMatrix-method} \alias{coerce,matrix.csr,TsparseMatrix-method} % \alias{coerce,CsparseMatrix,matrix.csr-method} \alias{coerce,CsparseMatrix,matrix.coo-method} \alias{coerce,CsparseMatrix,matrix.csc-method} \alias{coerce,dsparseMatrix,matrix.csr-method} \alias{coerce,dgRMatrix,matrix.csr-method} \alias{coerce,dgCMatrix,matrix.csc-method} \alias{coerce,dgTMatrix,matrix.coo-method} \alias{coerce,matrix.csr,dgRMatrix-method} \alias{coerce,matrix.csc,dgCMatrix-method} \alias{coerce,matrix.coo,dgTMatrix-method} \alias{coerce,matrix.csr,dgCMatrix-method} \alias{coerce,matrix.coo,dgCMatrix-method} % \alias{coerce,matrix.csr,Matrix-method} \alias{coerce,matrix.coo,Matrix-method} \alias{coerce,matrix.csc,Matrix-method} % \description{ Methods for coercion from and to sparse matrices from package \pkg{SparseM} are provided here, for ease of porting functionality to the \pkg{Matrix} package, and comparing functionality of the two packages. All these work via the usual \code{\link{as}(., "")} coercion, \preformatted{ as(from, Class) }%pre } \section{Methods}{ \describe{ \item{from = "matrix.csr", to = "dgRMatrix"}{ ... } \item{from = "matrix.csc", to = "dgCMatrix"}{ ... } \item{from = "matrix.coo", to = "dgTMatrix"}{ ... } \item{from = "dgRMatrix", to = "matrix.csr"}{ ... } \item{from = "dgCMatrix", to = "matrix.csc"}{ ... } \item{from = "dgTMatrix", to = "matrix.coo"}{ ... } \item{from = "sparseMatrix", to = "matrix.csr"}{ ... } \item{from = "matrix.csr", to = "dgCMatrix"}{ ... } \item{from = "matrix.coo", to = "dgCMatrix"}{ ... } \item{from = "matrix.csr", to = "Matrix"}{ ... } \item{from = "matrix.csc", to = "Matrix"}{ ... } \item{from = "matrix.coo", to = "Matrix"}{ ... } } } \seealso{ The documentation in CRAN package \CRANpkg{SparseM}, such as \code{\link[SparseM]{SparseM.ontology}}, and one important class, \code{\link[SparseM:matrix.csr-class]{matrix.csr}}. } \keyword{methods} Matrix/man/qr-methods.Rd0000644000176200001440000001076213146601633014654 0ustar liggesusers\name{qr-methods} \title{QR Decomposition -- S4 Methods and Generic} \docType{methods} \alias{qr} \alias{qrR} \alias{qr-methods} \alias{qr,dgCMatrix-method} \alias{qr,sparseMatrix-method} \alias{qr,ddenseMatrix-method}% only if(.Matrix.avoiding.as.matrix) \alias{qr,denseMatrix-method}% only if(.Matrix.avoiding.as.matrix) \description{ The \pkg{Matrix} package provides methods for the QR decomposition of special classes of matrices. There is a generic function which uses \code{\link[base]{qr}} as default, but methods defined in this package can take extra arguments. In particular there is an option for determining a fill-reducing permutation of the columns of a sparse, rectangular matrix. } \usage{ qr(x, \dots) qrR(qr, complete=FALSE, backPermute=TRUE, row.names = TRUE) } \arguments{ \item{x}{a numeric or complex matrix whose QR decomposition is to be computed. Logical matrices are coerced to numeric.} \item{qr}{a QR decomposition of the type computed by \code{qr}.} \item{complete}{logical indicating whether the \eqn{\bold{R}} matrix is to be completed by binding zero-value rows beneath the square upper triangle.} \item{backPermute}{logical indicating if the rows of the \eqn{\bold{R}} matrix should be back permuted such that \code{qrR()}'s result can be used directly to reconstruct the original matrix \eqn{\bold{X}}.} \item{row.names}{logical indicating if \code{\link{rownames}} should propagated to the result.} \item{\dots}{further arguments passed to or from other methods} } \section{Methods}{ \describe{ \item{x = "dgCMatrix"}{QR decomposition of a general sparse double-precision matrix with \code{nrow(x) >= ncol(x)}. Returns an object of class \code{"\linkS4class{sparseQR}"}.} \item{x = "sparseMatrix"}{works via \code{"dgCMatrix"}.} } } \seealso{\code{\link[base]{qr}}; then, the class documentations, mainly \code{\linkS4class{sparseQR}}, and also \code{\linkS4class{dgCMatrix}}. } \examples{ %% FIXME: Currently mixing example + regression tests <--> ../tests/factorizing.R ##------------- example of pivoting -- from base' qraux.Rd ------------- X <- cbind(int = 1, b1=rep(1:0, each=3), b2=rep(0:1, each=3), c1=rep(c(1,0,0), 2), c2=rep(c(0,1,0), 2), c3=rep(c(0,0,1),2)) rownames(X) <- paste0("r", seq_len(nrow(X))) dnX <- dimnames(X) bX <- X # [b]ase version of X X <- as(bX, "sparseMatrix") X # is singular, columns "b2" and "c3" are "extra" stopifnot(identical(dimnames(X), dnX))# some versions changed X's dimnames! c(rankMatrix(X)) # = 4 (not 6) m <- function(.) as(., "matrix") ##----- regular case ------------------------------------------ Xr <- X[ , -c(3,6)] # the "regular" (non-singular) version of X stopifnot(rankMatrix(Xr) == ncol(Xr)) Y <- cbind(y <- setNames(1:6, paste0("y", 1:6))) ## regular case: qXr <- qr( Xr) qxr <- qr(m(Xr)) qxrLA <- qr(m(Xr), LAPACK=TRUE) # => qr.fitted(), qr.resid() not supported qcfXy <- qr.coef (qXr, y) # vector qcfXY <- qr.coef (qXr, Y) # 4x1 dgeMatrix cf <- c(int=6, b1=-3, c1=-2, c2=-1) stopifnot( all.equal(qr.coef(qxr, y), cf, tol=1e-15) , getRversion() <= "3.4.1" || all.equal(qr.coef(qxrLA,y), cf, tol=1e-15) , all.equal(qr.coef(qxr, Y), m(cf), tol=1e-15) , all.equal( qcfXy, cf, tol=1e-15) , all.equal(m(qcfXY), m(cf), tol=1e-15) , all.equal(y, qr.fitted(qxr, y), tol=2e-15) , all.equal(y, qr.fitted(qXr, y), tol=2e-15) , all.equal(m(qr.fitted(qXr, Y)), qr.fitted(qxr, Y), tol=1e-15) , all.equal( qr.resid (qXr, y), qr.resid (qxr, y), tol=1e-15) , all.equal(m(qr.resid (qXr, Y)), qr.resid (qxr, Y), tol=1e-15) ) ##----- rank-deficient ("singular") case ------------------------------------ (qX <- qr( X)) # both @p and @q are non-trivial permutations qx <- qr(m(X)) ; str(qx) # $pivot is non-trivial, too drop0(R. <- qr.R(qX), tol=1e-15) # columns *permuted*: c3 b1 .. Q. <- qr.Q(qX) qI <- sort.list(qX@q) # the inverse 'q' permutation (X. <- drop0(Q. \%*\% R.[, qI], tol=1e-15))## just = X, incl. correct colnames stopifnot(all(X - X.) < 8*.Machine$double.eps, ## qrR(.) returns R already "back permuted" (as with qI): identical(R.[, qI], qrR(qX)) ) ## ## In this sense, classical qr.coef() is fine: cfqx <- qr.coef(qx, y) # quite different from nna <- !is.na(cfqx) stopifnot(all.equal(unname(qr.fitted(qx,y)), as.numeric(X[,nna] \%*\% cfqx[nna]))) ## FIXME: do these make *any* sense? --- should give warnings ! qr.coef(qX, y) qr.coef(qX, Y) rm(m) } \keyword{methods} \keyword{algebra} \keyword{array} Matrix/man/ddiMatrix-class.Rd0000644000176200001440000000346311140343613015612 0ustar liggesusers\name{ddiMatrix-class} \title{Class "ddiMatrix" of Diagonal Numeric Matrices} \docType{class} \alias{ddiMatrix-class} %%----> put all methods into ./diagonalMatrix-class.Rd % \description{The class \code{"ddiMatrix"} of numerical diagonal matrices. %% FIXME add more Note that diagonal matrices now extend \emph{\code{sparseMatrix}}, whereas they did extend dense matrices earlier.% up to early summer 2008. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("ddiMatrix", ...)} but typically rather via \code{\link{Diagonal}}. } \section{Slots}{ \describe{ \item{\code{x}:}{numeric vector. For an \eqn{n \times n}{n * n} matrix, the \code{x} slot is of length \eqn{n} or \code{0}, depending on the \code{diag} slot:} \item{\code{diag}:}{\code{"character"} string, either \code{"U"} or \code{"N"} where \code{"U"} denotes unit-diagonal, i.e., identity matrices.} \item{\code{Dim},\code{Dimnames}:}{matrix dimension and \code{\link{dimnames}}, see the \code{\linkS4class{Matrix}} class description.} } } \section{Extends}{ Class \code{"\linkS4class{diagonalMatrix}"}, directly. Class \code{"\linkS4class{dMatrix}"}, directly. Class \code{"\linkS4class{sparseMatrix}"}, indirectly, see \code{\link{showClass}("ddiMatrix")}. } \section{Methods}{ \describe{ \item{\%*\%}{\code{signature(x = "ddiMatrix", y = "ddiMatrix")}: ... } } } \seealso{ Class \code{\linkS4class{diagonalMatrix}} and function \code{\link{Diagonal}}. } \examples{ (d2 <- Diagonal(x = c(10,1))) str(d2) ## slightly larger in internal size: str(as(d2, "sparseMatrix")) M <- Matrix(cbind(1,2:4)) M \%*\% d2 #> `fast' multiplication chol(d2) # trivial stopifnot(is(cd2 <- chol(d2), "ddiMatrix"), all.equal(cd2@x, c(sqrt(10),1))) } \keyword{classes} Matrix/man/RsparseMatrix-class.Rd0000644000176200001440000000514411006011151016455 0ustar liggesusers\name{RsparseMatrix-class} \docType{class} \alias{RsparseMatrix-class} % \alias{coerce,RsparseMatrix,CsparseMatrix-method} \alias{coerce,RsparseMatrix,TsparseMatrix-method} \alias{coerce,RsparseMatrix,denseMatrix-method} \alias{coerce,RsparseMatrix,dgeMatrix-method} \alias{coerce,RsparseMatrix,generalMatrix-method} \alias{coerce,RsparseMatrix,matrix-method} \alias{coerce,RsparseMatrix,dsparseMatrix-method} \alias{coerce,RsparseMatrix,lsparseMatrix-method} \alias{coerce,RsparseMatrix,nsparseMatrix-method} \alias{coerce,RsparseMatrix,dMatrix-method} \alias{coerce,RsparseMatrix,lMatrix-method} \alias{coerce,RsparseMatrix,nMatrix-method} \alias{coerce,matrix,RsparseMatrix-method} \alias{coerce,denseMatrix,RsparseMatrix-method} \alias{coerce,sparseMatrix,RsparseMatrix-method} % all other ..RMatrix coercions -- here as well for now -- \alias{coerce,matrix,dgRMatrix-method} % \alias{t,RsparseMatrix-method} % \title{Class "RsparseMatrix" of Sparse Matrices in Column-compressed Form} \description{The \code{"RsparseMatrix"} class is the virtual class of all sparse matrices coded in sorted compressed row-oriented form. Since it is a virtual class, no objects may be created from it. See \code{showClass("RsparseMatrix")} for its subclasses. } \section{Slots}{ \describe{ \item{\code{j}:}{Object of class \code{"integer"} of length \code{nnzero} (number of non-zero elements). These are the row numbers for each non-zero element in the matrix.} \item{\code{p}:}{Object of class \code{"integer"} of pointers, one for each row, to the initial (zero-based) index of elements in the row.} \item{\code{Dim}, \code{Dimnames}:}{inherited from the superclass, see \code{\linkS4class{sparseMatrix}}.} } } \section{Extends}{ Class \code{"sparseMatrix"}, directly. Class \code{"Matrix"}, by class \code{"sparseMatrix"}. } \section{Methods}{ Only \bold{few} methods are defined currently on purpose, since we rather use the \code{\linkS4class{CsparseMatrix}} in \pkg{Matrix}. Recently, more methods were added but \emph{beware} that these typically do \emph{not} return \code{"RsparseMatrix"} results, but rather Csparse* or Tsparse* ones. \describe{ \item{t}{\code{signature(x = "RsparseMatrix")}: ... } \item{coerce}{\code{signature(from = "RsparseMatrix", to = "CsparseMatrix")}: ... } \item{coerce}{\code{signature(from = "RsparseMatrix", to = "TsparseMatrix")}: ... } } } \seealso{ its superclass, \code{\linkS4class{sparseMatrix}}, and, e.g., class \code{\linkS4class{dgRMatrix}} for the links to other classes. } \examples{ showClass("RsparseMatrix") } \keyword{classes} Matrix/man/uniqTsparse.Rd0000644000176200001440000000630313015274275015106 0ustar liggesusers\name{uniqTsparse} \title{Unique (Sorted) TsparseMatrix Representations} \alias{uniqTsparse} \alias{anyDuplicatedT} \description{ Detect or \dQuote{unify} (or \dQuote{standardize}) non-unique \code{\linkS4class{TsparseMatrix}} matrices, prducing unique \eqn{(i,j,x)} triplets which are \emph{sorted}, first in \eqn{j}, then in \eqn{i} (in the sense of \code{\link{order}(j,i)}). Note that \code{new(.)}, \code{\link{spMatrix}} or \code{\link{sparseMatrix}} constructors for \code{"dgTMatrix"} (and other \code{"\linkS4class{TsparseMatrix}"} classes) implicitly add \eqn{x_k}'s that belong to identical \eqn{(i_k, j_k)} pairs. \code{anyDuplicatedT()} reports the index of the first duplicated pair, or \code{0} if there is none. \code{uniqTsparse(x)} replaces duplicated index pairs \eqn{(i,j)} and their corresponding \code{x} slot entries by the triple \eqn{(i,j, sx)} where \code{sx = sum(x [])}, and for logical \code{x}, addition is replaced by logical \eqn{or}. } \usage{ uniqTsparse(x, class.x = c(class(x))) anyDuplicatedT(x, di = dim(x)) } \arguments{ \item{x}{a sparse matrix stored in triplet form, i.e., inheriting from class \code{\linkS4class{TsparseMatrix}}.} \item{class.x}{optional character string specifying \code{class(x)}.} \item{di}{the matrix dimension of \code{x}, \code{\link{dim}(x)}.} } %% \details{ %% } \value{ \code{uniqTsparse(x)} returns a \code{\linkS4class{TsparseMatrix}} \dQuote{like x}, of the same class and with the same elements, just internally possibly changed to \dQuote{unique} \eqn{(i,j,x)} triplets in \emph{sorted} order. \code{anyDuplicatedT(x)} returns an \code{\link{integer}} as \code{\link{anyDuplicated}}, the \emph{index} of the first duplicated entry (from the \eqn{(i,j)} pairs) if there is one, and \code{0} otherwise. } \seealso{ \code{\linkS4class{TsparseMatrix}}, for uniqueness, notably \code{\linkS4class{dgTMatrix}}. } \examples{ example("dgTMatrix-class", echo=FALSE) ## -> 'T2' with (i,j,x) slots of length 5 each T2u <- uniqTsparse(T2) stopifnot(## They "are" the same (and print the same): all.equal(T2, T2u, tol=0), ## but not internally: anyDuplicatedT(T2) == 2, anyDuplicatedT(T2u) == 0, length(T2 @x) == 5, length(T2u@x) == 3) ## is 'x' a "uniq Tsparse" Matrix ? [requires x to be TsparseMatrix!] non_uniqT <- function(x, di = dim(x)) is.unsorted(x@j) || anyDuplicatedT(x, di) non_uniqT(T2 ) # TRUE non_uniqT(T2u) # FALSE T3 <- T2u T3[1, c(1,3)] <- 10; T3[2, c(1,5)] <- 20 T3u <- uniqTsparse(T3) str(T3u) # sorted in 'j', and within j, sorted in i stopifnot(!non_uniqT(T3u)) ## Logical l.TMatrix and n.TMatrix : (L2 <- T2 > 0) validObject(L2u <- uniqTsparse(L2)) (N2 <- as(L2, "nMatrix")) validObject(N2u <- uniqTsparse(N2)) stopifnot(N2u@i == L2u@i, L2u@i == T2u@i, N2@i == L2@i, L2@i == T2@i, N2u@j == L2u@j, L2u@j == T2u@j, N2@j == L2@j, L2@j == T2@j) # now with a nasty NA [partly failed in Matrix 1.1-5]: L2.N <- L2; L2.N@x[2] <- NA; L2.N validObject(L2.N) (m2N <- as.matrix(L2.N)) # looks "ok" iL <- as.integer(m2N) stopifnot(identical(10L, which(is.na(match(iL, 0:1))))) symnum(m2N) } \keyword{utilities} \keyword{classes} Matrix/man/generalMatrix-class.Rd0000644000176200001440000000206010435070553016465 0ustar liggesusers\name{generalMatrix-class} \docType{class} \alias{generalMatrix-class} \title{Class "generalMatrix" of General Matrices} \description{ Virtual class of \dQuote{general} matrices; i.e., matrices that do not have a known property such as symmetric, triangular, or diagonal. } \section{Objects from the Class}{A virtual Class: No objects may be created from it.} \section{Slots}{ \describe{ \item{\code{factors}}{,} \item{\code{Dim}}{,} \item{\code{Dimnames}:}{all slots inherited from \code{\linkS4class{compMatrix}}; see its description.} } } \section{Extends}{ Class \code{"compMatrix"}, directly. Class \code{"Matrix"}, by class \code{"compMatrix"}. } % \section{Methods}{ % No methods defined with class "generalMatrix" in the signature. % } \seealso{ Classes \code{\linkS4class{compMatrix}}, and the non-general virtual classes: \code{\linkS4class{symmetricMatrix}}, \code{\linkS4class{triangularMatrix}}, \code{\linkS4class{diagonalMatrix}}. } % \examples{ % ##---- Should be DIRECTLY executable !! ---- % } \keyword{classes} Matrix/man/CHMfactor-class.Rd0000644000176200001440000002332512322331041015465 0ustar liggesusers\name{CHMfactor-class} \title{CHOLMOD-based Cholesky Factorizations} \docType{class} \alias{CHMfactor-class}% "mother" virtual \alias{CHMsimpl-class}% virtual \alias{CHMsuper-class}% virtual \alias{dCHMsimpl-class} \alias{nCHMsimpl-class} \alias{dCHMsuper-class} \alias{nCHMsuper-class} \alias{isLDL} % \alias{coerce,CHMfactor,Matrix-method} \alias{coerce,CHMfactor,sparseMatrix-method} \alias{coerce,CHMfactor,triangularMatrix-method} \alias{coerce,CHMfactor,pMatrix-method} \alias{expand,CHMfactor-method} %\alias{solve,CHMfactor,...}%--> solve-methods.Rd \alias{determinant,CHMfactor,missing-method} \alias{determinant,CHMfactor,logical-method} \alias{update,CHMfactor-method} \alias{.updateCHMfactor} % \description{The virtual class \code{"CHMfactor"} is a class of CHOLMOD-based Cholesky factorizations of symmetric, sparse, compressed, column-oriented matrices. Such a factorization is simplicial (virtual class \code{"CHMsimpl"}) or supernodal (virtual class \code{"CHMsuper"}). Objects that inherit from these classes are either numeric factorizations (classes \code{"dCHMsimpl"} and \code{"dCHMsuper"}) or symbolic factorizations (classes \code{"nCHMsimpl"} and \code{"nCHMsuper"}). } \usage{% want usage for the update method which has "surprising arguments" isLDL(x) \S4method{update}{CHMfactor}(object, parent, mult = 0, \dots) .updateCHMfactor(object, parent, mult)% otherwise don't mention; for experts ## and many more methods, notably, ## solve(a, b, system = c("A","LDLt","LD","DLt","L","Lt","D","P","Pt"), ...) ## ----- see below } \arguments{ \item{x,object,a}{a \code{"CHMfactor"} object (almost always the result of \code{\link{Cholesky}()}).} \item{parent}{a \code{"\linkS4class{dsCMatrix}"} or \code{"\linkS4class{dgCMatrix}"} matrix object with the same nonzero pattern as the matrix that generated \code{object}. If \code{parent} is symmetric, of class \code{"\linkS4class{dsCMatrix}"}, then \code{object} should be a decomposition of a matrix with the same nonzero pattern as \code{parent}. If \code{parent} is not symmetric then \code{object} should be the decomposition of a matrix with the same nonzero pattern as \code{tcrossprod(parent)}. Since Matrix version 1.0-8, other \code{"\linkS4class{sparseMatrix}"} matrices are coerced to \code{\linkS4class{dsparseMatrix}} and \code{\linkS4class{CsparseMatrix}} if needed.} \item{mult}{a numeric scalar (default 0). \code{mult} times the identity matrix is (implicitly) added to \code{parent} or \code{tcrossprod(parent)} before updating the decomposition \code{object}.} \item{\dots}{potentially further arguments to the methods.} } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dCHMsuper", ...)} but are more commonly created via \code{\link{Cholesky}()}, applied to \code{\linkS4class{dsCMatrix}} or \code{\linkS4class{lsCMatrix}} objects. For an introduction, it may be helpful to look at the \code{expand()} method and examples below. } \section{Slots}{ of \code{"CHMfactor"} and all classes inheriting from it: \describe{ \item{\code{perm}:}{An integer vector giving the 0-based permutation of the rows and columns chosen to reduce fill-in and for post-ordering.} \item{\code{colcount}:}{Object of class \code{"integer"} .... }%% FIXME \item{\code{type}:}{Object of class \code{"integer"} .... } } Slots of the non virtual classes \dQuote{[dl]CHM(super|simpl)}: \describe{ \item{\code{p}:}{Object of class \code{"integer"} of pointers, one for each column, to the initial (zero-based) index of elements in the column. Only present in classes that contain \code{"CHMsimpl"}.} \item{\code{i}:}{Object of class \code{"integer"} of length nnzero (number of non-zero elements). These are the row numbers for each non-zero element in the matrix. Only present in classes that contain \code{"CHMsimpl"}.} \item{\code{x}:}{For the \code{"d*"} classes: \code{"numeric"} - the non-zero elements of the matrix.} } } \section{Methods}{ \describe{ \item{isLDL}{\code{(x)} returns a \code{\link{logical}} indicating if \code{x} is an \eqn{LDL'} decomposition or (when \code{FALSE}) an \eqn{LL'} one.} \item{coerce}{\code{signature(from = "CHMfactor", to = "sparseMatrix")} (or equivalently, \code{to = "Matrix"} or \code{to = "triangularMatrix"}) \code{as(*, "sparseMatrix")} returns the lower triangular factor \eqn{L} from the \eqn{LL'} form of the Cholesky factorization. Note that (currently) the factor from the \eqn{LL'} form is always returned, even if the \code{"CHMfactor"} object represents an \eqn{LDL'} decomposition. Furthermore, this is the factor after any fill-reducing permutation has been applied. See the \code{expand} method for obtaining both the permutation matrix, \eqn{P}, and the lower Cholesky factor, \eqn{L}.} \item{coerce}{\code{signature(from = "CHMfactor", to = "pMatrix")} returns the permutation matrix \eqn{P}, representing the fill-reducing permutation used in the decomposition.} \item{expand}{\code{signature(x = "CHMfactor")} returns a list with components \code{P}, the matrix representing the fill-reducing permutation, and \code{L}, the lower triangular Cholesky factor. The original positive-definite matrix \eqn{A} corresponds to the product \eqn{A = P'LL'P}. Because of fill-in during the decomposition the product may apparently have more non-zeros than the original matrix, even after applying \code{\link{drop0}} to it. However, the extra "non-zeros" should be very small in magnitude.} \item{image}{\code{signature(x = "CHMfactor"):} Plot the image of the lower triangular factor, \eqn{L}, from the decomposition. This method is equivalent to \code{image(as(x, "sparseMatrix"))} so the comments in the above description of the \code{coerce} method apply here too.} \item{solve}{\code{signature(a = "CHMfactor", b = "ddenseMatrix"), system= *}: %% This is copy-paste from solve-methods.Rd {FIXME ?} The \code{solve} methods for a \code{"CHMfactor"} object take an optional third argument \code{system} whose value can be one of the character strings \code{"A"}, \code{"LDLt"}, \code{"LD"}, \code{"DLt"}, \code{"L"}, \code{"Lt"}, \code{"D"}, \code{"P"} or \code{"Pt"}. This argument describes the system to be solved. The default, \code{"A"}, is to solve \eqn{Ax = b} for \eqn{x} where \code{A} is the sparse, positive-definite matrix that was factored to produce \code{a}. Analogously, \code{system = "L"} returns the solution \eqn{x}, of \eqn{Lx = b}. Similarly, for all system codes \bold{but} \code{"P"} and \code{"Pt"} where, e.g., \code{x <- solve(a, b, system="P")} is equivalent to \code{x <- P \%*\% b}. See also \code{\link{solve-methods}}. } \item{determinant}{\code{signature(x = "CHMfactor", logarithm = "logical")} returns the determinant (or the logarithm of the determinant, if \code{logarithm = TRUE}, the default) of the factor \eqn{L} from the \eqn{LL'} decomposition (even if the decomposition represented by \code{x} is of the \eqn{LDL'} form (!)). This is the square root of the determinant (half the logarithm of the determinant when \code{logarithm = TRUE}) of the positive-definite matrix that was decomposed.} %% since 0.999375-8 (2008-03-25): \item{update}{\code{signature(object = "CHMfactor"), parent}. The \code{\link{update}} method requires an additional argument \code{parent}, which is \emph{either} a \code{"\linkS4class{dsCMatrix}"} object, say \eqn{A}, (with the same structure of nonzeros as the matrix that was decomposed to produce \code{object}) or a general \code{"\linkS4class{dgCMatrix}"}, say \eqn{M}, where \eqn{A := M M'} (\code{== tcrossprod(parent)}) is used for \eqn{A}. Further it provides an optional argument \code{mult}, a numeric scalar. This method updates the numeric values in \code{object} to the decomposition of \eqn{A+mI} where \eqn{A} is the matrix above (either the \code{parent} or \eqn{M M'}) and \eqn{m} is the scalar \code{mult}. Because only the numeric values are updated this method should be faster than creating and decomposing \eqn{A+mI}. It is not uncommon to want, say, the determinant of \eqn{A+mI} for many different values of \eqn{m}. This method would be the preferred approach in such cases.} } } %\references{} %\author{} %\note{} \seealso{ \code{\link{Cholesky}}, also for examples; class \code{\linkS4class{dgCMatrix}}. } \examples{% most are in ./Cholesky.Rd ## An example for the expand() method n <- 1000; m <- 200; nnz <- 2000 set.seed(1) M1 <- spMatrix(n, m, i = sample(n, nnz, replace = TRUE), j = sample(m, nnz, replace = TRUE), x = round(rnorm(nnz),1)) XX <- crossprod(M1) ## = M1'M1 = M M' where M <- t(M1) CX <- Cholesky(XX) isLDL(CX) str(CX) ## a "dCHMsimpl" object r <- expand(CX) L.P <- with(r, crossprod(L,P)) ## == L'P PLLP <- crossprod(L.P) ## == (L'P)' L'P == P'LL'P = XX = M M' b <- sample(m) stopifnot(all.equal(PLLP, XX), % not needed: factorsCheck is off: check.attributes=FALSE), all(as.vector(solve(CX, b, system="P" )) == r$P \%*\% b), all(as.vector(solve(CX, b, system="Pt")) == t(r$P) \%*\% b) ) u1 <- update(CX, XX, mult=pi) u2 <- update(CX, t(M1), mult=pi) # with the original M, where XX = M M' stopifnot(all.equal(u1,u2, tol=1e-14)) ## [ See help(Cholesky) for more examples ] ## ------------- } \keyword{classes} \keyword{algebra} Matrix/man/CAex.Rd0000644000176200001440000000232512467733634013421 0ustar liggesusers\name{CAex} \alias{CAex} \docType{data} \title{Albers' example Matrix with "Difficult" Eigen Factorization} \description{ An example of a sparse matrix for which \code{\link{eigen}()} seemed to be difficult, an unscaled version of this has been posted to the web, accompanying an E-mail to R-help (\url{https://stat.ethz.ch/mailman/listinfo/r-help}), by Casper J Albers, Open University, UK. } \usage{data(CAex)} \format{ This is a \eqn{72 \times 72}{72 * 72} symmetric matrix with 216 non-zero entries in five bands, stored as sparse matrix of class \code{\linkS4class{dgCMatrix}}. } \details{ Historical note (2006-03-30): In earlier versions of \R, \code{\link{eigen}(CAex)} fell into an infinite loop whereas \code{\link{eigen}(CAex, EISPACK=TRUE)} had been okay. } % \source{ see above % } \examples{ data(CAex) str(CAex) # of class "dgCMatrix" image(CAex)# -> it's a simple band matrix with 5 bands ## and the eigen values are basically 1 (42 times) and 0 (30 x): zapsmall(ev <- eigen(CAex, only.values=TRUE)$values) ## i.e., the matrix is symmetric, hence sCA <- as(CAex, "symmetricMatrix") ## and stopifnot(class(sCA) == "dsCMatrix", as(sCA, "matrix") == as(CAex, "matrix")) } \keyword{datasets} Matrix/man/image-methods.Rd0000644000176200001440000001407112532424335015311 0ustar liggesusers\name{image-methods} \title{Methods for image() in Package 'Matrix'} \docType{methods} %\alias{image}% <- needed for \usage{.} \alias{image-methods} \alias{image,ANY-method} \alias{image,CHMfactor-method} \alias{image,Matrix-method} \alias{image,dgRMatrix-method} \alias{image,dgCMatrix-method} \alias{image,dgTMatrix-method} \alias{image,dsparseMatrix-method} \alias{image,lsparseMatrix-method} \alias{image,nsparseMatrix-method} \description{ Methods for function \code{\link[graphics]{image}} in package \pkg{Matrix}. An image of a matrix simply color codes all matrix entries and draws the \eqn{n\times m}{n x m} matrix using an \eqn{n\times m}{n x m} grid of (colored) rectangles. The \pkg{Matrix} package \code{image} methods are based on \code{\link[lattice]{levelplot}()} from package \pkg{lattice}; hence these methods return an \dQuote{object} of class \code{"trellis"}, producing a graphic when (auto-) \code{\link{print}()}ed. } \usage{% want \usage{} since we have many "surprising arguments" \S4method{image}{dgTMatrix}(x, xlim = c(1, di[2]), ylim = c(di[1], 1), aspect = "iso", sub = sprintf("Dimensions: \%d x \%d", di[1], di[2]), xlab = "Column", ylab = "Row", cuts = 15, useRaster = FALSE, useAbs = NULL, colorkey = !useAbs, col.regions = NULL, lwd = NULL, \dots) } \arguments{ \item{x}{a Matrix object, i.e., fulfilling \code{\link{is}(x, "Matrix")}.} \item{xlim, ylim}{x- and y-axis limits; may be used to \dQuote{zoom into} matrix. Note that \eqn{x,y} \dQuote{feel reversed}: \code{ylim} is for the rows (= 1st index) and \code{xlim} for the columns (= 2nd index). For convenience, when the limits are integer valued, they are both extended by \code{0.5}; also, \code{ylim} is always used decreasingly.} \item{aspect}{aspect ratio specified as number (y/x) or string; see \code{\link[lattice]{levelplot}}.} \item{sub, xlab, ylab}{axis annotation with sensible defaults; see \code{\link{plot.default}}.} \item{cuts}{number of levels the range of matrix values would be divided into.} \item{useRaster}{logical indicating if raster graphics should be used (instead of the tradition rectangle vector drawing). If true, \code{\link[lattice]{panel.levelplot.raster}} (from \pkg{lattice} package) is used, and the colorkey is also done via rasters, see also \code{\link[lattice]{levelplot}} and possibly \code{\link[grid]{grid.raster}}. Note that using raster graphics may often be faster, but can be slower, depending on the matrix dimensions and the graphics device (dimensions).} \item{useAbs}{logical indicating if \code{\link{abs}(x)} should be shown; if \code{TRUE}, the former (implicit) default, the default \code{col.regions} will be \code{\link{grey}} colors (and no \code{colorkey} drawn). The default is \code{FALSE} unless the matrix has no negative entries.} \item{colorkey}{logical indicating if a color key aka \sQuote{legend} should be produced. Default is to draw one, unless \code{useAbs} is true. You can also specify a \code{\link{list}}, see \code{\link[lattice]{levelplot}}, such as\code{list(raster=TRUE)} in the case of rastering.} \item{col.regions}{vector of gradually varying colors; see \code{\link[lattice]{levelplot}}.} \item{lwd}{(only used when \code{useRaster} is false:) non-negative number or \code{NULL} (default), specifying the line-width of the rectangles of each non-zero matrix entry (drawn by \code{\link[grid]{grid.rect}}). The default depends on the matrix dimension and the device size.} \item{\dots}{further arguments passed to methods and \code{\link[lattice]{levelplot}}, notably \code{at} for specifying (possibly non equidistant) cut values for dividing the matrix values (superseding \code{cuts} above).}% FIXME? example *using* at=.. } \section{Methods}{ All methods currently end up calling the method for the \code{\linkS4class{dgTMatrix}} class. Use \code{showMethods(image)} to list them all. } \value{ as all \pkg{lattice} graphics functions, \code{image()} returns a \code{"trellis"} object, effectively the result of \code{\link[lattice]{levelplot}()}. } \seealso{ \code{\link[lattice]{levelplot}}, and \code{\link[lattice]{print.trellis}} from package \pkg{lattice}. } \examples{ showMethods(image) ## If you want to see all the methods' implementations: showMethods(image, incl=TRUE, inherit=FALSE) data(CAex) image(CAex, main = "image(CAex)") image(CAex, useAbs=TRUE, main = "image(CAex, useAbs=TRUE)") cCA <- Cholesky(crossprod(CAex), Imult = .01) ## See ?print.trellis --- place two image() plots side by side: print(image(cCA, main="Cholesky(crossprod(CAex), Imult = .01)"), split=c(x=1,y=1,nx=2, ny=1), more=TRUE) print(image(cCA, useAbs=TRUE), split=c(x=2,y=1,nx=2,ny=1)) data(USCounties) image(USCounties)# huge image(sign(USCounties))## just the pattern # how the result looks, may depend heavily on # the device, screen resolution, antialiasing etc # e.g. x11(type="Xlib") may show very differently than cairo-based ## Drawing borders around each rectangle; # again, viewing depends very much on the device: image(USCounties[1:400,1:200], lwd=.1) ## Using (xlim,ylim) has advantage : matrix dimension and (col/row) indices: image(USCounties, c(1,200), c(1,400), lwd=.1) image(USCounties, c(1,300), c(1,200), lwd=.5 ) image(USCounties, c(1,300), c(1,200), lwd=.01) if(doExtras <- interactive() || nzchar(Sys.getenv("R_MATRIX_CHECK_EXTRA")) || identical("true", unname(Sys.getenv("R_PKG_CHECKING_doExtras")))) { ## Using raster graphics: For PDF this would give a 77 MB file, ## however, for such a large matrix, this is typically considerably ## *slower* (than vector graphics rectangles) in most cases : if(doPNG <- !dev.interactive()) png("image-USCounties-raster.png", width=3200, height=3200) image(USCounties, useRaster = TRUE) # should not suffer from anti-aliasing if(doPNG) dev.off() ## and now look at the *.png image in a viewer you can easily zoom in and out }#only if(doExtras) } \keyword{methods} \keyword{hplot} Matrix/man/Subassign-methods.Rd0000644000176200001440000001511112254575000016156 0ustar liggesusers\name{[<--methods} \docType{methods} \alias{[<--methods} \alias{Subassign-methods}% <- nicer to use in \link{.} % \title{Methods for "[<-" - Assigning to Subsets for 'Matrix'} % in ../R/Matrix.R \alias{[<-,Matrix,ANY,ANY,ANY-method} \alias{[<-,Matrix,ANY,ANY,Matrix-method} \alias{[<-,Matrix,ANY,missing,Matrix-method} \alias{[<-,Matrix,missing,ANY,Matrix-method} \alias{[<-,Matrix,ANY,ANY,matrix-method} \alias{[<-,Matrix,ANY,missing,matrix-method} \alias{[<-,Matrix,missing,ANY,matrix-method} \alias{[<-,Matrix,matrix,missing,replValue-method} \alias{[<-,Matrix,lsparseMatrix,missing,replValue-method} \alias{[<-,Matrix,nsparseMatrix,missing,replValue-method} \alias{[<-,Matrix,ldenseMatrix,missing,replValue-method} \alias{[<-,Matrix,ndenseMatrix,missing,replValue-method} % \alias{[<-,Matrix,missing,numeric,missing-method} % \alias{[<-,Matrix,numeric,missing,missing-method} % \alias{[<-,Matrix,numeric,numeric,missing-method} % in ../R/denseMatrix.R \alias{[<-,denseMatrix,index,missing,replValue-method} \alias{[<-,denseMatrix,index,index,replValue-method} \alias{[<-,denseMatrix,matrix,missing,replValue-method} \alias{[<-,denseMatrix,missing,index,replValue-method} \alias{[<-,denseMatrix,missing,missing,ANY-method} % in ../R/diagMatrix.R \alias{[<-,diagonalMatrix,index,index,replValue-method} \alias{[<-,diagonalMatrix,index,missing,replValue-method} \alias{[<-,diagonalMatrix,matrix,missing,replValue-method} \alias{[<-,diagonalMatrix,missing,index,replValue-method} \alias{[<-,diagonalMatrix,missing,missing,ANY-method} % \alias{[<-,diagonalMatrix,index,index,sparseMatrix-method} \alias{[<-,diagonalMatrix,index,missing,sparseMatrix-method} \alias{[<-,diagonalMatrix,missing,index,sparseMatrix-method} % \alias{[<-,diagonalMatrix,index,index,sparseVector-method} \alias{[<-,diagonalMatrix,index,missing,sparseVector-method} \alias{[<-,diagonalMatrix,missing,index,sparseVector-method} % % -> ../R/sparseMatrix.R : \alias{[<-,sparseMatrix,ANY,ANY,sparseMatrix-method} \alias{[<-,sparseMatrix,ANY,missing,sparseMatrix-method} \alias{[<-,sparseMatrix,missing,ANY,sparseMatrix-method} \alias{[<-,sparseMatrix,missing,missing,ANY-method} % -> ../R/indMatrix.R : -- these give errors \alias{[<-,indMatrix,index,ANY,ANY-method} \alias{[<-,indMatrix,missing,index,ANY-method} \alias{[<-,indMatrix,missing,missing,ANY-method} % -> ../R/Tsparse.R : replValue = { numeric, logical } \alias{[<-,TsparseMatrix,index,index,replValue-method} \alias{[<-,TsparseMatrix,index,missing,replValue-method} \alias{[<-,TsparseMatrix,matrix,missing,replValue-method} \alias{[<-,TsparseMatrix,Matrix,missing,replValue-method} \alias{[<-,TsparseMatrix,lMatrix,missing,replValue-method} \alias{[<-,TsparseMatrix,nMatrix,missing,replValue-method} \alias{[<-,TsparseMatrix,missing,index,replValue-method} \alias{[<-,TsparseMatrix,missing,index,sparseVector-method} \alias{[<-,TsparseMatrix,index,missing,sparseVector-method} \alias{[<-,TsparseMatrix,index,index,sparseVector-method} % \alias{[<-,dgTMatrix,missing,missing,numeric-method} % -> ../R/Csparse.R : \alias{[<-,CsparseMatrix,index,index,replValue-method} \alias{[<-,CsparseMatrix,index,missing,replValue-method} \alias{[<-,CsparseMatrix,Matrix,missing,replValue-method} \alias{[<-,CsparseMatrix,matrix,missing,replValue-method} \alias{[<-,CsparseMatrix,lsparseMatrix,missing,replValue-method} \alias{[<-,CsparseMatrix,nsparseMatrix,missing,replValue-method} \alias{[<-,CsparseMatrix,ldenseMatrix,missing,replValue-method} \alias{[<-,CsparseMatrix,ndenseMatrix,missing,replValue-method} \alias{[<-,CsparseMatrix,missing,index,replValue-method} \alias{[<-,CsparseMatrix,missing,index,sparseVector-method} \alias{[<-,CsparseMatrix,index,missing,sparseVector-method} \alias{[<-,CsparseMatrix,index,index,sparseVector-method} % % \alias{[<-,RsparseMatrix,index,index,replValue-method} \alias{[<-,RsparseMatrix,index,missing,replValue-method} \alias{[<-,RsparseMatrix,matrix,missing,replValue-method} \alias{[<-,RsparseMatrix,missing,index,replValue-method} \alias{[<-,RsparseMatrix,missing,index,sparseVector-method} \alias{[<-,RsparseMatrix,index,missing,sparseVector-method} \alias{[<-,RsparseMatrix,index,index,sparseVector-method} % % % \alias{[<-,dsparseMatrix,missing,index,numeric-method} % \alias{[<-,dsparseMatrix,index,missing,numeric-method} % \alias{[<-,dsparseMatrix,index,index,numeric-method} % % % \alias{[<-,lsparseMatrix,missing,numeric,logical-method} % \alias{[<-,lsparseMatrix,numeric,missing,logical-method} % \alias{[<-,lsparseMatrix,numeric,numeric,logical-method} %------- \description{ Methods for \code{"[<-"}, i.e., extraction or subsetting mostly of matrices, in package \pkg{Matrix}. \bold{Note}: Contrary to standard \code{\link{matrix}} assignment in base \R, in \code{x[..] <- val} it is typically an \bold{error} (see \code{\link{stop}}) when the \link{type} or \code{\link{class}} of \code{val} would require the class of \code{x} to be changed, e.g., when \code{x} is logical, say \code{"lsparseMatrix"}, and \code{val} is numeric. In other cases, e.g., when \code{x} is a \code{"nsparseMatrix"} and \code{val} is not \code{TRUE} or \code{FALSE}, a warning is signalled, and \code{val} is \dQuote{interpreted} as \code{\link{logical}}, and (logical) \code{\link{NA}} is interpreted as \code{TRUE}. } \section{Methods}{ There are \emph{many many} more than these: \describe{ \item{x = "Matrix", i = "missing", j = "missing", value= "ANY"}{ is currently a simple fallback method implementation which ensures \dQuote{readable} error messages.} \item{x = "Matrix", i = "ANY", j = "ANY", value= "ANY"}{ currently gives an error } \item{x = "denseMatrix", i = "index", j = "missing", value= "numeric"}{ ... } \item{x = "denseMatrix", i = "index", j = "index", value= "numeric"}{ ... } \item{x = "denseMatrix", i = "missing", j = "index", value= "numeric"}{ ... } } } \seealso{ %% ./Xtrct-methods.Rd: \code{\link{[-methods}} for subsetting \code{"Matrix"} objects; the \code{\linkS4class{index}} class; \code{\link{Extract}} about the standard subset assignment (and extraction). } \examples{ %% Note that ./Xtrct-methods.Rd has the indexing ones set.seed(101) (a <- m <- Matrix(round(rnorm(7*4),2), nrow = 7)) a[] <- 2.2 # <<- replaces **every** entry a ## as do these: a[,] <- 3 ; a[TRUE,] <- 4 m[2, 3] <- 3.14 # simple number m[3, 3:4]<- 3:4 # simple numeric of length 2 ## sub matrix assignment: m[-(4:7), 3:4] <- cbind(1,2:4) #-> upper right corner of 'm' m[3:5, 2:3] <- 0 m[6:7, 1:2] <- Diagonal(2) m ## rows or columns only: m[1,] <- 10 m[,2] <- 1:7 m[-(1:6), ] <- 3:0 # not the first 6 rows, i.e. only the 7th as(m, "sparseMatrix") } \keyword{methods} \keyword{array} Matrix/man/sparseLU-class.Rd0000644000176200001440000000637712526663046015450 0ustar liggesusers\name{sparseLU-class} \docType{class} \alias{sparseLU-class} \alias{expand,sparseLU-method} \title{Sparse LU decomposition of a square sparse matrix} \description{Objects of this class contain the components of the LU decomposition of a sparse square matrix.} \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("sparseLU", ...)} but are more commonly created by function \code{\link{lu}()} applied to a sparse matrix, such as a matrix of class \code{\linkS4class{dgCMatrix}}. } \section{Slots}{ \describe{ \item{\code{L}:}{Object of class \code{"\linkS4class{dtCMatrix}"}, the lower triangular factor from the left.} \item{\code{U}:}{Object of class \code{"\linkS4class{dtCMatrix}"}, the upper triangular factor from the right.} \item{\code{p}:}{Object of class \code{"integer"}, permutation applied from the left. } \item{\code{q}:}{Object of class \code{"integer"}, permutation applied from the right.} \item{\code{Dim}:}{the dimension of the original matrix; inherited from class \code{\linkS4class{MatrixFactorization}}.} } } \section{Extends}{ Class \code{"\linkS4class{LU}"}, directly. Class \code{"\linkS4class{MatrixFactorization}"}, by class \code{"LU"}. } \section{Methods}{ \describe{ \item{expand}{\code{signature(x = "sparseLU")} Returns a list with components \code{P}, \code{L}, \code{U}, and \code{Q}, where \eqn{P} and \eqn{Q} represent fill-reducing permutations, and \eqn{L}, and \eqn{U} the lower and upper triangular matrices of the decomposition. The original matrix corresponds to the product \eqn{P'LUQ}.} } } %\references{} \note{ The decomposition is of the form \deqn{A = P'LUQ,} %% --------- or equivalently \eqn{PAQ' = LU}, where all matrices are sparse and of size \eqn{n\times n}{n by n}. The matrices \eqn{P} and \eqn{Q}, and their transposes \eqn{P'} and \eqn{Q'} are permutation matrices, \eqn{L} is lower triangular and \eqn{U} is upper triangular. } \seealso{ \code{\link{lu}}, \code{\link[base]{solve}}, \code{\linkS4class{dgCMatrix}} } \examples{ ## Extending the one in examples(lu), calling the matrix A, ## and confirming the factorization identities : A <- as(readMM(system.file("external/pores_1.mtx", package = "Matrix")), "CsparseMatrix") ## with dimnames(.) - to see that they propagate to L, U : dimnames(A) <- dnA <- list(paste0("r", seq_len(nrow(A))), paste0("C", seq_len(ncol(A)))) str(luA <- lu(A)) # p is a 0-based permutation of the rows # q is a 0-based permutation of the columns 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, tolerance = 1e-12), identical(dimnames(P.LUQ), dnA)) ## 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 stopifnot(all.equal(pA, pLU, tolerance = 1e-12)) } \keyword{classes} Matrix/man/dgeMatrix-class.Rd0000644000176200001440000001153713141330160015606 0ustar liggesusers\name{dgeMatrix-class} \title{Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices} \docType{class} \alias{dgeMatrix-class} % METHODS: %\alias{solve,....-method}--> solve-methods.Rd %\alias{\%*\%,....-method} --> matrix-products.Rd %\alias{crossprod,...-method}--> matrix-products.Rd %\alias{tcrossprod,..-method}--> " " % Group ones \alias{Arith,dgeMatrix,dgeMatrix-method} \alias{Arith,dgeMatrix,logical-method} \alias{Arith,dgeMatrix,numeric-method} \alias{Arith,logical,dgeMatrix-method} \alias{Arith,numeric,dgeMatrix-method} \alias{Math,dgeMatrix-method} %\alias{Math2,dgeMatrix,numeric-method} % Others % \alias{as.vector,dgeMatrix-method} \alias{coerce,dgeMatrix,matrix-method} \alias{coerce,dgeMatrix,triangularMatrix-method} \alias{coerce,dgeMatrix,lgeMatrix-method} \alias{coerce,numLike,dgeMatrix-method} \alias{coerce,matrix,dgeMatrix-method} \alias{colMeans,dgeMatrix-method} \alias{colSums,dgeMatrix-method} \alias{determinant,dgeMatrix,logical-method} \alias{determinant,dgeMatrix,missing-method} \alias{diag,dgeMatrix-method} \alias{diag<-,dgeMatrix-method} \alias{dim,dgeMatrix-method} \alias{dimnames,dgeMatrix-method} \alias{eigen,dgeMatrix,missing-method} \alias{eigen,dgeMatrix,logical-method} \alias{eigen,Matrix,ANY,missing-method}% only if(.Matrix.avoiding.as.matrix) \alias{eigen,Matrix,ANY,logical-method}% only if(.Matrix.avoiding.as.matrix) \alias{norm,dgeMatrix,missing-method} \alias{norm,dgeMatrix,character-method} \alias{rcond,dgeMatrix,missing-method} \alias{rcond,dgeMatrix,character-method} \alias{rowMeans,dgeMatrix-method} \alias{rowSums,dgeMatrix-method} \alias{t,dgeMatrix-method} % \description{A general numeric dense matrix in the S4 Matrix representation. \code{dgeMatrix} is the \emph{\dQuote{standard}} class for dense numeric matrices in the \pkg{Matrix} package. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dgeMatrix", ...)} or, more commonly, by coercion from the \code{Matrix} class (see \linkS4class{Matrix}) or by \code{\link{Matrix}(..)}. } \section{Slots}{ \describe{ \item{\code{x}:}{Object of class \code{"numeric"} - the numeric values contained in the matrix, in column-major order.} \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.} \item{\code{Dimnames}:}{a list of length two - inherited from class \code{\linkS4class{Matrix}}.} \item{\code{factors}:}{Object of class \code{"list"} - a list of factorizations of the matrix.} } } \section{Methods}{ The are group methods (see, e.g., \code{\link{Arith}}) \describe{ \item{Arith}{\code{signature(e1 = "dgeMatrix", e2 = "dgeMatrix")}: ... } \item{Arith}{\code{signature(e1 = "dgeMatrix", e2 = "numeric")}: ... } \item{Arith}{\code{signature(e1 = "numeric", e2 = "dgeMatrix")}: ... } \item{Math}{\code{signature(x = "dgeMatrix")}: ... } \item{Math2}{\code{signature(x = "dgeMatrix", digits = "numeric")}: ...} } matrix products \code{\link[=crossprod-methods]{\%*\%}}, \code{\link[=crossprod-methods]{crossprod}()} and \code{tcrossprod()}, several \code{\link{solve}} methods, and other matrix methods available: \describe{ \item{Schur}{\code{signature(x = "dgeMatrix", vectors = "logical")}: ... } \item{Schur}{\code{signature(x = "dgeMatrix", vectors = "missing")}: ... } \item{chol}{\code{signature(x = "dgeMatrix")}: see \code{\link{chol}}.} \item{coerce}{\code{signature(from = "dgeMatrix", to = "lgeMatrix")}: ... } \item{coerce}{\code{signature(from = "dgeMatrix", to = "matrix")}: ... } \item{coerce}{\code{signature(from = "matrix", to = "dgeMatrix")}: ... } \item{colMeans}{\code{signature(x = "dgeMatrix")}: columnwise means (averages)} \item{colSums}{\code{signature(x = "dgeMatrix")}: columnwise sums} \item{diag}{\code{signature(x = "dgeMatrix")}: ... } \item{dim}{\code{signature(x = "dgeMatrix")}: ... } \item{dimnames}{\code{signature(x = "dgeMatrix")}: ... } \item{eigen}{\code{signature(x = "dgeMatrix", only.values= "logical")}: ...} \item{eigen}{\code{signature(x = "dgeMatrix", only.values= "missing")}: ...} \item{norm}{\code{signature(x = "dgeMatrix", type = "character")}: ... } \item{norm}{\code{signature(x = "dgeMatrix", type = "missing")}: ... } \item{rcond}{\code{signature(x = "dgeMatrix", norm = "character")} or \code{norm = "missing"}: the reciprocal condition number, \code{\link{rcond}()}.} \item{rowMeans}{\code{signature(x = "dgeMatrix")}: rowwise means (averages)} \item{rowSums}{\code{signature(x = "dgeMatrix")}: rowwise sums} \item{t}{\code{signature(x = "dgeMatrix")}: matrix transpose} } } \seealso{ Classes \code{\linkS4class{Matrix}}, \code{\linkS4class{dtrMatrix}}, and \code{\linkS4class{dsyMatrix}}. } %\examples{} \keyword{classes} \keyword{algebra} Matrix/man/sparseVector-class.Rd0000644000176200001440000002751313057762217016365 0ustar liggesusers%%----- Docu for *all* sparse vector classes ---------- \name{sparseVector-class} \docType{class} \title{Sparse Vector Classes} \alias{sparseVector-class} % sub classes \alias{dsparseVector-class} \alias{isparseVector-class} \alias{lsparseVector-class} \alias{nsparseVector-class} \alias{zsparseVector-class} \alias{xsparseVector-class}% the class union %% Group methods \alias{Arith,sparseVector,sparseVector-method} \alias{Arith,dsparseVector,dsparseVector-method} \alias{-,dsparseVector,missing-method} \alias{!,sparseVector-method} \alias{Logic,sparseVector,sparseVector-method} \alias{Logic,lsparseVector,lsparseVector-method} \alias{Logic,nsparseVector,nsparseVector-method} \alias{Ops,ANY,sparseVector-method} \alias{Ops,sparseVector,ANY-method} \alias{Ops,sparseVector,sparseVector-method} \alias{Ops,sparseVector,atomicVector-method} \alias{Ops,atomicVector,sparseVector-method} \alias{Ops,Matrix,sparseVector-method} \alias{Ops,sparseVector,Matrix-method} \alias{Arith,ddenseMatrix,sparseVector-method} \alias{Arith,dgeMatrix,sparseVector-method} \alias{Arith,sparseVector,ddenseMatrix-method} \alias{Arith,sparseVector,dgeMatrix-method} \alias{Logic,dMatrix,sparseVector-method} \alias{Logic,lMatrix,sparseVector-method} \alias{Logic,nMatrix,sparseVector-method} \alias{Logic,sparseVector,dMatrix-method} \alias{Logic,sparseVector,lMatrix-method} \alias{Logic,sparseVector,nMatrix-method} \alias{Math,sparseVector-method} \alias{Math2,dsparseVector-method}% or (dsparseVector, numeric) & (dsparseVector,missing) ? \alias{Math2,sparseVector-method} \alias{Summary,sparseVector-method} \alias{Summary,nsparseVector-method} %% non-group : %\alias{solve,..} --> solve-methods.Rd %\alias{\%*\%,..} --> matrix-products.Rd \alias{coerce,ANY,sparseVector-method} \alias{coerce,ANY,nsparseVector-method} \alias{coerce,CsparseMatrix,sparseVector-method} \alias{coerce,TsparseMatrix,sparseVector-method} \alias{coerce,sparseMatrix,sparseVector-method} \alias{coerce,diagonalMatrix,sparseVector-method} \alias{coerce,atomicVector,sparseVector-method} \alias{coerce,atomicVector,dsparseVector-method} \alias{coerce,sparseVector,integer-method} \alias{coerce,sparseVector,logical-method} \alias{coerce,sparseVector,numeric-method} \alias{coerce,sparseVector,vector-method} \alias{coerce,sparseVector,Matrix-method} \alias{coerce,sparseVector,sparseMatrix-method} \alias{coerce,sparseVector,CsparseMatrix-method} \alias{coerce,sparseVector,TsparseMatrix-method} \alias{coerce,nsparseVector,lsparseVector-method} \alias{coerce,nsparseVector,dsparseVector-method} \alias{coerce,nsparseVector,isparseVector-method} \alias{coerce,nsparseVector,zsparseVector-method} \alias{coerce,xsparseVector,dsparseVector-method} \alias{coerce,xsparseVector,isparseVector-method} \alias{coerce,xsparseVector,lsparseVector-method} \alias{coerce,xsparseVector,zsparseVector-method} \alias{coerce,xsparseVector,nsparseVector-method} % \alias{as.logical,sparseVector-method} \alias{as.numeric,sparseVector-method} \alias{as.vector,sparseVector-method} \alias{c.sparseVector}% S3 *and* exported functions \alias{dim<-,sparseVector-method} \alias{is.na,nsparseVector-method} \alias{is.na,sparseVector-method} \alias{is.finite,nsparseVector-method} \alias{is.finite,sparseVector-method} \alias{is.infinite,nsparseVector-method} \alias{is.infinite,sparseVector-method} \alias{length,sparseVector-method} \alias{mean,sparseVector-method} \alias{rep,sparseVector-method} \alias{show,sparseVector-method} \alias{t,sparseVector-method} \alias{toeplitz,sparseVector-method} % \alias{head,sparseVector-method} \alias{tail,sparseVector-method} \alias{which,nsparseVector-method} \alias{which,lsparseVector-method} \alias{[,sparseVector,index,ANY,ANY-method} \alias{[,sparseVector,lsparseVector,ANY,ANY-method} \alias{[,sparseVector,nsparseVector,ANY,ANY-method} \alias{[<-,sparseVector,index,missing,replValueSp-method} \alias{[<-,sparseVector,sparseVector,missing,replValueSp-method} % also indexing in "traditional" vectors: %R_FIXME \alias{[<-,atomicVector,sparseVector,missing,replValue-method} %R_FIXME \alias{[,atomicVector,lsparseVector,ANY,ANY-method} %R_FIXME \alias{[,atomicVector,nsparseVector,ANY,ANY-method} % \description{Sparse Vector Classes: The virtual mother class \code{"sparseVector"} has the five actual daughter classes \code{"dsparseVector"}, \code{"isparseVector"}, \code{"lsparseVector"}, \code{"nsparseVector"}, and \code{"zsparseVector"}, where we've mainly implemented methods for the \code{d*}, \code{l*} and \code{n*} ones. } \section{Slots}{ \describe{ \item{\code{length}:}{class \code{"numeric"} - the \code{\link{length}} of the sparse vector. Note that \code{"numeric"} can be considerably larger than the maximal \code{"integer"}, \code{\link{.Machine}$integer.max}, on purpose.} \item{\code{i}:}{class \code{"numeric"} - the (1-based) indices of the non-zero entries. Must \emph{not} be \code{NA} and strictly sorted increasingly. Note that \code{"integer"} is \dQuote{part of} \code{"numeric"}, and can (and often will) be used for non-huge sparseVectors.} \item{\code{x}:}{(for all but \code{"nsparseVector"}): the non-zero entries. This is of class \code{"numeric"} for class \code{"dsparseVector"}, \code{"logical"} for class \code{"lsparseVector"}, etc. Note that \code{"nsparseVector"}s have no \code{x} slot. Further, mainly for ease of method definitions, we've defined the class union (see \code{\link{setClassUnion}}) of all sparse vector classes which \emph{have} an \code{x} slot, as class \code{"xsparseVector"}. } } } \section{Methods}{ \describe{ \item{length}{\code{signature(x = "sparseVector")}: simply extracts the \code{length} slot.} \item{show}{\code{signature(object = "sparseVector")}: The \code{\link{show}} method for sparse vectors prints \emph{\dQuote{structural}} zeroes as \code{"."} using the non-exported \code{prSpVector} function which allows further customization such as replacing \code{"."} by \code{" "} (blank). Note that \code{\link{options}(max.print)} will influence how many entries of large sparse vectors are printed at all.} \item{as.vector}{\code{signature(x = "sparseVector", mode = "character")} coerces sparse vectors to \dQuote{regular}, i.e., atomic vectors. This is the same as \code{as(x, "vector")}.} \item{as}{..: see \code{coerce} below} \item{coerce}{\code{signature(from = "sparseVector", to = "sparseMatrix")}, and} \item{coerce}{\code{signature(from = "sparseMatrix", to = "sparseVector")}, etc: coercions to and from sparse matrices (\code{\linkS4class{sparseMatrix}}) are provided and work analogously as in standard \R, i.e., a vector is coerced to a 1-column matrix.} \item{dim<-}{\code{signature(x = "sparseVector", value = "integer")} coerces a sparse vector to a sparse Matrix, i.e., an object inheriting from \code{\linkS4class{sparseMatrix}}, of the appropriate dimension.} \item{head}{\code{signature(x = "sparseVector")}: as with \R's (package \pkg{util}) \code{\link{head}}, \code{head(x,n)} (for \eqn{n >= 1}) is equivalent to \code{x[1:n]}, but here can be much more efficient, see the example.} \item{tail}{\code{signature(x = "sparseVector")}: analogous to \code{\link{head}}, see above.} \item{toeplitz}{\code{signature(x = "sparseVector")}: as \code{\link[stats]{toeplitz}(x)}, produce the \eqn{n \times n} Toeplitz matrix from \code{x}, where \code{n = length(x)}.} \item{rep}{\code{signature(x = "sparseVector")} repeat \code{x}, with the same argument list \code{(x, times, length.out, each, ...)} as the default method for rep().} \item{which}{\code{signature(x = "nsparseVector")} and} \item{which}{\code{signature(x = "lsparseVector")} return the indices of the non-zero entries (which is trivial for sparse vectors).} \item{Ops}{\code{signature(e1 = "sparseVector", e2 = "*")}: define arithmetic, compare and logic operations, (see \code{\link[=S4groupGeneric]{Ops}}).} \item{Summary}{\code{signature(x = "sparseVector")}: define all the \code{\link[=S4groupGeneric]{Summary}} methods.} \item{[}{\code{signature(x = "atomicVector", i = ...)}: not only can you subset (aka \emph{\dQuote{index into}}) sparseVectors \code{x[i]} using sparseVectors \code{i}, but we also support efficient subsetting of traditional vectors \code{x} by logical sparse vectors (i.e., \code{i} of class \code{"nsparseVector"} or \code{"lsparseVector"}).} \item{is.na, is.finite, is.infinite}{\code{(x = "sparseVector")}, and} \item{is.na, is.finite, is.infinite}{\code{(x = "nsparseVector")}: return \code{\link{logical}} or \code{"nsparseVector"} of the same length as \code{x}, indicating if/where \code{x} is \code{\link{NA}} (or \code{NaN}), finite or infinite, entirely analogously to the corresponding base \R functions.} } \code{c.sparseVector()} is an S3 method for all \code{"sparseVector"}s, but automatic dispatch only happens for the first argument, so it is useful also as regular \R function, see the examples. } \seealso{ \code{\link{sparseVector}()} for friendly construction of sparse vectors (apart from \code{as(*, "sparseVector")}). } %\author{Martin} \examples{ getClass("sparseVector") getClass("dsparseVector") getClass("xsparseVector")# those with an 'x' slot sx <- c(0,0,3, 3.2, 0,0,0,-3:1,0,0,2,0,0,5,0,0) (ss <- as(sx, "sparseVector")) ix <- as.integer(round(sx)) (is <- as(ix, "sparseVector")) ## an "isparseVector" (!) (ns <- sparseVector(i= c(7, 3, 2), length = 10)) # "nsparseVector" ## rep() works too: (ri <- rep(is, length.out= 25)) ## Using `dim<-` as in base R : r <- ss dim(r) <- c(4,5) # becomes a sparse Matrix: r ## or coercion (as as.matrix() in base R): as(ss, "Matrix") stopifnot(all(ss == print(as(ss, "CsparseMatrix")))) ## currently has "non-structural" FALSE -- printing as ":" (lis <- is & FALSE) (nn <- is[is == 0]) # all "structural" FALSE ## NA-case sN <- sx; sN[4] <- NA (svN <- as(sN, "sparseVector")) v <- as(c(0,0,3, 3.2, rep(0,9),-3,0,-1, rep(0,20),5,0), "sparseVector") v <- rep(rep(v, 50), 5000) set.seed(1); v[sample(v@i, 1e6)] <- 0 str(v) % Formal class 'dsparseVector' [package "Matrix"] with 3 slots % ..@ x : num [1:250000] 3.2 -1 -3 3 5 3.2 -3 3 -1 5 ... % ..@ length: int 9500000 % ..@ i : int [1:250000] 4 16 52 155 189 194 204 231 244 265 ... system.time(for(i in 1:4) hv <- head(v, 1e6)) ## user system elapsed ## 0.033 0.000 0.032 system.time(for(i in 1:4) h2 <- v[1:1e6]) ## user system elapsed ## 1.317 0.000 1.319 stopifnot(identical(hv, h2), identical(is | FALSE, is != 0), validObject(svN), validObject(lis), as.logical(is.na(svN[4])), identical(is^2 > 0, is & TRUE), all(!lis), !any(lis), length(nn@i) == 0, !any(nn), all(!nn), sum(lis) == 0, !prod(lis), range(lis) == c(0,0)) ## create and use the t(.) method: t(x20 <- sparseVector(c(9,3:1), i=c(1:2,4,7), length=20)) (T20 <- toeplitz(x20)) stopifnot(is(T20, "symmetricMatrix"), is(T20, "sparseMatrix"), identical(unname(as.matrix(T20)), toeplitz(as.vector(x20)))) ## c() method for "sparseVector" - also available as regular function (c1 <- c(x20, 0,0,0, -10*x20)) (c2 <- c(ns, is, FALSE)) (c3 <- c(ns, !ns, TRUE, NA, FALSE)) (c4 <- c(ns, rev(ns))) ## here, c() would produce a list {not dispatching to c.sparseVector()} (c5 <- c.sparseVector(0,0, x20)) ## checking (consistency) .v <- as.vector .s <- function(v) as(v, "sparseVector") stopifnot( all.equal(c1, .s(c(.v(x20), 0,0,0, -10*.v(x20))), tol=0), all.equal(c2, .s(c(.v(ns), .v(is), FALSE)), tol=0), all.equal(c3, .s(c(.v(ns), !.v(ns), TRUE, NA, FALSE)), tol=0), all.equal(c4, .s(c(.v(ns), rev(.v(ns)))), tol=0), all.equal(c5, .s(c(0,0, .v(x20))), tol=0) ) } \keyword{classes} Matrix/man/externalFormats.Rd0000644000176200001440000000644412571665074015763 0ustar liggesusers\name{externalFormats} \alias{readHB} \alias{readMM} % \alias{writeHB} \alias{writeMM} \alias{writeMM,CsparseMatrix-method} \alias{writeMM,sparseMatrix-method} \title{Read and write external matrix formats} \description{ Read matrices stored in the Harwell-Boeing or MatrixMarket formats or write \code{\linkS4class{sparseMatrix}} objects to one of these formats. } \usage{ readHB(file) readMM(file) writeMM(obj, file, \dots) } \arguments{ \item{obj}{a real sparse matrix} \item{file}{for \code{writeMM} - the name of the file to be written. For \code{readHB} and \code{readMM} the name of the file to read, as a character scalar. The names of files storing matrices in the Harwell-Boeing format usually end in \code{".rua"} or \code{".rsa"}. Those storing matrices in the MatrixMarket format usually end in \code{".mtx"}. Alternatively, \code{readHB} and \code{readMM} accept connection objects.} \item{\dots}{optional additional arguments. Currently none are used in any methods.} } \value{ The \code{readHB} and \code{readMM} functions return an object that inherits from the \code{"\linkS4class{Matrix}"} class. Methods for the \code{writeMM} generic functions usually return \code{\link{NULL}} and, as a side effect, the matrix \code{obj} is written to \code{file} in the MatrixMarket format (writeMM). } \note{ The Harwell-Boeing format is older and less flexible than the MatrixMarket format. The function \code{writeHB} was deprecated and has now been removed. Please use \code{writeMM} instead. A very simple way to export small sparse matrices \code{S}, is to use \code{summary(S)} which returns a \code{\link{data.frame}} with columns \code{i}, \code{j}, and possibly \code{x}, see \code{summary} in \code{\link{sparseMatrix-class}}, and an example below. } \references{ \url{http://math.nist.gov/MatrixMarket} \url{http://www.cise.ufl.edu/research/sparse/matrices} } \examples{ str(pores <- readMM(system.file("external/pores_1.mtx", package = "Matrix"))) str(utm <- readHB(system.file("external/utm300.rua", package = "Matrix"))) str(lundA <- readMM(system.file("external/lund_a.mtx", package = "Matrix"))) str(lundA <- readHB(system.file("external/lund_a.rsa", package = "Matrix"))) \dontrun{ ## NOTE: The following examples take quite some time ## ---- even on a fast internet connection: if(FALSE) # the URL has been corrected, but we need an un-tar step! str(sm <- readHB(gzcon(url("http://www.cise.ufl.edu/research/sparse/RB/Boeing/msc00726.tar.gz")))) str(jgl009 <- readMM(gzcon(url("ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/counterx/jgl009.mtx.gz")))) } data(KNex) writeMM(KNex$mm, "mmMM.mtx") ## very simple export - in triplet format - to text file: data(CAex) s.CA <- summary(CAex) s.CA # shows (i, j, x) [columns of a data frame] message("writing to ", outf <- tempfile()) write.table(s.CA, file = outf, row.names=FALSE) ## and read it back -- showing off sparseMatrix(): str(dd <- read.table(outf, header=TRUE)) ## has columns (i, j, x) -> we can use via do.call() as arguments to sparseMatrix(): mm <- do.call(sparseMatrix, dd) stopifnot(all.equal(mm, CAex, tolerance=1e-15)) } \keyword{IO} \keyword{array} \keyword{algebra} Matrix/man/ddenseMatrix-class.Rd0000644000176200001440000000416612271746775016343 0ustar liggesusers\name{ddenseMatrix-class} \docType{class} \alias{ddenseMatrix-class} \title{Virtual Class "ddenseMatrix" of Numeric Dense Matrices} % now separated from ./dgeMatrix-class.Rd - on purpose % METHODS: % undocu (FIXME) \alias{show,ddenseMatrix-method} \alias{coerce,ddenseMatrix,matrix-method} \alias{coerce,ddenseMatrix,dgeMatrix-method} %\alias{coerce,ddenseMatrix,CsparseMatrix-method} % % Group \alias{Arith,ddenseMatrix,ddenseMatrix-method} \alias{Arith,ddenseMatrix,logical-method} \alias{Arith,ddenseMatrix,numeric-method} \alias{Arith,logical,ddenseMatrix-method} \alias{Arith,numeric,ddenseMatrix-method} \alias{Math,ddenseMatrix-method} \alias{Summary,ddenseMatrix-method} % \alias{as.numeric,ddenseMatrix-method} \alias{diag,ddenseMatrix-method} \alias{determinant,ddenseMatrix,missing-method} \alias{determinant,ddenseMatrix,logical-method} \alias{lu,ddenseMatrix-method} \alias{norm,ddenseMatrix,missing-method} \alias{norm,ddenseMatrix,character-method} \alias{rcond,ddenseMatrix,missing-method} \alias{rcond,ddenseMatrix,character-method} %% \alias{solve,ddenseMatrix,ANY-method}--> solve-methods.Rd \alias{t,ddenseMatrix-method} % \description{This is the virtual class of all dense numeric (i.e., \bold{d}ouble, hence \emph{\dQuote{ddense}}) S4 matrices. Its most important subclass is the \code{\linkS4class{dgeMatrix}} class. %% and now say what the difference is ! __ FIXME __ } \section{Extends}{ Class \code{"dMatrix"} directly; class \code{"Matrix"}, by the above. } \section{Slots}{ the same slots at its subclass \code{\linkS4class{dgeMatrix}}, see there. } \section{Methods}{ Most methods are implemented via \code{as(*, "dgeMatrix")} and are mainly used as \dQuote{fallbacks} when the subclass doesn't need its own specialized method. Use \code{\link{showMethods}(class = "ddenseMatrix", where = "package:Matrix")} for an overview. } %\references{} %\note{} \seealso{ The virtual classes \code{\linkS4class{Matrix}}, \code{\linkS4class{dMatrix}}, and \code{\linkS4class{dsparseMatrix}}. } \examples{ showClass("ddenseMatrix") showMethods(class = "ddenseMatrix", where = "package:Matrix") } \keyword{classes} Matrix/man/Matrix.Rd0000644000176200001440000001047711644124434014040 0ustar liggesusers\name{Matrix} \alias{Matrix} \title{Construct a Classed Matrix} \usage{ Matrix(data=NA, nrow=1, ncol=1, byrow=FALSE, dimnames=NULL, sparse = NULL, doDiag = TRUE, forceCheck = FALSE) } \description{ Construct a Matrix of a class that inherits from \code{Matrix}. } \arguments{ \item{data}{an optional numeric data vector or matrix.} \item{nrow}{when \code{data} is not a matrix, the desired number of rows} \item{ncol}{when \code{data} is not a matrix, the desired number of columns} \item{byrow}{logical. If \code{FALSE} (the default) the matrix is filled by columns, otherwise the matrix is filled by rows.} \item{dimnames}{a \code{\link{dimnames}} attribute for the matrix: a \code{list} of two character components. They are set if not \code{\link{NULL}} (as per default).} \item{sparse}{logical or \code{NULL}, specifying if the result should be sparse or not. By default, it is made sparse when more than half of the entries are 0. Note that when the resulting matrix is diagonal (\dQuote{mathematically}), \code{sparse=FALSE} results in a \code{\linkS4class{diagonalMatrix}}, unless \code{doDiag=FALSE} as well, see the first examples.} \item{doDiag}{only when \code{sparse = FALSE}, logical indicating if a \code{\linkS4class{diagonalMatrix}} object should be considered (default). Otherwise, in such a case, a dense (symmetric) matrix will be returned.} \item{forceCheck}{logical indicating if the checks for structure should even happen when \code{data} is already a \code{"Matrix"} object.} } \value{ Returns matrix of a class that inherits from \code{"Matrix"}. Only if \code{data} is not a \code{\link{matrix}} and does not already inherit from class \code{\linkS4class{Matrix}} are the arguments \code{nrow}, \code{ncol} and \code{byrow} made use of. } \details{ If either of \code{nrow} or \code{ncol} is not given, an attempt is made to infer it from the length of \code{data} and the other parameter. Further, \code{Matrix()} makes efforts to keep \code{\link{logical}} matrices logical, i.e., inheriting from class \code{\linkS4class{lMatrix}}, and to determine specially structured matrices such as symmetric, triangular or diagonal ones. Note that a \emph{symmetric} matrix also needs symmetric \code{\link{dimnames}}, e.g., by specifying \code{dimnames = list(NULL,NULL)}, see the examples. Most of the time, the function works via a traditional (\emph{full}) \code{\link{matrix}}. However, \code{Matrix(0, nrow,ncol)} directly constructs an \dQuote{empty} \linkS4class{sparseMatrix}, as does \code{Matrix(FALSE, *)}. Although it is sometime possible to mix unclassed matrices (created with \code{matrix}) with ones of class \code{"Matrix"}, it is much safer to always use carefully constructed ones of class \code{"Matrix"}. } \seealso{ The classes \code{\linkS4class{Matrix}}, \code{\linkS4class{symmetricMatrix}}, \code{\linkS4class{triangularMatrix}}, and \code{\linkS4class{diagonalMatrix}}; further, \code{\link{matrix}}. Special matrices can be constructed, e.g., via \code{\link{sparseMatrix}} (sparse), \code{\link{bdiag}} (block-diagonal), \code{\link{bandSparse}} (banded sparse), or \code{\link{Diagonal}}. } \examples{ Matrix(0, 3, 2) # 3 by 2 matrix of zeros -> sparse Matrix(0, 3, 2, sparse=FALSE)# -> 'dense' Matrix(0, 2, 2, sparse=FALSE)# diagonal ! Matrix(0, 2, 2, sparse=FALSE, doDiag=FALSE)# -> dense Matrix(1:6, 3, 2) # a 3 by 2 matrix (+ integer warning) Matrix(1:6 + 1, nrow=3) ## logical ones: Matrix(diag(4) > 0)# -> "ldiMatrix" with diag = "U" Matrix(diag(4) > 0, sparse=TRUE)# -> sparse... Matrix(diag(4) >= 0)# -> "lsyMatrix" (of all 'TRUE') ## triangular l3 <- upper.tri(matrix(,3,3)) (M <- Matrix(l3)) # -> "ltCMatrix" Matrix(! l3)# -> "ltrMatrix" as(l3, "CsparseMatrix") Matrix(1:9, nrow=3, dimnames = list(c("a", "b", "c"), c("A", "B", "C"))) (I3 <- Matrix(diag(3)))# identity, i.e., unit "diagonalMatrix" str(I3) # note the empty 'x' slot (A <- cbind(a=c(2,1), b=1:2))# symmetric *apart* from dimnames Matrix(A) # hence 'dgeMatrix' (As <- Matrix(A, dimnames = list(NULL,NULL)))# -> symmetric stopifnot(is(As, "symmetricMatrix"), is(Matrix(0, 3,3), "sparseMatrix"), is(Matrix(FALSE, 1,1), "sparseMatrix")) } \keyword{array} \keyword{algebra} Matrix/man/isTriangular.Rd0000644000176200001440000000630312501122043015214 0ustar liggesusers\name{isTriangular} \title{isTriangular() and isDiagonal() Methods} %\docType{methods} both generic *and* methods \alias{isDiagonal} \alias{isDiagonal-methods} \alias{isDiagonal,symmetricMatrix-method} \alias{isDiagonal,triangularMatrix-method} \alias{isDiagonal,denseMatrix-method} \alias{isDiagonal,diagonalMatrix-method} \alias{isDiagonal,sparseMatrix-method} \alias{isDiagonal,matrix-method} % \alias{isTriangular} \alias{isTriangular-methods} \alias{isTriangular,triangularMatrix-method} \alias{isTriangular,denseMatrix-method} \alias{isTriangular,diagonalMatrix-method} \alias{isTriangular,BunchKaufman-method} \alias{isTriangular,Cholesky-method} \alias{isTriangular,CsparseMatrix-method} \alias{isTriangular,TsparseMatrix-method} \alias{isTriangular,dtCMatrix-method} \alias{isTriangular,dtRMatrix-method} \alias{isTriangular,dtTMatrix-method} \alias{isTriangular,dtpMatrix-method} \alias{isTriangular,dtrMatrix-method} \alias{isTriangular,ltCMatrix-method} \alias{isTriangular,ltRMatrix-method} \alias{isTriangular,ltTMatrix-method} \alias{isTriangular,ltpMatrix-method} \alias{isTriangular,ltrMatrix-method} \alias{isTriangular,ntCMatrix-method} \alias{isTriangular,ntRMatrix-method} \alias{isTriangular,ntTMatrix-method} \alias{isTriangular,ntpMatrix-method} \alias{isTriangular,ntrMatrix-method} \alias{isTriangular,pBunchKaufman-method} \alias{isTriangular,pCholesky-method} \alias{isTriangular,matrix-method} % \description{ \code{isTriangular(M)} returns a \code{\link{logical}} indicating if \code{M} is a triangular matrix. Analogously, \code{isDiagonal(M)} is true iff \code{M} is a diagonal matrix. Contrary to \code{\link{isSymmetric}()}, these two functions are generically from package \pkg{Matrix}, and hence also define methods for traditional (\code{\link{class}} \code{"matrix"}) matrices. By our definition, triangular, diagonal and symmetric matrices are all \emph{square}, i.e. have the same number of rows and columns. } \usage{ isDiagonal(object) isTriangular(object, upper = NA, \dots) } \arguments{ \item{object}{any \R object, typically a matrix (traditional or Matrix package).} \item{upper}{logical, one of \code{NA} (default), \code{FALSE}, or \code{TRUE} where the last two cases require a lower or upper triangular \code{object} to result in \code{TRUE}.} \item{\dots}{potentially further arguments for other methods.} } \value{ a (\dQuote{scalar}) logical, \code{TRUE} or \code{FALSE}, never \code{\link{NA}}. For \code{isTriangular()}, if the result is \code{TRUE}, it may contain an attribute (see \code{\link{attributes}} \code{"kind"}, either \code{"L"} or \code{"U"} indicating if it is a \bold{l}ower or \bold{u}pper triangular matrix. } \seealso{ \code{\link{isSymmetric}}; formal class (and subclasses) \code{"\linkS4class{triangularMatrix}"} and \code{"\linkS4class{diagonalMatrix}"}. } \examples{ isTriangular(Diagonal(4)) ## is TRUE: a diagonal matrix is also (both upper and lower) triangular (M <- Matrix(c(1,2,0,1), 2,2)) isTriangular(M) # TRUE (*and* of formal class "dtrMatrix") isTriangular(as(M, "dgeMatrix")) # still triangular, even if not "formally" isTriangular(crossprod(M)) # FALSE isDiagonal(matrix(c(2,0,0,1), 2,2)) # TRUE } \keyword{methods} Matrix/man/band.Rd0000644000176200001440000001214512445374135013477 0ustar liggesusers\name{band} \docType{methods} \alias{band-methods} \alias{tril-methods} \alias{triu-methods} \alias{band,CsparseMatrix-method} \alias{tril,CsparseMatrix-method} \alias{triu,CsparseMatrix-method} \alias{band,RsparseMatrix-method} \alias{tril,RsparseMatrix-method} \alias{triu,RsparseMatrix-method} \alias{band,TsparseMatrix-method} \alias{tril,TsparseMatrix-method} \alias{triu,TsparseMatrix-method} %FIXME! \alias{band,diagonalMatrix-method} \alias{tril,diagonalMatrix-method} \alias{triu,diagonalMatrix-method} \alias{tril,dsCMatrix-method} \alias{tril,lsCMatrix-method} \alias{tril,nsCMatrix-method} \alias{triu,dsCMatrix-method} \alias{triu,lsCMatrix-method} \alias{triu,nsCMatrix-method} \alias{band,ddenseMatrix-method} \alias{tril,ddenseMatrix-method} \alias{triu,ddenseMatrix-method} \alias{band,denseMatrix-method} \alias{tril,denseMatrix-method} \alias{triu,denseMatrix-method} \alias{band,matrix-method} \alias{tril,matrix-method} \alias{triu,matrix-method} % Begin{UGLY-disAMBIGUATION-hack} -- in ../R/triangularMatrix.R % we would want to define 'triangularMatrix' methods, but they ambiguate with the above! % \alias{tril,triangularMatrix-method} % \alias{triu,triangularMatrix-method} \alias{tril,dtCMatrix-method} \alias{tril,dtRMatrix-method} \alias{tril,dtTMatrix-method} \alias{tril,dtpMatrix-method} \alias{tril,dtrMatrix-method} \alias{tril,ltCMatrix-method} \alias{tril,ltRMatrix-method} \alias{tril,ltTMatrix-method} \alias{tril,ltpMatrix-method} \alias{tril,ltrMatrix-method} \alias{tril,ntCMatrix-method} \alias{tril,ntRMatrix-method} \alias{tril,ntTMatrix-method} \alias{tril,ntpMatrix-method} \alias{tril,ntrMatrix-method} \alias{tril,itTMatrix-method} \alias{tril,itCMatrix-method} \alias{tril,itRMatrix-method} \alias{triu,dtCMatrix-method} \alias{triu,dtRMatrix-method} \alias{triu,dtTMatrix-method} \alias{triu,dtpMatrix-method} \alias{triu,dtrMatrix-method} \alias{triu,ltCMatrix-method} \alias{triu,ltRMatrix-method} \alias{triu,ltTMatrix-method} \alias{triu,ltpMatrix-method} \alias{triu,ltrMatrix-method} \alias{triu,ntCMatrix-method} \alias{triu,ntRMatrix-method} \alias{triu,ntTMatrix-method} \alias{triu,ntpMatrix-method} \alias{triu,ntrMatrix-method} \alias{triu,itTMatrix-method} \alias{triu,itCMatrix-method} \alias{triu,itRMatrix-method} % End{UGLY-disAMBIGUATION-hack} % \alias{band} \alias{tril} \alias{triu} \title{Extract bands of a matrix} \description{ Returns a new matrix formed by extracting the lower triangle (\code{tril}) or the upper triangle (\code{triu}) or a general band relative to the diagonal (\code{band}), and setting other elements to zero. The general forms of these functions include integer arguments to specify how many diagonal bands above or below the main diagonal are not set to zero. } \usage{ band(x, k1, k2, \dots) tril(x, k = 0, \dots) triu(x, k = 0, \dots) } \arguments{ \item{x}{a matrix-like object} \item{k,k1,k2}{integers specifying the diagonal bands that will not be set to zero. These are given relative to the main diagonal, which is \code{k=0}. A negative value of \code{k} indicates a diagonal below the main diagonal and a positive value indicates a diagonal above the main diagonal.} \item{\dots}{Optional arguments used by specific methods. (None used at present.)} } \value{ An object of an appropriate matrix class. The class of the value of \code{tril} or \code{triu} inherits from \code{\linkS4class{triangularMatrix}} when appropriate. Note that the result is of class \code{\linkS4class{sparseMatrix}} only if \code{x} is. } \section{Methods}{ \describe{ \item{x = "CsparseMatrix"}{method for compressed, sparse, column-oriented matrices.} \item{x = "TsparseMatrix"}{method for sparse matrices in triplet format.} \item{x = "RsparseMatrix"}{method for compressed, sparse, row-oriented matrices.} \item{x = "ddenseMatrix"}{method for dense numeric matrices, including packed numeric matrices.} } } \seealso{ \code{\link{bandSparse}} for the \emph{construction} of a banded sparse matrix directly from its non-zero diagonals. } \examples{ ## A random sparse matrix : set.seed(7) m <- matrix(0, 5, 5) m[sample(length(m), size = 14)] <- rep(1:9, length=14) (mm <- as(m, "CsparseMatrix")) tril(mm) # lower triangle tril(mm, -1) # strict lower triangle triu(mm, 1) # strict upper triangle band(mm, -1, 2) # general band (m5 <- Matrix(rnorm(25), nc = 5)) tril(m5) # lower triangle tril(m5, -1) # strict lower triangle triu(m5, 1) # strict upper triangle band(m5, -1, 2) # general band (m65 <- Matrix(rnorm(30), nc = 5)) # not square triu(m65) # result in not dtrMatrix unless square (sm5 <- crossprod(m65)) # symmetric band(sm5, -1, 1)# symmetric band preserves symmetry property as(band(sm5, -1, 1), "sparseMatrix")# often preferable %% \dontshow{ ## this uses special methods (x.x <- crossprod(mm)) tril(x.x) xx <- tril(x.x) + triu(x.x, 1) ## the same as x.x (but stored differently): txx <- t(as(xx, "symmetricMatrix")) stopifnot(identical(triu(x.x), t(tril(x.x))), identical(class(x.x), class(txx)), identical(as(x.x, "generalMatrix"), as(txx, "generalMatrix"))) } } \keyword{methods} \keyword{algebra} Matrix/man/rleDiff-class.Rd0000644000176200001440000000265111314233025015234 0ustar liggesusers\name{rleDiff-class} \docType{class} \Rdversion{1.1} \title{Class "rleDiff" of rle(diff(.)) Stored Vectors} \alias{rleDiff-class} \alias{show,rleDiff-method} \description{ Class \code{"rleDiff"} is for compactly storing long vectors which mainly consist of \emph{linear} stretches. For such a vector \code{x}, \code{\link{diff}(x)} consists of \emph{constant} stretches and is hence well compressable via \code{\link{rle}()}. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("rleDiff", ...)}. Currently experimental, see below. } \section{Slots}{ \describe{ \item{\code{first}:}{A single number (of class \code{"numLike"}, a class union of \code{"numeric"} and \code{"logical"}).} \item{\code{rle}:}{Object of class \code{"rle"}, basically a \code{\link{list}} with components \code{"lengths"} and \code{"values"}, see \code{\link{rle}()}. As this is used to encode potentially huge index vectors, \code{lengths} may be of type \code{\link{double}} here.} } } \section{Methods}{ There is a simple \code{\link{show}} method only.% currently } \note{ This is currently an \emph{experimental} auxiliary class for the class \code{\linkS4class{abIndex}}, see there. } \seealso{ \code{\link{rle}}, \code{\linkS4class{abIndex}}. } \examples{ showClass("rleDiff") ab <- c(abIseq(2, 100), abIseq(20, -2)) ab@rleD # is "rleDiff" } \keyword{classes} Matrix/man/boolean-matprod.Rd0000644000176200001440000000771312507220752015655 0ustar liggesusers\name{\%&\%-methods} \title{Boolean Arithmetic Matrix Products: \code{\%&\%} and Methods} \docType{methods} \alias{\%&\%} \alias{\%&\%-methods} \alias{\%&\%,ANY,ANY-method} \alias{\%&\%,ANY,matrix-method} \alias{\%&\%,ANY,Matrix-method} \alias{\%&\%,matrix,ANY-method} \alias{\%&\%,Matrix,ANY-method} \alias{\%&\%,matrix,matrix-method} \alias{\%&\%,Matrix,Matrix-method} \alias{\%&\%,mMatrix,mMatrix-method} \alias{\%&\%,mMatrix,nMatrix-method} \alias{\%&\%,nMatrix,mMatrix-method} \alias{\%&\%,nMatrix,nMatrix-method} \alias{\%&\%,nMatrix,nsparseMatrix-method} \alias{\%&\%,nsparseMatrix,nMatrix-method} \alias{\%&\%,nsparseMatrix,nsparseMatrix-method} \alias{\%&\%,nCsparseMatrix,nCsparseMatrix-method} \alias{\%&\%,nCsparseMatrix,nsparseMatrix-method} \alias{\%&\%,nsparseMatrix,nCsparseMatrix-method} \alias{\%&\%,diagonalMatrix,geMatrix-method} \alias{\%&\%,geMatrix,diagonalMatrix-method} \alias{\%&\%,CsparseMatrix,diagonalMatrix-method} \alias{\%&\%,diagonalMatrix,CsparseMatrix-method} \alias{\%&\%,diagonalMatrix,diagonalMatrix-method} \alias{\%&\%,diagonalMatrix,sparseMatrix-method} \alias{\%&\%,sparseMatrix,diagonalMatrix-method} \alias{\%&\%,mMatrix,sparseVector-method} \alias{\%&\%,numLike,sparseVector-method} \alias{\%&\%,sparseVector,mMatrix-method} \alias{\%&\%,sparseVector,numLike-method} \alias{\%&\%,sparseVector,sparseVector-method} \description{ For boolean or \dQuote{patter\bold{n}} matrices, i.e., \R objects of class \code{\linkS4class{nMatrix}}, it is natural to allow matrix products using boolean instead of numerical arithmetic. In package \pkg{Matrix}, we use the binary operator \code{\%&\%} (aka \dQuote{infix}) function) for this and provide methods for all our matrices and the traditional \R matrices (see \code{\link{matrix}}). } \section{Methods}{ We provide methods for both the \dQuote{traditional} (\R base) matrices and numeric vectors and conceptually all matrices and \code{\linkS4class{sparseVector}}s in package \pkg{Matrix}. \describe{ \item{\code{signature(x = "ANY", y = "ANY")}}{ } \item{\code{signature(x = "ANY", y = "Matrix")}}{ } \item{\code{signature(x = "Matrix", y = "ANY")}}{ } \item{\code{signature(x = "mMatrix", y = "mMatrix")}}{ } \item{\code{signature(x = "nMatrix", y = "nMatrix")}}{ } \item{\code{signature(x = "nMatrix", y = "nsparseMatrix")}}{ } \item{\code{signature(x = "nsparseMatrix", y = "nMatrix")}}{ } \item{\code{signature(x = "nsparseMatrix", y = "nsparseMatrix")}}{ } \item{\code{signature(x = "sparseVector", y = "mMatrix")}}{ } \item{\code{signature(x = "mMatrix", y = "sparseVector")}}{ } \item{\code{signature(x = "sparseVector", y = "sparseVector")}}{ } }% {describe} }% {Methods} \note{ The current implementation ends up coercing both \code{x} and \code{y} to (virtual) class \code{\linkS4class{nsparseMatrix}} which may be quite inefficient. A future implementation may well return a matrix with \bold{different} class, but the \dQuote{same} content, i.e., the same matrix entries \eqn{m_ij}{m[i,j]}. } \value{ a pattern matrix, i.e., inheriting from \code{"\linkS4class{nMatrix}"}, or an \code{"\linkS4class{ldiMatrix}"} in case of a diagonal matrix. } \examples{ set.seed(7) L <- Matrix(rnorm(20) > 1, 4,5) (N <- as(L, "nMatrix")) D <- Matrix(round(rnorm(30)), 5,6) # -> values in -1:1 (for this seed) L \%&\% D stopifnot(identical(L \%&\% D, N \%&\% D), all(L \%&\% D == as((L \%*\% abs(D)) > 0, "sparseMatrix"))) ## cross products , possibly with boolArith = TRUE : crossprod(N) # -> sparse patter'n' (TRUE/FALSE : boolean arithmetic) crossprod(N +0) # -> numeric Matrix (with same "pattern") stopifnot(all(crossprod(N) == t(N) \%&\% N), identical(crossprod(N), crossprod(N +0, boolArith=TRUE)), identical(crossprod(L), crossprod(N , boolArith=FALSE))) crossprod(D, boolArith = TRUE) # pattern: "nsCMatrix" crossprod(L, boolArith = TRUE) # ditto crossprod(L, boolArith = FALSE) # numeric: "dsCMatrix" } \keyword{methods} Matrix/man/symmpart.Rd0000644000176200001440000000461512417245712014447 0ustar liggesusers\name{symmpart} \title{Symmetric Part and Skew(symmetric) Part of a Matrix} %% Hmm, want the generic and methods all in this file ... %% \docType{methods} \alias{symmpart} \alias{skewpart} % \alias{symmpart-methods} \alias{skewpart-methods} \alias{symmpart,Matrix-method} \alias{skewpart,Matrix-method} \alias{symmpart,diagonalMatrix-method} \alias{skewpart,diagonalMatrix-method} \alias{symmpart,ddenseMatrix-method} \alias{skewpart,ddenseMatrix-method} \alias{symmpart,denseMatrix-method} \alias{skewpart,denseMatrix-method} \alias{symmpart,symmetricMatrix-method} \alias{skewpart,symmetricMatrix-method} \alias{symmpart,matrix-method} \alias{skewpart,matrix-method} % \description{ \code{symmpart(x)} computes the symmetric part \code{(x + t(x))/2} and \code{skewpart(x)} the skew symmetric part \code{(x - t(x))/2} of a square matrix \code{x}, more efficiently for specific Matrix classes. Note that \code{x == symmpart(x) + skewpart(x)} for all square matrices -- apart from extraneous \code{\link{NA}} values in the RHS. } \usage{ symmpart(x) skewpart(x) } \arguments{ \item{x}{a \emph{square} matrix; either \dQuote{traditional} of class \code{"matrix"}, or typically, inheriting from the \code{\linkS4class{Matrix}} class.} } \details{ These are generic functions with several methods for different matrix classes, use e.g., \code{\link{showMethods}(symmpart)} to see them. If the row and column names differ, the result will use the column names unless they are (partly) \code{NULL} where the row names are non-\code{NULL} (see also the examples). } \value{ \code{symmpart()} returns a symmetric matrix, inheriting from \code{\linkS4class{symmetricMatrix}} iff \code{x} inherited from \code{Matrix}. \code{skewpart()} returns a skew-symmetric matrix, typically of the same class as \code{x} (or the closest \dQuote{general} one, see \code{\linkS4class{generalMatrix}}). } \seealso{ \code{\link{isSymmetric}}.} \examples{ m <- Matrix(1:4, 2,2) symmpart(m) skewpart(m) stopifnot(all(m == symmpart(m) + skewpart(m))) dn <- dimnames(m) <- list(row = c("r1", "r2"), col = c("var.1", "var.2")) stopifnot(all(m == symmpart(m) + skewpart(m))) colnames(m) <- NULL stopifnot(all(m == symmpart(m) + skewpart(m))) dimnames(m) <- unname(dn) stopifnot(all(m == symmpart(m) + skewpart(m))) ## investigate the current methods: showMethods(skewpart, include = TRUE) } \keyword{array} \keyword{arith} Matrix/man/ngeMatrix-class.Rd0000644000176200001440000000411112622367447015633 0ustar liggesusers\name{ngeMatrix-class} \docType{class} \title{Class "ngeMatrix" of General Dense Nonzero-pattern Matrices} \alias{ngeMatrix-class} % \alias{!,ngeMatrix-method} \alias{Arith,ngeMatrix,ngeMatrix-method} \alias{Compare,ngeMatrix,ngeMatrix-method} \alias{Logic,ngeMatrix,ngeMatrix-method} \alias{as.vector,ngeMatrix-method} \alias{coerce,matrix,ngeMatrix-method} \alias{coerce,ngeMatrix,dgeMatrix-method} \alias{coerce,ngeMatrix,matrix-method} \alias{coerce,ngeMatrix,ngCMatrix-method} \alias{coerce,ngeMatrix,ngTMatrix-method} \alias{coerce,ngeMatrix,nsyMatrix-method} \alias{coerce,ngeMatrix,ntrMatrix-method} \alias{coerce,ngeMatrix,ntpMatrix-method} \alias{coerce,ngeMatrix,nspMatrix-method} \alias{diag<-,ngeMatrix-method} \alias{t,ngeMatrix-method} % \description{This is the class of general dense nonzero-pattern matrices, see \code{\linkS4class{nMatrix}}. } \section{Slots}{ \describe{ \item{\code{x}:}{Object of class \code{"logical"}. The logical values that constitute the matrix, stored in column-major order.} \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), see the \code{\linkS4class{Matrix}} class.} \item{\code{factors}:}{Object of class \code{"list"}. A named list of factorizations that have been computed for the matrix.} } } \section{Extends}{ Class \code{"ndenseMatrix"}, directly. Class \code{"lMatrix"}, by class \code{"ndenseMatrix"}. Class \code{"denseMatrix"}, by class \code{"ndenseMatrix"}. Class \code{"Matrix"}, by class \code{"ndenseMatrix"}. Class \code{"Matrix"}, by class \code{"ndenseMatrix"}. } \section{Methods}{ Currently, mainly \code{\link{t}()} and coercion methods (for \code{\link{as}(.)}); use, e.g., \code{\link{showMethods}(class="ngeMatrix")} for details. } \seealso{ Non-general logical dense matrix classes such as \code{\linkS4class{ntrMatrix}}, or \code{\linkS4class{nsyMatrix}}; \emph{sparse} logical classes such as \code{\linkS4class{ngCMatrix}}. } \examples{ showClass("ngeMatrix") ## "lgeMatrix" is really more relevant } \keyword{classes} Matrix/man/Matrix-class.Rd0000644000176200001440000001773713141330160015136 0ustar liggesusers\name{Matrix-class} \title{Virtual Class "Matrix" Class of Matrices} \docType{class} \alias{Matrix-class} \alias{!,Matrix-method} %% Group methods: \alias{-,Matrix,missing-method} \alias{+,Matrix,missing-method} \alias{Arith,Matrix,Matrix-method} \alias{Ops,Matrix,Matrix-method} \alias{Ops,Matrix,ANY-method} \alias{Ops,ANY,Matrix-method} \alias{Ops,Matrix,NULL-method} \alias{Ops,NULL,Matrix-method} \alias{Ops,Matrix,matrix-method} \alias{Ops,matrix,Matrix-method} \alias{Ops,logical,Matrix-method} \alias{Ops,Matrix,logical-method} \alias{Logic,logical,Matrix-method} \alias{Logic,Matrix,logical-method} \alias{Logic,Matrix,ANY-method} \alias{Logic,ANY,Matrix-method} \alias{Summary,Matrix-method} \alias{Math2,Matrix-method} \alias{mean,Matrix-method} % "[" ---> Xtrct-methods.Rd % "[<-" ---> Subassign-methods.Rd %\alias{solve,...} --> solve-methods.Rd %\alias{\%*%,... } --> matrix-products.Rd \alias{cbind2,ANY,Matrix-method} \alias{cbind2,Matrix,ANY-method} \alias{cbind2,Matrix,Matrix-method} \alias{cbind2,Matrix,NULL-method} \alias{cbind2,Matrix,atomicVector-method} \alias{cbind2,Matrix,missing-method} \alias{cbind2,NULL,Matrix-method} \alias{cbind2,atomicVector,Matrix-method} \alias{rbind2,ANY,Matrix-method} \alias{rbind2,Matrix,ANY-method} \alias{rbind2,Matrix,Matrix-method} \alias{rbind2,Matrix,NULL-method} \alias{rbind2,Matrix,atomicVector-method} \alias{rbind2,Matrix,missing-method} \alias{rbind2,NULL,Matrix-method} \alias{rbind2,atomicVector,Matrix-method} % \alias{cov2cor,Matrix-method} \alias{det}% "the function" (our copy of base::det) \alias{determinant,Matrix,missing-method} \alias{determinant,Matrix,logical-method} \alias{diag,Matrix-method} \alias{drop,Matrix-method} \alias{head,Matrix-method} \alias{tail,Matrix-method} \alias{diff,Matrix-method} \alias{dim,Matrix-method} \alias{dim<-,Matrix-method} \alias{dimnames,Matrix-method} \alias{dimnames<-,Matrix,list-method} \alias{dimnames<-,Matrix,NULL-method} \alias{length,Matrix-method} \alias{show,Matrix-method} \alias{as.array,Matrix-method} \alias{as.matrix,Matrix-method} \alias{as.vector,Matrix-method} \alias{as.numeric,Matrix-method} \alias{as.logical,Matrix-method} \alias{t,Matrix-method} \alias{unname,Matrix-method} \alias{coerce,Matrix,vector-method} \alias{coerce,Matrix,numeric-method} \alias{coerce,Matrix,logical-method} \alias{coerce,Matrix,integer-method} \alias{coerce,Matrix,complex-method} % \alias{coerce,Matrix,matrix-method}% \alias{coerce,matrix,Matrix-method} \alias{coerce,ANY,Matrix-method} \alias{coerce,Matrix,denseMatrix-method} \alias{coerce,Matrix,CsparseMatrix-method} \alias{coerce,Matrix,sparseMatrix-method} %\alias{solve,Matrix,....-method}--> ./solve-methods.Rd \alias{rep,Matrix-method} \alias{svd,Matrix-method}% only if(.Matrix.avoiding.as.matrix) \alias{unname,Matrix,missing-method} % Fake entries - so users find this: \alias{print.Matrix} % \description{ The \code{Matrix} class is a class contained by all actual classes in the \pkg{Matrix} package. It is a \dQuote{virtual} class. } \section{Slots}{ Common to \emph{all} matrix objects in the package: \describe{ \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.} \item{\code{Dimnames}:}{list of length two; each component containing NULL or a \code{\link{character}} vector length equal the corresponding \code{Dim} element.} } } \section{Methods}{ \describe{ \item{determinant}{\code{signature(x = "Matrix", logarithm = "missing")}: and} \item{determinant}{\code{signature(x = "Matrix", logarithm = "logical")}: compute the (\eqn{\log}) determinant of \code{x}. The method chosen depends on the actual Matrix class of \code{x}. Note that \code{\link[base]{det}} also works for all our matrices, calling the appropriate \code{determinant()} method. The \code{Matrix::det} is an exact copy of \code{base::det}, but in the correct namespace, and hence calling the S4-aware version of \code{determinant()}.).} \item{diff}{\code{signature(x = "Matrix")}: As \code{\link{diff}()} for traditional matrices, i.e., applying \code{diff()} to each column.} \item{dim}{\code{signature(x = "Matrix")}: extract matrix dimensions \code{\link{dim}}.} \item{dim<-}{\code{signature(x = "Matrix", value = "ANY")}: where \code{value} is integer of length 2. Allows to \emph{reshape} Matrix objects, but only when \code{prod(value) == prod(dim(x))}.} \item{dimnames}{\code{signature(x = "Matrix")}: extract \code{\link{dimnames}}.} \item{dimnames<-}{\code{signature(x = "Matrix", value = "list")}: set the \code{dimnames} to a \code{\link{list}} of length 2, see \code{\link{dimnames<-}}.} \item{length}{\code{signature(x = "Matrix")}: simply defined as \code{prod(dim(x))} (and hence of mode \code{"double"}).} \item{show}{\code{signature(object = "Matrix")}: \code{\link{show}} method for \code{\link{print}}ing. For printing \emph{sparse} matrices, see \code{\link{printSpMatrix}}.} \item{image}{\code{signature(object = "Matrix")}: draws an \code{\link{image}} of the matrix entries, using \code{\link[lattice]{levelplot}()} from package \pkg{lattice}.} \item{head}{\code{signature(object = "Matrix")}: return only the \emph{\dQuote{head}}, i.e., the first few rows.} \item{tail}{\code{signature(object = "Matrix")}: return only the \emph{\dQuote{tail}}, i.e., the last few rows of the respective matrix.} \cr %------------------------------------ \item{as.matrix, as.array}{\code{signature(x = "Matrix")}: the same as \code{as(x, "matrix")}; see also the note below.} \item{as.vector}{\code{signature(x = "Matrix", mode = "missing")}: \code{as.vector(m)} should be identical to \code{as.vector(as(m, "matrix"))}, implemented more efficiently for some subclasses.} \item{as(x, "vector"), as(x, "numeric")}{etc, similarly.} \item{coerce}{\code{signature(from = "ANY", to = "Matrix")}: This relies on a correct \code{\link{as.matrix}()} method for \code{from}.} } There are many more methods that (conceptually should) work for all \code{"Matrix"} objects, e.g., \code{\link{colSums}}, \code{\link{rowMeans}}. Even \pkg{base} functions may work automagically (if they first call \code{\link{as.matrix}()} on their principal argument), e.g., \code{\link{apply}}, \code{\link{eigen}}, \code{\link{svd}} or \code{\link{kappa}} all do work via coercion to a \dQuote{traditional} (dense) \code{\link{matrix}}. %% --> ../tests/base-matrix-fun.R } \note{ %% Matrix.avoding.as.matrix is in __contradiction__ to this (since 2005-09-30 !): Loading the \code{Matrix} namespace \dQuote{overloads} \code{\link{as.matrix}} and \code{\link{as.array}} in the \pkg{base} namespace by the equivalent of \code{function(x) as(x, "matrix")}. Consequently, \code{as.matrix(m)} or \code{as.array(m)} will properly work when \code{m} inherits from the \code{"Matrix"} class --- \emph{also} for functions in package \pkg{base} and other packages. E.g., \code{\link{apply}} or \code{\link{outer}} can therefore be applied to \code{"Matrix"} matrices. } %\references{} \author{Douglas Bates \email{bates@stat.wisc.edu} and Martin Maechler} \seealso{ the classes \code{\linkS4class{dgeMatrix}}, \code{\linkS4class{dgCMatrix}}, and function \code{\link{Matrix}} for construction (and examples). Methods, e.g., for \code{\link[=kronecker-methods]{kronecker}}. } \examples{ slotNames("Matrix") cl <- getClass("Matrix") names(cl@subclasses) # more than 40 .. showClass("Matrix")#> output with slots and all subclasses (M <- Matrix(c(0,1,0,0), 6, 4)) dim(M) diag(M) cm <- M[1:4,] + 10*Diagonal(4) diff(M) ## can reshape it even : dim(M) <- c(2, 12) M stopifnot(identical(M, Matrix(c(0,1,0,0), 2,12)), all.equal(det(cm), determinant(as(cm,"matrix"), log=FALSE)$modulus, check.attributes=FALSE)) } \keyword{classes} \keyword{algebra} Matrix/man/matrix-products.Rd0000644000176200001440000004463713153267746015761 0ustar liggesusers\name{matrix-products} \docType{methods} \title{Matrix (Cross) Products (of Transpose)} \alias{\%*\%-methods} \alias{crossprod-methods} \alias{tcrossprod-methods} %%-- %*% ------------------------------------- \alias{\%*\%,ddenseMatrix,ldenseMatrix-method} \alias{\%*\%,ddenseMatrix,matrix-method} \alias{\%*\%,ddenseMatrix,ndenseMatrix-method} \alias{\%*\%,ldenseMatrix,ddenseMatrix-method} \alias{\%*\%,ldenseMatrix,ldenseMatrix-method} \alias{\%*\%,ldenseMatrix,matrix-method} \alias{\%*\%,ldenseMatrix,ndenseMatrix-method} \alias{\%*\%,matrix,ddenseMatrix-method} \alias{\%*\%,matrix,ldenseMatrix-method} \alias{\%*\%,matrix,ndenseMatrix-method} \alias{\%*\%,ndenseMatrix,ddenseMatrix-method} \alias{\%*\%,ndenseMatrix,ldenseMatrix-method} \alias{\%*\%,ndenseMatrix,matrix-method} \alias{\%*\%,ndenseMatrix,ndenseMatrix-method} \alias{\%*\%,dgeMatrix,dgeMatrix-method} \alias{\%*\%,dgeMatrix,matrix-method} \alias{\%*\%,dgeMatrix,numLike-method} \alias{\%*\%,matrix,dgeMatrix-method} \alias{\%*\%,numLike,dgeMatrix-method} \alias{\%*\%,numLike,CsparseMatrix-method} \alias{\%*\%,CsparseMatrix,CsparseMatrix-method} \alias{\%*\%,CsparseMatrix,ddenseMatrix-method} \alias{\%*\%,CsparseMatrix,matrix-method} \alias{\%*\%,CsparseMatrix,numLike-method} \alias{\%*\%,ddenseMatrix,CsparseMatrix-method} \alias{\%*\%,matrix,CsparseMatrix-method} \alias{\%*\%,matrix,sparseMatrix-method} \alias{\%*\%,sparseMatrix,matrix-method} \alias{\%*\%,ddenseMatrix,ddenseMatrix-method} \alias{\%*\%,dgeMatrix,diagonalMatrix-method} \alias{\%*\%,matrix,diagonalMatrix-method} \alias{\%*\%,diagonalMatrix,dgeMatrix-method} \alias{\%*\%,diagonalMatrix,diagonalMatrix-method} \alias{\%*\%,diagonalMatrix,matrix-method} \alias{\%*\%,diagonalMatrix,CsparseMatrix-method} \alias{\%*\%,diagonalMatrix,sparseMatrix-method} \alias{\%*\%,CsparseMatrix,diagonalMatrix-method} \alias{\%*\%,sparseMatrix,diagonalMatrix-method} \alias{\%*\%,denseMatrix,diagonalMatrix-method} \alias{\%*\%,diagonalMatrix,denseMatrix-method} \alias{\%*\%,diagonalMatrix,lgeMatrix-method} \alias{\%*\%,lgeMatrix,diagonalMatrix-method} \alias{\%*\%,nMatrix,lMatrix-method} \alias{\%*\%,lMatrix,nMatrix-method} \alias{\%*\%,lMatrix,lMatrix-method} \alias{\%*\%,nMatrix,nMatrix-method} \alias{\%*\%,dMatrix,lMatrix-method} \alias{\%*\%,dMatrix,nMatrix-method} \alias{\%*\%,lMatrix,dMatrix-method} \alias{\%*\%,nMatrix,dMatrix-method} \alias{\%*\%,dMatrix,integer-method} \alias{\%*\%,integer,dMatrix-method} \alias{\%*\%,Matrix,numLike-method} \alias{\%*\%,numLike,Matrix-method} \alias{\%*\%,Matrix,ANY-method} \alias{\%*\%,ANY,Matrix-method} \alias{\%*\%,Matrix,matrix-method} \alias{\%*\%,matrix,Matrix-method} \alias{\%*\%,ddenseMatrix,dsparseMatrix-method} \alias{\%*\%,dgeMatrix,dsparseMatrix-method} \alias{\%*\%,dsparseMatrix,ddenseMatrix-method} \alias{\%*\%,dsparseMatrix,dgeMatrix-method} \alias{\%*\%,ddenseMatrix,dsyMatrix-method} \alias{\%*\%,matrix,dsyMatrix-method} \alias{\%*\%,dsyMatrix,dsyMatrix-method} \alias{\%*\%,dspMatrix,ddenseMatrix-method} \alias{\%*\%,dspMatrix,matrix-method} \alias{\%*\%,dsyMatrix,ddenseMatrix-method} \alias{\%*\%,dsyMatrix,matrix-method} \alias{\%*\%,dtpMatrix,ddenseMatrix-method} \alias{\%*\%,dgeMatrix,dtpMatrix-method} \alias{\%*\%,dtpMatrix,matrix-method} \alias{\%*\%,matrix,dtpMatrix-method} \alias{\%*\%,dtrMatrix,dtrMatrix-method} \alias{\%*\%,ddenseMatrix,dtrMatrix-method} \alias{\%*\%,dtrMatrix,ddenseMatrix-method} \alias{\%*\%,dtrMatrix,matrix-method} \alias{\%*\%,matrix,dtrMatrix-method} \alias{\%*\%,matrix,indMatrix-method} \alias{\%*\%,indMatrix,matrix-method} \alias{\%*\%,indMatrix,indMatrix-method} \alias{\%*\%,Matrix,indMatrix-method} \alias{\%*\%,indMatrix,Matrix-method} \alias{\%*\%,lgCMatrix,lgCMatrix-method} \alias{\%*\%,lsparseMatrix,lsparseMatrix-method} \alias{\%*\%,lsparseMatrix,ldenseMatrix-method} \alias{\%*\%,ldenseMatrix,lsparseMatrix-method} \alias{\%*\%,ngCMatrix,ngCMatrix-method} \alias{\%*\%,nsparseMatrix,nsparseMatrix-method} \alias{\%*\%,nsparseMatrix,ndenseMatrix-method} \alias{\%*\%,ndenseMatrix,nsparseMatrix-method} \alias{\%*\%,matrix,pMatrix-method} \alias{\%*\%,pMatrix,matrix-method} \alias{\%*\%,pMatrix,pMatrix-method} \alias{\%*\%,Matrix,pMatrix-method} \alias{\%*\%,pMatrix,Matrix-method} \alias{\%*\%,mMatrix,sparseVector-method} \alias{\%*\%,sparseVector,mMatrix-method} \alias{\%*\%,sparseVector,sparseVector-method} \alias{\%*\%,numLike,sparseVector-method} \alias{\%*\%,sparseVector,numLike-method} \alias{\%*\%,TsparseMatrix,ANY-method} \alias{\%*\%,ANY,TsparseMatrix-method} \alias{\%*\%,TsparseMatrix,Matrix-method} \alias{\%*\%,Matrix,TsparseMatrix-method} \alias{\%*\%,TsparseMatrix,TsparseMatrix-method} %%-- crossprod ------------------------------- \alias{crossprod-methods} \alias{crossprod,dgeMatrix,dgeMatrix-method} \alias{crossprod,dgeMatrix,matrix-method} \alias{crossprod,dgeMatrix,numLike-method} \alias{crossprod,dgeMatrix,missing-method} \alias{crossprod,matrix,dgeMatrix-method} \alias{crossprod,numLike,dgeMatrix-method} \alias{crossprod,numLike,CsparseMatrix-method} \alias{crossprod,CsparseMatrix,missing-method} \alias{crossprod,CsparseMatrix,CsparseMatrix-method} \alias{crossprod,CsparseMatrix,ddenseMatrix-method} \alias{crossprod,CsparseMatrix,matrix-method} \alias{crossprod,CsparseMatrix,numLike-method} \alias{crossprod,ddenseMatrix,CsparseMatrix-method} \alias{crossprod,matrix,CsparseMatrix-method} \alias{crossprod,ddenseMatrix,missing-method} \alias{crossprod,ddenseMatrix,dgCMatrix-method} \alias{crossprod,dgCMatrix,dgeMatrix-method} \alias{crossprod,CsparseMatrix,diagonalMatrix-method} \alias{crossprod,diagonalMatrix,CsparseMatrix-method} \alias{crossprod,diagonalMatrix,dgeMatrix-method} \alias{crossprod,diagonalMatrix,diagonalMatrix-method} \alias{crossprod,diagonalMatrix,lgeMatrix-method} \alias{crossprod,diagonalMatrix,matrix-method} \alias{crossprod,diagonalMatrix,missing-method} \alias{crossprod,diagonalMatrix,sparseMatrix-method} \alias{crossprod,sparseMatrix,diagonalMatrix-method} \alias{crossprod,ANY,Matrix-method} \alias{crossprod,Matrix,numLike-method} \alias{crossprod,numLike,Matrix-method} \alias{crossprod,Matrix,ANY-method} \alias{crossprod,Matrix,missing-method} \alias{crossprod,Matrix,Matrix-method} \alias{crossprod,Matrix,matrix-method} \alias{crossprod,matrix,Matrix-method} \alias{crossprod,matrix,diagonalMatrix-method} \alias{crossprod,ddenseMatrix,dsparseMatrix-method} \alias{crossprod,dgeMatrix,dsparseMatrix-method} \alias{crossprod,dsparseMatrix,ddenseMatrix-method} \alias{crossprod,dsparseMatrix,dgeMatrix-method} \alias{crossprod,dtpMatrix,ddenseMatrix-method} \alias{crossprod,dtpMatrix,matrix-method} \alias{crossprod,dtrMatrix,ddenseMatrix-method} \alias{crossprod,dtrMatrix,dtrMatrix-method} \alias{crossprod,dtrMatrix,matrix-method} \alias{crossprod,matrix,dtrMatrix-method} \alias{crossprod,dtrMatrix,missing-method} \alias{crossprod,indMatrix,matrix-method} \alias{crossprod,indMatrix,Matrix-method} \alias{crossprod,indMatrix,indMatrix-method} \alias{crossprod,indMatrix,missing-method} \alias{crossprod,lgCMatrix,missing-method} \alias{crossprod,lgTMatrix,missing-method} \alias{crossprod,lsparseMatrix-method} \alias{crossprod,lsparseMatrix,missing-method} \alias{crossprod,lsparseMatrix,lsparseMatrix-method} \alias{crossprod,lsparseMatrix,ldenseMatrix-method} \alias{crossprod,ldenseMatrix,lsparseMatrix-method} \alias{crossprod,ngCMatrix,missing-method} \alias{crossprod,ngTMatrix,missing-method} \alias{crossprod,nsparseMatrix-method} \alias{crossprod,nsparseMatrix,missing-method} \alias{crossprod,nsparseMatrix,nsparseMatrix-method} \alias{crossprod,nsparseMatrix,ndenseMatrix-method} \alias{crossprod,ndenseMatrix,nsparseMatrix-method} \alias{crossprod,pMatrix,matrix-method} \alias{crossprod,pMatrix,Matrix-method} \alias{crossprod,pMatrix,pMatrix-method} \alias{crossprod,pMatrix,missing-method} \alias{crossprod,mMatrix,sparseVector-method} \alias{crossprod,sparseVector,mMatrix-method} \alias{crossprod,sparseVector,missing-method} \alias{crossprod,sparseVector,sparseVector-method} \alias{crossprod,numLike,sparseVector-method} \alias{crossprod,sparseVector,numLike-method} \alias{crossprod,TsparseMatrix,ANY-method} \alias{crossprod,ANY,TsparseMatrix-method} \alias{crossprod,TsparseMatrix,Matrix-method} \alias{crossprod,Matrix,TsparseMatrix-method} \alias{crossprod,TsparseMatrix,TsparseMatrix-method} \alias{crossprod,TsparseMatrix,missing-method} \alias{crossprod,symmetricMatrix,Matrix-method} \alias{crossprod,symmetricMatrix,missing-method} \alias{crossprod,symmetricMatrix,ANY-method} \alias{crossprod,ddenseMatrix,ddenseMatrix-method} \alias{crossprod,ddenseMatrix,ldenseMatrix-method} \alias{crossprod,ddenseMatrix,matrix-method} \alias{crossprod,ddenseMatrix,ndenseMatrix-method} \alias{crossprod,ldenseMatrix,ddenseMatrix-method} \alias{crossprod,ldenseMatrix,ldenseMatrix-method} \alias{crossprod,ldenseMatrix,matrix-method} \alias{crossprod,ldenseMatrix,missing-method} \alias{crossprod,ldenseMatrix,ndenseMatrix-method} \alias{crossprod,ndenseMatrix,ddenseMatrix-method} \alias{crossprod,ndenseMatrix,ldenseMatrix-method} \alias{crossprod,ndenseMatrix,matrix-method} \alias{crossprod,ndenseMatrix,missing-method} \alias{crossprod,ndenseMatrix,ndenseMatrix-method} %%-- tcrossprod ------------------------------ \alias{tcrossprod-methods} \alias{tcrossprod,dgeMatrix,missing-method} \alias{tcrossprod,dgeMatrix,dgeMatrix-method} \alias{tcrossprod,dgeMatrix,matrix-method} \alias{tcrossprod,dgeMatrix,numLike-method} \alias{tcrossprod,matrix,dgeMatrix-method} \alias{tcrossprod,numLike,dgeMatrix-method} \alias{tcrossprod,CsparseMatrix,ddenseMatrix-method} \alias{tcrossprod,CsparseMatrix,matrix-method} \alias{tcrossprod,CsparseMatrix,numLike-method} \alias{tcrossprod,ddenseMatrix,CsparseMatrix-method} \alias{tcrossprod,matrix,CsparseMatrix-method} \alias{tcrossprod,numLike,CsparseMatrix-method} \alias{tcrossprod,CsparseMatrix,CsparseMatrix-method} \alias{tcrossprod,CsparseMatrix,missing-method} \alias{tcrossprod,ddenseMatrix,missing-method} \alias{tcrossprod,CsparseMatrix,diagonalMatrix-method} \alias{tcrossprod,dgeMatrix,diagonalMatrix-method} \alias{tcrossprod,diagonalMatrix,CsparseMatrix-method} \alias{tcrossprod,diagonalMatrix,diagonalMatrix-method} \alias{tcrossprod,diagonalMatrix,matrix-method} \alias{tcrossprod,diagonalMatrix,missing-method} \alias{tcrossprod,diagonalMatrix,sparseMatrix-method} \alias{tcrossprod,lgeMatrix,diagonalMatrix-method} \alias{tcrossprod,matrix,diagonalMatrix-method} \alias{tcrossprod,sparseMatrix,diagonalMatrix-method} \alias{tcrossprod,ANY,Matrix-method} \alias{tcrossprod,numLike,Matrix-method} \alias{tcrossprod,Matrix,numLike-method} \alias{tcrossprod,Matrix,ANY-method} \alias{tcrossprod,Matrix,missing-method} \alias{tcrossprod,Matrix,Matrix-method} \alias{tcrossprod,Matrix,matrix-method} \alias{tcrossprod,matrix,Matrix-method} \alias{tcrossprod,ddenseMatrix,dtrMatrix-method} \alias{tcrossprod,dtrMatrix,dtrMatrix-method} \alias{tcrossprod,matrix,dtrMatrix-method} \alias{tcrossprod,matrix,indMatrix-method} \alias{tcrossprod,Matrix,indMatrix-method} \alias{tcrossprod,indMatrix,indMatrix-method} \alias{tcrossprod,indMatrix,missing-method} \alias{tcrossprod,lgCMatrix,missing-method} \alias{tcrossprod,lgTMatrix,missing-method} \alias{tcrossprod,lsparseMatrix,missing-method} \alias{tcrossprod,ngCMatrix,missing-method} \alias{tcrossprod,ngTMatrix,missing-method} \alias{tcrossprod,nsparseMatrix,missing-method} \alias{tcrossprod,matrix,pMatrix-method} \alias{tcrossprod,Matrix,pMatrix-method} \alias{tcrossprod,pMatrix,pMatrix-method} \alias{tcrossprod,pMatrix,missing-method} \alias{tcrossprod,mMatrix,sparseVector-method} \alias{tcrossprod,sparseMatrix,sparseVector-method} \alias{tcrossprod,sparseVector,mMatrix-method} \alias{tcrossprod,sparseVector,missing-method} \alias{tcrossprod,sparseVector,sparseMatrix-method} \alias{tcrossprod,sparseVector,sparseVector-method} \alias{tcrossprod,numLike,sparseVector-method} \alias{tcrossprod,sparseVector,numLike-method} \alias{tcrossprod,TsparseMatrix,ANY-method} \alias{tcrossprod,ANY,TsparseMatrix-method} \alias{tcrossprod,TsparseMatrix,Matrix-method} \alias{tcrossprod,Matrix,TsparseMatrix-method} \alias{tcrossprod,TsparseMatrix,TsparseMatrix-method} \alias{tcrossprod,TsparseMatrix,missing-method} \alias{tcrossprod,Matrix,symmetricMatrix-method} \alias{tcrossprod,ANY,symmetricMatrix-method} \alias{tcrossprod,ddenseMatrix,ddenseMatrix-method} \alias{tcrossprod,ddenseMatrix,ldenseMatrix-method} \alias{tcrossprod,ddenseMatrix,matrix-method} \alias{tcrossprod,ddenseMatrix,ndenseMatrix-method} \alias{tcrossprod,ldenseMatrix,ddenseMatrix-method} \alias{tcrossprod,ldenseMatrix,ldenseMatrix-method} \alias{tcrossprod,ldenseMatrix,matrix-method} \alias{tcrossprod,ldenseMatrix,missing-method} \alias{tcrossprod,ldenseMatrix,ndenseMatrix-method} \alias{tcrossprod,ndenseMatrix,ddenseMatrix-method} \alias{tcrossprod,ndenseMatrix,ldenseMatrix-method} \alias{tcrossprod,ndenseMatrix,matrix-method} \alias{tcrossprod,ndenseMatrix,missing-method} \alias{tcrossprod,ndenseMatrix,ndenseMatrix-method} % (special class methods, added only for speedup:) \alias{tcrossprod,ddenseMatrix,dsCMatrix-method} \alias{tcrossprod,ddenseMatrix,lsCMatrix-method} \alias{tcrossprod,ddenseMatrix,nsCMatrix-method} \alias{tcrossprod,matrix,dsCMatrix-method} \alias{tcrossprod,matrix,lsCMatrix-method} \alias{tcrossprod,matrix,nsCMatrix-method} %%--------------- %- these three are needed for R CMD check: \alias{\%*\%} \alias{crossprod} \alias{tcrossprod} %% no longer (don't want to mask 'base' functionality): % \alias{tcrossprod,matrix,missing-method} % \alias{tcrossprod,numeric,missing-method} \description{ The basic matrix product, \code{\%*\%} is implemented for all our \code{\linkS4class{Matrix}} and also for \code{\linkS4class{sparseVector}} classes, fully analogously to \R's base \code{matrix} and vector objects. The functions \code{\link{crossprod}} and \code{\link{tcrossprod}} are matrix products or \dQuote{cross products}, ideally implemented efficiently without computing \code{\link{t}(.)}'s unnecessarily. They also return \code{\linkS4class{symmetricMatrix}} classed matrices when easily detectable, e.g., in \code{crossprod(m)}, the one argument case. \code{tcrossprod()} takes the cross-product of the transpose of a matrix. \code{tcrossprod(x)} is formally equivalent to, but faster than, the call \code{x \%*\% t(x)}, and so is \code{tcrossprod(x, y)} instead of \code{x \%*\% t(y)}. \emph{Boolean} matrix products are computed via either \code{\link{\%&\%}} or \code{boolArith = TRUE}. } \usage{ \S4method{\%*\%}{CsparseMatrix,diagonalMatrix}(x, y) \S4method{crossprod}{dgeMatrix,missing}(x, y = NULL, boolArith = NA, \dots) \S4method{crossprod}{CsparseMatrix,diagonalMatrix}(x, y = NULL, boolArith = NA, \dots) ## .... and for many more signatures \S4method{tcrossprod}{CsparseMatrix,ddenseMatrix}(x, y = NULL, boolArith = NA, \dots) \S4method{tcrossprod}{TsparseMatrix,missing}(x, y = NULL, boolArith = NA, \dots) ## .... and for many more signatures } \arguments{ \item{x}{a matrix-like object} \item{y}{a matrix-like object, or for \code{[t]crossprod()} \code{NULL} (by default); the latter case is formally equivalent to \code{y = x}.} \item{boolArith}{\code{\link{logical}}, i.e., \code{NA}, \code{TRUE}, or \code{FALSE}. If true the result is (coerced to) a pattern matrix, i.e., \code{"\linkS4class{nMatrix}"}, unless there are \code{NA} entries and the result will be a \code{"\linkS4class{lMatrix}"}. If false the result is (coerced to) numeric. When \code{NA}, currently the default, the result is a pattern matrix when \code{x} and \code{y} are \code{"\linkS4class{nsparseMatrix}"} and numeric otherwise.} \item{\dots}{potentially more arguments passed to and from methods.} } \details{ For some classes in the \code{Matrix} package, such as \code{\linkS4class{dgCMatrix}}, it is much faster to calculate the cross-product of the transpose directly instead of calculating the transpose first and then its cross-product. \code{boolArith = TRUE} for regular (\dQuote{non cross}) matrix products, \code{\%*\%} cannot be specified. Instead, we provide the \code{\link{\%&\%}} operator for \emph{boolean} matrix products. } \note{ \code{boolArith = TRUE}, \code{FALSE} or \code{NA} has been newly introduced for \pkg{Matrix} 1.2.0 (March 2015). Its implementation may be incomplete and partly missing. Please report such omissions if detected! Currently, \code{boolArith = TRUE} is implemented via \code{\linkS4class{CsparseMatrix}} coercions which may be quite inefficient for dense matrices. Contributions for efficiency improvements are welcome. } \value{ A \code{\linkS4class{Matrix}} object, in the one argument case of an appropriate \emph{symmetric} matrix class, i.e., inheriting from \code{\linkS4class{symmetricMatrix}}. } \section{Methods}{ \describe{ \item{\%*\%}{\code{signature(x = "dgeMatrix", y = "dgeMatrix")}: Matrix multiplication; ditto for several other signature combinations, see \code{showMethods("\%*\%", class = "dgeMatrix")}.} \item{\%*\%}{\code{signature(x = "dtrMatrix", y = "matrix")} and other signatures (use \code{showMethods("\%*\%", class="dtrMatrix")}): matrix multiplication. Multiplication of (matching) triangular matrices now should remain triangular (in the sense of class \linkS4class{triangularMatrix}).} \item{crossprod}{\code{signature(x = "dgeMatrix", y = "dgeMatrix")}: ditto for several other signatures, use \code{showMethods("crossprod", class = "dgeMatrix")}, matrix crossproduct, an efficient version of \code{t(x) \%*\% y}.} \item{crossprod}{\code{signature(x = "CsparseMatrix", y = "missing")} returns \code{t(x) \%*\% x} as an \code{dsCMatrix} object.} \item{crossprod}{\code{signature(x = "TsparseMatrix", y = "missing")} returns \code{t(x) \%*\% x} as an \code{dsCMatrix} object.} \item{crossprod,tcrossprod}{\code{signature(x = "dtrMatrix", y = "matrix")} and other signatures, see \code{"\%*\%"} above.} }%{describe} } \seealso{\code{\link[base]{tcrossprod}} in \R's base, \code{\link{crossprod}} and \code{\link{\%*\%}}.} \examples{ ## A random sparse "incidence" matrix : m <- matrix(0, 400, 500) set.seed(12) m[runif(314, 0, length(m))] <- 1 mm <- as(m, "dgCMatrix") object.size(m) / object.size(mm) # smaller by a factor of > 200 ## tcrossprod() is very fast: system.time(tCmm <- tcrossprod(mm))# 0 (PIII, 933 MHz) system.time(cm <- crossprod(t(m))) # 0.16 system.time(cm. <- tcrossprod(m)) # 0.02 stopifnot(cm == as(tCmm, "matrix")) ## show sparse sub matrix tCmm[1:16, 1:30] } \keyword{methods} \keyword{algebra} Matrix/man/dsparseMatrix-class.Rd0000644000176200001440000000241112271746775016531 0ustar liggesusers\name{dsparseMatrix-class} \docType{class} \alias{dsparseMatrix-class} % Group \alias{Summary,dsparseMatrix-method} \alias{Arith,dsparseMatrix,logical-method} \alias{Arith,dsparseMatrix,numeric-method} \alias{Arith,logical,dsparseMatrix-method} \alias{Arith,numeric,dsparseMatrix-method} % \alias{lu,dsparseMatrix-method} % \title{Virtual Class "dsparseMatrix" of Numeric Sparse Matrices} \description{The Class \code{"dsparseMatrix"} is the virtual (super) class of all numeric sparse matrices. } \section{Slots}{ \describe{ \item{\code{Dim}:}{the matrix dimension, see class \code{"\linkS4class{Matrix}"}.} \item{\code{Dimnames}:}{see the \code{"Matrix"} class.} \item{\code{x}:}{a \code{\link{numeric}} vector containing the (non-zero) matrix entries.} } } \section{Extends}{ Class \code{"dMatrix"} and \code{"sparseMatrix"}, directly.\cr Class \code{"Matrix"}, by the above classes. } % \section{Methods}{ % No methods defined with class "dsparseMatrix" in the signature. % } %%\author{Martin} \seealso{ the documentation of the (non virtual) sub classes, see \code{showClass("dsparseMatrix")}; in particular, \linkS4class{dgTMatrix}, \linkS4class{dgCMatrix}, and \linkS4class{dgRMatrix}. } \examples{ showClass("dsparseMatrix") } \keyword{classes} Matrix/man/dMatrix-class.Rd0000644000176200001440000001264713057762217015317 0ustar liggesusers\name{dMatrix-class} \docType{class} \title{(Virtual) Class "dMatrix" of "double" Matrices} \alias{dMatrix-class} \alias{lMatrix-class} % \alias{show,dMatrix-method} %\alias{coerce,dMatrix,matrix-method} \alias{coerce,dMatrix,lMatrix-method} \alias{coerce,lMatrix,dMatrix-method} \alias{coerce,lMatrix,dgCMatrix-method} \alias{coerce,matrix,lMatrix-method} %\alias{coerce,dMatrix,dgeMatrix-method} \alias{[,dMatrix,lMatrix,missing,ANY-method} \alias{[,dMatrix,logical,missing,ANY-method} % Group methods \alias{Ops,dMatrix,dMatrix-method} \alias{Ops,dMatrix,lMatrix-method} \alias{Ops,dMatrix,nMatrix-method} \alias{Ops,lMatrix,dMatrix-method} \alias{Ops,lMatrix,lMatrix-method} \alias{Ops,lMatrix,numeric-method} \alias{Ops,nMatrix,dMatrix-method} \alias{Ops,numeric,lMatrix-method} \alias{Arith,dMatrix,dMatrix-method} \alias{Arith,lMatrix,logical-method} \alias{Arith,lMatrix,numeric-method} \alias{Arith,logical,lMatrix-method} \alias{Arith,numeric,lMatrix-method} \alias{Compare,dMatrix,logical-method} \alias{Compare,dMatrix,numeric-method} \alias{Compare,lMatrix,logical-method} \alias{Compare,lMatrix,numeric-method} \alias{Compare,logical,dMatrix-method} \alias{Compare,logical,lMatrix-method} \alias{Compare,numeric,dMatrix-method} \alias{Compare,numeric,lMatrix-method} \alias{Logic,dMatrix,logical-method} \alias{Logic,dMatrix,numeric-method} \alias{Logic,lMatrix,logical-method} \alias{Logic,lMatrix,numeric-method} \alias{Logic,logical,dMatrix-method} \alias{Logic,logical,lMatrix-method} \alias{Logic,numeric,dMatrix-method} \alias{Logic,numeric,lMatrix-method} \alias{Summary,lMatrix-method} %% R <= 2.5.x : % \alias{Math2,dMatrix,ANY-method}% Math2 = round + signif,.., but % \alias{Math2,dMatrix,missing-method} % % for silly reasons, need these 2+3 as well: % \alias{round,dMatrix,numeric-method} % \alias{signif,dMatrix,numeric-method} %% R-2.6.0 - maybe \alias{Math2,dMatrix-method} \alias{log,dMatrix-method} \alias{gamma,dMatrix-method} \alias{lgamma,dMatrix-method} % \alias{zapsmall,dMatrix-method} \alias{which,lMatrix-method} % %\alias{solve,...} --> solve-methods.Rd \description{ The \code{dMatrix} class is a virtual class contained by all actual classes of numeric matrices in the \pkg{Matrix} package. Similarly, all the actual classes of logical matrices inherit from the \code{lMatrix} class. } %\section{Objects from the Class}{A virtual Class: No objects may be % created from it. %} \section{Slots}{ Common to \emph{all} matrix object in the package: \describe{ \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.} \item{\code{Dimnames}:}{list of length two; each component containing NULL or a \code{\link{character}} vector length equal the corresponding \code{Dim} element.} } } \section{Methods}{ There are (relatively simple) group methods (see, e.g., \code{\link{Arith}}) \describe{ \item{Arith}{\code{signature(e1 = "dMatrix", e2 = "dMatrix")}: ... } \item{Arith}{\code{signature(e1 = "dMatrix", e2 = "numeric")}: ... } \item{Arith}{\code{signature(e1 = "numeric", e2 = "dMatrix")}: ... } \item{Math}{\code{signature(x = "dMatrix")}: ... } \item{Math2}{\code{signature(x = "dMatrix", digits = "numeric")}: this group contains \code{\link{round}()} and \code{\link{signif}()}.} \item{Compare}{\code{signature(e1 = "numeric", e2 = "dMatrix")}: ... } \item{Compare}{\code{signature(e1 = "dMatrix", e2 = "numeric")}: ... } \item{Compare}{\code{signature(e1 = "dMatrix", e2 = "dMatrix")}: ... } \item{Summary}{\code{signature(x = "dMatrix")}: The \code{"Summary"} group contains the seven functions \code{\link{max}()}, \code{\link{min}()}, \code{\link{range}()}, \code{\link{prod}()}, \code{\link{sum}()}, \code{\link{any}()}, and \code{\link{all}()}.} } The following methods are also defined for all double matrices: \describe{ \item{coerce}{\code{signature(from = "dMatrix", to = "matrix")}: ... } % \item{expm}{\code{signature(x = "dMatrix")}: computes the \emph{\dQuote{Matrix Exponential}}, see \code{\link{expm}}.} \item{zapsmall}{\code{signature(x = "dMatrix")}: ... } } The following methods are defined for all logical matrices: \describe{ \item{which}{\code{signature(x = "lsparseMatrix")} and many other subclasses of \code{"lMatrix"}: as the \pkg{base} function \code{\link{which}(x, arr.ind)} returns the indices of the \code{\link{TRUE}} entries in \code{x}; if \code{arr.ind} is true, as a 2-column matrix of row and column indices. Since \pkg{Matrix} version 1.2-9, if \code{useNames} is true, as by default, with \code{\link{dimnames}}, the same as \code{base::which}.} } } %\references{} % Martin + Doug\author{Douglas Bates \email{bates@stat.wisc.edu}} \seealso{ The nonzero-pattern matrix class \code{\linkS4class{nMatrix}}, which can be used to store non-\code{\link{NA}} \code{\link{logical}} matrices even more compactly. The numeric matrix classes \code{\linkS4class{dgeMatrix}}, \code{\linkS4class{dgCMatrix}}, and \code{\linkS4class{Matrix}}. \code{\link{drop0}(x, tol=1e-10)} is sometimes preferable to (and more efficient than) \code{zapsmall(x, digits=10)}. } \examples{ showClass("dMatrix") set.seed(101) round(Matrix(rnorm(28), 4,7), 2) M <- Matrix(rlnorm(56, sd=10), 4,14) (M. <- zapsmall(M)) table(as.logical(M. == 0)) } \keyword{classes} \keyword{algebra} Matrix/man/kronecker-methods.Rd0000644000176200001440000000467313153267746016234 0ustar liggesusers\name{kronecker-methods} \docType{methods} \title{Methods for Function 'kronecker()' in Package 'Matrix'} \alias{kronecker-methods} % \alias{kronecker,ANY,Matrix-method} \alias{kronecker,ANY,diagonalMatrix-method} \alias{kronecker,ANY,sparseMatrix-method} \alias{kronecker,Matrix,ANY-method} \alias{kronecker,Matrix,diagonalMatrix-method} \alias{kronecker,diagonalMatrix,ANY-method} \alias{kronecker,diagonalMatrix,Matrix-method} \alias{kronecker,indMatrix,indMatrix-method} \alias{kronecker,sparseMatrix,ANY-method} \alias{kronecker,sparseMatrix,TsparseMatrix-method} % \alias{kronecker,TsparseMatrix,sparseMatrix-method} \alias{kronecker,TsparseMatrix,TsparseMatrix-method} \alias{kronecker,dgTMatrix,dgTMatrix-method} \alias{kronecker,dgTMatrix,dtTMatrix-method} \alias{kronecker,dtTMatrix,dgTMatrix-method} \alias{kronecker,dtTMatrix,dtTMatrix-method} \alias{kronecker,dsparseMatrix,dsparseMatrix-method} % \description{ Computes Kronecker products for objects inheriting from \code{"\linkS4class{Matrix}"}. In order to preserver sparseness, we treat \code{0 * NA} as \code{0}, not as \code{\link{NA}} as usually in \R (and as used for the \pkg{base} function \code{\link[base]{kronecker}}). } \section{Methods}{ \describe{ \item{kronecker}{\code{signature(X = "Matrix", Y = "ANY")} .......} \item{kronecker}{\code{signature(X = "ANY", Y = "Matrix")} .......} \item{kronecker}{\code{signature(X = "diagonalMatrix", Y = "ANY")} .......} \item{kronecker}{\code{signature(X = "sparseMatrix", Y = "ANY")} .......} \item{kronecker}{\code{signature(X = "TsparseMatrix", Y = "TsparseMatrix")} .......} \item{kronecker}{\code{signature(X = "dgTMatrix", Y = "dgTMatrix")} .......} \item{kronecker}{\code{signature(X = "dtTMatrix", Y = "dtTMatrix")} .......} \item{kronecker}{\code{signature(X = "indMatrix", Y = "indMatrix")} .......} } } \examples{ (t1 <- spMatrix(5,4, x= c(3,2,-7,11), i= 1:4, j=4:1)) # 5 x 4 (t2 <- kronecker(Diagonal(3, 2:4), t1)) # 15 x 12 ## should also work with special-cased logical matrices l3 <- upper.tri(matrix(,3,3)) M <- Matrix(l3) (N <- as(M, "nsparseMatrix")) # "ntCMatrix" (upper triangular) N2 <- as(N, "generalMatrix") # (lost "t"riangularity) MM <- kronecker(M,M) NN <- kronecker(N,N) # "dtTMatrix" i.e. did keep NN2 <- kronecker(N2,N2) stopifnot(identical(NN,MM), is(NN2, "sparseMatrix"), all(NN2 == NN), is(NN, "triangularMatrix")) } \keyword{methods} \keyword{array} Matrix/man/abIseq.Rd0000644000176200001440000000360111617257315013774 0ustar liggesusers\name{abIseq} \title{Sequence Generation of "abIndex", Abstract Index Vectors} \Rdversion{1.1} % \alias{abIseq} \alias{abIseq1} \alias{c.abIndex} % \description{ Generation of abstract index vectors, i.e., objects of class \code{"\linkS4class{abIndex}"}. \code{abIseq()} is designed to work entirely like \code{\link{seq}}, but producing \code{"abIndex"} vectors.\cr \code{abIseq1()} is its basic building block, where \code{abIseq1(n,m)} corresponds to \code{n:m}. \code{c(x, ...)} will return an \code{"abIndex"} vector, when \code{x} is one. } \usage{ abIseq1(from = 1, to = 1) abIseq (from = 1, to = 1, by = ((to - from)/(length.out - 1)), length.out = NULL, along.with = NULL) \method{c}{abIndex}(\dots) } \arguments{ \item{from, to}{the starting and (maximal) end value of the sequence.} \item{by}{number: increment of the sequence.} \item{length.out}{desired length of the sequence. A non-negative number, which for \code{seq} and \code{seq.int} will be rounded up if fractional.} \item{along.with}{take the length from the length of this argument.} \item{\dots}{in general an arbitrary number of \R objects; here, when the first is an \code{"\linkS4class{abIndex}"} vector, these arguments will be concatenated to a new \code{"abIndex"} object.} } %\author{Martin Maechler} % \details{ % } \value{ An abstract index vector, i.e., object of class \code{"\linkS4class{abIndex}"}. } % \references{ % %% ~put references to the literature/web site here ~ % } \seealso{ the class \code{\linkS4class{abIndex}} documentation; \code{\link{rep2abI}()} for another constructor; \code{\link{rle}} (\pkg{base}). } \examples{ stopifnot(identical(-3:20, as(abIseq1(-3,20), "vector"))) try( ## (arithmetic) not yet implemented abIseq(1, 50, by = 3) ) %% FIXME: add / exchange with ../tests/abIndex-tsts.R } \keyword{manip} \keyword{classes} Matrix/man/nsparseMatrix-classes.Rd0000644000176200001440000002035013057762217017065 0ustar liggesusers\name{nsparseMatrix-classes} \title{Sparse "pattern" Matrices} \docType{class} \alias{nsparseMatrix-class} %not yet \alias{nCsparseMatrix-class} \alias{ngCMatrix-class} \alias{ntCMatrix-class} \alias{nsCMatrix-class} \alias{ngRMatrix-class} \alias{ntRMatrix-class} \alias{nsRMatrix-class} \alias{ngTMatrix-class} \alias{ntTMatrix-class} \alias{nsTMatrix-class} % \alias{all,nsparseMatrix-method} \alias{any,nsparseMatrix-method} \alias{-,nsparseMatrix,missing-method} \alias{!,nsparseMatrix-method} \alias{coerce,nsparseMatrix,dsparseMatrix-method} \alias{coerce,matrix,ngCMatrix-method} \alias{coerce,matrix,ngTMatrix-method} \alias{coerce,matrix,ntCMatrix-method} \alias{coerce,matrix,ntTMatrix-method} \alias{coerce,ngCMatrix,dMatrix-method} \alias{coerce,ngCMatrix,dgCMatrix-method} \alias{coerce,ngCMatrix,dsparseMatrix-method} \alias{coerce,ngCMatrix,lMatrix-method} \alias{coerce,ngCMatrix,lgCMatrix-method} \alias{coerce,ngCMatrix,lsparseMatrix-method} \alias{coerce,ngCMatrix,matrix-method} \alias{coerce,ngCMatrix,ngTMatrix-method} \alias{coerce,ngCMatrix,ngeMatrix-method} \alias{coerce,ngCMatrix,ntCMatrix-method} \alias{coerce,ngTMatrix,dMatrix-method} \alias{coerce,ngTMatrix,dgTMatrix-method} \alias{coerce,ngTMatrix,dsparseMatrix-method} \alias{coerce,ngTMatrix,generalMatrix-method} \alias{coerce,ngTMatrix,lMatrix-method} \alias{coerce,ngTMatrix,lgTMatrix-method} \alias{coerce,ngTMatrix,matrix-method} \alias{coerce,ngTMatrix,ngCMatrix-method} \alias{coerce,ngTMatrix,lgeMatrix-method} \alias{coerce,ngTMatrix,ngeMatrix-method} \alias{coerce,ngTMatrix,ntTMatrix-method} \alias{coerce,ngTMatrix,symmetricMatrix-method} \alias{coerce,ngTMatrix,triangularMatrix-method} \alias{coerce,nsCMatrix,dMatrix-method} \alias{coerce,nsCMatrix,dsCMatrix-method} \alias{coerce,nsCMatrix,dsparseMatrix-method} \alias{coerce,nsCMatrix,generalMatrix-method} \alias{coerce,nsCMatrix,lMatrix-method} \alias{coerce,nsCMatrix,lsCMatrix-method} \alias{coerce,nsCMatrix,lsparseMatrix-method} \alias{coerce,nsCMatrix,matrix-method} \alias{coerce,nsCMatrix,ngCMatrix-method} \alias{coerce,nsCMatrix,nsTMatrix-method} \alias{coerce,nsTMatrix,dsTMatrix-method} \alias{coerce,nsTMatrix,matrix-method} \alias{coerce,nsTMatrix,ngCMatrix-method} \alias{coerce,nsTMatrix,ngTMatrix-method} \alias{coerce,nsTMatrix,nsCMatrix-method} \alias{coerce,nsTMatrix,nsyMatrix-method} \alias{coerce,ntCMatrix,dMatrix-method} \alias{coerce,ntCMatrix,dsparseMatrix-method} \alias{coerce,ntCMatrix,dtCMatrix-method} \alias{coerce,ntCMatrix,lMatrix-method} \alias{coerce,ntCMatrix,lsparseMatrix-method} \alias{coerce,ntCMatrix,ltCMatrix-method} \alias{coerce,ntCMatrix,matrix-method} \alias{coerce,ntCMatrix,ngCMatrix-method} \alias{coerce,ntCMatrix,TsparseMatrix-method} \alias{coerce,ntTMatrix,dtTMatrix-method} \alias{coerce,ntTMatrix,generalMatrix-method} \alias{coerce,ntTMatrix,matrix-method} \alias{coerce,ntTMatrix,ngCMatrix-method} \alias{coerce,ntTMatrix,ngTMatrix-method} \alias{coerce,ntTMatrix,ntCMatrix-method} \alias{coerce,ntTMatrix,ntrMatrix-method} % \alias{t,ngCMatrix-method} \alias{t,ngTMatrix-method} \alias{t,nsCMatrix-method} \alias{t,ntCMatrix-method} \alias{t,nsTMatrix-method} \alias{t,ntTMatrix-method} \alias{is.na,nsparseMatrix-method} \alias{which,ngTMatrix-method} \alias{which,nsparseMatrix-method} \alias{which,nsTMatrix-method} \alias{which,ntTMatrix-method} % Group \alias{Ops,dsparseMatrix,nsparseMatrix-method} \alias{Ops,nsparseMatrix,dsparseMatrix-method} \alias{Ops,lsparseMatrix,nsparseMatrix-method} \alias{Ops,nsparseMatrix,lsparseMatrix-method} \alias{Ops,sparseMatrix,nsparseMatrix-method} \alias{Ops,nsparseMatrix,sparseMatrix-method} \alias{Arith,nsparseMatrix,Matrix-method} \alias{Arith,Matrix,nsparseMatrix-method} % \description{The \code{nsparseMatrix} class is a virtual class of sparse \emph{\dQuote{pattern}} matrices, i.e., binary matrices conceptually with \code{TRUE}/\code{FALSE} entries. Only the positions of the elements that are \code{TRUE} are stored. These can be stored in the \dQuote{triplet} form (\code{\linkS4class{TsparseMatrix}}, subclasses \code{ngTMatrix}, \code{nsTMatrix}, and \code{ntTMatrix} which really contain pairs, not triplets) or in compressed column-oriented form (class \code{\linkS4class{CsparseMatrix}}, subclasses \code{ngCMatrix}, \code{nsCMatrix}, and \code{ntCMatrix}) or--\emph{rarely}--in compressed row-oriented form (class \code{\linkS4class{RsparseMatrix}}, subclasses \code{ngRMatrix}, \code{nsRMatrix}, and \code{ntRMatrix}). The second letter in the name of these non-virtual classes indicates \code{g}eneral, \code{s}ymmetric, or \code{t}riangular. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("ngCMatrix", ...)} and so on. More frequently objects are created by coercion of a numeric sparse matrix to the pattern form for use in the symbolic analysis phase of an algorithm involving sparse matrices. Such algorithms often involve two phases: a symbolic phase wherein the positions of the non-zeros in the result are determined and a numeric phase wherein the actual results are calculated. During the symbolic phase only the positions of the non-zero elements in any operands are of interest, hence numeric sparse matrices can be treated as sparse pattern matrices. } \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular. Present in the triangular and symmetric classes but not in the general class.} \item{\code{diag}:}{Object of class \code{"character"}. Must be either \code{"U"}, for unit triangular (diagonal is all ones), or \code{"N"} for non-unit. The implicit diagonal elements are not explicitly stored when \code{diag} is \code{"U"}. Present in the triangular classes only.} \item{\code{p}:}{Object of class \code{"integer"} of pointers, one for each column (row), to the initial (zero-based) index of elements in the column. Present in compressed column-oriented and compressed row-oriented forms only.} \item{\code{i}:}{Object of class \code{"integer"} of length nnzero (number of non-zero elements). These are the row numbers for each TRUE element in the matrix. All other elements are FALSE. Present in triplet and compressed column-oriented forms only.} \item{\code{j}:}{Object of class \code{"integer"} of length nnzero (number of non-zero elements). These are the column numbers for each TRUE element in the matrix. All other elements are FALSE. Present in triplet and compressed column-oriented forms only.} \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix.} } } \section{Methods}{ \describe{ \item{coerce}{\code{signature(from = "dgCMatrix", to = "ngCMatrix")}, and many similar ones; typically you should coerce to \code{"nsparseMatrix"} (or \code{"nMatrix"}). Note that coercion to a sparse pattern matrix records all the potential non-zero entries, i.e., explicit (\dQuote{non-structural}) zeroes are coerced to \code{TRUE}, not \code{FALSE}, see the example. } \item{t}{\code{signature(x = "ngCMatrix")}: returns the transpose of \code{x}} \item{which}{\code{signature(x = "lsparseMatrix")}, semantically equivalent to \pkg{base} function \code{\link{which}(x, arr.ind)}; for details, see the \code{\linkS4class{lMatrix}} class documentation.} } } %\references{} %\author{} %\note{} \seealso{ the class \code{\linkS4class{dgCMatrix}} } \examples{ (m <- Matrix(c(0,0,2:0), 3,5, dimnames=list(LETTERS[1:3],NULL))) ## ``extract the nonzero-pattern of (m) into an nMatrix'': nm <- as(m, "nsparseMatrix") ## -> will be a "ngCMatrix" str(nm) # no 'x' slot nnm <- !nm # no longer sparse (nnm <- as(nnm, "sparseMatrix"))# "lgCMatrix" ## consistency check: stopifnot(xor(as( nm, "matrix"), as(nnm, "matrix"))) ## low-level way of adding "non-structural zeros" : nnm@x[2:4] <- c(FALSE,NA,NA) nnm as(nnm, "nMatrix") # NAs *and* non-structural 0 |---> 'TRUE' data(KNex) nmm <- as(KNex $ mm, "ngCMatrix") str(xlx <- crossprod(nmm))# "nsCMatrix" stopifnot(isSymmetric(xlx)) image(xlx, main=paste("crossprod(nmm) : Sparse", class(xlx))) } \keyword{classes} \keyword{algebra} Matrix/man/sparseMatrix.Rd0000644000176200001440000002246712651647132015264 0ustar liggesusers\name{sparseMatrix} \alias{sparseMatrix} \title{General Sparse Matrix Construction from Nonzero Entries} \description{ User friendly construction of a compressed, column-oriented, sparse matrix, inheriting from \code{\link{class}} \code{\linkS4class{CsparseMatrix}} (or \code{\linkS4class{TsparseMatrix}} if \code{giveCsparse} is false), from locations (and values) of its non-zero entries. This is the recommended user interface rather than direct \code{\link{new}("***Matrix", ....)} calls. } \usage{ sparseMatrix(i = ep, j = ep, p, x, dims, dimnames, symmetric = FALSE, triangular = FALSE, index1 = TRUE, giveCsparse = TRUE, check = TRUE, use.last.ij = FALSE) } \arguments{ \item{i,j}{integer vectors of the same length specifying the locations (row and column indices) of the non-zero (or non-\code{TRUE}) entries of the matrix. Note that for \emph{repeated} pairs \eqn{(i_k,j_k)}, when \code{x} is not missing, the corresponding \eqn{x_k} are \emph{added}, in consistency with the definition of the \code{"\linkS4class{TsparseMatrix}"} class, unless \code{use.last.ij} is true, in which case only the \emph{last} of the corresponding \eqn{(i_k, j_k, x_k)} triplet is used.} \item{p}{numeric (integer valued) vector of pointers, one for each column (or row), to the initial (zero-based) index of elements in the column (or row). Exactly one of \code{i}, \code{j} or \code{p} must be missing.} \item{x}{ optional values of the matrix entries. If specified, must be of the same length as \code{i} / \code{j}, or of length one where it will be recycled to full length. If missing, the resulting matrix will be a 0/1 patter\bold{n} matrix, i.e., extending class \code{\linkS4class{nsparseMatrix}}. } \item{dims}{optional, non-negative, integer, dimensions vector of length 2. Defaults to \code{c(max(i), max(j))}.} \item{dimnames}{optional list of \code{\link{dimnames}}; if not specified, none, i.e., \code{\link{NULL}} ones, are used.} \item{symmetric}{logical indicating if the resulting matrix should be symmetric. In that case, only the lower or upper triangle needs to be specified via \eqn{(i/j/p)}.} \item{triangular}{logical indicating if the resulting matrix should be triangular. In that case, the lower or upper triangle needs to be specified via \eqn{(i/j/p)}.} \item{index1}{logical scalar. If \code{TRUE}, the default, the index vectors \code{i} and/or \code{j} are 1-based, as is the convention in \R. That is, counting of rows and columns starts at 1. If \code{FALSE} the index vectors are 0-based so counting of rows and columns starts at 0; this corresponds to the internal representation.} \item{giveCsparse}{logical indicating if the result should be a \code{\linkS4class{CsparseMatrix}} or a \code{\linkS4class{TsparseMatrix}}. The default, \code{TRUE} is very often more efficient subsequently, but not always.} \item{check}{logical indicating if a validity check is performed; do not set to \code{FALSE} unless you know what you're doing!} \item{use.last.ij}{logical indicating if in the case of repeated, i.e., duplicated pairs \eqn{(i_k, j_k)} only the last one should be used. The default, \code{FALSE}, corresponds to the \code{"\linkS4class{TsparseMatrix}"} definition.} } \value{ A sparse matrix, by default (see \code{giveCsparse}) in compressed, column-oriented form, as an \R object inheriting from both \code{\linkS4class{CsparseMatrix}} and \code{\linkS4class{generalMatrix}}. } \details{ Exactly one of the arguments \code{i}, \code{j} and \code{p} must be missing. In typical usage, \code{p} is missing, \code{i} and \code{j} are vectors of positive integers and \code{x} is a numeric vector. These three vectors, which must have the same length, form the triplet representation of the sparse matrix. If \code{i} or \code{j} is missing then \code{p} must be a non-decreasing integer vector whose first element is zero. It provides the compressed, or \dQuote{pointer} representation of the row or column indices, whichever is missing. The expanded form of \code{p}, \code{rep(seq_along(dp),dp)} where \code{dp <- diff(p)}, is used as the (1-based) row or column indices. You cannot set both \code{singular} and \code{triangular} to true; rather use \code{\link{Diagonal}()} (or its alternatives, see there). The values of \code{i}, \code{j}, \code{p} and \code{index1} are used to create 1-based index vectors \code{i} and \code{j} from which a \code{\linkS4class{TsparseMatrix}} is constructed, with numerical values given by \code{x}, if non-missing. Note that in that case, when some pairs \eqn{(i_k,j_k)} are repeated (aka \dQuote{duplicated}), the corresponding \eqn{x_k} are \emph{added}, in consistency with the definition of the \code{"\linkS4class{TsparseMatrix}"} class, unless \code{use.last.ij} is set to true. %% By default, when \code{giveCsparse} is true, the \code{\linkS4class{CsparseMatrix}} derived from this triplet form is returned. The reason for returning a \code{\linkS4class{CsparseMatrix}} object instead of the triplet format by default is that the compressed column form is easier to work with when performing matrix operations. In particular, if there are no zeros in \code{x} then a \code{\linkS4class{CsparseMatrix}} is a unique representation of the sparse matrix. } \note{% We say so above (-> {index1}), but some do not read that You \emph{do} need to use \code{index1 = FALSE} (or add \code{+ 1} to \code{i} and \code{j}) if you want use the 0-based \code{i} (and \code{j}) slots from existing sparse matrices. } \seealso{\code{\link{Matrix}(*, sparse=TRUE)} for the constructor of such matrices from a \emph{dense} matrix. That is easier in small sample, but much less efficient (or impossible) for large matrices, where something like \code{sparseMatrix()} is needed. Further \code{\link{bdiag}} and \code{\link{Diagonal}} for (block-)diagonal and \code{\link{bandSparse}} for banded sparse matrix constructors. Random sparse matrices via \code{\link{rsparsematrix}()}. The standard \R \code{\link{xtabs}(*, sparse=TRUE)}, for sparse tables and \code{\link{sparse.model.matrix}()} for building sparse model matrices. Consider \code{\linkS4class{CsparseMatrix}} and similar class definition help files. } \examples{ ## simple example i <- c(1,3:8); j <- c(2,9,6:10); x <- 7 * (1:7) (A <- sparseMatrix(i, j, x = x)) ## 8 x 10 "dgCMatrix" summary(A) str(A) # note that *internally* 0-based row indices are used (sA <- sparseMatrix(i, j, x = x, symmetric = TRUE)) ## 10 x 10 "dsCMatrix" (tA <- sparseMatrix(i, j, x = x, triangular= TRUE)) ## 10 x 10 "dtCMatrix" stopifnot( all(sA == tA + t(tA)) , identical(sA, as(tA + t(tA), "symmetricMatrix"))) ## dims can be larger than the maximum row or column indices (AA <- sparseMatrix(c(1,3:8), c(2,9,6:10), x = 7 * (1:7), dims = c(10,20))) summary(AA) ## i, j and x can be in an arbitrary order, as long as they are consistent set.seed(1); (perm <- sample(1:7)) (A1 <- sparseMatrix(i[perm], j[perm], x = x[perm])) stopifnot(identical(A, A1)) ## The slots are 0-index based, so try( sparseMatrix(i=A@i, p=A@p, x= seq_along(A@x)) ) ## fails and you should say so: 1-indexing is FALSE: sparseMatrix(i=A@i, p=A@p, x= seq_along(A@x), index1 = FALSE) ## the (i,j) pairs can be repeated, in which case the x's are summed (args <- data.frame(i = c(i, 1), j = c(j, 2), x = c(x, 2))) (Aa <- do.call(sparseMatrix, args)) ## explicitly ask for elimination of such duplicates, so ## that the last one is used: (A. <- do.call(sparseMatrix, c(args, list(use.last.ij = TRUE)))) stopifnot(Aa[1,2] == 9, # 2+7 == 9 A.[1,2] == 2) # 2 was *after* 7 ## for a pattern matrix, of course there is no "summing": (nA <- do.call(sparseMatrix, args[c("i","j")])) dn <- list(LETTERS[1:3], letters[1:5]) ## pointer vectors can be used, and the (i,x) slots are sorted if necessary: m <- sparseMatrix(i = c(3,1, 3:2, 2:1), p= c(0:2, 4,4,6), x = 1:6, dimnames = dn) m str(m) stopifnot(identical(dimnames(m), dn)) sparseMatrix(x = 2.72, i=1:3, j=2:4) # recycling x sparseMatrix(x = TRUE, i=1:3, j=2:4) # recycling x, |--> "lgCMatrix" ## no 'x' --> patter*n* matrix: (n <- sparseMatrix(i=1:6, j=rev(2:7)))# -> ngCMatrix ## an empty sparse matrix: (e <- sparseMatrix(dims = c(4,6), i={}, j={})) ## a symmetric one: (sy <- sparseMatrix(i= c(2,4,3:5), j= c(4,7:5,5), x = 1:5, dims = c(7,7), symmetric=TRUE)) stopifnot(isSymmetric(sy), identical(sy, ## switch i <-> j {and transpose } t( sparseMatrix(j= c(2,4,3:5), i= c(4,7:5,5), x = 1:5, dims = c(7,7), symmetric=TRUE)))) ## rsparsematrix() calls sparseMatrix() : M1 <- rsparsematrix(1000, 20, nnz = 200) summary(M1) ## pointers example in converting from other sparse matrix representations. if(require(SparseM) && packageVersion("SparseM") >= 0.87 && nzchar(dfil <- system.file("extdata", "rua_32_ax.rua", package = "SparseM"))) { X <- model.matrix(read.matrix.hb(dfil)) XX <- sparseMatrix(j = X@ja, p = X@ia - 1L, x = X@ra, dims = X@dimension) validObject(XX) ## Alternatively, and even more user friendly : X. <- as(X, "Matrix") # or also X2 <- as(X, "sparseMatrix") stopifnot(identical(XX, X.), identical(X., X2)) }% if }% example \keyword{array} Matrix/man/ndenseMatrix-class.Rd0000644000176200001440000000521712622367447016346 0ustar liggesusers\name{ndenseMatrix-class} \docType{class} \alias{ndenseMatrix-class} \alias{!,ndenseMatrix-method} \alias{Ops,ndenseMatrix,ndenseMatrix-method} \alias{Summary,ndenseMatrix-method} \alias{as.logical,ndenseMatrix-method} \alias{coerce,matrix,ndenseMatrix-method} \alias{coerce,ndenseMatrix,matrix-method} \alias{coerce,ndenseMatrix,CsparseMatrix-method} \alias{coerce,ndenseMatrix,TsparseMatrix-method} \alias{coerce,ndenseMatrix,ldenseMatrix-method} \alias{coerce,ndenseMatrix,sparseMatrix-method} \alias{coerce,ndenseMatrix,nsparseMatrix-method} \alias{coerce,ngeMatrix,lgeMatrix-method} \alias{coerce,nspMatrix,lspMatrix-method} \alias{coerce,nsyMatrix,lsyMatrix-method} \alias{coerce,ntpMatrix,ltpMatrix-method} \alias{coerce,ntrMatrix,ltrMatrix-method} \alias{as.vector,ndenseMatrix-method} \alias{diag,ndenseMatrix-method} \alias{norm,ndenseMatrix,character-method} \alias{which,ndenseMatrix-method} % \title{Virtual Class "ndenseMatrix" of Dense Logical Matrices} \description{ \code{ndenseMatrix} is the virtual class of all dense \bold{l}ogical (S4) matrices. It extends both \code{\linkS4class{denseMatrix}} and \code{\linkS4class{lMatrix}} directly. } \section{Slots}{ \describe{ \item{\code{x}:}{logical vector containing the entries of the matrix.} \item{\code{Dim}, \code{Dimnames}:}{see \code{\linkS4class{Matrix}}.} } } \section{Extends}{ Class \code{"nMatrix"}, directly. Class \code{"denseMatrix"}, directly. Class \code{"Matrix"}, by class \code{"nMatrix"}. Class \code{"Matrix"}, by class \code{"denseMatrix"}. } \section{Methods}{ \describe{ \item{\%*\%}{\code{signature(x = "nsparseMatrix", y = "ndenseMatrix")}: ... } \item{\%*\%}{\code{signature(x = "ndenseMatrix", y = "nsparseMatrix")}: ... } \item{coerce}{\code{signature(from = "matrix", to = "ndenseMatrix")}: ... } \item{coerce}{\code{signature(from = "ndenseMatrix", to = "matrix")}: ... } \item{crossprod}{\code{signature(x = "nsparseMatrix", y = "ndenseMatrix")}: ... } \item{crossprod}{\code{signature(x = "ndenseMatrix", y = "nsparseMatrix")}: ... } \item{as.vector}{\code{signature(x = "ndenseMatrix", mode = "missing")}: ...} \item{diag}{\code{signature(x = "ndenseMatrix")}: extracts the diagonal as for all matrices, see the generic \code{\link{diag}()}.} \item{which}{\code{signature(x = "ndenseMatrix")}, semantically equivalent to \pkg{base} function \code{\link{which}(x, arr.ind)}; for details, see the \code{\linkS4class{lMatrix}} class documentation.} } } \seealso{ Class \code{\linkS4class{ngeMatrix}} and the other subclasses. } \examples{ showClass("ndenseMatrix") as(diag(3) > 0, "ndenseMatrix")# -> "nge" } \keyword{classes} Matrix/man/Schur-class.Rd0000644000176200001440000000270610773452776014776 0ustar liggesusers\name{Schur-class} \docType{class} \alias{Schur-class} % \title{Class "Schur" of Schur Matrix Factorizations} \description{Class \code{"Schur"} is the class of Schur matrix factorizations. These are a generalization of eigen value (or \dQuote{spectral}) decompositions for general (possibly asymmmetric) square matrices, see the \code{\link{Schur}()} function. } \section{Objects from the Class}{ Objects of class \code{"Schur"} are typically created by \code{\link{Schur}()}. } \section{Slots}{ \code{"Schur"} has slots \describe{ \item{\code{T}:}{Upper Block-triangular \code{\linkS4class{Matrix}} object.} \item{\code{Q}:}{Square \emph{orthogonal} \code{"Matrix"}.} \item{\code{EValues}:}{numeric or complex vector of eigenvalues of \code{T}.} \item{\code{Dim}:}{the matrix dimension: equal to \code{c(n,n)} of class \code{"integer"}.} } } \section{Extends}{ Class \code{"\linkS4class{MatrixFactorization}"}, directly. } % \section{Methods}{ % are all inherited from the MatrixFactorization class % } % \note{There's not yet a class for \emph{sparse} Schur decompositions; % mainly because there's no \code{\link{Schur}()} method for those neither. % } \seealso{ \code{\link{Schur}()} for object creation; \code{\linkS4class{MatrixFactorization}}. } \examples{ showClass("Schur") Schur(M <- Matrix(c(1:7, 10:2), 4,4)) ## Trivial, of course: str(Schur(Diagonal(5))) ## for more examples, see Schur() } \keyword{classes} Matrix/man/lu.Rd0000644000176200001440000001070112532076334013204 0ustar liggesusers\name{lu} \title{(Generalized) Triangular Decomposition of a Matrix} \alias{lu} \alias{lu,matrix-method} \alias{lu,dgeMatrix-method} \alias{lu,dgCMatrix-method} \alias{lu,dtCMatrix-method} \usage{ lu(x, \dots) \S4method{lu}{matrix}(x, warnSing = TRUE, \dots) \S4method{lu}{dgeMatrix}(x, warnSing = TRUE, \dots) \S4method{lu}{dgCMatrix}(x, errSing = TRUE, order = TRUE, tol = 1, keep.dimnames = TRUE, \dots) } \description{ Computes (generalized) triangular decompositions of square (sparse or dense) and non-square dense matrices. } \arguments{ \item{x}{a dense or sparse matrix, in the latter case of square dimension. No missing values or IEEE special values are allowed.} \item{warnSing}{(when \code{x} is a \code{"\linkS4class{denseMatrix}"}) logical specifying if a \code{\link{warning}} should be signalled when \code{x} is singular.} \item{errSing}{(when \code{x} is a \code{"\linkS4class{sparseMatrix}"}) logical specifying if an error (see \code{\link{stop}}) should be signalled when \code{x} is singular. When \code{x} is singular, \code{lu(x, errSing=FALSE)} returns \code{\link{NA}} instead of an LU decomposition. No warning is signalled and the useR should be careful in that case. } \item{order}{logical or integer, used to choose which fill-reducing permutation technique will be used internally. Do not change unless you know what you are doing.} \item{tol}{positive number indicating the pivoting tolerance used in \code{cs_lu}. Do only change with much care.} \item{keep.dimnames}{logical indicating that \code{\link{dimnames}} should be propagated to the result, i.e., \dQuote{kept}. This was hardcoded to \code{FALSE} in upto \pkg{Matrix} version 1.2-0. Setting to \code{FALSE} may gain some performance.} \item{\dots}{further arguments passed to or from other methods.} } \value{ An object of class \code{"LU"}, i.e., \code{"\linkS4class{denseLU}"}%% ./LU-class.Rd (see its separate help page), or \code{"sparseLU"}, see \code{\linkS4class{sparseLU}}; this is a representation of a triangular decomposition of \code{x}. } \details{ \code{lu()} is a generic function with special methods for different types of matrices. Use \code{\link{showMethods}("lu")} to list all the methods for the \code{\link{lu}} generic. The method for class \code{\linkS4class{dgeMatrix}} (and all dense matrices) is based on LAPACK's \code{"dgetrf"} subroutine. It returns a decomposition also for singular and non-square matrices. The method for class \code{\linkS4class{dgCMatrix}} (and all sparse matrices) is based on functions from the CSparse library. It signals an error (or returns \code{NA}, when \code{errSing = FALSE}, see above) when the decomposition algorithm fails, as when \code{x} is (too close to) singular.% yes, it would be nice if we could have it % behave more similar to the dense method: still give an LU, % and an optional warning. } \note{ Because the underlying algorithm differ entirely, in the \emph{dense} case (class \code{\linkS4class{denseLU}}), the decomposition is \deqn{A = P L U,} %% --------- where as in the \emph{sparse} case (class \code{\linkS4class{sparseLU}}), it is \deqn{A = P' L U Q.} %% ------------ } \references{ Golub, G., and Van Loan, C. F. (1989). \emph{Matrix Computations,} 2nd edition, Johns Hopkins, Baltimore. %% Tim Davis (2005) %% \url{http://www.cise.ufl.edu/research/sparse/CSparse/} Timothy A. Davis (2006) \emph{Direct Methods for Sparse Linear Systems}, SIAM Series \dQuote{Fundamentals of Algorithms}. } \seealso{ Class definitions \code{\linkS4class{denseLU}} and \code{\linkS4class{sparseLU}} and function \code{\link{expand}}; \code{\link{qr}}, \code{\link{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 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 # q is a 0-based permutation of the columns ## 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 ## equal up to "rounding" ppm[1:14, 1:5] pLU[1:14, 1:5] } \keyword{array} \keyword{algebra} Matrix/man/compMatrix-class.Rd0000644000176200001440000000306612526660171016021 0ustar liggesusers\name{compMatrix-class} \docType{class} \title{Class "compMatrix" of Composite (Factorizable) Matrices} \alias{compMatrix-class} \alias{dimnames<-,compMatrix,list-method} \alias{dimnames<-,compMatrix,NULL-method} \description{ Virtual class of \emph{composite} matrices; i.e., matrices that can be \emph{factorized}, typically as a product of simpler matrices. } \section{Objects from the Class}{A virtual Class: No objects may be created from it.} \section{Slots}{ \describe{ \item{\code{factors}:}{Object of class \code{"list"} - a list of factorizations of the matrix. Note that this is typically empty, i.e., \code{list()}, initially and is \emph{updated \bold{automagically}} whenever a matrix factorization is computed.} \item{\code{Dim}, \code{Dimnames}:}{inherited from the \code{\linkS4class{Matrix}} class, see there.} } } \section{Extends}{ Class \code{"Matrix"}, directly. } \section{Methods}{ \describe{ \item{dimnames<-}{\code{signature(x = "compMatrix", value = "list")}: set the \code{dimnames} to a \code{\link{list}} of length 2, see \code{\link{dimnames<-}}. The \code{factors} slot is currently reset to empty, as the factorization \code{dimnames} would have to be adapted, too.} } } \seealso{ The matrix factorization classes \code{"\linkS4class{MatrixFactorization}"} and their generators, \code{\link{lu}()}, \code{\link{qr}()}, \code{\link{chol}()} and \code{\link{Cholesky}()}, \code{\link{BunchKaufman}()}, \code{\link{Schur}()}. } %% FIXME: add: % \examples{ % % } \keyword{classes} Matrix/man/dgTMatrix-class.Rd0000644000176200001440000001047012501612602015563 0ustar liggesusers\name{dgTMatrix-class} \title{Sparse matrices in triplet form} \docType{class} \alias{dgTMatrix-class} \alias{+,dgTMatrix,dgTMatrix-method} \alias{coerce,dgTMatrix,dgCMatrix-method} \alias{coerce,dgTMatrix,dgeMatrix-method} \alias{coerce,dgTMatrix,matrix-method} \alias{coerce,dgTMatrix,dtCMatrix-method} \alias{coerce,dgTMatrix,dsTMatrix-method} \alias{coerce,dgTMatrix,dtTMatrix-method} \alias{coerce,dgTMatrix,symmetricMatrix-method} \alias{coerce,dgTMatrix,triangularMatrix-method} \alias{coerce,dgeMatrix,dgTMatrix-method} \alias{coerce,matrix,dgTMatrix-method} \description{The \code{"dgTMatrix"} class is the class of sparse matrices stored as (possibly redundant) triplets. The internal representation is not at all unique, contrary to the one for class \code{\linkS4class{dgCMatrix}}. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dgTMatrix", ...)}, but more typically via \code{as(*, "dgTMatrix")}, \code{\link{spMatrix}()}, or \code{\link{sparseMatrix}(*, giveCsparse=FALSE)}. } \section{Slots}{ \describe{ \item{\code{i}:}{\code{\link{integer}} row indices of non-zero entries \emph{in 0-base}, i.e., must be in \code{0:(nrow(.)-1)}.} \item{\code{j}:}{\code{\link{integer}} column indices of non-zero entries. Must be the same length as slot \code{i} and \emph{0-based} as well, i.e., in \code{0:(ncol(.)-1)}.} \item{\code{x}:}{\code{\link{numeric}} vector - the (non-zero) entry at position \code{(i,j)}. Must be the same length as slot \code{i}. If an index pair occurs more than once, the corresponding values of slot \code{x} are added to form the element of the matrix.} \item{\code{Dim}:}{Object of class \code{"integer"} of length 2 - the dimensions of the matrix.} } } \section{Methods}{ \describe{ \item{+}{\code{signature(e1 = "dgTMatrix", e2 = "dgTMatrix")}} \item{coerce}{\code{signature(from = "dgTMatrix", to = "dgCMatrix")}} \item{coerce}{\code{signature(from = "dgTMatrix", to = "dgeMatrix")}} \item{coerce}{\code{signature(from = "dgTMatrix", to = "matrix")}, and typically coercion methods for more specific signatures, we are not mentioning here. Note that these are not guaranteed to continue to exist, but rather you should use calls like \code{as(x, "CsparseMatrix")}, \code{as(x, "generalMatrix")}, \code{as(x, "dMatrix")}, i.e. coercion to higher level virtual classes.} \item{coerce}{\code{signature(from = "matrix", to = "dgTMatrix")}, (direct coercion from tradition matrix).} \item{image}{\code{signature(x = "dgTMatrix")}: plots an image of \code{x} using the \code{\link[lattice]{levelplot}} function} \item{t}{\code{signature(x = "dgTMatrix")}: returns the transpose of \code{x}} } } %\references{} %\author{} \note{Triplet matrices are a convenient form in which to construct sparse matrices after which they can be coerced to \code{\linkS4class{dgCMatrix}} objects. Note that both \code{new(.)} and \code{\link{spMatrix}} constructors for \code{"dgTMatrix"} (and other \code{"\linkS4class{TsparseMatrix}"} classes) implicitly add \eqn{x_k}'s that belong to identical \eqn{(i_k, j_k)} pairs. However this means that a matrix typically can tbe stored in more than one possible \code{"\linkS4class{TsparseMatrix}"} representations. Use \code{\link{uniqTsparse}()} in order to ensure uniqueness of the internal representation of such a matrix. } \seealso{ Class \code{\linkS4class{dgCMatrix}} or the superclasses \code{\linkS4class{dsparseMatrix}} and \code{\linkS4class{TsparseMatrix}}; \code{\link{uniqTsparse}}. } \examples{ m <- Matrix(0+1:28, nrow = 4) m[-3,c(2,4:5,7)] <- m[ 3, 1:4] <- m[1:3, 6] <- 0 (mT <- as(m, "dgTMatrix")) str(mT) mT[1,] mT[4, drop = FALSE] stopifnot(identical(mT[lower.tri(mT)], m [lower.tri(m) ])) mT[lower.tri(mT,diag=TRUE)] <- 0 mT ## Triplet representation with repeated (i,j) entries ## *adds* the corresponding x's: T2 <- new("dgTMatrix", i = as.integer(c(1,1,0,3,3)), j = as.integer(c(2,2,4,0,0)), x=10*1:5, Dim=4:5) str(T2) # contains (i,j,x) slots exactly as above, but T2 ## has only three non-zero entries, as for repeated (i,j)'s, ## the corresponding x's are "implicitly" added stopifnot(nnzero(T2) == 3) } \keyword{classes} \keyword{algebra} Matrix/man/is.null.DN.Rd0000644000176200001440000000321012102200250014420 0ustar liggesusers\name{is.null.DN} \alias{is.null.DN} \title{Are the Dimnames \code{dn} NULL-like ?} \description{ Are the \code{\link{dimnames}} \code{dn} \code{\link{NULL}}-like? \code{is.null.DN(dn)} is less strict than \code{\link{is.null}(dn)}, because it is also true (\code{\link{TRUE}}) when the dimnames \code{dn} are \dQuote{like} \code{NULL}, or \code{list(NULL,NULL)}, as they can easily be for the traditional \R matrices (\code{\link{matrix}}) which have no formal \code{\link{class}} definition, and hence much freedom in how their \code{\link{dimnames}} look like. } \usage{ is.null.DN(dn) } \arguments{ \item{dn}{\code{\link{dimnames}()} of a \code{\link{matrix}}-like \R object. } } \note{ This function is really to be used on \dQuote{traditional} matrices rather than those inheriting from \code{\linkS4class{Matrix}}, as the latter will always have dimnames \code{list(NULL,NULL)} exactly, in such a case. } \value{ \code{\link{logical}} \code{\link{TRUE}} or \code{\link{FALSE}}. } %% \details{ %% } \author{Martin Maechler} \seealso{ \code{\link{is.null}}, \code{\link{dimnames}}, \code{\link{matrix}}. } \examples{ m <- matrix(round(100 * rnorm(6)), 2,3); m1 <- m2 <- m3 <- m4 <- m dimnames(m1) <- list(NULL, NULL) dimnames(m2) <- list(NULL, character()) dimnames(m3) <- rev(dimnames(m2)) dimnames(m4) <- rep(list(character()),2) m4 ## prints absolutely identically to m stopifnot(m == m1, m1 == m2, m2 == m3, m3 == m4, identical(capture.output(m) -> cm, capture.output(m1)), identical(cm, capture.output(m2)), identical(cm, capture.output(m3)), identical(cm, capture.output(m4))) } \keyword{utilities} Matrix/man/cBind.Rd0000644000176200001440000000606312772471324013615 0ustar liggesusers\name{cBind} \alias{cBind} \alias{rBind} %no \alias{cbind} %no \alias{rbind} % \title{Versions of 'cbind' and 'rbind' recursively built on cbind2/rbind2} \description{ The base functions \code{\link{cbind}} and \code{\link{rbind}} are defined for an arbitrary number of arguments and hence have the first formal argument \code{...}. For that reason, in the past S4 methods could easily be defined for binding together matrices inheriting from \code{\link{Matrix}}. For that reason, \code{\link{cbind2}} and \code{\link{rbind2}} have been provided for binding together \emph{two} matrices, and we have defined methods for these and the \code{'Matrix'}-matrices. Before \R version 3.2.0 (April 2015), we have needed a substitute for \emph{S4-enabled} versions of \code{cbind} and \code{rbind}, and provided \code{cBind} and \code{rBind} with identical syntax and semantic in order to bind together multiple matrices (\code{"matrix"} or \code{"Matrix"} and vectors. With \R version 3.2.0 and newer, \code{cBind} and \code{rBind} are \emph{deprecated} and produce a deprecation warning (via \code{\link{.Deprecated}}), and your code should start using \code{cbind()} and \code{rbind()} instead. } \usage{ %no cbind(..., deparse.level = 1) %no rbind(..., deparse.level = 1) cBind(..., deparse.level = 1) rBind(..., deparse.level = 1) } \arguments{ \item{\dots}{matrix-like \R objects to be bound together, see \code{\link{cbind}} and \code{\link{rbind}}.} \item{deparse.level}{integer determining under which circumstances column and row names are built from the actual arguments' \sQuote{expression}, see \code{\link{cbind}}.} } \details{ The implementation of these is \emph{recursive}, calling \code{\link{cbind2}} or \code{\link{rbind2}} respectively, where these have methods defined and so should dispatch appropriately. } \value{ typically a \sQuote{matrix-like} object of a similar \code{\link{class}} as the first argument in \code{\dots}. Note that sometimes by default, the result is a \code{\linkS4class{sparseMatrix}} if one of the arguments is (even in the case where this is not efficient). In other cases, the result is chosen to be sparse when there are more zero entries is than non-zero ones (as the default \code{sparse} in \code{\link{Matrix}()}). } \author{Martin Maechler} \seealso{\code{\link{cbind2}}, \code{\link{cbind}}, Documentation in base \R's \pkg{methods} package% R <= 3.3.1 \code{\link[methods]{Methods}}. . } \examples{ (a <- matrix(c(2:1,1:2), 2,2)) D <- Diagonal(2) if(getRversion() < "3.2.0") { M1 <- cbind(0, rBind(a, 7)) print(M1) # remains traditional matrix M2 <- cBind(4, a, D, -1, D, 0) # a sparse Matrix print(M2) } else { ## newer versions of R do not need cBind / rBind: M1 <- cbind(0, suppressWarnings(rBind(a, 7))) print(M1) # remains traditional matrix M2 <- suppressWarnings(cBind(4, a, D, -1, D, 0)) # a sparse Matrix print(M2) stopifnot(identical(M1, cbind(0, rbind(a, 7))), identical(M2, cbind(4, a, D, -1, D, 0))) }# R >= 3.2.0 } \keyword{array} \keyword{manip} Matrix/man/Cholesky.Rd0000644000176200001440000001613512532076334014354 0ustar liggesusers\name{Cholesky} \alias{Cholesky} \alias{Cholesky,dsCMatrix-method}% -> ../R/dsCMatrix.R \alias{Cholesky,CsparseMatrix-method}% coerce \alias{Cholesky,sparseMatrix-method}% coerce \alias{Cholesky,nsparseMatrix-method}% error for now; todo in the future \alias{Cholesky,Matrix-method}% <- "good" error message \alias{.SuiteSparse_version} \title{Cholesky Decomposition of a Sparse Matrix} \concept{Choleski}% alternative English form \usage{ Cholesky(A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, \dots) } \description{ Computes the Cholesky (aka \dQuote{Choleski}) decomposition of a sparse, symmetric, positive-definite matrix. However, typically \code{\link{chol}()} should rather be used unless you are interested in the different kinds of sparse Cholesky decompositions. } \arguments{ \item{A}{sparse symmetric matrix. No missing values or IEEE special values are allowed.} \item{perm}{logical scalar indicating if a fill-reducing permutation should be computed and applied to the rows and columns of \code{A}. Default is \code{TRUE}.}% NA not available here \item{LDL}{logical scalar indicating if the decomposition should be computed as LDL' where \code{L} is a unit lower triangular matrix. The alternative is LL' where \code{L} is lower triangular with arbitrary diagonal elements. Default is \code{TRUE}. Setting it to \code{\link{NA}} leaves the choice to a CHOLMOD-internal heuristic.} \item{super}{logical scalar indicating if a supernodal decomposition should be created. The alternative is a simplicial decomposition. Default is \code{FALSE}. Setting it to \code{\link{NA}} leaves the choice to a CHOLMOD-internal heuristic.} \item{Imult}{numeric scalar which defaults to zero. The matrix that is decomposed is \eqn{A+m*I} where \eqn{m} is the value of \code{Imult} and \code{I} is the identity matrix of order \code{ncol(A)}.} \item{\dots}{further arguments passed to or from other methods.} } \value{ an object inheriting from either \code{"\linkS4class{CHMsuper}"}, or \code{"\linkS4class{CHMsimpl}"}, depending on the \code{super} argument; both classes extend \code{"\linkS4class{CHMfactor}"} which extends \code{"\linkS4class{MatrixFactorization}"}. In other words, the result of \code{Cholesky()} is \emph{not} a matrix, and if you want one, you should probably rather use \code{\link{chol}()}, see Details. } %FAILS WHY??\newcommand{\tR}{\tilde{R}}% both \tR{} and simple '\tR' fails \details{ This is a generic function with special methods for different types of matrices. Use \code{\link{showMethods}("Cholesky")} to list all the methods for the \code{\link{Cholesky}} generic. The method for class \code{\linkS4class{dsCMatrix}} of sparse matrices --- the only one available currently --- is based on functions from the CHOLMOD library. Again: If you just want the Cholesky decomposition of a matrix in a straightforward way, you should probably rather use \code{\link{chol}(.)}. Note that if \code{perm=TRUE} (default), the decomposition is \deqn{A = P' \tilde{L} D \tilde{L}' P = P' L L' P,}{A = P' L~ D L~' P = P' L L' P,} where \eqn{L} can be extracted by \code{as(*, "Matrix")}, \eqn{P} by \code{as(*, "pMatrix")} and both by \code{\link{expand}(*)}, see the class \code{\linkS4class{CHMfactor}} documentation. Note that consequently, you cannot easily get the \dQuote{traditional} cholesky factor \eqn{R}, from this decomposition, as \deqn{R'R = A = P'LL'P = P'\tilde{R}'\tilde{R} P = (\tilde{R}P)' (\tilde{R}P),}{ R'R = A = P'LL'P = P' R~' R~ P = (R~ P)' (R~ P),} but \eqn{\tilde{R}P}{R~ P} is \emph{not} triangular even though \eqn{\tilde{R}}{R~} is. } \references{ Yanqing Chen, Timothy A. Davis, William W. Hager, and Sivasankaran Rajamanickam (2008) Algorithm 887: CHOLMOD, Supernodal Sparse Cholesky Factorization and Update/Downdate. \emph{ACM Trans. Math. Softw.} \bold{35}, 3, Article 22, 14 pages. \url{http://doi.acm.org/10.1145/1391989.1391995} Timothy A. Davis (2006) \emph{Direct Methods for Sparse Linear Systems}, SIAM Series \dQuote{Fundamentals of Algorithms}. } \seealso{ Class definitions \code{\linkS4class{CHMfactor}} and \code{\linkS4class{dsCMatrix}} and function \code{\link{expand}}. Note the extra \code{\link{solve}(*, system = . )} options in \code{\linkS4class{CHMfactor}}. Note that \code{\link{chol}()} returns matrices (inheriting from \code{"\linkS4class{Matrix}"}) whereas \code{Cholesky()} returns a \code{"\linkS4class{CHMfactor}"} object, and hence a typical user will rather use \code{chol(A)}. } \examples{ data(KNex) mtm <- with(KNex, crossprod(mm)) str(mtm@factors) # empty list() (C1 <- Cholesky(mtm)) # uses show() str(mtm@factors) # 'sPDCholesky' (simpl) (Cm <- Cholesky(mtm, super = TRUE)) c(C1 = isLDL(C1), Cm = isLDL(Cm)) str(mtm@factors) # 'sPDCholesky' *and* 'SPdCholesky' str(cm1 <- as(C1, "sparseMatrix")) str(cmat <- as(Cm, "sparseMatrix"))# hmm: super is *less* sparse here cm1[1:20, 1:20] b <- matrix(c(rep(0, 711), 1), nc = 1) ## solve(Cm, b) by default solves Ax = b, where A = Cm'Cm (= mtm)! ## hence, the identical() check *should* work, but fails on some GOTOblas: x <- solve(Cm, b) stopifnot(identical(x, solve(Cm, b, system = "A")), all.equal(x, solve(mtm, b))) Cn <- Cholesky(mtm, perm = FALSE)# no permutation -- much worse: sizes <- c(simple = object.size(C1), super = object.size(Cm), noPerm = object.size(Cn)) ## simple is 100, super= 137, noPerm= 812 : noquote(cbind(format(100 * sizes / sizes[1], digits=4))) ## Visualize the sparseness: dq <- function(ch) paste('"',ch,'"', sep="") ## dQuote() gives bad plots image(mtm, main=paste("crossprod(mm) : Sparse", dq(class(mtm)))) image(cm1, main= paste("as(Cholesky(crossprod(mm)),\"sparseMatrix\"):", dq(class(cm1)))) \dontshow{% FIXME-- move to ../tests/factorizing.R : expand(C1) ## to check printing } ## Smaller example, with same matrix as in help(chol) : (mm <- Matrix(toeplitz(c(10, 0, 1, 0, 3)), sparse = TRUE)) # 5 x 5 (opts <- expand.grid(perm = c(TRUE,FALSE), LDL = c(TRUE,FALSE), super = c(FALSE,TRUE))) rr <- lapply(seq_len(nrow(opts)), function(i) do.call(Cholesky, c(list(A = mm), opts[i,]))) nn <- do.call(expand.grid, c(attr(opts, "out.attr")$dimnames, stringsAsFactors=FALSE,KEEP.OUT.ATTRS=FALSE)) names(rr) <- apply(nn, 1, function(r) paste(sub("(=.).*","\\\\1", r), collapse=","))% extra '\\' in Rd str(rr, max=1) str(re <- lapply(rr, expand), max=2) ## each has a 'P' and a 'L' matrix %% FIXME !! --- "check" them __unfinished__ R0 <- chol(mm, pivot=FALSE) R1 <- chol(mm, pivot=TRUE ) stopifnot(all.equal(t(R1), re[[1]]$L), all.equal(t(R0), re[[2]]$L), identical(as(1:5, "pMatrix"), re[[2]]$P), # no pivoting TRUE) %% --> ../TODO : .diag.dsC() should be renamed, documented, tested,... \dontshow{ str(dd <- .diag.dsC(mtm)) dc <- .diag.dsC(Chx=C1) # <- directly from the Cholesky stopifnot(all.equal(dd,dc)) }%dont # Version of the underlying SuiteSparse library by Tim Davis : .SuiteSparse_version() } \keyword{array} \keyword{algebra} Matrix/man/Diagonal.Rd0000644000176200001440000001016313142363760014304 0ustar liggesusers\name{Diagonal} \title{Create Diagonal Matrix Object} \alias{Diagonal} \alias{.sparseDiagonal} \alias{.symDiagonal} \alias{.trDiagonal} \description{ Create a diagonal matrix object, i.e., an object inheriting from \code{\linkS4class{diagonalMatrix}} (or a sparse diagonal matrix in cases that is prefered). } \usage{ Diagonal(n, x = NULL) .symDiagonal(n, x = rep.int(1,n), uplo = "U", kind = if(is.logical(x)) "l" else "d") .trDiagonal(n, x = 1, uplo = "U", unitri=TRUE, kind = if(is.logical(x)) "l" else "d") .sparseDiagonal(n, x = 1, uplo = "U", shape = if(missing(cols)) "t" else "g", unitri, kind, cols = if(n) 0:(n - 1L) else integer(0)) } \arguments{ \item{n}{integer specifying the dimension of the (square) matrix. If missing, \code{length(x)} is used.} \item{x}{numeric or logical; if missing, a \emph{unit} diagonal \eqn{n \times n}{n x n} matrix is created.} \item{uplo}{for \code{.symDiagonal} (\code{.trDiagonal}), the resulting sparse \code{\linkS4class{symmetricMatrix}} (or \code{\linkS4class{triangularMatrix}}) will have slot \code{uplo} set from this argument, either \code{"U"} or \code{"L"}. Only rarely will it make sense to change this from the default.} \item{shape}{string of 1 character, one of \code{c("t","s","g")}, to choose a triangular, symmetric or general result matrix.} \item{unitri}{optional logical indicating if a triangular result should be \dQuote{unit-triangular}, i.e., with \code{diag = "U"} slot, if possible. The default, \code{\link{missing}}, is the same as \code{\link{TRUE}}.} \item{kind}{string of 1 character, one of \code{c("d","l","n")}, to choose the storage mode of the result, from classes \code{\linkS4class{dsparseMatrix}}, \code{\linkS4class{lsparseMatrix}}, or \code{\linkS4class{nsparseMatrix}}, respectively.} \item{cols}{integer vector with values from \code{0:(n-1)}, denoting the \emph{columns} to subselect conceptually, i.e., get the equivalent of \code{Diagonal(n,*)[, cols + 1]}.} } \value{ \code{Diagonal()} returns an object of class \code{\linkS4class{ddiMatrix}} or \code{\linkS4class{ldiMatrix}} (with \dQuote{superclass} \code{\linkS4class{diagonalMatrix}}). \code{.symDiagonal()} returns an object of class \code{\linkS4class{dsCMatrix}} or \code{\linkS4class{lsCMatrix}}, i.e., a \emph{sparse} \emph{symmetric} matrix. Analogously, \code{.triDiagonal} gives a sparse \code{\linkS4class{triangularMatrix}}. This can be more efficient than \code{Diagonal(n)} when the result is combined with further symmetric (sparse) matrices, e.g., in \code{\link{kronecker}}, however \emph{not} for matrix multiplications where \code{Diagonal()} is clearly preferred. \code{.sparseDiagonal()}, the workhorse of \code{.symDiagonal} and \code{.trDiagonal} returns a \code{\linkS4class{CsparseMatrix}} (the resulting class depending on \code{shape} and \code{kind}) representation of \code{Diagonal(n)}, or, when \code{cols} are specified, of \code{Diagonal(n)[, cols+1]}. } \author{Martin Maechler} \seealso{the generic function \code{\link{diag}} for \emph{extraction} of the diagonal from a matrix works for all \dQuote{Matrices}. \code{\link{bandSparse}} constructs a \emph{banded} sparse matrix from its non-zero sub-/super - diagonals. \code{\link{band}(A)} returns a band matrix containing some sub-/super - diagonals of \code{A}. \code{\link{Matrix}} for general matrix construction; further, class \code{\linkS4class{diagonalMatrix}}. } \examples{ Diagonal(3) Diagonal(x = 10^(3:1)) Diagonal(x = (1:4) >= 2)#-> "ldiMatrix" ## Use Diagonal() + kronecker() for "repeated-block" matrices: M1 <- Matrix(0+0:5, 2,3) (M <- kronecker(Diagonal(3), M1)) (S <- crossprod(Matrix(rbinom(60, size=1, prob=0.1), 10,6))) (SI <- S + 10*.symDiagonal(6)) # sparse symmetric still stopifnot(is(SI, "dsCMatrix")) (I4 <- .sparseDiagonal(4, shape="t"))# now (2012-10) unitriangular stopifnot(I4@diag == "U", all(I4 == diag(4))) \dontshow{% checking some "unit-diagonality": L <- Diagonal(5, TRUE) stopifnot(L@diag == "U", identical(L, Diagonal(5) > 0)) } } \keyword{array} \keyword{algebra} Matrix/man/dpoMatrix-class.Rd0000644000176200001440000001300212271746775015650 0ustar liggesusers\name{dpoMatrix-class} \title{Positive Semi-definite Dense Numeric Matrices} \docType{class} \alias{dpoMatrix-class} \alias{dppMatrix-class} \alias{corMatrix-class} % --- \alias{coerce,dpoMatrix,corMatrix-method} \alias{coerce,dpoMatrix,dppMatrix-method} \alias{coerce,dpoMatrix,lMatrix-method} \alias{coerce,dpoMatrix,nMatrix-method} \alias{coerce,dppMatrix,lMatrix-method} \alias{coerce,dppMatrix,nMatrix-method} \alias{coerce,dppMatrix,sparseMatrix-method} \alias{coerce,dppMatrix,CsparseMatrix-method} \alias{coerce,dppMatrix,dpoMatrix-method} \alias{coerce,dspMatrix,dpoMatrix-method} \alias{coerce,dspMatrix,dppMatrix-method} \alias{coerce,matrix,corMatrix-method} \alias{coerce,Matrix,corMatrix-method} \alias{coerce,matrix,dpoMatrix-method} \alias{coerce,Matrix,dpoMatrix-method} \alias{coerce,matrix,dppMatrix-method} \alias{coerce,Matrix,dppMatrix-method} %\alias{coerce,corMatrix,lMatrix-method} \alias{Ops,dpoMatrix,logical-method} \alias{Ops,dpoMatrix,numeric-method} \alias{Ops,dppMatrix,logical-method} \alias{Ops,dppMatrix,numeric-method} \alias{Ops,logical,dpoMatrix-method} \alias{Ops,logical,dppMatrix-method} \alias{Ops,numeric,dpoMatrix-method} \alias{Ops,numeric,dppMatrix-method} \alias{Arith,dpoMatrix,logical-method} \alias{Arith,dpoMatrix,numeric-method} \alias{Arith,dppMatrix,logical-method} \alias{Arith,dppMatrix,numeric-method} \alias{Arith,logical,dpoMatrix-method} \alias{Arith,logical,dppMatrix-method} \alias{Arith,numeric,dpoMatrix-method} \alias{Arith,numeric,dppMatrix-method} % \alias{rcond,dpoMatrix,character-method} \alias{rcond,dppMatrix,character-method} \alias{rcond,dpoMatrix,missing-method} \alias{rcond,dppMatrix,missing-method} \alias{determinant,dpoMatrix,logical-method} \alias{determinant,dppMatrix,logical-method} \alias{determinant,dpoMatrix,missing-method} \alias{determinant,dppMatrix,missing-method} %\alias{solve,dpoMatrix,...-method}--> solve-methods.Rd \alias{t,dppMatrix-method} \description{ The \code{"dpoMatrix"} class is the class of positive-semidefinite symmetric matrices in nonpacked storage. The \code{"dppMatrix"} class is the same except in packed storage. Only the upper triangle or the lower triangle is required to be available. The \code{"corMatrix"} class extends \code{"dpoMatrix"} with a slot \code{sd}. } \section{Objects from the Class}{Objects can be created by calls of the form \code{new("dpoMatrix", ...)} or from \code{crossprod} applied to an \code{"dgeMatrix"} object.} \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{x}:}{Object of class \code{"numeric"}. The numeric values that constitute the matrix, stored in column-major order.} \item{\code{Dim}:}{Object of class \code{"integer"}. The dimensions of the matrix which must be a two-element vector of non-negative integers.} \item{\code{Dimnames}:}{inherited from class \code{"Matrix"}} \item{\code{factors}:}{Object of class \code{"list"}. A named list of factorizations that have been computed for the matrix.} \item{\code{sd}:}{(for \code{"corMatrix"}) a \code{\link{numeric}} vector of length \code{n} containing the (original) \eqn{\sqrt{var(.)}}{sqrt(var(.))} entries which allow reconstruction of a covariance matrix from the correlation matrix.} } } \section{Extends}{ Class \code{"dsyMatrix"}, directly.\cr Classes \code{"dgeMatrix"}, \code{"symmetricMatrix"}, and many more by class \code{"dsyMatrix"}. } \section{Methods}{ \describe{ \item{chol}{\code{signature(x = "dpoMatrix")}: Returns (and stores) the Cholesky decomposition of \code{x}, see \code{\link{chol}}.} \item{determinant}{\code{signature(x = "dpoMatrix")}: Returns the \code{\link{determinant}} of \code{x}, via \code{chol(x)}, see above.} \item{rcond}{\code{signature(x = "dpoMatrix", norm = "character")}: Returns (and stores) the reciprocal of the condition number of \code{x}. The \code{norm} can be \code{"O"} for the one-norm (the default) or \code{"I"} for the infinity-norm. For symmetric matrices the result does not depend on the norm.} \item{solve}{\code{signature(a = "dpoMatrix", b = "....")}}{, and} \item{solve}{\code{signature(a = "dppMatrix", b = "....")}}{work via the Cholesky composition, see also the Matrix \code{\link{solve-methods}}.} \item{Arith}{\code{signature(e1 = "dpoMatrix", e2 = "numeric")} (and quite a few other signatures): The result of (\dQuote{elementwise} defined) arithmetic operations is typically \emph{not} positive-definite anymore. The only exceptions, currently, are multiplications, divisions or additions with \emph{positive} \code{length(.) == 1} numbers (or \code{\link{logical}}s).} } } %\references{} %\author{} \seealso{ Classes \code{\linkS4class{dsyMatrix}} and \code{\linkS4class{dgeMatrix}}; further, \code{\link{Matrix}}, \code{\link{rcond}}, \code{\link[base]{chol}}, \code{\link[base]{solve}}, \code{\link{crossprod}}. } \examples{ h6 <- Hilbert(6) rcond(h6) str(h6) h6 * 27720 # is ``integer'' solve(h6) str(hp6 <- as(h6, "dppMatrix")) ### Note that as(*, "corMatrix") *scales* the matrix (ch6 <- as(h6, "corMatrix")) stopifnot(all.equal(h6 * 27720, round(27720 * h6), tolerance = 1e-14), all.equal(ch6@sd^(-2), 2*(1:6)-1, tolerance= 1e-12)) chch <- chol(ch6) stopifnot(identical(chch, ch6@factors$Cholesky), all(abs(crossprod(chch) - ch6) < 1e-10)) } \keyword{classes} \keyword{algebra} Matrix/man/isSymmetric-methods.Rd0000644000176200001440000000333712272147560016545 0ustar liggesusers\name{isSymmetric-methods} \docType{methods} \alias{isSymmetric-methods} \alias{isSymmetric,symmetricMatrix-method} \alias{isSymmetric,triangularMatrix-method} \alias{isSymmetric,denseMatrix-method} \alias{isSymmetric,diagonalMatrix-method} \alias{isSymmetric,sparseMatrix-method} \title{Methods for Function isSymmetric in Package 'Matrix'} \description{ \code{isSymmetric(M)} returns a \code{\link{logical}} indicating if \code{M} is a symmetric matrix. This (now) is a \pkg{base} function with a default method for the traditional matrices of \code{\link{class}} \code{"matrix"}. Methods here are defined for virtual Matrix classes such that it works for all objects inheriting from class \code{\linkS4class{Matrix}}. } \seealso{\code{\link{forceSymmetric}}, \code{\link{symmpart}}, and the formal class (and subclasses) \code{"\linkS4class{symmetricMatrix}"}. } %% \usage{ %% ## some methods have a 'tol' : %% \S4method{isSymmetric}{denseMatrix}(object, tol = 100 * .Machine$double.eps, ...) %% \S4method{isSymmetric}{sparseMatrix}(object, tol = 100 * .Machine$double.eps, ...) %% } %% \section{Methods}{ %% \describe{ %% \item{object = "symmetricMatrix"}{ ... } %% \item{object = "triangularMatrix"}{ ... } %% \item{object = "denseMatrix"}{ ... } %% \item{object = "diagonalMatrix"}{ ... } %% \item{object = "sparseMatrix"}{ ... } %% } %% } \examples{ isSymmetric(Diagonal(4)) # TRUE of course M <- Matrix(c(1,2,2,1), 2,2) isSymmetric(M) # TRUE (*and* of formal class "dsyMatrix") isSymmetric(as(M, "dgeMatrix")) # still symmetric, even if not "formally" isSymmetric(triu(M)) # FALSE ## Look at implementations: showMethods("isSymmetric", includeDefs=TRUE)# "ANY": base's S3 generic; 6 more } \keyword{methods} Matrix/man/diagonalMatrix-class.Rd0000644000176200001440000002701312622367447016646 0ustar liggesusers\name{diagonalMatrix-class} \title{Class "diagonalMatrix" of Diagonal Matrices} \docType{class} \alias{diagonalMatrix-class} % \alias{as.vector,diagonalMatrix-method} \alias{coerce,matrix,diagonalMatrix-method} \alias{coerce,diagonalMatrix,denseMatrix-method} \alias{coerce,diagonalMatrix,generalMatrix-method} \alias{coerce,diagonalMatrix,matrix-method} \alias{coerce,diagonalMatrix,nMatrix-method} \alias{coerce,diagonalMatrix,nsparseMatrix-method} \alias{coerce,Matrix,diagonalMatrix-method} \alias{cbind2,sparseMatrix,diagonalMatrix-method} \alias{cbind2,diagonalMatrix,sparseMatrix-method} \alias{rbind2,sparseMatrix,diagonalMatrix-method} \alias{rbind2,diagonalMatrix,sparseMatrix-method} \alias{determinant,diagonalMatrix,logical-method} \alias{norm,diagonalMatrix,character-method} % \alias{coerce,ddiMatrix,matrix-method} \alias{coerce,ddiMatrix,dgeMatrix-method} \alias{coerce,ddiMatrix,ddenseMatrix-method} \alias{coerce,ldiMatrix,ldenseMatrix-method} % Mainly against ambiguity warnings: % Horrible-Hack: currently define for "all subclasses of diagonalMatrix" % ------------- in ../R/diagMatrix.R \alias{coerce,ddiMatrix,symmetricMatrix-method} \alias{coerce,ldiMatrix,symmetricMatrix-method} \alias{coerce,ddiMatrix,triangularMatrix-method} \alias{coerce,ldiMatrix,triangularMatrix-method} %_no_longer_ \alias{coerce,ddiMatrix,sparseMatrix-method} %_no_longer_ \alias{coerce,ldiMatrix,sparseMatrix-method} \alias{coerce,ddiMatrix,CsparseMatrix-method} \alias{coerce,ldiMatrix,CsparseMatrix-method} \alias{coerce,ddiMatrix,TsparseMatrix-method} \alias{coerce,ddiMatrix,dsparseMatrix-method} \alias{coerce,ldiMatrix,TsparseMatrix-method} \alias{coerce,ldiMatrix,lsparseMatrix-method} % \alias{cbind2,ddiMatrix,matrix-method} \alias{cbind2,ldiMatrix,matrix-method} \alias{cbind2,matrix,ddiMatrix-method} \alias{cbind2,matrix,ldiMatrix-method} \alias{rbind2,ddiMatrix,matrix-method} \alias{rbind2,ldiMatrix,matrix-method} \alias{rbind2,matrix,ddiMatrix-method} \alias{rbind2,matrix,ldiMatrix-method} % \alias{cbind2,ddiMatrix,atomicVector-method} \alias{cbind2,ldiMatrix,atomicVector-method} \alias{cbind2,atomicVector,ddiMatrix-method} \alias{cbind2,atomicVector,ldiMatrix-method} \alias{rbind2,ddiMatrix,atomicVector-method} \alias{rbind2,ldiMatrix,atomicVector-method} \alias{rbind2,atomicVector,ddiMatrix-method} \alias{rbind2,atomicVector,ldiMatrix-method} \alias{diag,diagonalMatrix-method} % \alias{diag,ddiMatrix-method} % \alias{diag,ldiMatrix-method} \alias{which,ldiMatrix-method} % \alias{Math,diagonalMatrix-method}% Math2: handled via "dMatrix" class \alias{Ops,diagonalMatrix,triangularMatrix-method} \alias{Ops,ddiMatrix,sparseMatrix-method} \alias{Ops,sparseMatrix,ddiMatrix-method} \alias{Ops,ldiMatrix,sparseMatrix-method} \alias{Ops,sparseMatrix,ldiMatrix-method} \alias{Ops,ddiMatrix,numeric-method} \alias{Ops,numeric,ddiMatrix-method} \alias{Ops,ldiMatrix,numeric-method} \alias{Ops,numeric,ldiMatrix-method} \alias{Ops,ddiMatrix,logical-method} \alias{Ops,logical,ddiMatrix-method} \alias{Ops,ldiMatrix,logical-method} \alias{Ops,logical,ldiMatrix-method} % \alias{Ops,ddiMatrix,ANY-method} \alias{Ops,ANY,ddiMatrix-method} \alias{Ops,ldiMatrix,ANY-method} \alias{Ops,ANY,ldiMatrix-method} \alias{Ops,ddiMatrix,Matrix-method} \alias{Ops,Matrix,ddiMatrix-method} \alias{Ops,ldiMatrix,Matrix-method} \alias{Ops,Matrix,ldiMatrix-method} \alias{Ops,ddiMatrix,dMatrix-method} \alias{Ops,dMatrix,ddiMatrix-method} \alias{Ops,ldiMatrix,dMatrix-method} \alias{Ops,dMatrix,ldiMatrix-method} % \alias{Ops,ddiMatrix,ddiMatrix-method} \alias{Ops,ddiMatrix,ldiMatrix-method} \alias{Ops,ldiMatrix,ddiMatrix-method} \alias{Ops,ldiMatrix,ldiMatrix-method} \alias{Arith,triangularMatrix,diagonalMatrix-method} \alias{Compare,triangularMatrix,diagonalMatrix-method} \alias{Logic,triangularMatrix,diagonalMatrix-method} \alias{Arith,numeric,ddiMatrix-method} \alias{Arith,numeric,ldiMatrix-method} \alias{Arith,ddiMatrix,numeric-method} \alias{Arith,ldiMatrix,numeric-method} \alias{Arith,logical,ddiMatrix-method} \alias{Arith,logical,ldiMatrix-method} \alias{Arith,ddiMatrix,logical-method} \alias{Arith,ldiMatrix,logical-method} \alias{-,ddiMatrix,missing-method} \alias{-,ldiMatrix,missing-method} \alias{all,ddiMatrix-method} \alias{all,ldiMatrix-method} \alias{any,ddiMatrix-method} \alias{any,ldiMatrix-method} \alias{prod,ddiMatrix-method} \alias{prod,ldiMatrix-method} \alias{sum,ddiMatrix-method} \alias{sum,ldiMatrix-method} %%--"hack"-- for all these signatures explicitly (in loop in ../R/diagMatrix.R ): %% <[dln]denseMatrix o [dl]diMatrix : \alias{^,ddenseMatrix,ddiMatrix-method} \alias{^,ddenseMatrix,ldiMatrix-method} \alias{^,ddiMatrix,ddenseMatrix-method} \alias{^,ddiMatrix,ldenseMatrix-method} \alias{^,ddiMatrix,ndenseMatrix-method} \alias{^,ldenseMatrix,ddiMatrix-method} \alias{^,ldenseMatrix,ldiMatrix-method} \alias{^,ldiMatrix,ddenseMatrix-method} \alias{^,ldiMatrix,ldenseMatrix-method} \alias{^,ldiMatrix,ndenseMatrix-method} \alias{^,ndenseMatrix,ddiMatrix-method} \alias{^,ndenseMatrix,ldiMatrix-method} \alias{/,ddiMatrix,ddenseMatrix-method} \alias{/,ddiMatrix,ldenseMatrix-method} \alias{/,ddiMatrix,ndenseMatrix-method} \alias{/,ldiMatrix,ddenseMatrix-method} \alias{/,ldiMatrix,ldenseMatrix-method} \alias{/,ldiMatrix,ndenseMatrix-method} \alias{*,ddenseMatrix,ddiMatrix-method} \alias{*,ddenseMatrix,ldiMatrix-method} \alias{*,ddiMatrix,ddenseMatrix-method} \alias{*,ddiMatrix,ldenseMatrix-method} \alias{*,ddiMatrix,ndenseMatrix-method} \alias{*,ldenseMatrix,ddiMatrix-method} \alias{*,ldenseMatrix,ldiMatrix-method} \alias{*,ldiMatrix,ddenseMatrix-method} \alias{*,ldiMatrix,ldenseMatrix-method} \alias{*,ldiMatrix,ndenseMatrix-method} \alias{*,ndenseMatrix,ddiMatrix-method} \alias{*,ndenseMatrix,ldiMatrix-method} \alias{&,ddenseMatrix,ddiMatrix-method} \alias{&,ddenseMatrix,ldiMatrix-method} \alias{&,ddiMatrix,ddenseMatrix-method} \alias{&,ddiMatrix,ldenseMatrix-method} \alias{&,ddiMatrix,ndenseMatrix-method} \alias{&,ldenseMatrix,ddiMatrix-method} \alias{&,ldenseMatrix,ldiMatrix-method} \alias{&,ldiMatrix,ddenseMatrix-method} \alias{&,ldiMatrix,ldenseMatrix-method} \alias{&,ldiMatrix,ndenseMatrix-method} \alias{&,ndenseMatrix,ddiMatrix-method} \alias{&,ndenseMatrix,ldiMatrix-method} \alias{\%/\%,ddiMatrix,ddenseMatrix-method} \alias{\%/\%,ddiMatrix,ldenseMatrix-method} \alias{\%/\%,ddiMatrix,ndenseMatrix-method} \alias{\%/\%,ldiMatrix,ddenseMatrix-method} \alias{\%/\%,ldiMatrix,ldenseMatrix-method} \alias{\%/\%,ldiMatrix,ndenseMatrix-method} \alias{\%\%,ddiMatrix,ddenseMatrix-method} \alias{\%\%,ddiMatrix,ldenseMatrix-method} \alias{\%\%,ddiMatrix,ndenseMatrix-method} \alias{\%\%,ldiMatrix,ddenseMatrix-method} \alias{\%\%,ldiMatrix,ldenseMatrix-method} \alias{\%\%,ldiMatrix,ndenseMatrix-method} %% Matrix o [dl]diMatrix : \alias{^,Matrix,ddiMatrix-method} \alias{^,Matrix,ldiMatrix-method} \alias{^,ddiMatrix,Matrix-method} \alias{^,ldiMatrix,Matrix-method} \alias{/,ddiMatrix,Matrix-method} \alias{/,ldiMatrix,Matrix-method} \alias{*,Matrix,ddiMatrix-method} \alias{*,Matrix,ldiMatrix-method} \alias{*,ddiMatrix,Matrix-method} \alias{*,ldiMatrix,Matrix-method} \alias{&,Matrix,ddiMatrix-method} \alias{&,Matrix,ldiMatrix-method} \alias{&,ddiMatrix,Matrix-method} \alias{&,ldiMatrix,Matrix-method} \alias{\%/\%,ddiMatrix,Matrix-method} \alias{\%/\%,ldiMatrix,Matrix-method} \alias{\%\%,ddiMatrix,Matrix-method} \alias{\%\%,ldiMatrix,Matrix-method} %> %-end{H.Hack} \alias{Ops,diagonalMatrix,diagonalMatrix-method} \alias{Ops,diagonalMatrix,ddiMatrix-method} \alias{Ops,ddiMatrix,diagonalMatrix-method} \alias{Summary,ddiMatrix-method} \alias{Summary,ldiMatrix-method} % \alias{chol2inv,diagonalMatrix-method} \alias{t,diagonalMatrix-method} \alias{print,diagonalMatrix-method} \alias{show,diagonalMatrix-method} %\alias{solve,...} --> solve-methods.Rd %\alias{\%*%,... } --> matrix-products.Rd \alias{summary,diagonalMatrix-method} \description{ Class "diagonalMatrix" is the virtual class of all diagonal matrices. } \section{Objects from the Class}{A virtual Class: No objects may be created from it.} \section{Slots}{ \describe{ \item{\code{diag}:}{code{"character"} string, either \code{"U"} or \code{"N"}, where \code{"U"} means \sQuote{unit-diagonal}.} \item{\code{Dim}:}{matrix dimension, and} \item{\code{Dimnames}:}{the \code{\link{dimnames}}, a \code{\link{list}}, see the \code{\linkS4class{Matrix}} class description. Typically \code{list(NULL,NULL)} for diagonal matrices.} } } \section{Extends}{ Class \code{"\linkS4class{sparseMatrix}"}, directly. } \section{Methods}{ These are just a subset of the signature for which defined methods. Currently, there are (too) many explicit methods defined in order to ensure efficient methods for diagonal matrices. \describe{ \item{coerce}{\code{signature(from = "matrix", to = "diagonalMatrix")}: ... } \item{coerce}{\code{signature(from = "Matrix", to = "diagonalMatrix")}: ... } \item{coerce}{\code{signature(from = "diagonalMatrix", to = "generalMatrix")}: ... } \item{coerce}{\code{signature(from = "diagonalMatrix", to = "triangularMatrix")}: ... } \item{coerce}{\code{signature(from = "diagonalMatrix", to = "nMatrix")}: ... } \item{coerce}{\code{signature(from = "diagonalMatrix", to = "matrix")}: ... } \item{coerce}{\code{signature(from = "diagonalMatrix", to = "sparseVector")}: ... } \item{t}{\code{signature(x = "diagonalMatrix")}: ... } \cr and many more methods \item{solve}{\code{signature(a = "diagonalMatrix", b, ...)}: is trivially implemented, of course; see also \code{\link{solve-methods}}.} \item{which}{\code{signature(x = "nMatrix")}, semantically equivalent to \pkg{base} function \code{\link{which}(x, arr.ind)}.} \item{"Math"}{\code{signature(x = "diagonalMatrix")}: all these group methods return a \code{"diagonalMatrix"}, apart from \code{\link{cumsum}()} etc which return a \emph{vector} also for \pkg{base} \code{\link{matrix}}.} \item{*}{\code{signature(e1 = "ddiMatrix", e2="denseMatrix")}: arithmetic and other operators from the \code{\link[=S4groupGeneric]{Ops}} group have a few dozen explicit method definitions, in order to keep the results \emph{diagonal} in many cases, including the following:} \item{/}{\code{signature(e1 = "ddiMatrix", e2="denseMatrix")}: the result is from class \code{\linkS4class{ddiMatrix}} which is typically very desirable. Note that when \code{e2} contains off-diagonal zeros or \code{\link{NA}}s, we implicitly use \eqn{0 / x = 0}, hence differing from traditional \R arithmetic (where \eqn{0 / 0 \mapsto \mbox{NaN}}{0/0 |-> NaN}), in order to preserve sparsity.} \item{summary}{\code{(object = "diagonalMatrix")}: Returns an object of S3 class \code{"diagSummary"} which is the summary of the vector \code{object@x} plus a simple heading, and an appropriate \code{\link{print}} method.} } } \seealso{ \code{\link{Diagonal}()} as constructor of these matrices, and \code{\link{isDiagonal}}. \code{\linkS4class{ddiMatrix}} and \code{\linkS4class{ldiMatrix}} are \dQuote{actual} classes extending \code{"diagonalMatrix"}. } \examples{ I5 <- Diagonal(5) D5 <- Diagonal(x = 10*(1:5)) ## trivial (but explicitly defined) methods: stopifnot(identical(crossprod(I5), I5), identical(tcrossprod(I5), I5), identical(crossprod(I5, D5), D5), identical(tcrossprod(D5, I5), D5), identical(solve(D5), solve(D5, I5)), all.equal(D5, solve(solve(D5)), tolerance = 1e-12) ) solve(D5)# efficient as is diagonal # an unusual way to construct a band matrix: rbind2(cbind2(I5, D5), cbind2(D5, I5)) } \keyword{classes} Matrix/man/bdiag.Rd0000644000176200001440000000745512750671113013644 0ustar liggesusers\name{bdiag} \alias{bdiag} \alias{.bdiag} \title{Construct a Block Diagonal Matrix} \description{ Build a block diagonal matrix given several building block matrices. } \usage{ bdiag(\dots) .bdiag(lst) } \arguments{ \item{\dots}{individual matrices or a \code{\link{list}} of matrices.} \item{lst}{non-empty \code{\link{list}} of matrices.} } \details{ For non-trivial argument list, \code{bdiag()} calls \code{.bdiag()}. The latter maybe useful to programmers. } \note{This function has been written and is efficient for the case of relatively few block matrices which are typically sparse themselves. It is currently \emph{inefficient} for the case of many small dense block matrices. For the case of \emph{many} dense \eqn{k \times k}{k * k} matrices, the \code{bdiag_m()} function in the \sQuote{Examples} is an order of magnitude faster. } \value{ A \emph{sparse} matrix obtained by combining the arguments into a block diagonal matrix. The value of \code{bdiag()} inheris from class \code{\linkS4class{CsparseMatrix}}, whereas \code{.bdiag()} returns a \code{\linkS4class{TsparseMatrix}}. } \author{Martin Maechler, built on a version posted by Berton Gunter to R-help; earlier versions have been posted by other authors, notably Scott Chasalow to S-news. Doug Bates's faster implementation builds on \code{\linkS4class{TsparseMatrix}} objects. } \seealso{\code{\link{Diagonal}} for constructing matrices of class \code{\linkS4class{diagonalMatrix}}, or \code{\link{kronecker}} which also works for \code{"Matrix"} inheriting matrices. \code{\link{bandSparse}} constructs a \emph{banded} sparse matrix from its non-zero sub-/super - diagonals. Note that other CRAN \R packages have own versions of \code{bdiag()} which return traditional matrices. } \examples{ bdiag(matrix(1:4, 2), diag(3)) ## combine "Matrix" class and traditional matrices: bdiag(Diagonal(2), matrix(1:3, 3,4), diag(3:2)) mlist <- list(1, 2:3, diag(x=5:3), 27, cbind(1,3:6), 100:101) bdiag(mlist) stopifnot(identical(bdiag(mlist), % <- used to fail in earlier versions bdiag(lapply(mlist, as.matrix)))) ml <- c(as(matrix((1:24)\%\% 11 == 0, 6,4),"nMatrix"), rep(list(Diagonal(2, x=TRUE)), 3)) mln <- c(ml, Diagonal(x = 1:3)) stopifnot(is(bdiag(ml), "lsparseMatrix"),% failed in Matrix <= 1.0-2 is(bdiag(mln),"dsparseMatrix") ) ## random (diagonal-)block-triangular matrices: rblockTri <- function(nb, max.ni, lambda = 3) { .bdiag(replicate(nb, { n <- sample.int(max.ni, 1) tril(Matrix(rpois(n*n, lambda=lambda), n,n)) })) } (T4 <- rblockTri(4, 10, lambda = 1)) image(T1 <- rblockTri(12, 20)) ##' Fast version of Matrix :: .bdiag() -- for the case of *many* (k x k) matrices: ##' @param lmat list(, , ....., ) where each mat_j is a k x k 'matrix' ##' @return a sparse (N*k x N*k) matrix of class \code{"\linkS4class{dgCMatrix}"}. bdiag_m <- function(lmat) { ## Copyright (C) 2016 Martin Maechler, ETH Zurich if(!length(lmat)) return(new("dgCMatrix")) stopifnot(is.list(lmat), is.matrix(lmat[[1]]), (k <- (d <- dim(lmat[[1]]))[1]) == d[2], # k x k all(vapply(lmat, dim, integer(2)) == k)) # all of them N <- length(lmat) if(N * k > .Machine$integer.max) stop("resulting matrix too large; would be M x M, with M=", N*k) M <- as.integer(N * k) ## result: an M x M matrix new("dgCMatrix", Dim = c(M,M), ## 'i :' maybe there's a faster way (w/o matrix indexing), but elegant? i = as.vector(matrix(0L:(M-1L), nrow=k)[, rep(seq_len(N), each=k)]), p = k * 0L:M, x = as.double(unlist(lmat, recursive=FALSE, use.names=FALSE))) } l12 <- replicate(12, matrix(rpois(16, lambda = 6.4), 4,4), simplify=FALSE) dim(T12 <- bdiag_m(l12))# 48 x 48 T12[1:20, 1:20] } \keyword{array} Matrix/man/updown.Rd0000644000176200001440000000346111745552731014112 0ustar liggesusers\name{updown} \alias{updown} \alias{updown-methods} \alias{updown,ANY,ANY,ANY-method} \alias{updown,character,mMatrix,CHMfactor-method} \alias{updown,logical,mMatrix,CHMfactor-method} \title{Up- and Down-Dating a Cholesky Decomposition} \description{ Compute the up- or down-dated Cholesky decomposition } \usage{ updown(update, C, L) } \arguments{ \item{update}{logical (\code{TRUE} or \code{FALSE}) or \code{"+"} or \code{"-"} indicating if an up- or a down-date is to be computed.} \item{C}{any \R object, coercable to a sparse matrix (i.e., of subclass of \code{\linkS4class{sparseMatrix}}).} \item{L}{a Cholesky factor, specifically, of class \code{"\linkS4class{CHMfactor}"}.} } % \details{ % } \value{ an updated Cholesky factor, of the same dimension as \code{L}. Typically of class \code{"\linkS4class{dCHMsimpl}"} (a sub class of \code{"\linkS4class{CHMfactor}"}). } \references{ CHOLMOD manual, currently beginning of chapter~18. ... %% FIXME } \author{Contributed by Nicholas Nagle, University of Tennessee, Knoxville, USA} \section{Methods}{ \describe{ \item{\code{signature(update = "character", C = "mMatrix", L = "CHMfactor")}}{..} \item{\code{signature(update = "logical", C = "mMatrix", L = "CHMfactor")}}{ .. } } } \seealso{ \code{\link{Cholesky}}, } \examples{ dn <- list(LETTERS[1:3], letters[1:5]) ## pointer vectors can be used, and the (i,x) slots are sorted if necessary: m <- sparseMatrix(i = c(3,1, 3:2, 2:1), p= c(0:2, 4,4,6), x = 1:6, dimnames = dn) cA <- Cholesky(A <- crossprod(m) + Diagonal(5)) 166 * as(cA,"Matrix") ^ 2 uc1 <- updown("+", Diagonal(5), cA) ## Hmm: this loses positive definiteness: uc2 <- updown("-", 2*Diagonal(5), cA) image(show(as(cA, "Matrix"))) image(show(c2 <- as(uc2,"Matrix")))# severely negative entries ##--> Warning } \keyword{methods} Matrix/man/invPerm.Rd0000644000176200001440000000256412364143216014211 0ustar liggesusers\name{invPerm} \alias{invPerm} \title{Inverse Permutation Vector} \description{ From a permutation vector \code{p}, compute its \emph{inverse} permutation vector. } \usage{ invPerm(p, zero.p = FALSE, zero.res = FALSE) } \arguments{ \item{p}{an integer vector of length, say, \code{n}.} \item{zero.p}{logical indicating if \code{p} contains values \code{0:(n-1)} or rather (by default, \code{zero.p = FALSE}) \code{1:n}.} \item{zero.res}{logical indicating if the result should contain values \code{0:(n-1)} or rather (by default, \code{zero.res = FALSE}) \code{1:n}.} } \value{ an integer vector of the same length (\code{n}) as \code{p}. By default, (\code{zero.p = FALSE, zero.res = FALSE}), \code{invPerm(p)} is the same as \code{\link{order}(p)} or \code{\link{sort.list}(p)} and for that case, the function is equivalent to \code{invPerm. <- function(p) { p[p] <- seq_along(p) ; p }}. } \author{Martin Maechler} \seealso{the class of permutation matrices, \code{\linkS4class{pMatrix}}. } \examples{ p <- sample(10) # a random permutation vector ip <- invPerm(p) p[ip] # == 1:10 ## they are indeed inverse of each other: stopifnot( identical(p[ip], 1:10), identical(ip[p], 1:10), identical(invPerm(ip), p) ) \dontshow{ p3 <- c(3, 1:2) # ('double' instead of integer) stopifnot(identical(invPerm(p3), c(2:3, 1L))) } } \keyword{arithmetic} Matrix/man/rcond.Rd0000644000176200001440000001177012322330663013673 0ustar liggesusers\name{rcond} \title{Estimate the Reciprocal Condition Number} \alias{rcond} % most methods are "documented" in Matrix-class.Rd \alias{rcond,ANY,missing-method} \alias{rcond,Matrix,character-method} \alias{rcond,ldenseMatrix,character-method} \alias{rcond,ndenseMatrix,character-method} \alias{rcond,sparseMatrix,character-method} % \usage{ rcond(x, norm, \dots) \S4method{rcond}{sparseMatrix,character}(x, norm, useInv=FALSE, \dots) } \description{ Estimate the reciprocal of the condition number of a matrix. This is a generic function with several methods, as seen by \code{\link{showMethods}(rcond)}. } \arguments{ \item{x}{an \R object that inherits from the \code{Matrix} class.} \item{norm}{character string indicating the type of norm to be used in the estimate. The default is \code{"O"} for the 1-norm (\code{"O"} is equivalent to \code{"1"}). For sparse matrices, when \code{useInv=TRUE}, \code{norm} can be any of the \code{kind}s allowed for \code{\link{norm}}; otherwise, the other possible value is \code{"I"} for the infinity norm, see also \code{\link{norm}}. } \item{useInv}{logical (or \code{"Matrix"} containing \code{\link{solve}(x)}). If not false, compute the reciprocal condition number as \eqn{1/(\|x\| \cdot \|x^{-1}\|)}{1/(||x|| * ||x^(-1)||)}, where \eqn{x^{-1}}{x^(-1)} is the inverse of \eqn{x}, \code{solve(x)}. This may be an efficient alternative (only) in situations where \code{solve(x)} is fast (or known), e.g., for (very) sparse or triangular matrices. Note that the \emph{result} may differ depending on \code{useInv}, as per default, when it is false, an \emph{approximation} is computed. } \item{\dots}{further arguments passed to or from other methods.} } \value{ An estimate of the reciprocal condition number of \code{x}. } \section{BACKGROUND}{ The condition number of a regular (square) matrix is the product of the \code{\link{norm}} of the matrix and the norm of its inverse (or pseudo-inverse). More generally, the condition number is defined (also for non-square matrices \eqn{A}) as \deqn{\kappa(A) = \frac{\max_{\|v\| = 1} \|A v\|}{\min_{\|v\| = 1} \|A v\|}.}{% kappa(A) = (max_(||v|| = 1; || Av ||)) /(min_(||v|| = 1; || Av ||)).} Whenever \code{x} is \emph{not} a square matrix, in our method definitions, this is typically computed via \code{rcond(qr.R(qr(X)), ...)} where \code{X} is \code{x} or \code{t(x)}. The condition number takes on values between 1 and infinity, inclusive, and can be viewed as a factor by which errors in solving linear systems with this matrix as coefficient matrix could be magnified. \code{rcond()} computes the \emph{reciprocal} condition number \eqn{1/\kappa} with values in \eqn{[0,1]} and can be viewed as a scaled measure of how close a matrix is to being rank deficient (aka \dQuote{singular}). Condition numbers are usually estimated, since exact computation is costly in terms of floating-point operations. An (over) estimate of reciprocal condition number is given, since by doing so overflow is avoided. Matrices are well-conditioned if the reciprocal condition number is near 1 and ill-conditioned if it is near zero. } \seealso{ \code{\link{norm}}, \code{\link[base]{kappa}()} from package \pkg{base} computes an \emph{approximate} condition number of a \dQuote{traditional} matrix, even non-square ones, with respect to the \eqn{p=2} (Euclidean) \code{\link{norm}}. \code{\link[base]{solve}}. \code{\link{condest}}, a newer \emph{approximate} estimate of the (1-norm) condition number, particularly efficient for large sparse matrices. } \references{ Golub, G., and Van Loan, C. F. (1989). \emph{Matrix Computations,} 2nd edition, Johns Hopkins, Baltimore. } \examples{ x <- Matrix(rnorm(9), 3, 3) rcond(x) ## typically "the same" (with more computational effort): 1 / (norm(x) * norm(solve(x))) rcond(Hilbert(9)) # should be about 9.1e-13 ## For non-square matrices: rcond(x1 <- cbind(1,1:10))# 0.05278 rcond(x2 <- cbind(x1, 2:11))# practically 0, since x2 does not have full rank ## sparse (S1 <- Matrix(rbind(0:1,0, diag(3:-2)))) rcond(S1) m1 <- as(S1, "denseMatrix") all.equal(rcond(S1), rcond(m1)) ## wide and sparse rcond(Matrix(cbind(0, diag(2:-1)))) ## Large sparse example ---------- m <- Matrix(c(3,0:2), 2,2) M <- bdiag(kronecker(Diagonal(2), m), kronecker(m,m)) 36*(iM <- solve(M)) # still sparse MM <- kronecker(Diagonal(10), kronecker(Diagonal(5),kronecker(m,M))) dim(M3 <- kronecker(bdiag(M,M),MM)) # 12'800 ^ 2 if(interactive()) ## takes about 2 seconds if you have >= 8 GB RAM system.time(r <- rcond(M3)) ## whereas this is *fast* even though it computes solve(M3) system.time(r. <- rcond(M3, useInv=TRUE)) if(interactive()) ## the values are not the same c(r, r.) # 0.05555 0.013888 ## for all 4 norms available for sparseMatrix : cbind(rr <- sapply(c("1","I","F","M"), function(N) rcond(M3, norm=N, useInv=TRUE))) \dontshow{stopifnot(all.equal(r., 1/72, tolerance=1e-12))} } \keyword{array} \keyword{algebra} Matrix/man/sparse.model.matrix.Rd0000644000176200001440000001351712271746775016510 0ustar liggesusers\name{sparse.model.matrix} \title{Construct Sparse Design / Model Matrices} \alias{sparse.model.matrix} \alias{fac2sparse} \alias{fac2Sparse} \description{Construct a sparse model or \dQuote{design} matrix, form a formula and data frame (\code{sparse.model.matrix}) or a single factor (\code{fac2sparse}). The \code{fac2[Ss]parse()} functions are utilities, also used internally in the principal user level function \code{sparse.model.matrix()}. } \usage{ sparse.model.matrix(object, data = environment(object), contrasts.arg = NULL, xlev = NULL, transpose = FALSE, drop.unused.levels = FALSE, row.names = TRUE, verbose = FALSE, \dots) fac2sparse(from, to = c("d", "i", "l", "n", "z"), drop.unused.levels = TRUE, giveCsparse = TRUE) fac2Sparse(from, to = c("d", "i", "l", "n", "z"), drop.unused.levels = TRUE, giveCsparse = TRUE, factorPatt12, contrasts.arg = NULL) } \arguments{ \item{object}{an object of an appropriate class. For the default method, a model formula or terms object.} \item{data}{a data frame created with \code{\link{model.frame}}. If another sort of object, \code{model.frame} is called first.} \item{contrasts.arg}{\describe{ \item{for \code{sparse.model.matrix()}:}{A list, whose entries are contrasts suitable for input to the \code{\link{contrasts}} replacement function and whose names are the names of columns of \code{data} containing \code{\link{factor}}s.} \item{for \code{fac2Sparse()}:}{character string or \code{NULL} or (coercable to) \code{"\linkS4class{sparseMatrix}"}, specifying the contrasts to be applied to the factor levels.} }} \item{xlev}{to be used as argument of \code{\link{model.frame}} if \code{data} has no \code{"terms"} attribute.} \item{transpose}{logical indicating if the \emph{transpose} should be returned; if the transposed is used anyway, setting \code{transpose = TRUE} is more efficient.} \item{drop.unused.levels}{should factors have unused levels dropped? The default for \code{sparse.model.matrix} has been changed to \code{FALSE}, 2010-07, for compatibility with \R's standard (dense) \code{\link{model.matrix}()}.} \item{row.names}{logical indicating if row names should be used.} \item{verbose}{logical or integer indicating if (and how much) progress output should be printed.} \item{\dots}{further arguments passed to or from other methods.} \item{from}{(for \code{fac2sparse()}:) a \code{\link{factor}}.} \item{to}{a character indicating the \dQuote{kind} of sparse matrix to be returned. The default, \code{"d"} is for \code{\link{double}}.} \item{giveCsparse}{(for \code{fac2sparse()}:) logical indicating if the result must be a \code{\linkS4class{CsparseMatrix}}.} \item{factorPatt12}{logical vector, say \code{fp}, of length two; when \code{fp[1]} is true, return \dQuote{contrasted} \code{t(X)}; when \code{fp[2]} is true, the original (\dQuote{dummy}) \code{t(X)}, i.e, the result of \code{\link{fac2sparse}()}.} } \value{ a sparse matrix, extending \code{\linkS4class{CsparseMatrix}} (for \code{fac2sparse()} if \code{giveCsparse} is true as per default; a \code{\linkS4class{TsparseMatrix}}, otherwise). For \code{fac2Sparse()}, a \code{\link{list}} of length two, both components with the corresponding transposed model matrix, where the corresponding \code{factorPatt12} is true. Note that \code{\link[MatrixModels]{model.Matrix}(*, sparse=TRUE)} from package \pkg{MatrixModels} may be often be preferable to \code{sparse.model.matrix()} nowadays, as \code{model.Matrix()} returns \code{\link[MatrixModels:modelMatrix-class]{modelMatrix}} objects with additional slots \code{assign} and \code{contrasts} which relate back to the variables used. \code{fac2sparse()}, the basic workhorse of \code{sparse.model.matrix()}, returns the \emph{transpose} (\code{\link{t}}) of the model matrix. } \author{Doug Bates and Martin Maechler, with initial suggestions from Tim Hesterberg. } \seealso{ \code{\link{model.matrix}} in standard \R's package \pkg{stats}.\cr \code{\link[MatrixModels]{model.Matrix}} which calls \code{sparse.model.matrix} or \code{model.matrix} depending on its \code{sparse} argument may be preferred to \code{sparse.model.matrix}. \code{as(f, "sparseMatrix")} (see \code{coerce(from = "factor", ..)} in the class doc \linkS4class{sparseMatrix}) produces the \emph{transposed} sparse model matrix for a single factor \code{f} (and \emph{no} contrasts). } \examples{ dd <- data.frame(a = gl(3,4), b = gl(4,1,12))# balanced 2-way options("contrasts") # the default: "contr.treatment" sparse.model.matrix(~ a + b, dd) sparse.model.matrix(~ -1+ a + b, dd)# no intercept --> even sparser sparse.model.matrix(~ a + b, dd, contrasts = list(a="contr.sum")) sparse.model.matrix(~ a + b, dd, contrasts = list(b="contr.SAS")) ## Sparse method is equivalent to the traditional one : stopifnot(all(sparse.model.matrix(~ a + b, dd) == Matrix(model.matrix(~ a + b, dd), sparse=TRUE)), all(sparse.model.matrix(~ 0+ a + b, dd) == Matrix(model.matrix(~ 0+ a + b, dd), sparse=TRUE))) %% many more and tougher examples ---> ../tests/spModel.matrix.R (ff <- gl(3,4,, c("X","Y", "Z"))) fac2sparse(ff) # 3 x 12 sparse Matrix of class "dgCMatrix" ## ## X 1 1 1 1 . . . . . . . . ## Y . . . . 1 1 1 1 . . . . ## Z . . . . . . . . 1 1 1 1 ## can also be computed via sparse.model.matrix(): f30 <- gl(3,0 ) f12 <- gl(3,0, 12) stopifnot( all.equal(t( fac2sparse(ff) ), sparse.model.matrix(~ 0+ff), tolerance = 0, check.attributes=FALSE), is(M <- fac2sparse(f30, drop= TRUE),"CsparseMatrix"), dim(M) == c(0, 0), is(M <- fac2sparse(f30, drop=FALSE),"CsparseMatrix"), dim(M) == c(3, 0), is(M <- fac2sparse(f12, drop= TRUE),"CsparseMatrix"), dim(M) == c(0,12), is(M <- fac2sparse(f12, drop=FALSE),"CsparseMatrix"), dim(M) == c(3,12) ) } \keyword{models} Matrix/man/MatrixClass.Rd0000644000176200001440000000220612571665074015027 0ustar liggesusers\name{MatrixClass} \title{The Matrix (Super-) Class of a Class} \alias{MatrixClass} \description{ Return the (maybe super-)\code{\link{class}} of class \code{cl} from package \pkg{Matrix}, returning \code{\link{character}(0)} if there is none. } \usage{ MatrixClass(cl, cld = getClassDef(cl), ...Matrix = TRUE, dropVirtual = TRUE, ...) } \arguments{ \item{cl}{string, class name} \item{cld}{its class definition} \item{...Matrix}{\code{\link{logical}} indicating if the result must be of pattern \code{"[dlniz]..Matrix"} where the first letter "[dlniz]" denotes the content kind.} \item{dropVirtual}{\code{\link{logical}} indicating if virtual classes are included or not.}% ?? (FIXME) -- example \item{\dots}{further arguments are passed to \code{\link{.selectSuperClasses}()}.} } \value{ a \code{\link{character}} string } \author{Martin Maechler, 24 Mar 2009} %% \details{ %% } \seealso{ \code{\linkS4class{Matrix}}, the mother of all \pkg{Matrix} classes. } \examples{ mkA <- setClass("A", contains="dgCMatrix") (A <- mkA()) stopifnot(identical( MatrixClass("A"), "dgCMatrix")) } \keyword{classes} Matrix/man/expand.Rd0000644000176200001440000000166711763577200014061 0ustar liggesusers\name{expand} \title{Expand a Decomposition into Factors} \usage{ expand(x, \dots) } \alias{expand} \description{ Expands decompositions stored in compact form into factors. } \arguments{ \item{x}{a matrix decomposition.} \item{\dots}{further arguments passed to or from other methods.} } \value{ The expanded decomposition, typically a list of matrix factors. } \details{ This is a generic function with special methods for different types of decompositions, see \code{\link{showMethods}(expand)} to list them all. } \note{ Factors for decompositions such as \code{lu} and \code{qr} can be stored in a compact form. The function \code{expand} allows all factors to be fully expanded. } \seealso{ The LU \code{\link{lu}}, and the \code{\link{Cholesky}} decompositions which have \code{expand} methods; \code{\link{facmul}}. } \examples{ (x <- Matrix(round(rnorm(9),2), 3, 3)) (ex <- expand(lux <- lu(x))) } \keyword{algebra} Matrix/man/KhatriRao.Rd0000644000176200001440000000657412760263240014462 0ustar liggesusers\name{KhatriRao} \title{Khatri-Rao Matrix Product} \alias{KhatriRao} \description{ Computes Khatri-Rao products for any kind of matrices. The Khatri-Rao product is a column-wise Kronecker product. Originally introduced by Khatri and Rao (1968), it has many different applications, see Liu and Trenkler (2008) for a survey. Notably, it is used in higher-dimensional tensor decompositions, see Bader and Kolda (2008). } \usage{ KhatriRao(X, Y = X, FUN = "*", make.dimnames = FALSE) } \arguments{ \item{X,Y}{matrices of with the same number of columns.} \item{FUN}{the (name of the) \code{\link{function}} to be used for the column-wise Kronecker products, see \code{\link{kronecker}}, defaulting to the usual multiplication.} \item{make.dimnames}{logical indicating if the result should inherit \code{\link{dimnames}} from \code{X} and \code{Y} in a simple way.} } %\details{ %} \value{ a \code{"\linkS4class{CsparseMatrix}"}, say \code{R}, the Khatri-Rao product of \code{X} (\eqn{n \times k}{n x k}) and \code{Y} (\eqn{m \times k}{m x k}), is of dimension \eqn{(n\cdot m) \times k}{(n*m) x k}, where the j-th column, \code{R[,j]} is the kronecker product \code{\link{kronecker}(X[,j], Y[,j])}. } \note{%% TODO? Could make it generic, and have dense and sparse methods The current implementation is efficient for large sparse matrices. } \references{ Khatri, C. G., and Rao, C. Radhakrishna (1968) Solutions to Some Functional Equations and Their Applications to Characterization of Probability Distributions. \emph{Sankhya: Indian J. Statistics, Series A} \bold{30}, 167--180. Liu, Shuangzhe, and G\enc{õ}{oe}tz Trenkler (2008) Hadamard, Khatri-Rao, Kronecker and Other Matrix Products. \emph{International J. Information and Systems Sciences} \bold{4}, 160--177. Bader, Brett W, and Tamara G Kolda (2008) Efficient MATLAB Computations with Sparse and Factored Tensors. \emph{SIAM J. Scientific Computing} \bold{30}, 205--231. } \author{ Original by Michael Cysouw, Univ. Marburg; minor tweaks, bug fixes etc, by Martin Maechler. } \seealso{ \code{\link{kronecker}}. } \examples{ ## Example with very small matrices: m <- matrix(1:12,3,4) d <- diag(1:4) KhatriRao(m,d) KhatriRao(d,m) dimnames(m) <- list(LETTERS[1:3], letters[1:4]) KhatriRao(m,d, make.dimnames=TRUE) KhatriRao(d,m, make.dimnames=TRUE) dimnames(d) <- list(NULL, paste0("D", 1:4)) KhatriRao(m,d, make.dimnames=TRUE) KhatriRao(d,m, make.dimnames=TRUE) dimnames(d) <- list(paste0("d", 10*1:4), paste0("D", 1:4)) (Kmd <- KhatriRao(m,d, make.dimnames=TRUE)) (Kdm <- KhatriRao(d,m, make.dimnames=TRUE)) nm <- as(m,"nMatrix") nd <- as(d,"nMatrix") KhatriRao(nm,nd, make.dimnames=TRUE) KhatriRao(nd,nm, make.dimnames=TRUE) stopifnot(dim(KhatriRao(m,d)) == c(nrow(m)*nrow(d), ncol(d))) ## border cases / checks: zm <- nm; zm[] <- 0 # all 0 matrix stopifnot(all(K1 <- KhatriRao(nd, zm) == 0), identical(dim(K1), c(12L, 4L)), all(K2 <- KhatriRao(zm, nd) == 0), identical(dim(K2), c(12L, 4L))) d0 <- d; d0[] <- 0; m0 <- Matrix(d0[-1,]) stopifnot(all(K3 <- KhatriRao(d0, m) == 0), identical(dim(K3), dim(Kdm)), all(K4 <- KhatriRao(m, d0) == 0), identical(dim(K4), dim(Kmd)), all(KhatriRao(d0, d0) == 0), all(KhatriRao(m0, d0) == 0), all(KhatriRao(d0, m0) == 0), all(KhatriRao(m0, m0) == 0), identical(dimnames(KhatriRao(m, d0, make.dimnames=TRUE)), dimnames(Kmd))) } \keyword{methods} \keyword{array} Matrix/man/expm.Rd0000644000176200001440000000451612764547531013555 0ustar liggesusers\name{expm} \title{Matrix Exponential} \alias{expm} \alias{expm,Matrix-method} \alias{expm,dMatrix-method} \alias{expm,dgeMatrix-method} \alias{expm,triangularMatrix-method} \alias{expm,symmetricMatrix-method} \alias{expm,ddiMatrix-method} \alias{expm,matrix-method}% < for now %% only as long as not requiring R >= 3.2.0: \newcommand{\CRANpkg}{\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}} \description{ Compute the exponential of a matrix. } \usage{ expm(x) } \arguments{ \item{x}{a matrix, typically inheriting from the \code{\linkS4class{dMatrix}} class.} } \details{ The exponential of a matrix is defined as the infinite Taylor series \code{expm(A) = I + A + A^2/2! + A^3/3! + ...} (although this is definitely not the way to compute it). The method for the \code{dgeMatrix} class uses Ward's diagonal Pade' approximation with three step preconditioning. %% which used to be the state-of-the-art of the original %% Moler & Van Loan (1978) "Nineteen dubious ..." } \value{ The matrix exponential of \code{x}. } \references{ \url{http://en.wikipedia.org/wiki/Matrix_exponential} Cleve Moler and Charles Van Loan (2003) Nineteen dubious ways to compute the exponential of a matrix, twenty-five years later. \emph{SIAM Review} \bold{45}, 1, 3--49. %% MM: Till we have something better, this is quite good: Eric W. Weisstein et al. (1999) \emph{Matrix Exponential}. From MathWorld, \url{http://mathworld.wolfram.com/MatrixExponential.html} } \author{This is a translation of the implementation of the corresponding Octave function contributed to the Octave project by A. Scottedward Hodel \email{A.S.Hodel@Eng.Auburn.EDU}. A bug in there has been fixed by Martin Maechler. } %\note{} \seealso{\code{\link{Schur}}; additionally, \code{\link[expm]{expm}}, \code{\link[expm]{logm}}, etc in package \CRANpkg{expm}. } \note{The \CRANpkg{expm} package contains newer (partly faster and more accurate) algorithms for \code{expm()} and includes \code{\link[expm]{logm}} and \code{\link[expm]{sqrtm}}. } \examples{ (m1 <- Matrix(c(1,0,1,1), nc = 2)) (e1 <- expm(m1)) ; e <- exp(1) stopifnot(all.equal(e1@x, c(e,0,e,e), tolerance = 1e-15)) (m2 <- Matrix(c(-49, -64, 24, 31), nc = 2)) (e2 <- expm(m2)) (m3 <- Matrix(cbind(0,rbind(6*diag(3),0))))# sparse! (e3 <- expm(m3)) # upper triangular } \keyword{algebra} \keyword{math} Matrix/man/denseMatrix-class.Rd0000644000176200001440000000343611717530545016164 0ustar liggesusers\name{denseMatrix-class} \docType{class} \title{Virtual Class "denseMatrix" of All Dense Matrices} \alias{denseMatrix-class} %% Group methods \alias{Math,denseMatrix-method} \alias{-,denseMatrix,missing-method} % \alias{show,denseMatrix-method} \alias{coerce,ANY,denseMatrix-method} \alias{coerce,denseMatrix,CsparseMatrix-method} \alias{coerce,denseMatrix,TsparseMatrix-method} \alias{coerce,denseMatrix,generalMatrix-method} \alias{coerce,denseMatrix,sparseMatrix-method} \alias{cbind2,denseMatrix,denseMatrix-method} \alias{cbind2,denseMatrix,matrix-method} \alias{cbind2,matrix,denseMatrix-method} \alias{cbind2,denseMatrix,numeric-method} \alias{cbind2,numeric,denseMatrix-method} \alias{rbind2,denseMatrix,denseMatrix-method} \alias{rbind2,denseMatrix,matrix-method} \alias{rbind2,matrix,denseMatrix-method} \alias{rbind2,denseMatrix,numeric-method} \alias{rbind2,numeric,denseMatrix-method} \alias{dim<-,denseMatrix-method} \alias{rcond,denseMatrix,character-method} % \description{This is the virtual class of all dense (S4) matrices. It is the direct superclass of \code{\linkS4class{ddenseMatrix}}, \code{\linkS4class{ldenseMatrix}} } \section{Extends}{ class \code{"Matrix"} directly. } \section{Slots}{ exactly those of its superclass \code{"\linkS4class{Matrix}"}. } % \section{Methods}{ Use \code{\link{showMethods}(class = "denseMatrix", where = "package:Matrix")} for an overview of methods. Extraction (\code{"["}) methods, see \code{\link{[-methods}}.%-> ./Xtrct-methods.Rd } \seealso{ \code{\link{colSums}}, \code{\link{kronecker}}, and other such methods with own help pages. Its superclass \code{\linkS4class{Matrix}}, and main subclasses, \code{\linkS4class{ddenseMatrix}} and \code{\linkS4class{sparseMatrix}}. } \examples{ showClass("denseMatrix") } \keyword{classes} Matrix/man/diagU2N.Rd0000644000176200001440000000477012531270632014022 0ustar liggesusers\name{diagU2N} \title{Transform Triangular Matrices from Unit Triangular to General Triangular and Back} \alias{diagN2U} \alias{diagU2N} \alias{.diagU2N} \description{ Transform a triangular matrix \code{x}, i.e., of \code{\link{class}} \code{"\linkS4class{triangularMatrix}"}, from (internally!) unit triangular (\dQuote{unitriangular}) to \dQuote{general} triangular (\code{diagU2N(x)}) or back (\code{diagN2U(x)}). Note that the latter, \code{diagN2U(x)}, also sets the diagonal to one in cases where \code{diag(x)} was not all one. \code{.diagU2N(x)} assumes but does \emph{not} check that \code{x} is a \code{\linkS4class{triangularMatrix}} with \code{diag} slot \code{"U"}, and should hence be used with care. } \usage{ diagN2U(x, cl = getClassDef(class(x)), checkDense = FALSE) diagU2N(x, cl = getClassDef(class(x)), checkDense = FALSE) .diagU2N(x, cl, checkDense = FALSE) } \arguments{ \item{x}{a \code{\linkS4class{triangularMatrix}}, often sparse.} \item{cl}{(optional, for speedup only:) class (definition) of \code{x}.} \item{checkDense}{logical indicating if dense (see \code{\linkS4class{denseMatrix}}) matrices should be considered at all; i.e., when false, as per default, the result will be sparse even when \code{x} is dense.} } \details{ The concept of unit triangular matrices with a \code{diag} slot of \code{"U"} stems from LAPACK. } \note{Such internal storage details should rarely be of relevance to the user. Hence, these functions really are rather \emph{internal} utilities. } \value{ a triangular matrix of the same \code{\link{class}} but with a different \code{diag} slot. For \code{diagU2N} (semantically) with identical entries as \code{x}, whereas in \code{diagN2U(x)}, the off-diagonal entries are unchanged and the diagonal is set to all \code{1} even if it was not previously. } \seealso{ \code{"\linkS4class{triangularMatrix}"}, \code{"\linkS4class{dtCMatrix}"}. } \examples{ (T <- Diagonal(7) + triu(Matrix(rpois(49, 1/4), 7,7), k = 1)) (uT <- diagN2U(T)) # "unitriangular" (t.u <- diagN2U(10*T))# changes the diagonal! stopifnot(all(T == uT), diag(t.u) == 1, identical(T, diagU2N(uT))) T[upper.tri(T)] <- 5 T <- diagN2U(as(T,"triangularMatrix")) stopifnot(T@diag == "U") dT <- as(T, "denseMatrix") dt. <- diagN2U(dT) dtU <- diagN2U(dT, checkDense=TRUE) stopifnot(is(dtU, "denseMatrix"), is(dt., "sparseMatrix"), all(dT == dt.), all(dT == dtU), dt.@diag == "U", dtU@diag == "U") } \keyword{utilities} \keyword{classes} Matrix/man/USCounties.Rd0000644000176200001440000000435612456300242014627 0ustar liggesusers\name{USCounties} \alias{USCounties} \docType{data} \title{USCounties Contiguity Matrix} \description{ This matrix represents the contiguities of 3111 US counties using the Queen criterion of at least a single shared boundary point. The representation is as a row standardised spatial weights matrix transformed to a symmetric matrix (see Ord (1975), p. 125). } \usage{data(USCounties)} \format{ A \eqn{3111 ^2} symmetric sparse matrix of class \code{\linkS4class{dsCMatrix}} with 9101 non-zero entries. } \details{ The data were read into \R using \code{\link[spdep]{read.gal}}, and row-standardised and transformed to symmetry using \code{\link[spdep]{nb2listw}} and \code{\link[spdep]{similar.listw}}. This spatial weights object was converted to class \code{\linkS4class{dsCMatrix}} using \code{\link[spdep]{as_dsTMatrix_listw}} and coercion. } \source{ %% no \url anymore, as broken (Jan. 2015) The data were retrieved from \code{http://sal.uiuc.edu/weights/zips/usc.zip}, files \dQuote{usc.txt} and \dQuote{usc\_q.GAL}, with permission for use and distribution from Luc Anselin. } \references{ Ord, J. K. (1975) Estimation methods for models of spatial interaction; \emph{Journal of the American Statistical Association} \bold{70}, 120--126. } \examples{ data(USCounties) (n <- ncol(USCounties)) IM <- .symDiagonal(n) nn <- 50 set.seed(1) rho <- runif(nn, 0, 1) system.time(MJ <- sapply(rho, function(x) determinant(IM - x * USCounties, logarithm = TRUE)$modulus)) ## can be done faster, by update()ing the Cholesky factor: nWC <- -USCounties C1 <- Cholesky(nWC, Imult = 2) system.time(MJ1 <- n * log(rho) + sapply(rho, function(x) 2 * c(determinant(update(C1, nWC, 1/x))$modulus))) all.equal(MJ, MJ1) \dontshow{stopifnot( all.equal(MJ, MJ1) )} C2 <- Cholesky(nWC, super = TRUE, Imult = 2) system.time(MJ2 <- n * log(rho) + sapply(rho, function(x) 2 * c(determinant(update(C2, nWC, 1/x))$modulus))) all.equal(MJ, MJ2) \dontshow{stopifnot(all.equal(MJ, MJ2))} system.time(MJ3 <- n * log(rho) + Matrix:::ldetL2up(C1, nWC, 1/rho)) stopifnot(all.equal(MJ, MJ3)) system.time(MJ4 <- n * log(rho) + Matrix:::ldetL2up(C2, nWC, 1/rho)) stopifnot(all.equal(MJ, MJ4)) } \keyword{datasets} Matrix/man/spMatrix.Rd0000644000176200001440000000544112651647132014402 0ustar liggesusers\name{spMatrix} \alias{spMatrix} \title{Sparse Matrix Constructor From Triplet} \description{ User friendly construction of a sparse matrix (inheriting from class \code{\linkS4class{TsparseMatrix}}) from the triplet representation. This is much less flexible than \code{\link{sparseMatrix}()} and hence somewhat \emph{deprecated}. } \usage{ spMatrix(nrow, ncol, i = integer(), j = integer(), x = numeric()) } \arguments{ \item{nrow, ncol}{integers specifying the desired number of rows and columns.} \item{i,j}{integer vectors of the same length specifying the locations of the non-zero (or non-\code{TRUE}) entries of the matrix.} \item{x}{atomic vector of the same length as \code{i} and \code{j}, specifying the values of the non-zero entries.} } \value{ A sparse matrix in triplet form, as an \R object inheriting from both \code{\linkS4class{TsparseMatrix}} and \code{\linkS4class{generalMatrix}}. The matrix \eqn{M} will have \code{M[i[k], j[k]] == x[k]}, for \eqn{k = 1,2,\ldots, n}, where \code{n = length(i)} and \code{M[ i', j' ] == 0} for all other pairs \eqn{(i',j')}. } \seealso{\code{\link{Matrix}(*, sparse=TRUE)} for the more usual constructor of such matrices. Then, \code{\link{sparseMatrix}} is more general and flexible than \code{spMatrix()} and by default returns a \code{\linkS4class{CsparseMatrix}} which is often slightly more desirable. Further, \code{\link{bdiag}} and \code{\link{Diagonal}} for (block-)diagonal matrix constructors. Consider \code{\linkS4class{TsparseMatrix}} and similar class definition help files. } \examples{ ## simple example A <- spMatrix(10,20, i = c(1,3:8), j = c(2,9,6:10), x = 7 * (1:7)) A # a "dgTMatrix" summary(A) str(A) # note that *internally* 0-based indices (i,j) are used L <- spMatrix(9, 30, i = rep(1:9, 3), 1:27, (1:27) \%\% 4 != 1) L # an "lgTMatrix" ## A simplified predecessor of Matrix' rsparsematrix() function : rSpMatrix <- function(nrow, ncol, nnz, rand.x = function(n) round(rnorm(nnz), 2)) { ## Purpose: random sparse matrix ## -------------------------------------------------------------- ## Arguments: (nrow,ncol): dimension ## nnz : number of non-zero entries ## rand.x: random number generator for 'x' slot ## -------------------------------------------------------------- ## Author: Martin Maechler, Date: 14.-16. May 2007 stopifnot((nnz <- as.integer(nnz)) >= 0, nrow >= 0, ncol >= 0, nnz <= nrow * ncol) spMatrix(nrow, ncol, i = sample(nrow, nnz, replace = TRUE), j = sample(ncol, nnz, replace = TRUE), x = rand.x(nnz)) } M1 <- rSpMatrix(100000, 20, nnz = 200) summary(M1) } \keyword{array} Matrix/man/printSpMatrix.Rd0000644000176200001440000001457112622365126015421 0ustar liggesusers\name{printSpMatrix} \alias{formatSpMatrix} \alias{printSpMatrix} \alias{printSpMatrix2} \title{Format and Print Sparse Matrices Flexibly} \description{ Format and print sparse matrices flexibly. These are the \dQuote{workhorses} used by the \code{\link{format}}, \code{\link{show}} and \code{\link{print}} methods for sparse matrices. If \code{x} is large, \code{printSpMatrix2(x)} calls \code{printSpMatrix()} twice, namely, for the first and the last few rows, suppressing those in between, and also suppresses columns when \code{x} is too wide. \code{printSpMatrix()} basically prints the result of \code{formatSpMatrix()}. } \usage{ formatSpMatrix(x, digits = NULL, maxp = 1e9, cld = getClassDef(class(x)), zero.print = ".", col.names, note.dropping.colnames = TRUE, uniDiag = TRUE, align = c("fancy", "right")) printSpMatrix(x, digits = NULL, maxp = getOption("max.print"), cld = getClassDef(class(x)), zero.print = ".", col.names, note.dropping.colnames = TRUE, uniDiag = TRUE, col.trailer = "", align = c("fancy", "right")) printSpMatrix2(x, digits = NULL, maxp = getOption("max.print"), zero.print = ".", col.names, note.dropping.colnames = TRUE, uniDiag = TRUE, suppRows = NULL, suppCols = NULL, col.trailer = if(suppCols) "......" else "", align = c("fancy", "right"), width = getOption("width"), fitWidth = TRUE) } \arguments{ \item{x}{an \R object inheriting from class \code{\linkS4class{sparseMatrix}}.} \item{digits}{significant digits to use for printing, see \code{\link{print.default}}, the default, \code{\link{NULL}}, corresponds to using \code{\link{getOption}("digits")}.} \item{maxp}{integer, default from \code{\link{options}(max.print)}, influences how many entries of large matrices are printed at all.} \item{cld}{the class definition of \code{x}; must be equivalent to \code{\link{getClassDef}(class(x))} and exists mainly for possible speedup.} \item{zero.print}{character which should be printed for \emph{structural} zeroes. The default \code{"."} may occasionally be replaced by \code{" "} (blank); using \code{"0"} would look almost like \code{print()}ing of non-sparse matrices.} \item{col.names}{logical or string specifying if and how column names of \code{x} should be printed, possibly abbreviated. The default is taken from \code{\link{options}("sparse.colnames")} if that is set, otherwise \code{FALSE} unless there are less than ten columns. When \code{TRUE} the full column names are printed.\cr When \code{col.names} is a string beginning with \code{"abb"} or \code{"sub"} and ending with an integer \code{n} (i.e., of the form \code{"abb... "}), the column names are \code{\link{abbreviate}()}d or \code{\link{substring}()}ed to (target) length \code{n}, see the examples. } \item{note.dropping.colnames}{logical specifying, when \code{col.names} is \code{FALSE} if the dropping of the column names should be noted, \code{TRUE} by default.} \item{uniDiag}{logical indicating if the diagonal entries of a sparse unit triangular or unit-diagonal matrix should be formatted as \code{"I"} instead of \code{"1"} (to emphasize that the 1's are \dQuote{structural}).} \item{col.trailer}{a string to be appended to the right of each column; this is typically made use of by \code{\link{show}()} only, when suppressing columns.} \item{suppRows, suppCols}{logicals or \code{NULL}, for \code{printSpMatrix2()} specifying if rows or columns should be suppressed in printing. If \code{NULL}, sensible defaults are determined from \code{\link{dim}(x)} and \code{\link{options}(c("width", "max.print"))}. Setting both to \code{FALSE} may be a very bad idea.} \item{align}{a string specifying how the \code{zero.print} codes should be aligned, i.e., padded as strings. The default, \code{"fancy"}, takes some effort to align the typical \code{zero.print = "."} with the position of \code{0}, i.e., the first decimal (one left of decimal point) of the numbers printed, whereas \code{align = "right"} just makes use of \code{\link{print}(*, right = TRUE)}.} \item{width}{number, a positive integer, indicating the approximately desired (line) width of the output, see also \code{fitWidth}.} \item{fitWidth}{logical indicating if some effort should be made to match the desired \code{width} or temporarily enlarge that if deemed necessary.} } \details{ \describe{ \item{formatSpMatrix:}{ If \code{x} is large, only the first rows making up the approximately first \code{maxp} entries is used, otherwise all of \code{x}. \code{\link{.formatSparseSimple}()} is applied to (a dense version of) the matrix. Then, \code{\link{formatSparseM}} is used, unless in trivial cases or for sparse matrices without \code{x} slot.} } } \value{ \item{formatSpMatrix()}{returns a character matrix with possibly empty column names, depending on \code{col.names} etc, see above.} \item{printSpMatrix*()}{return \code{x} \emph{invisibly}, see \code{\link{invisible}}.} } \author{Martin Maechler} \seealso{the virtual class \code{\linkS4class{sparseMatrix}} and the classes extending it; maybe \code{\link{sparseMatrix}} or \code{\link{spMatrix}} as simple constructors of such matrices. The underlying utilities \code{\link{formatSparseM}} and \code{.formatSparseSimple()} (on the same page). } \examples{ f1 <- gl(5, 3, labels = LETTERS[1:5]) X <- as(f1, "sparseMatrix") X ## <==> show(X) <==> print(X) t(X) ## shows column names, since only 5 columns X2 <- as(gl(12, 3, labels = paste(LETTERS[1:12],"c",sep=".")), "sparseMatrix") X2 ## less nice, but possible: print(X2, col.names = TRUE) # use [,1] [,2] .. => does not fit ## Possibilities with column names printing: t(X2) # suppressing column names print(t(X2), col.names=TRUE) print(t(X2), zero.print = "", col.names="abbr. 1") print(t(X2), zero.print = "-", col.names="substring 2") \dontshow{% show() was slow in 0.9975-8 because of slow adjust="fancy" op <- options(max.print = 25000, width = 80) sink(print(tempfile())) M <- Matrix(0, 10000, 100) M[1,1] <- M[2,3] <- 3.14 stopifnot((st <- system.time(show(M)))[1] < 1.0) # only 0.09 on cmath-3 sink() st options(op) } } \keyword{print} Matrix/man/drop0.Rd0000644000176200001440000000407412521705645013620 0ustar liggesusers\name{drop0} \alias{drop0} \title{Drop "Explicit Zeroes" from a Sparse Matrix} \description{ Returns a sparse matrix with no \dQuote{explicit zeroes}, i.e., all zero or \code{FALSE} entries are dropped from the explicitly indexed matrix entries. } \usage{ drop0(x, tol = 0, is.Csparse = NA) } \arguments{ \item{x}{a Matrix, typically sparse, i.e., inheriting from \code{\linkS4class{sparseMatrix}}.} % \item{clx}{[optional:] the \code{\link{class}} or \dQuote{class % definition} (see \code{\link{getClassDef}}; it is of class % \code{\linkS4class{classRepresentation}}) of \code{x}.\cr % This argument just exists for the possibility of speedup.} \item{tol}{non-negative number to be used as tolerance for checking if an entry \eqn{x_{i,j}}{x[i,j]} should be considered to be zero.} \item{is.Csparse}{logical indicating prior knowledge about the \dQuote{Csparseness} of \code{x}. This exists for possible speedup reasons only.} } % \details{ % ~~ If necessary, more details than the description above ~~ % } \value{ a Matrix like \code{x} but with no explicit zeros, i.e., \code{!any(x@x == 0)}, always inheriting from \code{\linkS4class{CsparseMatrix}}. } % \author{Martin} \note{When a sparse matrix is the result of matrix multiplications, you may want to consider combining \code{drop0()} with \code{\link{zapsmall}()}, see the example. } \seealso{\code{\link{spMatrix}}, class \code{\linkS4class{sparseMatrix}}; \code{\link{nnzero}} } \examples{ m <- spMatrix(10,20, i= 1:8, j=2:9, x = c(0:2,3:-1)) m drop0(m) ## A larger example: t5 <- new("dtCMatrix", Dim = c(5L, 5L), uplo = "L", x = c(10, 1, 3, 10, 1, 10, 1, 10, 10), i = c(0L,2L,4L, 1L, 3L,2L,4L, 3L, 4L), p = c(0L, 3L, 5L, 7:9)) TT <- kronecker(t5, kronecker(kronecker(t5,t5), t5)) IT <- solve(TT) I. <- TT \%*\% IT ; nnzero(I.) # 697 ( = 625 + 72 ) I.0 <- drop0(zapsmall(I.)) ## which actually can be more efficiently achieved by I.. <- drop0(I., tol = 1e-15) stopifnot(all(I.0 == Diagonal(625)), nnzero(I..) == 625) } \keyword{utilities} \keyword{array} Matrix/man/Cholesky-class.Rd0000644000176200001440000001044012271746775015465 0ustar liggesusers\name{Cholesky-class} \docType{class} \alias{Cholesky-class} \alias{pCholesky-class} \alias{BunchKaufman-class} \alias{pBunchKaufman-class} % \alias{coerce,pCholesky,lMatrix-method} \alias{coerce,pBunchKaufman,lMatrix-method} \alias{coerce,Cholesky,lMatrix-method} \alias{coerce,BunchKaufman,lMatrix-method} \alias{show,BunchKaufman-method} \alias{show,pBunchKaufman-method} % \title{Cholesky and Bunch-Kaufman Decompositions} \description{The \code{"Cholesky"} class is the class of Cholesky decompositions of positive-semidefinite, real dense matrices. The \code{"BunchKaufman"} class is the class of Bunch-Kaufman decompositions of symmetric, real matrices. The \code{"pCholesky"} and \code{"pBunchKaufman"} classes are their \emph{\bold{p}acked} storage versions. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("Cholesky", ...)} or \code{new("BunchKaufman", ...)}, etc, or rather by calls of the form \code{\link{chol}(pm)} or \code{\link{BunchKaufman}(pm)} where \code{pm} inherits from the \code{"\linkS4class{dpoMatrix}"} or \code{"\linkS4class{dsyMatrix}"} class or as a side-effect of other functions applied to \code{"dpoMatrix"} objects (see \code{\linkS4class{dpoMatrix}}). } \note{ \enumerate{ \item Objects of class \code{"Cholesky"} typically stem from \code{\link{chol}(D)}, applied to a \emph{dense} matrix \code{D}. On the other hand, the \emph{function} \code{\link{Cholesky}(S)} applies to a \emph{sparse} matrix \code{S}, and results in objects inheriting from class \code{\linkS4class{CHMfactor}}. \item For traditional matrices \code{m}, \code{chol(m)} is a traditional matrix as well, triangular, but simply an \eqn{n\times n}{n * n} numeric \code{\link{matrix}}. Hence, for compatibility, the \code{"Cholesky"} and \code{"BunchKaufman"} classes (and their \code{"p*"} packed versions) also extend triangular Matrix classes (such as "dtrMatrix"). Consequently, \code{\link{determinant}(R)} for \code{R <- chol(A)} returns the determinant of \code{R}, not of \code{A}. This is in contrast to class \code{\linkS4class{CHMfactor}} objects \code{C}, where \code{determinant(C)} gives the determinant of the \emph{original} matrix \code{A}, for \code{C <- Cholesky(A)}, see also the \code{determinant} method documentation on the class \code{\linkS4class{CHMfactor}} page. } } \section{Slots}{ A Cholesky decomposition extends class \code{\linkS4class{MatrixFactorization}} but is basically a triangular matrix extending the \code{"\linkS4class{dtrMatrix}"} class. \describe{ \item{\code{uplo}:}{inherited from the \code{"dtrMatrix"} class.} \item{\code{diag}:}{inherited from the \code{"dtrMatrix"} class.} \item{\code{x}:}{inherited from the \code{"dtrMatrix"} class.} \item{\code{Dim}:}{inherited from the \code{"dtrMatrix"} class.} \item{\code{Dimnames}:}{inherited from the \code{"dtrMatrix"} class.} } A Bunch-Kaufman decomposition also extends the \code{"dtrMatrix"} class and has a \code{perm} slot representing a permutation matrix. The packed versions extend the \code{"dtpMatrix"} class. } \section{Extends}{ Class \code{"MatrixFactorization"} and \code{"dtrMatrix"}, directly. Class \code{"dgeMatrix"}, by class \code{"dtrMatrix"}. Class \code{"Matrix"}, by class \code{"dtrMatrix"}. } \section{Methods}{ Both these factorizations can \emph{directly} be treated as (triangular) matrices, as they extend \code{"dtrMatrix"}, see above. There are currently no further explicit methods defined with class \code{"Cholesky"} or \code{"BunchKaufman"} in the signature. } \seealso{ Classes \code{\linkS4class{dtrMatrix}}, \code{\linkS4class{dpoMatrix}}; function \code{\link{chol}}. Function \code{\link{Cholesky}} resulting in class \code{\linkS4class{CHMfactor}} objects, \emph{not} class "Cholesky" ones, see the section \sQuote{Note}. } \examples{ (sm <- as(as(Matrix(diag(5) + 1), "dsyMatrix"), "dspMatrix")) signif(csm <- chol(sm), 4) (pm <- crossprod(Matrix(rnorm(18), nrow = 6, ncol = 3))) (ch <- chol(pm)) if (toupper(ch@uplo) == "U") # which is TRUE crossprod(ch) stopifnot(all.equal(as(crossprod(ch), "matrix"), as(pm, "matrix"), tolerance=1e-14)) } \keyword{classes} \keyword{algebra} Matrix/man/dgRMatrix-class.Rd0000644000176200001440000000424411705754605015602 0ustar liggesusers\name{dgRMatrix-class} \docType{class} \title{Sparse Compressed, Row-oriented Numeric Matrices} \alias{dgRMatrix-class} % all alias{coerce,...} are currently in ./RsparseMatrix-class.Rd \alias{diag,dgRMatrix-method} \alias{dim,dgRMatrix-method} \alias{t,dgRMatrix-method} \description{The \code{dgRMatrix} class is a class of sparse numeric matrices in the compressed, sparse, row-oriented format. In this implementation the non-zero elements in the rows are sorted into increasing column order. \bold{Note:} The column-oriented sparse classes, e.g., \code{\linkS4class{dgCMatrix}}, are preferred and better supported in the \pkg{Matrix} package. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("dgRMatrix", ...)}. } \section{Slots}{ \describe{ \item{\code{j}:}{Object of class \code{"integer"} of length nnzero (number of non-zero elements). These are the column numbers for each non-zero element in the matrix.} \item{\code{p}:}{Object of class \code{"integer"} of pointers, one for each row, to the initial (zero-based) index of elements in the row.} \item{\code{x}:}{Object of class \code{"numeric"} - the non-zero elements of the matrix.} \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix.} } } \section{Methods}{ \describe{ \item{coerce}{\code{signature(from = "matrix", to = "dgRMatrix")}} \item{coerce}{\code{signature(from = "dgRMatrix", to = "matrix")}} \item{coerce}{\code{signature(from = "dgRMatrix", to = "dgTMatrix")}} \item{diag}{\code{signature(x = "dgRMatrix")}: returns the diagonal of \code{x}} \item{dim}{\code{signature(x = "dgRMatrix")}: returns the dimensions of \code{x}} \item{image}{\code{signature(x = "dgRMatrix")}: plots an image of \code{x} using the \code{\link[lattice]{levelplot}} function} } } \seealso{ the \code{\linkS4class{RsparseMatrix}} class, the virtual class of all sparse compressed \bold{r}ow-oriented matrices, with its methods. The \code{\linkS4class{dgCMatrix}} class (\bold{c}olumn compressed sparse) is really preferred. } \keyword{classes} \keyword{algebra} Matrix/man/unpack.Rd0000644000176200001440000000515311773633512014055 0ustar liggesusers\name{unpack} \title{Representation of Packed and Unpacked (Dense) Matrices} \usage{ pack(x, \dots) \S4method{pack}{matrix}(x, symmetric = NA, upperTri = NA, \dots) unpack(x, \dots) } \alias{pack} \alias{pack,symmetricMatrix-method} \alias{pack,triangularMatrix-method} \alias{pack,matrix-method} \alias{pack,sparseMatrix-method} \alias{unpack} \alias{unpack,dtpMatrix-method} \alias{unpack,dspMatrix-method} \alias{unpack,symmetricMatrix-method} \alias{unpack,triangularMatrix-method} \alias{unpack,sparseMatrix-method} \description{ \dQuote{Packed} matrix storage here applies to dense matrices (\code{\linkS4class{denseMatrix}}) only, and there is available only for symmetric (\code{\linkS4class{symmetricMatrix}}) or triangular (\code{\linkS4class{triangularMatrix}}) matrices, where only one triangle of the matrix needs to be stored. \code{unpack()} unpacks \dQuote{packed} matrices, where \cr \code{pack()} produces \dQuote{packed} matrices. } \arguments{ \item{x}{ \describe{ \item{for \code{unpack()}:}{a matrix stored in packed form, e.g., of class \code{"d?pMatrix"} where "?" is "t" for triangular or "s" for symmetric.} \item{for \code{pack()}:}{a (symmetric or triangular) matrix stored in full storage.} } } \item{symmetric}{logical (including \code{NA}) for optionally specifying if \code{x} is symmetric (or rather triangular).} \item{upperTri}{(for the triangular case only) logical (incl. \code{NA}) indicating if \code{x} is upper (or lower) triangular.} \item{\dots}{further arguments passed to or from other methods.} } \value{ \describe{ \item{for \code{unpack()}:}{A \code{\linkS4class{Matrix}} object containing the full-storage representation of \code{x}.} \item{for \code{pack()}:}{ A packed \code{Matrix} (i.e. of class \code{"..pMatrix"}) representation of \code{x}.} } } \details{ These are generic functions with special methods for different types of packed (or non-packed) symmetric or triangular dense matrices. Use \code{\link{showMethods}("unpack")} to list the methods for \code{unpack()}, and similarly for \code{pack()}. } \examples{ showMethods("unpack") (cp4 <- chol(Hilbert(4))) # is triangular tp4 <- as(cp4,"dtpMatrix")# [t]riangular [p]acked str(tp4) (unpack(tp4)) stopifnot(identical(tp4, pack(unpack(tp4)))) (s <- crossprod(matrix(sample(15), 5,3))) # traditional symmetric matrix (sp <- pack(s)) mt <- as.matrix(tt <- tril(s)) (pt <- pack(mt)) stopifnot(identical(pt, pack(tt)), dim(s ) == dim(sp), all(s == sp), dim(mt) == dim(pt), all(mt == pt), all(mt == tt)) showMethods("pack") } \keyword{array} \keyword{algebra} Matrix/man/dsRMatrix-class.Rd0000644000176200001440000000541410757763005015616 0ustar liggesusers\name{dsRMatrix-class} \title{Symmetric Sparse Compressed Row Matrices} \docType{class} \alias{dsRMatrix-class} % \description{The \code{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. } \section{Objects from the Class}{ These \code{"..RMatrix"} classes are currently still mostly unimplemented! Objects can be created by calls of the form \code{new("dsRMatrix", ...)}. } \section{Slots}{ \describe{ \item{\code{uplo}:}{A character object indicating if the upper triangle (\code{"U"}) or the lower triangle (\code{"L"}) is stored. At present only the lower triangle form is allowed.} \item{\code{j}:}{Object of class \code{"integer"} of length \code{nnzero} (number of non-zero elements). These are the row numbers for each non-zero element in the matrix.} \item{\code{p}:}{Object of class \code{"integer"} of pointers, one for each row, to the initial (zero-based) index of elements in the row.} \item{\code{factors}:}{Object of class \code{"list"} - a list of factorizations of the matrix.} \item{\code{x}:}{Object of class \code{"numeric"} - the non-zero elements of the matrix.} \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.} \item{\code{Dimnames}:}{List of length two, see \code{\link{Matrix}}.} } } \section{Extends}{ Classes \code{\linkS4class{RsparseMatrix}}, \code{\linkS4class{dsparseMatrix}} and \code{\linkS4class{symmetricMatrix}}, directly. Class \code{"dMatrix"}, by class \code{"dsparseMatrix"}, class \code{"sparseMatrix"}, by class \code{"dsparseMatrix"} or \code{"RsparseMatrix"}; class \code{"compMatrix"} by class \code{"symmetricMatrix"} and of course, class \code{"Matrix"}. } \section{Methods}{ \describe{ \item{forceSymmetric}{\code{signature(x = "dsRMatrix", uplo = "missing")}: a trivial method just returning \code{x}} \item{forceSymmetric}{\code{signature(x = "dsRMatrix", uplo = "character")}: if \code{uplo == x@uplo}, this trivially returns \code{x}; otherwise \code{t(x)}.} \item{coerce}{\code{signature(from = "dsCMatrix", to = "dsRMatrix")}} } } \seealso{ the classes \code{\linkS4class{dgCMatrix}}, \code{\linkS4class{dgTMatrix}}, and \code{\linkS4class{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* dR <- as(ds2, "RsparseMatrix") dR # dsRMatrix } \keyword{classes} \keyword{algebra} Matrix/man/sparseQR-class.Rd0000644000176200001440000001741413141330160015422 0ustar liggesusers\name{sparseQR-class} \docType{class} \title{Sparse QR decomposition of a sparse matrix} \alias{sparseQR-class} \alias{qr.R,sparseQR-method} \alias{qr.Q}% the generic \alias{qr.Q,sparseQR-method} \alias{qr.coef,sparseQR,ddenseMatrix-method} \alias{qr.coef,sparseQR,matrix-method} \alias{qr.coef,sparseQR,Matrix-method} \alias{qr.coef,sparseQR,numeric-method} \alias{qr.fitted,sparseQR,ddenseMatrix-method} \alias{qr.fitted,sparseQR,matrix-method} \alias{qr.fitted,sparseQR,Matrix-method} \alias{qr.fitted,sparseQR,numeric-method} \alias{qr.qty,sparseQR,ddenseMatrix-method} \alias{qr.qty,sparseQR,matrix-method} \alias{qr.qty,sparseQR,numeric-method} \alias{qr.qty,sparseQR,Matrix-method} \alias{qr.qy,sparseQR,ddenseMatrix-method} \alias{qr.qy,sparseQR,matrix-method} \alias{qr.qy,sparseQR,numeric-method} \alias{qr.qy,sparseQR,Matrix-method} \alias{qr.resid,sparseQR,ddenseMatrix-method} \alias{qr.resid,sparseQR,matrix-method} \alias{qr.resid,sparseQR,Matrix-method} \alias{qr.resid,sparseQR,numeric-method} %\alias{solve,sparseQR,ANY-method}--> solve-methods.Rd % \description{Objects class \code{"sparseQR"} represent a QR decomposition of a sparse \eqn{m \times n}{m x n} (\dQuote{long}: \eqn{m \ge n}{m >= n}) rectangular matrix \eqn{A}, typically resulting from \code{\link{qr}()}, see \sQuote{Details} notably about row and column permutations for pivoting. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("sparseQR", ...)} but are more commonly created by function \code{\link[base]{qr}} applied to a sparse matrix such as a matrix of class \code{\linkS4class{dgCMatrix}}. } \section{Slots}{ \describe{ \item{\code{V}:}{Object of class \code{"dgCMatrix"}. The columns of \code{V} are the vectors that generate the Householder transformations of which the matrix Q is composed.} \item{\code{beta}:}{Object of class \code{"numeric"}, the normalizing factors for the Householder transformations.} \item{\code{p}:}{Object of class \code{"integer"}: Permutation (of \code{0:(n-1)}) applied to the rows of the original matrix.} \item{\code{R}:}{Object of class \code{"dgCMatrix"}: An upper triangular matrix of the same dimension as \eqn{X}.} \item{\code{q}:}{Object of class \code{"integer"}: Permutation applied from the right, i.e., to the \emph{columns} of the original matrix. Can be of length 0 which implies no permutation.} } } \section{Methods}{ \describe{ \item{qr.R}{\code{signature(qr = "sparseQR")}: compute the upper triangular \eqn{R} matrix of the QR decomposition. Note that this currently warns because of possible permutation mismatch with the classical \code{qr.R()} result, \emph{and} you can suppress these warnings by setting \code{\link{options}()} either \code{"Matrix.quiet.qr.R"} or (the more general) either \code{"Matrix.quiet"} to \code{\link{TRUE}}.} \item{qr.Q}{\code{signature(qr = "sparseQR")}: compute the orthogonal \eqn{Q} matrix of the QR decomposition.} \item{qr.coef}{\code{signature(qr = "sparseQR", y = "ddenseMatrix")}: ... } \item{qr.coef}{\code{signature(qr = "sparseQR", y = "matrix")}: ... } \item{qr.coef}{\code{signature(qr = "sparseQR", y = "numeric")}: ... } \item{qr.fitted}{\code{signature(qr = "sparseQR", y = "ddenseMatrix")}: ... } \item{qr.fitted}{\code{signature(qr = "sparseQR", y = "matrix")}: ... } \item{qr.fitted}{\code{signature(qr = "sparseQR", y = "numeric")}: ... } \item{qr.qty}{\code{signature(qr = "sparseQR", y = "ddenseMatrix")}: ... } \item{qr.qty}{\code{signature(qr = "sparseQR", y = "matrix")}: ... } \item{qr.qty}{\code{signature(qr = "sparseQR", y = "numeric")}: ... } \item{qr.qy}{\code{signature(qr = "sparseQR", y = "ddenseMatrix")}: ... } \item{qr.qy}{\code{signature(qr = "sparseQR", y = "matrix")}: ... } \item{qr.qy}{\code{signature(qr = "sparseQR", y = "numeric")}: ... } \item{qr.resid}{\code{signature(qr = "sparseQR", y = "ddenseMatrix")}: ... } \item{qr.resid}{\code{signature(qr = "sparseQR", y = "matrix")}: ... } \item{qr.resid}{\code{signature(qr = "sparseQR", y = "numeric")}: ... } \item{solve}{\code{signature(a = "sparseQR", b = "ANY")}: For \code{solve(a,b)}, simply uses \code{qr.coef(a,b)}.} } } %\references{} %\author{} \details{ For a sparse \eqn{m \times n}{m x n} (\dQuote{long}: \eqn{m \ge n}{m >= n}) rectangular matrix \eqn{A}, the sparse QR decomposition is either \cr of the form \eqn{P A = Q R} with a (row) permutation matrix \eqn{P}, (encoded in the \code{p} slot of the result) if the \code{q} slot is of length 0, \cr or of the form \eqn{P A P* = Q R} with an extra (column) permutation matrix \eqn{P*} (encoded in the \code{q} slot). Note that the row permutation \eqn{P A} in \R is simply \code{A[p+1, ]} where \code{p} is the \code{p}-slot, a 0-based permutation of \code{1:m} applied to the rows of the original matrix. If the \code{q} slot has length \code{n} it is a 0-based permutation of \code{1:n} applied to the columns of the original matrix to reduce the amount of \dQuote{fill-in} in the matrix \eqn{R}, and \eqn{A P*} in \R is simply \code{A[ , q+1]}. \eqn{R} is an \eqn{m\times n}{m by n} matrix that is zero below the main diagonal, i.e., upper triangular (\eqn{m\times m}{m by n}) with \eqn{m-n} extra zero rows. The matrix \eqn{Q} is a "virtual matrix". It is the product of \eqn{n} Householder transformations. The information to generate these Householder transformations is stored in the \code{V} and \code{beta} slots. \cr Note however that \code{qr.Q()} returns the row permuted matrix \eqn{Q* := P^{-1}Q = P'Q}{Q* := P^(-1) Q = P'Q} as permutation matrices are orthogonal; and \eqn{Q*} is orthogonal itself because \eqn{Q} and \eqn{P} are. This is useful because then, as in the dense matrix and \pkg{base} \R matrix \code{\link{qr}} case, we have the mathematical identity \deqn{P A = Q* R,} in \R as \preformatted{ A[p+1,] == qr.Q(*) \%*\% R .} The \code{"sparseQR"} methods for the \code{qr.*} functions return objects of class \code{"dgeMatrix"} (see \code{\linkS4class{dgeMatrix}}). Results from \code{qr.coef}, \code{qr.resid} and \code{qr.fitted} (when \code{k == ncol(R)}) are well-defined and should match those from the corresponding dense matrix calculations. However, because the matrix \code{Q} is not uniquely defined, the results of \code{qr.qy} and \code{qr.qty} do not necessarily match those from the corresponding dense matrix calculations. Also, the results of \code{qr.qy} and \code{qr.qty} apply to the permuted column order when the \code{q} slot has length \code{n}. } \seealso{ \code{\link[base]{qr}}, \code{\link{qr.Q}}, \code{\link{qr.R}}, \code{\link{qr.fitted}}, \code{\link{qr.resid}}, \code{\link{qr.coef}}, \code{\link{qr.qty}}, \code{\link{qr.qy}}, Permutation matrices in the \pkg{Matrix} package: \code{\linkS4class{pMatrix}}; \code{\linkS4class{dgCMatrix}}, \code{\linkS4class{dgeMatrix}}. %%% not (yet) in CRAN-released version of Matrix: %% \code{\linkS4class{SPQR}} an alternative QR decomposition resulting %% from \code{\link{spqr}()}. } \examples{ data(KNex) mm <- KNex $ mm y <- KNex $ y y. <- as(as.matrix(y), "dgCMatrix") str(qrm <- qr(mm)) qc <- qr.coef (qrm, y); qc. <- qr.coef (qrm, y.) # 2nd failed in Matrix <= 1.1-0 qf <- qr.fitted(qrm, y); qf. <- qr.fitted(qrm, y.) qs <- qr.resid (qrm, y); qs. <- qr.resid (qrm, y.) stopifnot(all.equal(qc, as.numeric(qc.), tolerance=1e-12), all.equal(qf, as.numeric(qf.), tolerance=1e-12), all.equal(qs, as.numeric(qs.), tolerance=1e-12), all.equal(qf+qs, y, tolerance=1e-12)) %% FIXME: add more similarly to ./lu.Rd, see also ./qr-methods.Rd } \keyword{classes} \keyword{algebra} \keyword{array} Matrix/man/unused-classes.Rd0000644000176200001440000000111611055522413015513 0ustar liggesusers\name{Unused-classes} %% This is just a stub, not yet used really: -- move to own page when used \docType{class} \alias{iMatrix-class} \alias{zMatrix-class} \title{Virtual Classes Not Yet Really Implemented and Used} \description{ \code{iMatrix} is the virtual class of all \bold{i}nteger (S4) matrices. It extends the \code{\linkS4class{Matrix}} class directly. \code{zMatrix} is the virtual class of all \code{\link{complex}} (S4) matrices. It extends the \code{\linkS4class{Matrix}} class directly. } \examples{ showClass("iMatrix") showClass("zMatrix") } \keyword{classes} Matrix/man/dtRMatrix-class-def.Rd0000644000176200001440000000531511004024375016335 0ustar liggesusers\name{dtRMatrix-class} \title{Triangular Sparse Compressed Row Matrices} \docType{class} \alias{dtRMatrix-class} %%--- No methods currently --- see ./dtCMatrix-class.Rd for more \description{The \code{dtRMatrix} class is a class of triangular, sparse matrices in the compressed, row-oriented format. In this implementation the non-zero elements in the rows are sorted into increasing columnd order. } \section{Objects from the Class}{ This class is currently still mostly unimplemented! Objects can be created by calls of the form \code{new("dtRMatrix", ...)}. } \section{Slots}{ \describe{ \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular. At present only the lower triangle form is allowed.} \item{\code{diag}:}{Object of class \code{"character"}. Must be either \code{"U"}, for unit triangular (diagonal is all ones), or \code{"N"}; see \code{\linkS4class{triangularMatrix}}.} \item{\code{j}:}{Object of class \code{"integer"} of length \code{\link{nnzero}(.)} (number of non-zero elements). These are the row numbers for each non-zero element in the matrix.} \item{\code{p}:}{Object of class \code{"integer"} of pointers, one for each row, to the initial (zero-based) index of elements in the row. (Only present in the \code{dsRMatrix} class.)} \item{\code{x}:}{Object of class \code{"numeric"} - the non-zero elements of the matrix.} \item{\code{Dim}:}{The dimension (a length-2 \code{"integer"})} \item{\code{Dimnames}:}{corresponding names (or \code{NULL}), inherited from the \code{\linkS4class{Matrix}}, see there.} } } \section{Extends}{ Class \code{"dgRMatrix"}, directly. Class \code{"dsparseMatrix"}, by class \code{"dgRMatrix"}. Class \code{"dMatrix"}, by class \code{"dgRMatrix"}. Class \code{"sparseMatrix"}, by class \code{"dgRMatrix"}. Class \code{"Matrix"}, by class \code{"dgRMatrix"}. } \section{Methods}{ No methods currently with class "dsRMatrix" in the signature. % \describe{ % \item{solve}{\code{signature(a = "dsRMatrix", b = "matrix")}: Solve % a linear system of equations defined by \code{x} using a Cholesky % decomposition.} % ...... % \item{coerce}{\code{signature(from = "dsRMatrix", to = "dgTMatrix")}} % ...... % } } %\references{} %\author{} %\note{} \seealso{ Classes \code{\linkS4class{dgCMatrix}}, \code{\linkS4class{dgTMatrix}}, \code{\linkS4class{dgeMatrix}} } \examples{ (m0 <- new("dtRMatrix")) (m2 <- new("dtRMatrix", Dim = c(2L,2L), x = c(5, 1:2), p = c(0L,2:3), j= c(0:1,1L))) str(m2) (m3 <- as(Diagonal(2), "RsparseMatrix"))# --> dtRMatrix } \keyword{classes} \keyword{algebra} Matrix/man/ltrMatrix-class.Rd0000644000176200001440000000514112001034107015636 0ustar liggesusers\name{ltrMatrix-class} \docType{class} \alias{ltpMatrix-class} \alias{ltrMatrix-class} % \alias{!,ltpMatrix-method} \alias{!,ltrMatrix-method} \alias{coerce,ltpMatrix,dtpMatrix-method} \alias{coerce,ltpMatrix,lgeMatrix-method} \alias{coerce,ltpMatrix,ltrMatrix-method} \alias{coerce,ltrMatrix,dtrMatrix-method} \alias{coerce,ltrMatrix,lgeMatrix-method} \alias{coerce,ltrMatrix,ltpMatrix-method} \alias{coerce,matrix,ltrMatrix-method} \alias{coerce,matrix,ltpMatrix-method} \alias{diag,ltrMatrix-method} \alias{diag,ltpMatrix-method} \alias{diag<-,ltpMatrix-method} \alias{diag<-,ltrMatrix-method} \alias{t,ltpMatrix-method} \alias{t,ltrMatrix-method} % \title{Triangular Dense Logical Matrices} \description{ The \code{"ltrMatrix"} class is the class of triangular, dense, logical matrices in nonpacked storage. The \code{"ltpMatrix"} class is the same except in packed storage. } \section{Slots}{ \describe{ \item{\code{x}:}{Object of class \code{"logical"}. The logical values that constitute the matrix, stored in column-major order.} \item{\code{uplo}:}{Object of class \code{"character"}. Must be either "U", for upper triangular, and "L", for lower triangular.} \item{\code{diag}:}{Object of class \code{"character"}. Must be either \code{"U"}, for unit triangular (diagonal is all ones), or \code{"N"}; see \code{\linkS4class{triangularMatrix}}.} \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2 \code{"integer"}) and corresponding names (or \code{NULL}), see the \code{\linkS4class{Matrix}} class.} \item{\code{factors}:}{Object of class \code{"list"}. A named list of factorizations that have been computed for the matrix.} } } \section{Extends}{ Both extend classes \code{"\linkS4class{ldenseMatrix}"} and \code{"\linkS4class{triangularMatrix}"}, directly; further, class \code{"Matrix"}, \code{"\linkS4class{lMatrix}"} and others, \emph{in}directly. Use \code{\link{showClass}("ltrMatrix")}, e.g., for details. } \section{Methods}{ Currently, mainly \code{\link{t}()} and coercion methods (for \code{\link{as}(.)}; use, e.g., \code{\link{showMethods}(class="ltpMatrix")} for details. } \seealso{ Classes \code{\linkS4class{lgeMatrix}}, \code{\linkS4class{Matrix}}; function \code{\link[base]{t}} } \examples{ showClass("ltrMatrix") str(new("ltpMatrix")) (lutr <- as(upper.tri(matrix(,4,4)), "ltrMatrix")) str(lutp <- as(lutr, "ltpMatrix"))# packed matrix: only 10 = (4+1)*4/2 entries !lutp ## the logical negation (is *not* logical triangular !) ## but this one is: stopifnot(all.equal(lutp, as(!!lutp, "ltpMatrix"))) } \keyword{classes} Matrix/cleanup0000755000176200001440000000075513203323431013074 0ustar liggesusers#!/bin/sh # Cleans up after the auxiliary files that were created when installing # the Matrix package (shamelessly taken from the XML source pkg) # echo " Cleaning up after installing the Matrix package" ## No configure currently --> empty for now: not yet really needed for f in config.log config.status config.cache ; do if test -w $f ; then rm -f $f fi done for D in `sed -n '/^SUBDIRS *= */s///p' src/Makevars` do if test -d src/$D then (cd src/$D ; make clean ) fi done Matrix/.Rinstignore0000644000176200001440000000003012545576764014040 0ustar liggesusersdoc/.*\.sty doc/.*\.tex