Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
strategy:
matrix:
include:
- { name: container, os: ubuntu-latest, container: rocker/r2u4ci }
#- { name: container, os: ubuntu-latest, container: rocker/r2u4ci }
- { name: macos, os: macos-latest, openmp: yes }
#- { name: macos, os: macos-latest, openmp: no }
#- { name: ubuntu, os: ubuntu-latest }
- { name: ubuntu, os: ubuntu-latest }


runs-on: ${{ matrix.os }}
Expand Down
8 changes: 7 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
2026-04-16 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll micro version and date

* inst/include/armadillo_bits/: Sync with Armadillo 15.2.5

2026-04-11 Dirk Eddelbuettel <edd@debian.org>

* README.md (Rcpp): Updated status section

2026-03-26 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll minor version and date
* DESCRIPTION (Version, Date): Roll micro version and date

* cleanup: No longer remove vignettes/*.pdf

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.2.4-1.2
Date: 2026-03-26
Version: 15.2.4.99-0
Date: 2026-04-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",
Expand Down
54 changes: 42 additions & 12 deletions inst/include/armadillo_bits/BaseCube_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ BaseCube<elem_type,derived>::is_zero(const typename get_pod_type<elem_type>::res

typedef typename get_pod_type<elem_type>::result T;

arma_conform_check( (tol < T(0)), "is_zero(): parameter 'tol' must be >= 0" );
arma_conform_check( ((tol >= T(0)) == false), "is_zero(): parameter 'tol' must be >= 0" );

if(ProxyCube<derived>::use_at || is_Cube<typename ProxyCube<derived>::stored_type>::value)
if(is_Cube<typename ProxyCube<derived>::stored_type>::value || ProxyCube<derived>::use_at)
{
const unwrap_cube<derived> U( (*this).get_ref() );

Expand All @@ -263,22 +263,52 @@ BaseCube<elem_type,derived>::is_zero(const typename get_pod_type<elem_type>::res

if(is_cx<elem_type>::yes)
{
for(uword i=0; i<n_elem; ++i)
if(tol == T(0))
{
const elem_type val = Pea[i];

const T val_real = access::tmp_real(val);
const T val_imag = access::tmp_imag(val);

if(eop_aux::arma_abs(val_real) > tol) { return false; }
if(eop_aux::arma_abs(val_imag) > tol) { return false; }
for(uword i=0; i < n_elem; ++i)
{
const elem_type val = Pea[i];

const T val_real = access::tmp_real(val);
const T val_imag = access::tmp_imag(val);

if(eop_aux::arma_abs(val_real) != T(0)) { return false; }
if(eop_aux::arma_abs(val_imag) != T(0)) { return false; }
}
}
else
{
for(uword i=0; i < n_elem; ++i)
{
const elem_type val = Pea[i];

const T val_real = access::tmp_real(val);
const T val_imag = access::tmp_imag(val);

if( (eop_aux::arma_abs(val_real) <= tol) == false ) { return false; }
if( (eop_aux::arma_abs(val_imag) <= tol) == false ) { return false; }
}
}
}
else // not complex
{
for(uword i=0; i < n_elem; ++i)
if(tol == T(0))
{
for(uword i=0; i < n_elem; ++i)
{
const elem_type val = Pea[i];

if(val != elem_type(0)) { return false; }
}
}
else
{
if(eop_aux::arma_abs(Pea[i]) > tol) { return false; }
for(uword i=0; i < n_elem; ++i)
{
const elem_type val = Pea[i];

if( (eop_aux::arma_abs(val) <= tol) == false ) { return false; }
}
}
}

Expand Down
60 changes: 45 additions & 15 deletions inst/include/armadillo_bits/Base_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Base<elem_type,derived>::is_symmetric(const typename get_pod_type<elem_type>::re

if(tol == T(0)) { return (*this).is_symmetric(); }

arma_conform_check( (tol < T(0)), "is_symmetric(): parameter 'tol' must be >= 0" );
arma_conform_check( ((tol >= T(0)) == false), "is_symmetric(): parameter 'tol' must be >= 0" );

const quasi_unwrap<derived> U( (*this).get_ref() );

Expand Down Expand Up @@ -435,7 +435,7 @@ Base<elem_type,derived>::is_hermitian(const typename get_pod_type<elem_type>::re

if(tol == T(0)) { return (*this).is_hermitian(); }

arma_conform_check( (tol < T(0)), "is_hermitian(): parameter 'tol' must be >= 0" );
arma_conform_check( ((tol >= T(0)) == false), "is_hermitian(): parameter 'tol' must be >= 0" );

const quasi_unwrap<derived> U( (*this).get_ref() );

Expand Down Expand Up @@ -464,9 +464,9 @@ Base<elem_type,derived>::is_zero(const typename get_pod_type<elem_type>::result

typedef typename get_pod_type<elem_type>::result T;

arma_conform_check( (tol < T(0)), "is_zero(): parameter 'tol' must be >= 0" );
arma_conform_check( ((tol >= T(0)) == false), "is_zero(): parameter 'tol' must be >= 0" );

if(Proxy<derived>::use_at || is_Mat<typename Proxy<derived>::stored_type>::value)
if( (quasi_unwrap<derived>::has_orig_mem) || (is_Mat<typename Proxy<derived>::stored_type>::value) || (Proxy<derived>::use_at) )
{
const quasi_unwrap<derived> U( (*this).get_ref() );

Expand All @@ -483,22 +483,52 @@ Base<elem_type,derived>::is_zero(const typename get_pod_type<elem_type>::result

if(is_cx<elem_type>::yes)
{
for(uword i=0; i<n_elem; ++i)
if(tol == T(0))
{
const elem_type val = Pea[i];

const T val_real = access::tmp_real(val);
const T val_imag = access::tmp_imag(val);

if(eop_aux::arma_abs(val_real) > tol) { return false; }
if(eop_aux::arma_abs(val_imag) > tol) { return false; }
for(uword i=0; i < n_elem; ++i)
{
const elem_type val = Pea[i];

const T val_real = access::tmp_real(val);
const T val_imag = access::tmp_imag(val);

if(eop_aux::arma_abs(val_real) != T(0)) { return false; }
if(eop_aux::arma_abs(val_imag) != T(0)) { return false; }
}
}
else
{
for(uword i=0; i < n_elem; ++i)
{
const elem_type val = Pea[i];

const T val_real = access::tmp_real(val);
const T val_imag = access::tmp_imag(val);

if( (eop_aux::arma_abs(val_real) <= tol) == false ) { return false; }
if( (eop_aux::arma_abs(val_imag) <= tol) == false ) { return false; }
}
}
}
else // not complex
{
for(uword i=0; i<n_elem; ++i)
if(tol == T(0))
{
for(uword i=0; i < n_elem; ++i)
{
const elem_type val = Pea[i];

if(val != elem_type(0)) { return false; }
}
}
else
{
if(eop_aux::arma_abs(Pea[i]) > tol) { return false; }
for(uword i=0; i < n_elem; ++i)
{
const elem_type val = Pea[i];

if( (eop_aux::arma_abs(val) <= tol) == false ) { return false; }
}
}
}

Expand Down Expand Up @@ -917,7 +947,7 @@ Base_extra_yes<elem_type,derived>::is_sympd(typename get_pod_type<elem_type>::re

typedef typename get_pod_type<elem_type>::result T;

arma_conform_check( (tol < T(0)), "is_sympd(): parameter 'tol' must be >= 0" );
arma_conform_check( ((tol >= T(0)) == false), "is_sympd(): parameter 'tol' must be >= 0" );

Mat<elem_type> X = static_cast<const derived&>(*this);

Expand Down
6 changes: 3 additions & 3 deletions inst/include/armadillo_bits/Cube_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4187,12 +4187,12 @@ Cube<eT>::clamp(const eT min_val, const eT max_val)

if(is_cx<eT>::no)
{
arma_conform_check( (access::tmp_real(min_val) > access::tmp_real(max_val)), "Cube::clamp(): min_val must be less than max_val" );
arma_conform_check( ((access::tmp_real(min_val) <= access::tmp_real(max_val)) == false), "Cube::clamp(): min_val must be less than max_val" );
}
else
{
arma_conform_check( (access::tmp_real(min_val) > access::tmp_real(max_val)), "Cube::clamp(): real(min_val) must be less than real(max_val)" );
arma_conform_check( (access::tmp_imag(min_val) > access::tmp_imag(max_val)), "Cube::clamp(): imag(min_val) must be less than imag(max_val)" );
arma_conform_check( ((access::tmp_real(min_val) <= access::tmp_real(max_val)) == false), "Cube::clamp(): real(min_val) must be less than real(max_val)" );
arma_conform_check( ((access::tmp_imag(min_val) <= access::tmp_imag(max_val)) == false), "Cube::clamp(): imag(min_val) must be less than imag(max_val)" );
}

arrayops::clamp(memptr(), n_elem, min_val, max_val);
Expand Down
6 changes: 3 additions & 3 deletions inst/include/armadillo_bits/Mat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7885,12 +7885,12 @@ Mat<eT>::clamp(const eT min_val, const eT max_val)

if(is_cx<eT>::no)
{
arma_conform_check( (access::tmp_real(min_val) > access::tmp_real(max_val)), "Mat::clamp(): min_val must be less than max_val" );
arma_conform_check( ((access::tmp_real(min_val) <= access::tmp_real(max_val)) == false), "Mat::clamp(): min_val must be less than max_val" );
}
else
{
arma_conform_check( (access::tmp_real(min_val) > access::tmp_real(max_val)), "Mat::clamp(): real(min_val) must be less than real(max_val)" );
arma_conform_check( (access::tmp_imag(min_val) > access::tmp_imag(max_val)), "Mat::clamp(): imag(min_val) must be less than imag(max_val)" );
arma_conform_check( ((access::tmp_real(min_val) <= access::tmp_real(max_val)) == false), "Mat::clamp(): real(min_val) must be less than real(max_val)" );
arma_conform_check( ((access::tmp_imag(min_val) <= access::tmp_imag(max_val)) == false), "Mat::clamp(): imag(min_val) must be less than imag(max_val)" );
}

arrayops::clamp(memptr(), n_elem, min_val, max_val);
Expand Down
8 changes: 4 additions & 4 deletions inst/include/armadillo_bits/SpBase_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ SpBase<elem_type,derived>::is_zero(const typename get_pod_type<elem_type>::resul

typedef typename get_pod_type<elem_type>::result T;

arma_conform_check( (tol < T(0)), "is_zero(): parameter 'tol' must be >= 0" );
arma_conform_check( ((tol >= T(0)) == false), "is_zero(): parameter 'tol' must be >= 0" );

const SpProxy<derived> P( (*this).get_ref() );

Expand All @@ -554,8 +554,8 @@ SpBase<elem_type,derived>::is_zero(const typename get_pod_type<elem_type>::resul
const T val_real = access::tmp_real(val);
const T val_imag = access::tmp_imag(val);

if(eop_aux::arma_abs(val_real) > tol) { return false; }
if(eop_aux::arma_abs(val_imag) > tol) { return false; }
if( (eop_aux::arma_abs(val_real) <= tol) == false ) { return false; }
if( (eop_aux::arma_abs(val_imag) <= tol) == false ) { return false; }

++it;
}
Expand All @@ -564,7 +564,7 @@ SpBase<elem_type,derived>::is_zero(const typename get_pod_type<elem_type>::resul
{
while(it != it_end)
{
if(eop_aux::arma_abs(*it) > tol) { return false; }
if( (eop_aux::arma_abs(*it) <= tol) == false ) { return false; }

++it;
}
Expand Down
14 changes: 7 additions & 7 deletions inst/include/armadillo_bits/SpMat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3565,7 +3565,7 @@ SpMat<eT>::is_symmetric(const typename get_pod_type<elem_type>::result tol) cons

if(tol == T(0)) { return (*this).is_symmetric(); }

arma_conform_check( (tol < T(0)), "is_symmetric(): parameter 'tol' must be >= 0" );
arma_conform_check( ((tol >= T(0)) == false), "is_symmetric(): parameter 'tol' must be >= 0" );

const SpMat<eT>& A = (*this);

Expand Down Expand Up @@ -3611,7 +3611,7 @@ SpMat<eT>::is_hermitian(const typename get_pod_type<elem_type>::result tol) cons

if(tol == T(0)) { return (*this).is_hermitian(); }

arma_conform_check( (tol < T(0)), "is_hermitian(): parameter 'tol' must be >= 0" );
arma_conform_check( ((tol >= T(0)) == false), "is_hermitian(): parameter 'tol' must be >= 0" );

const SpMat<eT>& A = (*this);

Expand Down Expand Up @@ -4204,12 +4204,12 @@ SpMat<eT>::clamp(const eT min_val, const eT max_val)

if(is_cx<eT>::no)
{
arma_conform_check( (access::tmp_real(min_val) > access::tmp_real(max_val)), "SpMat::clamp(): min_val must be less than max_val" );
arma_conform_check( ((access::tmp_real(min_val) <= access::tmp_real(max_val)) == false), "SpMat::clamp(): min_val must be less than max_val" );
}
else
{
arma_conform_check( (access::tmp_real(min_val) > access::tmp_real(max_val)), "SpMat::clamp(): real(min_val) must be less than real(max_val)" );
arma_conform_check( (access::tmp_imag(min_val) > access::tmp_imag(max_val)), "SpMat::clamp(): imag(min_val) must be less than imag(max_val)" );
arma_conform_check( ((access::tmp_real(min_val) <= access::tmp_real(max_val)) == false), "SpMat::clamp(): real(min_val) must be less than real(max_val)" );
arma_conform_check( ((access::tmp_imag(min_val) <= access::tmp_imag(max_val)) == false), "SpMat::clamp(): imag(min_val) must be less than imag(max_val)" );
}

if(n_nonzero == 0) { return *this; }
Expand Down Expand Up @@ -4389,7 +4389,7 @@ SpMat<eT>::sprandu(const uword in_rows, const uword in_cols, const double densit
{
arma_debug_sigprint();

arma_conform_check( ( (density < double(0)) || (density > double(1)) ), "sprandu(): density must be in the [0,1] interval" );
arma_conform_check( ( ((density >= double(0)) == false) || ((density <= double(1)) == false) ), "sprandu(): density must be in the [0,1] interval" );

const uword new_n_nonzero = uword(density * double(in_rows) * double(in_cols) + 0.5);

Expand Down Expand Up @@ -4466,7 +4466,7 @@ SpMat<eT>::sprandn(const uword in_rows, const uword in_cols, const double densit
{
arma_debug_sigprint();

arma_conform_check( ( (density < double(0)) || (density > double(1)) ), "sprandn(): density must be in the [0,1] interval" );
arma_conform_check( ( ((density >= double(0)) == false) || ((density <= double(1)) == false) ), "sprandn(): density must be in the [0,1] interval" );

const uword new_n_nonzero = uword(density * double(in_rows) * double(in_cols) + 0.5);

Expand Down
6 changes: 3 additions & 3 deletions inst/include/armadillo_bits/SpSubview_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,12 +946,12 @@ SpSubview<eT>::clamp(const eT min_val, const eT max_val)

if(is_cx<eT>::no)
{
arma_conform_check( (access::tmp_real(min_val) > access::tmp_real(max_val)), "SpSubview::clamp(): min_val must be less than max_val" );
arma_conform_check( ((access::tmp_real(min_val) <= access::tmp_real(max_val)) == false), "SpSubview::clamp(): min_val must be less than max_val" );
}
else
{
arma_conform_check( (access::tmp_real(min_val) > access::tmp_real(max_val)), "SpSubview::clamp(): real(min_val) must be less than real(max_val)" );
arma_conform_check( (access::tmp_imag(min_val) > access::tmp_imag(max_val)), "SpSubview::clamp(): imag(min_val) must be less than imag(max_val)" );
arma_conform_check( ((access::tmp_real(min_val) <= access::tmp_real(max_val)) == false), "SpSubview::clamp(): real(min_val) must be less than real(max_val)" );
arma_conform_check( ((access::tmp_imag(min_val) <= access::tmp_imag(max_val)) == false), "SpSubview::clamp(): imag(min_val) must be less than imag(max_val)" );
}

if((n_elem == 0) || (n_nonzero == 0)) { return; }
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 2
#define ARMA_VERSION_PATCH 4
#define ARMA_VERSION_PATCH 5
#define ARMA_VERSION_NAME "Medium Roast Deluxe"


Expand Down
6 changes: 3 additions & 3 deletions inst/include/armadillo_bits/arrayops_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ arrayops::is_zero(const eT* mem, const uword n_elem, const eT abs_limit, const t
{
for(uword i=0; i<n_elem; ++i)
{
if(eop_aux::arma_abs(mem[i]) > abs_limit) { return false; }
if( (eop_aux::arma_abs(mem[i]) <= abs_limit) == false ) { return false; }
}
}

Expand Down Expand Up @@ -1028,8 +1028,8 @@ arrayops::is_zero(const std::complex<T>* mem, const uword n_elem, const T abs_li
{
const eT& val = mem[i];

if(std::abs(std::real(val)) > abs_limit) { return false; }
if(std::abs(std::imag(val)) > abs_limit) { return false; }
if( (std::abs(std::real(val)) <= abs_limit) == false ) { return false; }
if( (std::abs(std::imag(val)) <= abs_limit) == false ) { return false; }
}
}

Expand Down
Loading