Skip to content

Commit 2d0cc32

Browse files
RcppArmadillo 15.8.0-1 with Armadillo 15.8.0 (#512)
* Armadillo 15.8-rc1 * RcppArmadillo 15.7.91-1 with Armadillo 15.7.91 aka 15.8-rc1 * Support wrap() for sparse expressions (#514) Add wrap() overloads for SpOp, SpGlue, mtSpOp and mtSpGlue that evaluate to SpMat, mirroring the dense Op/Glue ones. Armadillo 15.8 made spones() return an SpOp, which broke packages passing its result to wrap() (#513). * RcppArmadillo 15.7.92-1 with Armadillo 15.7.92 aka 15.8-rc2 * Armadillo 15.8.0 * RcppArmadillo 15.8.0-1 with Armadillo 15.8.0 --------- Co-authored-by: Kevin Ushey <kevinushey@gmail.com>
1 parent 33036ee commit 2d0cc32

52 files changed

Lines changed: 2165 additions & 234 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎ChangeLog‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
2026-11-22 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* DESCRIPTION (Version, Date): RcppArmadillo 15.8.0-1
4+
* inst/NEWS.Rd: Idem
5+
* configure.ac: Idem
6+
* configure: Idem
7+
8+
* inst/include/armadillo*: Armadillo 15.8.0
9+
10+
2026-11-20 Dirk Eddelbuettel <edd@debian.org>
11+
12+
* DESCRIPTION (Version, Date): RcppArmadillo 15.7.92-1
13+
* inst/NEWS.Rd: Idem
14+
* configure.ac: Idem
15+
* configure: Idem
16+
17+
* inst/include/armadillo*: Armadillo 15.7.92 aka 15.8-rc2
18+
19+
2026-11-19 Kevin Ushey <kevinushey@gmail.com>
20+
21+
* inst/include/RcppArmadillo/interface/RcppArmadilloForward.h: Declare
22+
wrap() for sparse expressions SpOp, SpGlue, mtSpOp and mtSpGlue
23+
* inst/include/RcppArmadillo/interface/RcppArmadilloWrap.h: Define them
24+
by evaluating to SpMat, as spones() now returns an SpOp
25+
* inst/tinytest/cpp/sparse.cpp: Add tests
26+
* inst/tinytest/test_sparse.R: Idem
27+
28+
2026-11-19 Dirk Eddelbuettel <edd@debian.org>
29+
30+
* DESCRIPTION (Version, Date): RcppArmadillo 15.7.91-1
31+
* inst/NEWS.Rd: Idem
32+
* configure.ac: Idem
33+
* configure: Idem
34+
35+
* inst/include/armadillo*: Armadillo 15.7.91 aka 15.8-rc1
36+
137
2026-10-16 Dirk Eddelbuettel <edd@debian.org>
238

339
* inst/include/armadillo_bits/*: Armadillo 15.6.2

‎DESCRIPTION‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: RcppArmadillo
22
Type: Package
33
Title: 'Rcpp' Integration for the 'Armadillo' Templated Linear Algebra Library
4-
Version: 15.6.2-1
5-
Date: 2026-10-16
4+
Version: 15.8.0-1
5+
Date: 2026-11-22
66
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "edd@debian.org",
77
comment = c(ORCID = "0000-0001-6419-907X")),
88
person("Romain", "Francois", role = "aut",

‎configure‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.6.2-1.
3+
# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.8.0-1.
44
#
55
# Report bugs to <edd@debian.org>.
66
#
@@ -603,8 +603,8 @@ MAKEFLAGS=
603603
# Identity of this package.
604604
PACKAGE_NAME='RcppArmadillo'
605605
PACKAGE_TARNAME='rcpparmadillo'
606-
PACKAGE_VERSION='15.6.2-1'
607-
PACKAGE_STRING='RcppArmadillo 15.6.2-1'
606+
PACKAGE_VERSION='15.8.0-1'
607+
PACKAGE_STRING='RcppArmadillo 15.8.0-1'
608608
PACKAGE_BUGREPORT='edd@debian.org'
609609
PACKAGE_URL=''
610610

@@ -1223,7 +1223,7 @@ if test "$ac_init_help" = "long"; then
12231223
# Omit some internal or obsolete options to make the list less imposing.
12241224
# This message is too long to be a string in the A/UX 3.1 sh.
12251225
cat <<_ACEOF
1226-
'configure' configures RcppArmadillo 15.6.2-1 to adapt to many kinds of systems.
1226+
'configure' configures RcppArmadillo 15.8.0-1 to adapt to many kinds of systems.
12271227
12281228
Usage: $0 [OPTION]... [VAR=VALUE]...
12291229
@@ -1285,7 +1285,7 @@ fi
12851285

12861286
if test -n "$ac_init_help"; then
12871287
case $ac_init_help in
1288-
short | recursive ) echo "Configuration of RcppArmadillo 15.6.2-1:";;
1288+
short | recursive ) echo "Configuration of RcppArmadillo 15.8.0-1:";;
12891289
esac
12901290
cat <<\_ACEOF
12911291
@@ -1366,7 +1366,7 @@ fi
13661366
test -n "$ac_init_help" && exit $ac_status
13671367
if $ac_init_version; then
13681368
cat <<\_ACEOF
1369-
RcppArmadillo configure 15.6.2-1
1369+
RcppArmadillo configure 15.8.0-1
13701370
generated by GNU Autoconf 2.72
13711371
13721372
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1482,7 +1482,7 @@ cat >config.log <<_ACEOF
14821482
This file contains any messages produced by compilers while
14831483
running configure, to aid debugging if configure makes a mistake.
14841484
1485-
It was created by RcppArmadillo $as_me 15.6.2-1, which was
1485+
It was created by RcppArmadillo $as_me 15.8.0-1, which was
14861486
generated by GNU Autoconf 2.72. Invocation command line was
14871487
14881488
$ $0$ac_configure_args_raw
@@ -3946,7 +3946,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39463946
# report actual input values of CONFIG_FILES etc. instead of their
39473947
# values after options handling.
39483948
ac_log="
3949-
This file was extended by RcppArmadillo $as_me 15.6.2-1, which was
3949+
This file was extended by RcppArmadillo $as_me 15.8.0-1, which was
39503950
generated by GNU Autoconf 2.72. Invocation command line was
39513951
39523952
CONFIG_FILES = $CONFIG_FILES
@@ -4001,7 +4001,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
40014001
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40024002
ac_cs_config='$ac_cs_config_escaped'
40034003
ac_cs_version="\\
4004-
RcppArmadillo config.status 15.6.2-1
4004+
RcppArmadillo config.status 15.8.0-1
40054005
configured by $0, generated by GNU Autoconf 2.72,
40064006
with options \\"\$ac_cs_config\\"
40074007

‎configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
AC_PREREQ([2.69])
1212

1313
## Process this file with autoconf to produce a configure script.
14-
AC_INIT([RcppArmadillo],[15.6.2-1],[edd@debian.org])
14+
AC_INIT([RcppArmadillo],[15.8.0-1],[edd@debian.org])
1515

1616
## Set R_HOME, respecting an environment variable if one is set
1717
: ${R_HOME=$(R RHOME)}

‎inst/NEWS.Rd‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
\newcommand{\ghpr}{\href{https://github.com/RcppCore/RcppArmadillo/pull/#1}{##1}}
44
\newcommand{\ghit}{\href{https://github.com/RcppCore/RcppArmadillo/issues/#1}{##1}}
55

6+
\section{Changes in RcppArmadillo version 15.8.0-1 (2026-11-22)}{
7+
\itemize{
8+
\item Upgraded to Armadillo release 15.8.0 (Medium Roast Chill)
9+
\itemize{
10+
\item Added \code{solve_factoriser} class for reusing matrix factorisation to
11+
solve systems of linear equations
12+
\item Added \code{solve_lse()} for solving linear least squares with
13+
equality constraints
14+
\item More efficient handling of \code{spones()}
15+
\item Reworked detection of aliasing for cubes
16+
}
17+
\item Added \code{wrap()} support for different sparse matrix expressions
18+
(Kevin Ushey in \ghpr{514} fixing \ghit{513})
19+
}
20+
}
21+
622
\section{Changes in RcppArmadillo version 15.6.2-1 (2026-10-16)}{
723
\itemize{
824
\item Upgraded to Armadillo release 15.6.2 (Medium Roast Cortado)

‎inst/include/RcppArmadillo/interface/RcppArmadilloForward.h‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ namespace Rcpp {
9292
template<typename out_eT, typename T1, typename T2, typename glue_type>
9393
SEXP wrap( const arma::mtGlue<out_eT,T1,T2,glue_type>& X );
9494

95+
template <typename T1, typename spop_type>
96+
SEXP wrap( const arma::SpOp<T1,spop_type>& X ) ;
97+
98+
template <typename T1, typename T2, typename spglue_type>
99+
SEXP wrap( const arma::SpGlue<T1,T2,spglue_type>& X ) ;
100+
101+
template <typename out_eT, typename T1, typename spop_type>
102+
SEXP wrap( const arma::mtSpOp<out_eT,T1,spop_type>& X ) ;
103+
104+
template <typename out_eT, typename T1, typename T2, typename spglue_type>
105+
SEXP wrap( const arma::mtSpGlue<out_eT,T1,T2,spglue_type>& X ) ;
106+
95107
template <typename eT, typename gen_type>
96108
SEXP wrap( const arma::Gen<eT,gen_type>& X) ;
97109

‎inst/include/RcppArmadillo/interface/RcppArmadilloWrap.h‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,26 @@ namespace Rcpp{
291291
return wrap( arma::Mat<out_eT>( X ) ) ;
292292
}
293293

294+
template <typename T1, typename spop_type>
295+
SEXP wrap( const arma::SpOp<T1,spop_type>& X ){
296+
return wrap( arma::SpMat<typename T1::elem_type>(X) ) ;
297+
}
298+
299+
template <typename T1, typename T2, typename spglue_type>
300+
SEXP wrap( const arma::SpGlue<T1,T2,spglue_type>& X ){
301+
return wrap( arma::SpMat<typename T1::elem_type>(X) ) ;
302+
}
303+
304+
template <typename out_eT, typename T1, typename spop_type>
305+
SEXP wrap( const arma::mtSpOp<out_eT,T1,spop_type>& X ){
306+
return wrap( arma::SpMat<out_eT>(X) ) ;
307+
}
308+
309+
template <typename out_eT, typename T1, typename T2, typename spglue_type>
310+
SEXP wrap( const arma::mtSpGlue<out_eT,T1,T2,spglue_type>& X ){
311+
return wrap( arma::SpMat<out_eT>(X) ) ;
312+
}
313+
294314
template <typename eT, typename gen_type>
295315
SEXP wrap( const arma::Gen<eT,gen_type>& X){
296316
return wrap( eT(X) ) ;

‎inst/include/armadillo‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ namespace arma
384384
#include "armadillo_bits/glue_powext_bones.hpp"
385385
#include "armadillo_bits/glue_cubemul_bones.hpp"
386386

387+
#include "armadillo_bits/solve_factoriser_bones.hpp"
388+
387389
#include "armadillo_bits/gmm_misc_bones.hpp"
388390
#include "armadillo_bits/gmm_diag_bones.hpp"
389391
#include "armadillo_bits/gmm_full_bones.hpp"
@@ -403,6 +405,7 @@ namespace arma
403405
#include "armadillo_bits/spop_relational_bones.hpp"
404406
#include "armadillo_bits/spop_omit_bones.hpp"
405407
#include "armadillo_bits/spop_accu_bones.hpp"
408+
#include "armadillo_bits/spop_spones_bones.hpp"
406409

407410
#include "armadillo_bits/spglue_plus_bones.hpp"
408411
#include "armadillo_bits/spglue_minus_bones.hpp"
@@ -541,6 +544,7 @@ namespace arma
541544
#include "armadillo_bits/fn_qr.hpp"
542545
#include "armadillo_bits/fn_svd.hpp"
543546
#include "armadillo_bits/fn_solve.hpp"
547+
#include "armadillo_bits/fn_solve_lse.hpp"
544548
#include "armadillo_bits/fn_repmat.hpp"
545549
#include "armadillo_bits/fn_repelem.hpp"
546550
#include "armadillo_bits/fn_reshape.hpp"
@@ -846,6 +850,8 @@ namespace arma
846850
#include "armadillo_bits/glue_powext_meat.hpp"
847851
#include "armadillo_bits/glue_cubemul_meat.hpp"
848852

853+
#include "armadillo_bits/solve_factoriser_meat.hpp"
854+
849855
#include "armadillo_bits/gmm_misc_meat.hpp"
850856
#include "armadillo_bits/gmm_diag_meat.hpp"
851857
#include "armadillo_bits/gmm_full_meat.hpp"
@@ -865,6 +871,7 @@ namespace arma
865871
#include "armadillo_bits/spop_relational_meat.hpp"
866872
#include "armadillo_bits/spop_omit_meat.hpp"
867873
#include "armadillo_bits/spop_accu_meat.hpp"
874+
#include "armadillo_bits/spop_spones_meat.hpp"
868875

869876
#include "armadillo_bits/spglue_plus_meat.hpp"
870877
#include "armadillo_bits/spglue_minus_meat.hpp"

‎inst/include/armadillo_bits/Cube_bones.hpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,4 +561,8 @@ class Cube_aux
561561

562562

563563

564+
template<typename eT> class Cube_noalias : public Cube<eT> {};
565+
566+
567+
564568
//! @}

‎inst/include/armadillo_bits/Cube_meat.hpp‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,7 +2772,7 @@ Cube<eT>::Cube(const OpCube<T1, op_type>& X)
27722772

27732773
arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
27742774

2775-
op_type::apply(*this, X);
2775+
op_type::apply(static_cast< Cube_noalias<eT>& >(*this), X);
27762776
}
27772777

27782778

@@ -3067,7 +3067,7 @@ Cube<eT>::Cube(const mtOpCube<eT, T1, op_type>& X)
30673067
{
30683068
arma_debug_sigprint_this(this);
30693069

3070-
op_type::apply(*this, X);
3070+
op_type::apply(static_cast< Cube_noalias<eT>& >(*this), X);
30713071
}
30723072

30733073

@@ -3163,7 +3163,10 @@ Cube<eT>::Cube(const GlueCube<T1, T2, glue_type>& X)
31633163
{
31643164
arma_debug_sigprint_this(this);
31653165

3166-
(*this).operator=(X);
3166+
arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3167+
arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
3168+
3169+
glue_type::apply(static_cast< Cube_noalias<eT>& >(*this), X);
31673170
}
31683171

31693172

@@ -3420,7 +3423,7 @@ Cube<eT>::Cube(const mtGlueCube<eT, T1, T2, glue_type>& X)
34203423
{
34213424
arma_debug_sigprint_this(this);
34223425

3423-
glue_type::apply(*this, X);
3426+
glue_type::apply(static_cast< Cube_noalias<eT>& >(*this), X);
34243427
}
34253428

34263429

0 commit comments

Comments
 (0)