Binary files /tmp/tmpLX7sle/Z1gUWogLL6/rmatrix-1.2-17/build/partial.rdb and /tmp/tmpLX7sle/_6fCpfRtOE/rmatrix-1.2-18/build/partial.rdb differ Binary files /tmp/tmpLX7sle/Z1gUWogLL6/rmatrix-1.2-17/build/vignette.rds and /tmp/tmpLX7sle/_6fCpfRtOE/rmatrix-1.2-18/build/vignette.rds differ diff -Nru rmatrix-1.2-17/debian/changelog rmatrix-1.2-18/debian/changelog --- rmatrix-1.2-17/debian/changelog 2019-03-27 02:46:46.000000000 +0000 +++ rmatrix-1.2-18/debian/changelog 2019-12-07 00:26:19.000000000 +0000 @@ -1,8 +1,26 @@ -rmatrix (1.2-17-1bionic0) bionic; urgency=medium +rmatrix (1.2-18-1bionic0) bionic; urgency=medium - * Compilation for Ubuntu 18.04.2 LTS + * Compilation for Ubuntu 18.04.3 LTS - -- Michael Rutter Wed, 27 Mar 2019 02:46:46 +0000 + -- Michael Rutter Sat, 07 Dec 2019 00:26:19 +0000 + +rmatrix (1.2-18-1) unstable; urgency=medium + + * New upstream release + + * debian/control: Set Build-Depends: to current R version + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Tue, 03 Dec 2019 13:43:42 -0600 + +rmatrix (1.2-17-2) unstable; urgency=medium + + * Source-only upload + + * debian/control: Set Build-Depends: to current R version + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Sun, 18 Aug 2019 07:39:22 -0500 rmatrix (1.2-17-1) unstable; urgency=medium diff -Nru rmatrix-1.2-17/debian/control rmatrix-1.2-18/debian/control --- rmatrix-1.2-17/debian/control 2019-03-24 17:43:44.000000000 +0000 +++ rmatrix-1.2-18/debian/control 2019-12-03 19:43:42.000000000 +0000 @@ -2,8 +2,8 @@ Section: gnu-r Priority: optional Maintainer: Dirk Eddelbuettel -Build-Depends: debhelper (>= 7.0.0), dh-r, r-base-dev (>= 3.5.3), r-cran-lattice (>= 0.12-11.1) -Standards-Version: 4.3.0 +Build-Depends: debhelper (>= 7.0.0), dh-r, r-base-dev (>= 3.6.1), r-cran-lattice (>= 0.12-11.1) +Standards-Version: 4.4.1 Vcs-Browser: https://salsa.debian.org/edd/r-cran-matrix Vcs-Git: https://salsa.debian.org/edd/r-cran-matrix.git Homepage: https://cran.r-project.org/package=Matrix diff -Nru rmatrix-1.2-17/DESCRIPTION rmatrix-1.2-18/DESCRIPTION --- rmatrix-1.2-17/DESCRIPTION 2019-03-22 22:56:52.000000000 +0000 +++ rmatrix-1.2-18/DESCRIPTION 2019-11-27 15:20:02.000000000 +0000 @@ -1,6 +1,6 @@ Package: Matrix -Version: 1.2-17 -Date: 2019-03-11 +Version: 1.2-18 +Date: 2019-11-25 Priority: recommended Title: Sparse and Dense Matrix Classes and Methods Contact: Doug and Martin @@ -35,7 +35,7 @@ URL: http://Matrix.R-forge.R-project.org/ BugReports: https://r-forge.r-project.org/tracker/?group_id=61 NeedsCompilation: yes -Packaged: 2019-03-20 21:37:04 UTC; maechler +Packaged: 2019-11-26 17:17:19 UTC; maechler Author: Douglas Bates [aut], Martin Maechler [aut, cre] (), Timothy A. Davis [ctb] (SuiteSparse and 'cs' C libraries, notably @@ -47,4 +47,4 @@ Regents of the University of California), R Core Team [ctb] (base R matrix implementation) Repository: CRAN -Date/Publication: 2019-03-22 22:56:52 UTC +Date/Publication: 2019-11-27 15:20:02 UTC Binary files /tmp/tmpLX7sle/Z1gUWogLL6/rmatrix-1.2-17/inst/doc/Comparisons.pdf and /tmp/tmpLX7sle/_6fCpfRtOE/rmatrix-1.2-18/inst/doc/Comparisons.pdf differ Binary files /tmp/tmpLX7sle/Z1gUWogLL6/rmatrix-1.2-17/inst/doc/Design-issues.pdf and /tmp/tmpLX7sle/_6fCpfRtOE/rmatrix-1.2-18/inst/doc/Design-issues.pdf differ Binary files /tmp/tmpLX7sle/Z1gUWogLL6/rmatrix-1.2-17/inst/doc/Intro2Matrix.pdf and /tmp/tmpLX7sle/_6fCpfRtOE/rmatrix-1.2-18/inst/doc/Intro2Matrix.pdf differ Binary files /tmp/tmpLX7sle/Z1gUWogLL6/rmatrix-1.2-17/inst/doc/Introduction.pdf and /tmp/tmpLX7sle/_6fCpfRtOE/rmatrix-1.2-18/inst/doc/Introduction.pdf differ Binary files /tmp/tmpLX7sle/Z1gUWogLL6/rmatrix-1.2-17/inst/doc/sparseModels.pdf and /tmp/tmpLX7sle/_6fCpfRtOE/rmatrix-1.2-18/inst/doc/sparseModels.pdf differ diff -Nru rmatrix-1.2-17/inst/NEWS.Rd rmatrix-1.2-18/inst/NEWS.Rd --- rmatrix-1.2-17/inst/NEWS.Rd 2019-03-20 20:04:11.000000000 +0000 +++ rmatrix-1.2-18/inst/NEWS.Rd 2019-11-26 17:14:40.000000000 +0000 @@ -14,7 +14,31 @@ %% \item \code{as(, "sparseMatrix")} no longer fails %% when \code{prod(dim(.))} is larger than \eqn{2^{31} - 1}. % -\section{Changes in version 1.2-17 (2019-03-.., svn r....)}{ +\section{Changes in version 1.2-18 (2019-11-26, manually picked from svn)}{ + \subsection{Bug Fixes}{ + \itemize{ + \item Fix last(?) \code{PROTECT()} warning found by \command{rchk} in + \file{src/dense.c}'s \code{ddense_skewpart()}. + + \item \code{as(m, "dgTMatrix")} does not lose \code{dimnames} anymore + when \code{m} is a (traditional) \code{matrix}. + + \item \code{M[logical(0), ]} now has dimension \eqn{0 x k} for sparse + \code{M} as for base matrices. + + \item \code{log(M, base)} (the 2-argument version of \code{log()}) + wrongly gave the result for \code{base = exp(1)}, i.e., the 1-argument default. + + \item \file{test-tools-Matrix.R}: \code{Qidentical()} no longer assumes + \code{class()} to be of length 1. + + \item \file{test-tools-1.R}: provide bug-fixed \code{canCoerce()} in + old R versions. + } + } +} + +\section{Changes in version 1.2-17 (2019-03-20, svn r3294)}{ \subsection{New Features}{ \itemize{ \item (none) diff -Nru rmatrix-1.2-17/inst/test-tools-1.R rmatrix-1.2-18/inst/test-tools-1.R --- rmatrix-1.2-17/inst/test-tools-1.R 2019-02-25 11:25:33.000000000 +0000 +++ rmatrix-1.2-18/inst/test-tools-1.R 2019-11-25 17:22:16.000000000 +0000 @@ -339,6 +339,15 @@ showOnly=FALSE, giveRE = FALSE, ...) assert.EQ.mat(M, as.mat(M2), tol=tol, showOnly=showOnly, giveRE=giveRE) +if(getRversion() <= "3.6.1" || R.version$`svn rev` < 77410) + ## { methods::canCoerce() : use .class1(), not class() } + canCoerce <- function(object, Class) { + is(object, Class) || + !is.null(selectMethod("coerce", c(methods:::.class1(object), Class), + optional = TRUE, + useInherited = c(from=TRUE, to=FALSE))) + } + chk.matrix <- function(M) { ## check object; including coercion to "matrix" : diff -Nru rmatrix-1.2-17/inst/test-tools-Matrix.R rmatrix-1.2-18/inst/test-tools-Matrix.R --- rmatrix-1.2-17/inst/test-tools-Matrix.R 2017-08-05 11:48:00.000000000 +0000 +++ rmatrix-1.2-18/inst/test-tools-Matrix.R 2019-11-25 17:29:57.000000000 +0000 @@ -39,8 +39,8 @@ ##' quasi-identical() for 'Matrix' matrices Qidentical <- function(x,y, strictClass = TRUE) { - if(class(x) != class(y)) { - if(strictClass || !is(x, class(y))) + if(!identical(class(x), cy <- class(y))) { + if(strictClass || !is(x, cy)) return(FALSE) ## else try further } @@ -66,8 +66,8 @@ ##' quasi-identical() for traditional ('matrix') matrices mQidentical <- function(x,y, strictClass = TRUE) { - if(class(x) != class(y)) { - if(strictClass || !is(x, class(y))) + if(!identical(class(x), cy <- class(y))) { + if(strictClass || !is(x, cy)) return(FALSE) ## else try further } diff -Nru rmatrix-1.2-17/man/CsparseMatrix-class.Rd rmatrix-1.2-18/man/CsparseMatrix-class.Rd --- rmatrix-1.2-17/man/CsparseMatrix-class.Rd 2014-01-28 15:34:21.000000000 +0000 +++ rmatrix-1.2-18/man/CsparseMatrix-class.Rd 2019-10-29 08:59:48.000000000 +0000 @@ -19,6 +19,7 @@ \alias{Arith,numeric,CsparseMatrix-method} \alias{Logic,CsparseMatrix,CsparseMatrix-method} \alias{Math,CsparseMatrix-method} +\alias{log,CsparseMatrix-method} % \alias{.validateCsparse} % diff -Nru rmatrix-1.2-17/man/ddenseMatrix-class.Rd rmatrix-1.2-18/man/ddenseMatrix-class.Rd --- rmatrix-1.2-17/man/ddenseMatrix-class.Rd 2014-01-28 15:34:21.000000000 +0000 +++ rmatrix-1.2-18/man/ddenseMatrix-class.Rd 2019-10-29 08:59:55.000000000 +0000 @@ -17,6 +17,7 @@ \alias{Arith,logical,ddenseMatrix-method} \alias{Arith,numeric,ddenseMatrix-method} \alias{Math,ddenseMatrix-method} +\alias{log,ddenseMatrix-method} \alias{Summary,ddenseMatrix-method} % \alias{as.numeric,ddenseMatrix-method} diff -Nru rmatrix-1.2-17/man/denseMatrix-class.Rd rmatrix-1.2-18/man/denseMatrix-class.Rd --- rmatrix-1.2-17/man/denseMatrix-class.Rd 2012-02-17 19:58:29.000000000 +0000 +++ rmatrix-1.2-18/man/denseMatrix-class.Rd 2019-10-29 09:00:03.000000000 +0000 @@ -4,6 +4,7 @@ \alias{denseMatrix-class} %% Group methods \alias{Math,denseMatrix-method} +\alias{log,denseMatrix-method} \alias{-,denseMatrix,missing-method} % \alias{show,denseMatrix-method} diff -Nru rmatrix-1.2-17/man/dgeMatrix-class.Rd rmatrix-1.2-18/man/dgeMatrix-class.Rd --- rmatrix-1.2-17/man/dgeMatrix-class.Rd 2017-08-05 11:48:00.000000000 +0000 +++ rmatrix-1.2-18/man/dgeMatrix-class.Rd 2019-10-29 09:01:43.000000000 +0000 @@ -14,6 +14,7 @@ \alias{Arith,logical,dgeMatrix-method} \alias{Arith,numeric,dgeMatrix-method} \alias{Math,dgeMatrix-method} +\alias{log,dgeMatrix-method} %\alias{Math2,dgeMatrix,numeric-method} % Others % diff -Nru rmatrix-1.2-17/man/diagonalMatrix-class.Rd rmatrix-1.2-18/man/diagonalMatrix-class.Rd --- rmatrix-1.2-17/man/diagonalMatrix-class.Rd 2015-11-16 14:58:47.000000000 +0000 +++ rmatrix-1.2-18/man/diagonalMatrix-class.Rd 2019-10-29 09:02:27.000000000 +0000 @@ -61,6 +61,7 @@ \alias{which,ldiMatrix-method} % \alias{Math,diagonalMatrix-method}% Math2: handled via "dMatrix" class +\alias{log,diagonalMatrix-method} \alias{Ops,diagonalMatrix,triangularMatrix-method} \alias{Ops,ddiMatrix,sparseMatrix-method} \alias{Ops,sparseMatrix,ddiMatrix-method} diff -Nru rmatrix-1.2-17/man/sparseMatrix-class.Rd rmatrix-1.2-18/man/sparseMatrix-class.Rd --- rmatrix-1.2-17/man/sparseMatrix-class.Rd 2016-11-23 11:08:45.000000000 +0000 +++ rmatrix-1.2-18/man/sparseMatrix-class.Rd 2019-11-26 08:17:16.000000000 +0000 @@ -4,6 +4,7 @@ \alias{sparseMatrix-class} %% Group methods \alias{Math,sparseMatrix-method} +\alias{log,sparseMatrix-method} %\alias{Math2,sparseMatrix,numeric-method} \alias{Ops,sparseMatrix,sparseMatrix-method} \alias{Ops,sparseMatrix,numeric-method} diff -Nru rmatrix-1.2-17/man/sparseVector-class.Rd rmatrix-1.2-18/man/sparseVector-class.Rd --- rmatrix-1.2-17/man/sparseVector-class.Rd 2017-03-08 11:01:35.000000000 +0000 +++ rmatrix-1.2-18/man/sparseVector-class.Rd 2019-10-29 09:03:00.000000000 +0000 @@ -36,6 +36,7 @@ \alias{Logic,sparseVector,lMatrix-method} \alias{Logic,sparseVector,nMatrix-method} \alias{Math,sparseVector-method} +\alias{log,sparseVector-method} \alias{Math2,dsparseVector-method}% or (dsparseVector, numeric) & (dsparseVector,missing) ? \alias{Math2,sparseVector-method} \alias{Summary,sparseVector-method} diff -Nru rmatrix-1.2-17/MD5 rmatrix-1.2-18/MD5 --- rmatrix-1.2-17/MD5 2019-03-22 22:56:52.000000000 +0000 +++ rmatrix-1.2-18/MD5 2019-11-27 15:20:02.000000000 +0000 @@ -1,5 +1,5 @@ 675a3a48a357cb2ee05ed285387b3e85 *ChangeLog -5e59faf86756d7dcf42826b8d318c0ec *DESCRIPTION +f177ecccd4b5433b4d552eacbe5a9e66 *DESCRIPTION 49c7113b5e0e4fbf269132f6a5ff5b06 *LICENCE c64f1d9e5087f242f8a60c4f135fbf10 *NAMESPACE 7e494fcaf80175fe73944c4d8732eb90 *R/AllClass.R @@ -11,8 +11,8 @@ 3f37d43942f54523314df6f5406cf488 *R/Hilbert.R 4d794b4715d6efa432fd7cf86f69da7a *R/KhatriRao.R 7cd5d5938844fa73c1a2b50fae7fdd19 *R/LU.R -639a65f83a4dccc663aad5299708071b *R/Math.R -8090100a5f06f969fc92a686e555800a *R/Matrix.R +b68cc36d8c1ce90f9b0e3ec48eb5f9e8 *R/Math.R +8e301592c128feab6ce5e2d23bac05c2 *R/Matrix.R e19ed36934229e22f41552d4d40c5d5a *R/MatrixFactorization.R 6e6e090d031ce8f02c8b4a6cd5b6ab08 *R/Ops.R a738e970d3c972b9ce5bc9492024a724 *R/Rsparse.R @@ -29,7 +29,7 @@ 1494b03ff03603b6feff2b5b72e80249 *R/ddenseMatrix.R 8779d27a6383083443ed2f1c6f6bff1f *R/denseMatrix.R 1e4701a2f806db46dacff8049266ef70 *R/dgCMatrix.R -264f7e142b8721e5df9f5467b98c016e *R/dgTMatrix.R +7eea936db6cd3af3a26f077325cc5eae *R/dgTMatrix.R 4a19560632a9bab7a208659535578cc9 *R/dgeMatrix.R 34c2a5d5cc24be26786ea5fb64460acf *R/diagMatrix.R be76b734bbed865c5a76f90ecd874448 *R/dpoMatrix.R @@ -78,28 +78,28 @@ a3265f0761ef916f610e9849c6677600 *R/triangularMatrix.R 7bb8f3b96f0cd3fc41bf5e4d75d085d9 *R/zzz.R f3b1b137d928891510363a3a18f9cfa6 *TODO -77fc9f3d733ea9855b5b5026431a4eea *build/partial.rdb -f6a48395281382c8210c31d00fb9d7a7 *build/vignette.rds +b17f5e08b6d570e8366e13b038ad63fc *build/partial.rdb +fcb1c4e8e688f3ee43ca1c41243e7171 *build/vignette.rds f2ad5375e270deeb7b041272dd095032 *cleanup 53de12cc7d1449cb2fa136f09333286b *data/CAex.R 9b3cfbb2041e5aba139c715280208c30 *data/KNex.R 3ed2e24d0f9b1af73f0b432f99644d64 *data/USCounties.R 8734f0b040c6292983d273d4251d250a *inst/Copyrights ac3697580885d17a062ce39df01338ad *inst/Doxyfile -76ebc2b80bf1698523d3c104a0f096ff *inst/NEWS.Rd +7a19af60ab9e9dcaed6b69c422b1e7d7 *inst/NEWS.Rd ea747a35318c564002a7144ebd510e28 *inst/doc/Announce.txt 0eeea40a3fb6da7157d2862bba10713a *inst/doc/Comparisons.R 09e13507b9832a30aa92e8aff0dc96a0 *inst/doc/Comparisons.Rnw -42d1e2ebceb4386a7e81b12d60ee5b6b *inst/doc/Comparisons.pdf +c55ae25df0e8ff45309f594a8d6ae6da *inst/doc/Comparisons.pdf f5541439d0f08315e57f86d026a1c40d *inst/doc/Design-issues.R 5a9e99ce004c325e01fb2773e58052f5 *inst/doc/Design-issues.Rnw -e6e6f6671bf9b0075f6b688a6deec860 *inst/doc/Design-issues.pdf +078db69d0b6a03ce27b9d1b8067c3665 *inst/doc/Design-issues.pdf 6f66bd95aab28d7bf06a019e7fbc14b5 *inst/doc/Intro2Matrix.R a6d6903590a8f5ac036fdeb74b48bb89 *inst/doc/Intro2Matrix.Rnw -ea6a658bb1c0874563f623eabd3a0e38 *inst/doc/Intro2Matrix.pdf +94da4afff0dd04f81421472c50fab2c7 *inst/doc/Intro2Matrix.pdf 188b839523ce6ec32e1f00ec4e2bc18e *inst/doc/Introduction.R c39a26dfe7ccaafd044e88468155b153 *inst/doc/Introduction.Rnw -7a0268bde26480ecdbbb0ffa47dbcbeb *inst/doc/Introduction.pdf +3d1c9420bdab29c6a0d6441ea8ec620d *inst/doc/Introduction.pdf 7d60c8defc517d361513bac03d04f13b *inst/doc/SuiteSparse/AMD.txt e4f8cd28fc8be8ab14106630610b9c5f *inst/doc/SuiteSparse/CHOLMOD.txt 0a80fb0db9cefb02e290ffd2f3431e6c *inst/doc/SuiteSparse/COLAMD.txt @@ -108,7 +108,7 @@ 6d217288f5da4fe419afaa34988bf42d *inst/doc/SuiteSparse/UserGuides.txt 2ab394c4daa5c94c2498ba3fa0578462 *inst/doc/sparseModels.R 491d961ca64f8da569c817b82daa9c58 *inst/doc/sparseModels.Rnw -2e592e2bec481ff8fe86d04499bea367 *inst/doc/sparseModels.pdf +223000386951246766fddd3587b972ee *inst/doc/sparseModels.pdf dcd11f6947f910f743254824e930b2c7 *inst/external/CAex_slots.rda be886d6bb832210bb654b9ad064fe0ff *inst/external/KNex_slots.rda 90f019ec81e67d7f3542f7ca39bf3f2d *inst/external/USCounties_slots.rda @@ -132,15 +132,15 @@ 2e479caeab6e64e7bc168955deb4a6b8 *inst/po/ko/LC_MESSAGES/R-Matrix.mo 39fa0e2e6cd45daedf6d68bcf53bb5d6 *inst/po/pl/LC_MESSAGES/Matrix.mo 4c881aca34074fd03f5bb60a9eba2716 *inst/po/pl/LC_MESSAGES/R-Matrix.mo -6a0f69d5af664234cee751d9e265bfc6 *inst/test-tools-1.R -9058fc5e4ffde0cb2066517ce4e050b5 *inst/test-tools-Matrix.R +95b8f579d8fea1f3ca11592a583c5202 *inst/test-tools-1.R +f70de7d5aac587e14befeb3888a3c543 *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 67893950e7e4ec247d084014f505c0b5 *man/Cholesky.Rd -4ef1b053e942af5a8a2289f4e252d323 *man/CsparseMatrix-class.Rd +17320b5f124586c8e868a04da2135769 *man/CsparseMatrix-class.Rd 9d51893942cc26c82dfea3a1f198a663 *man/Diagonal.Rd 74df4ccf77c8797a57520d36afe98a0f *man/Hilbert.Rd 8743b4fa2a7f121badda6d3022a9f2e5 *man/KNex.Rd @@ -174,15 +174,15 @@ 16c76be17728e8ade8678ab81a125899 *man/compMatrix-class.Rd 94d3e434a3e338f581e508ebee9a5a7f *man/condest.Rd 253bb6ac974d08c57d9da1fec62ea887 *man/dMatrix-class.Rd -67fcf5d02576b9c5a2d0b54237c0ec26 *man/ddenseMatrix-class.Rd +61bcd63c92c3fd085f3cace9bf58f7f2 *man/ddenseMatrix-class.Rd fea7d6aa90395d29ab34ebe90603aec4 *man/ddiMatrix-class.Rd -a45e58a48e996ba2ee632fb58122e6a9 *man/denseMatrix-class.Rd +6f39723018431aef5d98da8086ada47a *man/denseMatrix-class.Rd df0fb227fe85954a595a59d9900f2038 *man/dgCMatrix-class.Rd 33311e5379364ad7d6fa816ce187506d *man/dgRMatrix-class.Rd 041d945f08fb616237f7b522492cbe80 *man/dgTMatrix-class.Rd -a83ca4c4fb76a85c66e3c21ba291efbc *man/dgeMatrix-class.Rd +72308d53b230cfb96df740c7f93a29e2 *man/dgeMatrix-class.Rd 546b1c5f8bab6de2265cd8817a8a92b5 *man/diagU2N.Rd -906021883f39ba3269248030cef1aea9 *man/diagonalMatrix-class.Rd +2209d909e4016f4b766f1ec2088f5119 *man/diagonalMatrix-class.Rd 600227d6a7315d336ea3f9655491ac4a *man/dpoMatrix-class.Rd fe1acb9ad779ffe89d0169baec96938c *man/drop0.Rd 2e193c409e5072667ff59aee82235321 *man/dsCMatrix-class.Rd @@ -241,10 +241,10 @@ 9b68c5da96127168eb998860261126ef *man/spMatrix.Rd 47b173d7c7515d8616daab061f58df12 *man/sparse.model.matrix.Rd 41ee4b254fd4375e8f500a03e3cb8e2e *man/sparseLU-class.Rd -03f182926aa9fbc73543b9a03ee58e1c *man/sparseMatrix-class.Rd +205e2b46864a09d2504a03c1994a3942 *man/sparseMatrix-class.Rd c84d52ef4e65a95f2d4a314b1b5b919c *man/sparseMatrix.Rd aaaeedb1b37258fd2ca01a7de68edd33 *man/sparseQR-class.Rd -c621e0ace8c68ff9d30dcbd6d5c91c70 *man/sparseVector-class.Rd +98b4e7da1c3bd1736ed9b7eff66055dc *man/sparseVector-class.Rd d55a0d5dc2476a64f08435526794ad8d *man/sparseVector.Rd 3f3010b99b5b9081fb75f8543b4031f6 *man/symmetricMatrix-class.Rd 749ddc8f3da2e72556ea5a3b605e570e *man/symmpart.Rd @@ -405,7 +405,7 @@ 2d48f8b8f4e1eb4598302396f70e8c89 *src/cs.h 749274eb9cfbbb5cf0db83c0ae4300cd *src/cs_utils.c 0b6112e86dab4fcececbadd2e84582ea *src/cs_utils.h -e1b9bfdf21d644dffd2b3764c6514cd6 *src/dense.c +bf339de8d817238601c6b82d09818898 *src/dense.c f14d4d8cd3b94ab5e95c8c9bff9630f1 *src/dense.h ad83ec224514ddc5304264281ea43450 *src/dgCMatrix.c 2392fd374cf7d259fedbef27f0a13e7f *src/dgCMatrix.h @@ -452,7 +452,7 @@ edb93b23eb7e6db1f454970b4c663f3a *src/t_matrix_to_Csp.c e6de21ff3bf0908eaca620d9b868b4f1 *src/t_sparseVector.c 3dcc9418cfcbd6ec989b16a91b2b945a *tests/Class+Meth.R -b7de3c2add7cf86ac1e651697cd5f25b *tests/Simple.R +3e22f6eb5754617c715fffad55dbb6de *tests/Simple.R 4966b9ac5a23de46814439a84174973b *tests/abIndex-tsts.R ce85ee2aba7d78e88fef738a0d1c7118 *tests/base-matrix-fun.R 78d7038fa6dfd7401a6a20efae58ab1e *tests/bind.R @@ -464,7 +464,7 @@ 652e195c510ddacb0817e59ac04e630e *tests/group-methods.R 93103c6d9f3b55f28ded187227623ecd *tests/indexing.R 8687f4f398a94766ca0e51d4b89da2f9 *tests/indexing.Rout.save -b8500af28596546d186e10face184f08 *tests/matprod.R +10f18cf8b21133fd5f086d6348f10859 *tests/matprod.R 06d9de87597574aff0aa03776011bfa8 *tests/matr-exp.R 128ccccdfe84c2dbed42bdce86258491 *tests/other-pkgs.R 2787ae0732f209eee2a0965c196c3363 *tests/spModel.matrix.R diff -Nru rmatrix-1.2-17/R/dgTMatrix.R rmatrix-1.2-18/R/dgTMatrix.R --- rmatrix-1.2-17/R/dgTMatrix.R 2018-08-20 14:29:01.000000000 +0000 +++ rmatrix-1.2-18/R/dgTMatrix.R 2019-11-25 17:52:19.000000000 +0000 @@ -49,6 +49,7 @@ x <- as.double(from) nz <- isN0(x) new("dgTMatrix", Dim = dim(from), + Dimnames = .M.DN(from), i = row(from)[nz] - 1L, j = col(from)[nz] - 1L, x = x[nz]) @@ -177,7 +178,7 @@ 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) + x = c(e1@x, e2@x), Dim = e1@Dim, Dimnames = e1@Dimnames) }) diff -Nru rmatrix-1.2-17/R/Math.R rmatrix-1.2-18/R/Math.R --- rmatrix-1.2-17/R/Math.R 2015-09-02 21:29:32.000000000 +0000 +++ rmatrix-1.2-18/R/Math.R 2019-11-26 08:13:10.000000000 +0000 @@ -1,6 +1,9 @@ ####--- All "Math" and "Math2" group methods for all Matrix classes (incl sparseVector) ------ -#### ==== ===== but diagonalMatrix -> ./diagMatrix.R and abIndex.R -#### ~~~~~~~~~~~~ ~~~~~~~~~ +#### ==== ===== + +## "Design-bug": log(x, base) has *two* arguments // ditto for "trunc()" !! +## ---> need "log" methods "everywhere to catch 2-arg case ! + ###--------- Csparse @@ -43,6 +46,8 @@ } }) ## {Math} +setMethod("log", "CsparseMatrix", function(x, base = exp(1)) log(C2dense(x), base)) + ###--------- ddenseMatrix ##' Used for dt[rp]Matrix, ds[yp]Matrix (and subclasses, e.g. dpo*(), cor*() !): @@ -84,13 +89,35 @@ } }) +## "log" with *two* arguments +setMethod("log", "ddenseMatrix", function(x, base = exp(1)) +{ + if(is(x, "symmetricMatrix")) { ## -> result symmetric: keeps class + cld <- getClassDef(class(x)) + if((po <- extends(cld, "dpoMatrix")) || extends(cld, "dppMatrix")) { # result is *not* pos.def! + x <- as(x, if(po) "dsyMatrix" else "dspMatrix") + } + ## "symmetricMatrix" has 'factors' slot: + if(!is.null(x@factors)) x@factors <- list() + x@x <- log(x@x, base) + x + } + else { ## triangularMatrix or generalMatrix, includes, e.g. "corMatrix"! + if(inherits(x, "compMatrix")) # has 'factors' slot + if(!is.null(x@factors)) x@factors <- list() + ## result is general: *could* use -Inf for the whole 0-triangle, + ## but this is much easier: + log(as(x,"dgeMatrix"), base) + } +}) + ###--------- 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 + function(x) callGeneric(as(x, "dMatrix"))) # -> "ddenseMatrix" above +setMethod("log", "denseMatrix", function(x, base = exp(1)) log(as(x, "dMatrix"), base)) ###--------- dgeMatrix @@ -103,6 +130,10 @@ x } }) +setMethod("log", "dgeMatrix", function(x, base = exp(1)) { + x@x <- log(x@x, base) + x +}) ###--------- diagMatrix @@ -147,6 +178,25 @@ } }) ## {Math} +setMethod("log", "diagonalMatrix", function(x, base = exp(1)) { + ## no sparseness, i.e., no diagonal, but still symmetric: + r <- as(as(as(.diag2sT(x), "dMatrix"), "denseMatrix"), "dspMatrix") + diag(r) <- if(x@diag == "U") 0 else log(x@x, base) + ## Assign log(0, ) == -Inf to all off-diagonal elements; + ## indices depend crucially on uplo = "U" / "L" : + n <- x@Dim[[1L]] + if(n >= 1L) { + k <- seq_len(n) + i <- k*(k+1)/2 # as r@uplo == "U" + ## } else { # uplo == "L" + ## cumsum(c(1, if(n>1) n:2)) + ## } + r@x[-i] <- -Inf # = log(0, ) + } + r +}) + + ## NB: "Math2" (round, signif) for diagMatrix is perfectly via "dMatrix" @@ -175,6 +225,8 @@ setMethod("Math", signature(x = "sparseMatrix"), function(x) callGeneric(as(x, "CsparseMatrix"))) +setMethod("log", "sparseMatrix", function(x, base = exp(1)) log(as(x, "CsparseMatrix"), base)) + ###--------- sparseVector @@ -203,6 +255,7 @@ } }) +setMethod("log", "sparseVector", function(x, base = exp(1)) log(sp2vec(x), base)) setMethod("Math2", signature(x = "dsparseVector"), ## Assume that Generic(u, k) |--> u for u in {0,1} diff -Nru rmatrix-1.2-17/R/Matrix.R rmatrix-1.2-18/R/Matrix.R --- rmatrix-1.2-17/R/Matrix.R 2019-03-20 20:04:11.000000000 +0000 +++ rmatrix-1.2-18/R/Matrix.R 2019-11-25 17:50:23.000000000 +0000 @@ -295,12 +295,11 @@ } if(isTri && !is(data, "triangularMatrix")) { - data <- if(attr(isTri,"kind") == "L") tril(data) else triu(data) - #was as(data, "triangularMatrix") + if(attr(isTri,"kind") == "L") tril(data) else triu(data) } else if(isSym && !is(data, "symmetricMatrix")) - data <- forceSymmetric(data) #was as(data, "symmetricMatrix") - - data + forceSymmetric(data) + else + data } ## Methods for operations where one argument is numeric @@ -502,6 +501,7 @@ Matrix.msg("M[m,i,m] : nargs()=",nargs(), .M.level = 2) callGeneric(x, , j=j, drop= TRUE) }) +## select both rows *and* columns setMethod("[", signature(x = "Matrix", i = "index", j = "index", drop = "missing"), function(x,i,j, ..., drop) { @@ -533,7 +533,7 @@ ## Note: current method dispatch seems not to call this ever - if(!anyNA(i) && all(i)) ## select everything + if(length(i) && !anyNA(i) && all(i)) ## select everything x else ## not selecting all -> result is *NOT* diagonal/triangular/symmetric/.. ## keep j missing, but drop = "logical" diff -Nru rmatrix-1.2-17/src/dense.c rmatrix-1.2-18/src/dense.c --- rmatrix-1.2-17/src/dense.c 2019-03-07 20:34:24.000000000 +0000 +++ rmatrix-1.2-18/src/dense.c 2019-11-25 18:02:03.000000000 +0000 @@ -501,14 +501,13 @@ SEXP ddense_skewpart(SEXP x) /* Class of the value will be dgeMatrix */ { - SEXP dx = dup_mMatrix_as_dgeMatrix(x); + SEXP dx = PROTECT(dup_mMatrix_as_dgeMatrix(x)); int *adims = INTEGER(GET_SLOT(dx, Matrix_DimSym)), n = adims[0]; if(n != adims[1]) { error(_("matrix is not square! (skew-symmetric part)")); return R_NilValue; /* -Wall */ } else { - PROTECT(dx); SEXP ans = PROTECT(NEW_OBJECT_OF_CLASS("dgeMatrix")), dns, nms_dns; double *xx = REAL(GET_SLOT(dx, Matrix_xSym)); diff -Nru rmatrix-1.2-17/tests/matprod.R rmatrix-1.2-18/tests/matprod.R --- rmatrix-1.2-17/tests/matprod.R 2019-02-28 16:16:10.000000000 +0000 +++ rmatrix-1.2-18/tests/matprod.R 2019-11-26 07:34:19.000000000 +0000 @@ -254,9 +254,11 @@ mRight <- matrix(data = double(0), nrow = 0, ncol = 4) MLeft <- Matrix(data = double(0), nrow = 3, ncol = 0) MRight <- Matrix(data = double(0), nrow = 0, ncol = 4) -stopifnot(identical3(class(mLeft), class(mRight), "matrix")) -stopifnot(class(MLeft) == class(MRight), - class(MLeft) == "dgeMatrix") +stopifnot(exprs = { + class(mLeft) == class(mRight) + class(MLeft) == class(MRight) + class(MLeft) == "dgeMatrix" +}) Qidentical3 <- function(a,b,c) Q.eq(a,b) && Q.eq(b,c) Qidentical4 <- function(a,b,c,d) Q.eq(a,b) && Q.eq(b,c) && Q.eq(c,d) diff -Nru rmatrix-1.2-17/tests/Simple.R rmatrix-1.2-18/tests/Simple.R --- rmatrix-1.2-17/tests/Simple.R 2019-03-20 20:04:11.000000000 +0000 +++ rmatrix-1.2-18/tests/Simple.R 2019-11-26 10:37:11.000000000 +0000 @@ -1144,7 +1144,10 @@ Sys.setlocale("LC_COLLATE", "C") # to keep ls() reproducible for(nm in ls()) if(is(.m <- get(nm), "Matrix")) { cat("\n", rep("-",nchar(nm)),"\n",nm, ":\n", sep='') - checkMatrix(.m) + if(nm %in% c("d4da")) # asymmetric dimnames in symmetricMatrix .. + cat(" __skipping__ check for ",nm," for now !! \n") + else + checkMatrix(.m) } cat('Time elapsed: ', proc.time() - .pt,'\n') # "stats" }