diff --git a/ChangeLog b/ChangeLog index 9ee6611d..a77772fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2026-10-16 Dirk Eddelbuettel + + * inst/include/armadillo_bits/*: Armadillo 15.6.2 + + * vignettes/rmd/RcppArmadillo.bib: Updated several references + * vignettes/RcppArmadillo-intro.pdf: Regenerated + * vignettes/RcppArmadillo-sparseMatrix.pdf: Idem + 2026-10-02 Dirk Eddelbuettel * DESCRIPTION (Version, Date): RcppArmadillo 15.6.1-1 diff --git a/DESCRIPTION b/DESCRIPTION index 1533700c..8c698ef7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: RcppArmadillo Type: Package Title: 'Rcpp' Integration for the 'Armadillo' Templated Linear Algebra Library -Version: 15.6.1-1 -Date: 2026-10-02 +Version: 15.6.2-1 +Date: 2026-10-16 Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "edd@debian.org", comment = c(ORCID = "0000-0001-6419-907X")), person("Romain", "Francois", role = "aut", diff --git a/README.md b/README.md index 6093678a..703372e5 100644 --- a/README.md +++ b/README.md @@ -152,4 +152,4 @@ GPL (>= 2) [cran pkg]: https://cran.r-project.org/package=RcppArmadillo [benchmark]: https://eddelbuettel.github.io/ldlasb2/benchmarks.html [ldlasb2]: https://github.com/eddelbuettel/ldlasb2 -[rcpparmapaper]: http://dx.doi.org/10.1016/j.csda.2013.02.005 +[rcpparmapaper]: https://dx.doi.org/10.1016/j.csda.2013.02.005 diff --git a/configure b/configure index dae38e71..6c1600e6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.6.1-1. +# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.6.2-1. # # Report bugs to . # @@ -603,8 +603,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='RcppArmadillo' PACKAGE_TARNAME='rcpparmadillo' -PACKAGE_VERSION='15.6.1-1' -PACKAGE_STRING='RcppArmadillo 15.6.1-1' +PACKAGE_VERSION='15.6.2-1' +PACKAGE_STRING='RcppArmadillo 15.6.2-1' PACKAGE_BUGREPORT='edd@debian.org' PACKAGE_URL='' @@ -1223,7 +1223,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures RcppArmadillo 15.6.1-1 to adapt to many kinds of systems. +'configure' configures RcppArmadillo 15.6.2-1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1285,7 +1285,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of RcppArmadillo 15.6.1-1:";; + short | recursive ) echo "Configuration of RcppArmadillo 15.6.2-1:";; esac cat <<\_ACEOF @@ -1366,7 +1366,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -RcppArmadillo configure 15.6.1-1 +RcppArmadillo configure 15.6.2-1 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -1482,7 +1482,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by RcppArmadillo $as_me 15.6.1-1, which was +It was created by RcppArmadillo $as_me 15.6.2-1, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -3946,7 +3946,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by RcppArmadillo $as_me 15.6.1-1, which was +This file was extended by RcppArmadillo $as_me 15.6.2-1, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4001,7 +4001,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -RcppArmadillo config.status 15.6.1-1 +RcppArmadillo config.status 15.6.2-1 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 3d4a6d61..196c38c2 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ AC_PREREQ([2.69]) ## Process this file with autoconf to produce a configure script. -AC_INIT([RcppArmadillo],[15.6.1-1],[edd@debian.org]) +AC_INIT([RcppArmadillo],[15.6.2-1],[edd@debian.org]) ## Set R_HOME, respecting an environment variable if one is set : ${R_HOME=$(R RHOME)} diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index b8f7ea39..810e6bcf 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -3,9 +3,18 @@ \newcommand{\ghpr}{\href{https://github.com/RcppCore/RcppArmadillo/pull/#1}{##1}} \newcommand{\ghit}{\href{https://github.com/RcppCore/RcppArmadillo/issues/#1}{##1}} +\section{Changes in RcppArmadillo version 15.6.2-1 (2026-10-16)}{ + \itemize{ + \item Upgraded to Armadillo release 15.6.2 (Medium Roast Cortado) + \itemize{ + \item Faster inplace addition of \code{eye()} expressions + } + } +} + \section{Changes in RcppArmadillo version 15.6.1-1 [github-only] (2026-10-02)}{ \itemize{ - \item Upgraded to Armadillo release 15.6.1 (Medium Roast Agave) + \item Upgraded to Armadillo release 15.6.1 (Medium Roast Cortado) \itemize{ \item Fix for failures in \code{pinv()} when using the (non-default) "std" method diff --git a/inst/include/armadillo_bits/Mat_meat.hpp b/inst/include/armadillo_bits/Mat_meat.hpp index 9a3d3408..82cf55e3 100644 --- a/inst/include/armadillo_bits/Mat_meat.hpp +++ b/inst/include/armadillo_bits/Mat_meat.hpp @@ -5504,6 +5504,18 @@ Mat::Mat(const eOp& X) if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOp& >(X)); return; } } + if(is_gen_eye::value && is_same_type::value) + { + zeros(); + + const eT k = X.aux; + const uword N = (std::min)(n_rows, n_cols); + + for(uword ii=0; ii < N; ++ii) { at(ii,ii) = k; } + + return; + } + eop_type::apply(*this, X); } @@ -5534,6 +5546,18 @@ Mat::operator=(const eOp& X) if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOp& >(X)); return *this; } } + if(is_gen_eye::value && is_same_type::value) + { + zeros(); + + const eT k = X.aux; + const uword N = (std::min)(n_rows, n_cols); + + for(uword ii=0; ii < N; ++ii) { at(ii,ii) = k; } + + return *this; + } + eop_type::apply(*this, X); return *this; @@ -5563,6 +5587,18 @@ Mat::operator+=(const eOp& X) if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_plus(*this, reinterpret_cast< const eOp& >(X)); return *this; } } + if(is_gen_eye::value && is_same_type::value) + { + arma_conform_assert_same_size(n_rows, n_cols, X.get_n_rows(), X.get_n_cols(), "addition"); + + const eT k = X.aux; + const uword N = (std::min)(n_rows, n_cols); + + for(uword ii=0; ii < N; ++ii) { at(ii,ii) += k; } + + return *this; + } + eop_type::apply_inplace_plus(*this, X); return *this; @@ -5592,6 +5628,18 @@ Mat::operator-=(const eOp& X) if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_minus(*this, reinterpret_cast< const eOp& >(X)); return *this; } } + if(is_gen_eye::value && is_same_type::value) + { + arma_conform_assert_same_size(n_rows, n_cols, X.get_n_rows(), X.get_n_cols(), "subtraction"); + + const eT k = X.aux; + const uword N = (std::min)(n_rows, n_cols); + + for(uword ii=0; ii < N; ++ii) { at(ii,ii) -= k; } + + return *this; + } + eop_type::apply_inplace_minus(*this, X); return *this; diff --git a/inst/include/armadillo_bits/arma_version.hpp b/inst/include/armadillo_bits/arma_version.hpp index 12227caa..fff29c1a 100644 --- a/inst/include/armadillo_bits/arma_version.hpp +++ b/inst/include/armadillo_bits/arma_version.hpp @@ -23,7 +23,7 @@ #define ARMA_VERSION_MAJOR 15 #define ARMA_VERSION_MINOR 6 -#define ARMA_VERSION_PATCH 1 +#define ARMA_VERSION_PATCH 2 #define ARMA_VERSION_NAME "Medium Roast Cortado" diff --git a/inst/include/armadillo_bits/traits.hpp b/inst/include/armadillo_bits/traits.hpp index fbc36979..46e21eaf 100644 --- a/inst/include/armadillo_bits/traits.hpp +++ b/inst/include/armadillo_bits/traits.hpp @@ -444,6 +444,19 @@ struct is_op_diagmat< const Op > { static constexpr bool value = true; }; +template +struct is_gen_eye + { static constexpr bool value = false; }; + +template +struct is_gen_eye< Gen, gen_eye> > + { static constexpr bool value = true; }; + +template +struct is_gen_eye< const Gen, gen_eye> > + { static constexpr bool value = true; }; + + // // diff --git a/vignettes/RcppArmadillo-intro.pdf b/vignettes/RcppArmadillo-intro.pdf index b178e2e9..9bc6f74b 100644 Binary files a/vignettes/RcppArmadillo-intro.pdf and b/vignettes/RcppArmadillo-intro.pdf differ diff --git a/vignettes/RcppArmadillo-sparseMatrix.pdf b/vignettes/RcppArmadillo-sparseMatrix.pdf index 2519d688..afc1d0ad 100644 Binary files a/vignettes/RcppArmadillo-sparseMatrix.pdf and b/vignettes/RcppArmadillo-sparseMatrix.pdf differ diff --git a/vignettes/rmd/RcppArmadillo.bib b/vignettes/rmd/RcppArmadillo.bib index 291fd633..bb623372 100644 --- a/vignettes/rmd/RcppArmadillo.bib +++ b/vignettes/rmd/RcppArmadillo.bib @@ -2,7 +2,7 @@ @String{CRAN @String{manuals = CRAN # "doc/manuals/" } @String{RCoreTeam = "{R Development Core Team}" } @String{RFoundation = "R Foundation for Statistical Computing" } -@String{R-Forge = "https://R-Forge.R-Project.org/" } +@String{R-Forge = "https://R-Forge.R-Project.org" } @String{DOI = "10.32614/CRAN.package." } @@ -11,7 +11,7 @@ @manual{Abrahams+Grosse-Kunstleve:2003:Boost.Python organization = "Boost Consulting", title = "Building Hybrid Systems with Boost.Python", year = 2003, - url = "http://www.boostpro.com/writing/bpl.pdf" + url = "https://www.boost.org/doc/libs/latest/libs/python/doc/html/article.html" } @Book{Abrahams+Gurtovoy:2004:TemplateMetaprogramming, @@ -28,7 +28,7 @@ @Manual{Armstrong:2009:RAbstraction author = {Whit Armstrong}, year = 2009, note = {Code repository last updated July 22, 2009.}, - url = {http://github.com/armstrtw/rabstraction} + url = {https://github.com/armstrtw/rabstraction} } @Manual{Armstrong:2009:RObjects, @@ -37,7 +37,7 @@ @Manual{Armstrong:2009:RObjects author = {Whit Armstrong}, year = 2009, note = {Code repository last updated November 28, 2009.}, - url = {http://github.com/armstrtw/RObjects} + url = {https://github.com/armstrtw/RObjects} } @InProceedings{Bates+DebRoy:2001:C++Classes, @@ -56,7 +56,7 @@ @Misc{Brokken:2011:Cpp title = {C++ Annotations}, howpublished = {Electronic book, University of Groningen}, year = 2012, - url = {http://www.icce.rug.nl/documents/cplusplus/}, + url = {https://fbb-git.gitlab.io/cppannotations/cppannotations/html/}, note = {Version 9.3.0, accessed 2012-04-13.}, } @@ -334,7 +334,7 @@ @Manual{GSL year = {2010}, edition = {3rd}, note = {Version 1.14. {ISBN} 0954612078}, - url = {http://www.gnu.org/software/gsl} + url = {http://www.gnu.org/software/gsl/} } @Unpublished{Java+Gaile+Manly:2007:RCpp, @@ -456,7 +456,7 @@ @manual{R:Main year = 2026, note = {{ISBN} 3-900051-07-0}, doi = "10.32614/R.manuals", - oldurl = {http://www.R-project.org/}, + oldurl = {https://www.R-project.org/}, } @manual{R:Language, @@ -551,7 +551,7 @@ @article{Tusell:2010:Kalman number = 2, pages = "1--27", year = 2011, - oldurl = "http://www.jstatsoft.org/v39/i02", + oldurl = "https://www.jstatsoft.org/v39/i02", doi = {10.18637/jss.v039.i02} }