Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
- name: Setup
uses: eddelbuettel/github-actions/r-ci@master

- name: Setup ccache for R
uses: eddelbuettel/github-actions/ccache-with-R@master
with:
key: ${{ matrix.name }}-${{ matrix.openmp }}

- name: Configure
run: ./configure; cat src/Makevars

Expand Down
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2026-07-09 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): RcppArmadillo 15.4.1-1
* inst/NEWS.Rd: Idem
* configure.ac: Idem
* configure: Idem

* inst/include/armadillo_bits/: Armadillo 15.4.1

* .github/workflows/ci.yaml: Enable ccache in matrix

2026-06-18 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): RcppArmadillo 15.4.0-1
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: RcppArmadillo
Type: Package
Title: 'Rcpp' Integration for the 'Armadillo' Templated Linear Algebra Library
Version: 15.4.0-1
Date: 2026-06-17
Version: 15.4.1-1
Date: 2026-07-09
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",
Expand Down
18 changes: 9 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.4.0-1.
# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.4.1-1.
#
# Report bugs to <edd@debian.org>.
#
Expand Down Expand Up @@ -603,8 +603,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='RcppArmadillo'
PACKAGE_TARNAME='rcpparmadillo'
PACKAGE_VERSION='15.4.0-1'
PACKAGE_STRING='RcppArmadillo 15.4.0-1'
PACKAGE_VERSION='15.4.1-1'
PACKAGE_STRING='RcppArmadillo 15.4.1-1'
PACKAGE_BUGREPORT='edd@debian.org'
PACKAGE_URL=''

Expand Down Expand Up @@ -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.4.0-1 to adapt to many kinds of systems.
'configure' configures RcppArmadillo 15.4.1-1 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1285,7 +1285,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of RcppArmadillo 15.4.0-1:";;
short | recursive ) echo "Configuration of RcppArmadillo 15.4.1-1:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1366,7 +1366,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
RcppArmadillo configure 15.4.0-1
RcppArmadillo configure 15.4.1-1
generated by GNU Autoconf 2.72

Copyright (C) 2023 Free Software Foundation, Inc.
Expand Down Expand Up @@ -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.4.0-1, which was
It was created by RcppArmadillo $as_me 15.4.1-1, which was
generated by GNU Autoconf 2.72. Invocation command line was

$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -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.4.0-1, which was
This file was extended by RcppArmadillo $as_me 15.4.1-1, which was
generated by GNU Autoconf 2.72. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -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.4.0-1
RcppArmadillo config.status 15.4.1-1
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
AC_PREREQ([2.69])

## Process this file with autoconf to produce a configure script.
AC_INIT([RcppArmadillo],[15.4.0-1],[edd@debian.org])
AC_INIT([RcppArmadillo],[15.4.1-1],[edd@debian.org])

## Set R_HOME, respecting an environment variable if one is set
: ${R_HOME=$(R RHOME)}
Expand Down
10 changes: 10 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
\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.4.1-1 [github-only] (2026-07-09)}{
\itemize{
\item Upgraded to Armadillo release 15.4.1 (Medium Roast Agave)
\itemize{
\item Fix for rare infinite recursion bug in sparse version of \code{diagmat()}
\item More efficient checks for aliasing
}
}
}

\section{Changes in RcppArmadillo version 15.4.0-1 (2026-06-17)}{
\itemize{
\item Upgraded to Armadillo release 15.4.0 (Medium Roast Agave)
Expand Down
6 changes: 6 additions & 0 deletions inst/include/armadillo_bits/Mat_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,12 @@ class Mat<eT>::fixed : public Mat<eT>
arma_warn_unused arma_inline eT* memptr();
arma_warn_unused arma_inline const eT* memptr() const;

arma_inline subview_row<eT> row(const uword row_num);
arma_inline const subview_row<eT> row(const uword row_num) const;

arma_inline subview_col<eT> col(const uword col_num);
arma_inline const subview_col<eT> col(const uword col_num) const;

arma_warn_unused arma_inline bool is_vec() const;

inline const Mat<eT>& fill(const eT val);
Expand Down
60 changes: 60 additions & 0 deletions inst/include/armadillo_bits/Mat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10746,6 +10746,66 @@ Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::memptr() const



template<typename eT>
template<uword fixed_n_rows, uword fixed_n_cols>
arma_inline
subview_row<eT>
Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::row(const uword row_num)
{
arma_debug_sigprint();

arma_conform_check_bounds( row_num >= fixed_n_rows, "Mat::row(): index out of bounds" );

return subview_row<eT>(*this, row_num);
}



template<typename eT>
template<uword fixed_n_rows, uword fixed_n_cols>
arma_inline
const subview_row<eT>
Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::row(const uword row_num) const
{
arma_debug_sigprint();

arma_conform_check_bounds( row_num >= fixed_n_rows, "Mat::row(): index out of bounds" );

return subview_row<eT>(*this, row_num);
}



template<typename eT>
template<uword fixed_n_rows, uword fixed_n_cols>
arma_inline
subview_col<eT>
Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::col(const uword col_num)
{
arma_debug_sigprint();

arma_conform_check_bounds( col_num >= fixed_n_cols, "Mat::col(): index out of bounds" );

return subview_col<eT>(*this, col_num);
}



template<typename eT>
template<uword fixed_n_rows, uword fixed_n_cols>
arma_inline
const subview_col<eT>
Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::col(const uword col_num) const
{
arma_debug_sigprint();

arma_conform_check_bounds( col_num >= fixed_n_cols, "Mat::col(): index out of bounds" );

return subview_col<eT>(*this, col_num);
}



template<typename eT>
template<uword fixed_n_rows, uword fixed_n_cols>
arma_inline
Expand Down
2 changes: 0 additions & 2 deletions inst/include/armadillo_bits/SpBase_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ struct SpBase
{
arma_inline const derived& get_ref() const;

arma_inline bool is_alias(const SpMat<elem_type>& X) const;

arma_warn_unused inline const SpOp<derived,spop_htrans> t() const; //!< Hermitian transpose
arma_warn_unused inline const SpOp<derived,spop_htrans> ht() const; //!< Hermitian transpose
arma_warn_unused inline const SpOp<derived,spop_strans> st() const; //!< simple transpose
Expand Down
10 changes: 0 additions & 10 deletions inst/include/armadillo_bits/SpBase_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ SpBase<elem_type,derived>::get_ref() const



template<typename elem_type, typename derived>
arma_inline
bool
SpBase<elem_type,derived>::is_alias(const SpMat<elem_type>& X) const
{
return (*this).get_ref().is_alias(X);
}



template<typename elem_type, typename derived>
inline
const SpOp<derived, spop_htrans>
Expand Down
3 changes: 2 additions & 1 deletion inst/include/armadillo_bits/SpGlue_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ struct SpGlue : public SpBase< typename T1::elem_type, SpGlue<T1, T2, spglue_typ
inline SpGlue(const T1& in_A, const T2& in_B, const elem_type in_aux);
inline ~SpGlue();

arma_inline bool is_alias(const SpMat<elem_type>& X) const;
template<typename eT2>
arma_inline bool is_alias(const SpMat<eT2>& X) const;

const T1& A; //!< first operand; must be derived from SpBase
const T2& B; //!< second operand; must be derived from SpBase
Expand Down
3 changes: 2 additions & 1 deletion inst/include/armadillo_bits/SpGlue_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ SpGlue<T1,T2,spglue_type>::~SpGlue()


template<typename T1, typename T2, typename spglue_type>
template<typename eT2>
arma_inline
bool
SpGlue<T1,T2,spglue_type>::is_alias(const SpMat<typename T1::elem_type>& X) const
SpGlue<T1,T2,spglue_type>::is_alias(const SpMat<eT2>& X) const
{
return (A.is_alias(X) || B.is_alias(X));
}
Expand Down
3 changes: 2 additions & 1 deletion inst/include/armadillo_bits/SpMat_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,8 @@ class SpMat : public SpBase< eT, SpMat<eT> >
template<typename eT2, typename T1, typename Functor> inline void init_xform_mt(const SpBase<eT2,T1>& x, const Functor& func);

//! don't use this unless you're writing internal Armadillo code
arma_inline bool is_alias(const SpMat<eT>& X) const;
template<typename eT2>
arma_inline bool is_alias(const SpMat<eT2>& X) const;


protected:
Expand Down
7 changes: 5 additions & 2 deletions inst/include/armadillo_bits/SpMat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6015,11 +6015,14 @@ SpMat<eT>::init_xform_mt(const SpBase<eT2,T1>& A, const Functor& func)


template<typename eT>
template<typename eT2>
arma_inline
bool
SpMat<eT>::is_alias(const SpMat<eT>& X) const
SpMat<eT>::is_alias(const SpMat<eT2>& X) const
{
return (&X == this);
arma_debug_sigprint();

return (is_same_type<eT,eT2>::yes) && (void_ptr(this) == void_ptr(&X));
}


Expand Down
3 changes: 2 additions & 1 deletion inst/include/armadillo_bits/SpOp_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ struct SpOp : public SpBase< typename T1::elem_type, SpOp<T1, op_type> >
inline SpOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
inline ~SpOp();

arma_inline bool is_alias(const SpMat<elem_type>& X) const;
template<typename eT2>
arma_inline bool is_alias(const SpMat<eT2>& X) const;

const T1& m; //!< the operand; must be derived from SpBase
elem_type aux; //!< auxiliary data, using the element type as used by T1
Expand Down
3 changes: 2 additions & 1 deletion inst/include/armadillo_bits/SpOp_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ SpOp<T1, op_type>::~SpOp()


template<typename T1, typename op_type>
template<typename eT2>
arma_inline
bool
SpOp<T1, op_type>::is_alias(const SpMat<typename T1::elem_type>& X) const
SpOp<T1, op_type>::is_alias(const SpMat<eT2>& X) const
{
return m.is_alias(X);
}
Expand Down
3 changes: 2 additions & 1 deletion inst/include/armadillo_bits/SpSubview_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ class SpSubview : public SpBase< eT, SpSubview<eT> >
inline const_row_iterator end_row(const uword row_num) const;

//! don't use this unless you're writing internal Armadillo code
arma_inline bool is_alias(const SpMat<eT>& X) const;
template<typename eT2>
arma_inline bool is_alias(const SpMat<eT2>& X) const;


private:
Expand Down
2 changes: 2 additions & 0 deletions inst/include/armadillo_bits/SpSubview_col_list_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ class SpSubview_col_list : public SpBase< eT, SpSubview_col_list<eT,T1> >
inline static void schur_inplace(SpMat<eT>& out, const SpSubview_col_list& in);
inline static void div_inplace(SpMat<eT>& out, const SpSubview_col_list& in);

template<typename eT2>
arma_inline bool is_alias(const SpMat<eT2>& X) const;

friend class SpMat<eT>;
};
Expand Down
11 changes: 11 additions & 0 deletions inst/include/armadillo_bits/SpSubview_col_list_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,4 +714,15 @@ SpSubview_col_list<eT,T1>::div_inplace(SpMat<eT>& out, const SpSubview_col_list&



template<typename eT, typename T1>
template<typename eT2>
arma_inline
bool
SpSubview_col_list<eT,T1>::is_alias(const SpMat<eT2>& X) const
{
return m.is_alias(X);
}



//! @}
3 changes: 2 additions & 1 deletion inst/include/armadillo_bits/SpSubview_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1786,9 +1786,10 @@ SpSubview<eT>::end_row(const uword row_num) const


template<typename eT>
template<typename eT2>
arma_inline
bool
SpSubview<eT>::is_alias(const SpMat<eT>& X) const
SpSubview<eT>::is_alias(const SpMat<eT2>& X) const
{
return m.is_alias(X);
}
Expand Down
2 changes: 1 addition & 1 deletion inst/include/armadillo_bits/arma_version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#define ARMA_VERSION_MAJOR 15
#define ARMA_VERSION_MINOR 4
#define ARMA_VERSION_PATCH 0
#define ARMA_VERSION_PATCH 1
#define ARMA_VERSION_NAME "Medium Roast Agave"


Expand Down
2 changes: 1 addition & 1 deletion inst/include/armadillo_bits/diskio_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ diskio::load_csv_ascii(Mat<eT>& x, std::istream& f, std::string& err_msg, const

try { x.zeros(f_n_rows, f_n_cols); } catch(...) { err_msg = "not enough memory"; return false; }

if(strict) { x.fill(Datum<eT>::nan); } // take into account that each row may have a unique number of columns
if(strict && is_real<eT>::yes) { x.fill(Datum<eT>::nan); } // take into account that each row may have a unique number of columns

const bool use_mp = (arma_config::openmp) && (f_n_rows >= 2) && (f_n_cols >= 64);

Expand Down
Loading
Loading