Skip to content

Commit a240666

Browse files
committed
Armadillo 15.6.2
1 parent 948ee9c commit a240666

4 files changed

Lines changed: 66 additions & 1 deletion

File tree

‎ChangeLog‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2026-10-16 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* inst/include/armadillo_bits/*: Armadillo 15.6.2
4+
15
2026-10-02 Dirk Eddelbuettel <edd@debian.org>
26

37
* DESCRIPTION (Version, Date): RcppArmadillo 15.6.1-1

‎inst/include/armadillo_bits/Mat_meat.hpp‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5504,6 +5504,18 @@ Mat<eT>::Mat(const eOp<T1, eop_type>& X)
55045504
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return; }
55055505
}
55065506

5507+
if(is_gen_eye<T1>::value && is_same_type<eop_type, eop_scalar_times>::value)
5508+
{
5509+
zeros();
5510+
5511+
const eT k = X.aux;
5512+
const uword N = (std::min)(n_rows, n_cols);
5513+
5514+
for(uword ii=0; ii < N; ++ii) { at(ii,ii) = k; }
5515+
5516+
return;
5517+
}
5518+
55075519
eop_type::apply(*this, X);
55085520
}
55095521

@@ -5534,6 +5546,18 @@ Mat<eT>::operator=(const eOp<T1, eop_type>& X)
55345546
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
55355547
}
55365548

5549+
if(is_gen_eye<T1>::value && is_same_type<eop_type, eop_scalar_times>::value)
5550+
{
5551+
zeros();
5552+
5553+
const eT k = X.aux;
5554+
const uword N = (std::min)(n_rows, n_cols);
5555+
5556+
for(uword ii=0; ii < N; ++ii) { at(ii,ii) = k; }
5557+
5558+
return *this;
5559+
}
5560+
55375561
eop_type::apply(*this, X);
55385562

55395563
return *this;
@@ -5563,6 +5587,18 @@ Mat<eT>::operator+=(const eOp<T1, eop_type>& X)
55635587
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_plus(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
55645588
}
55655589

5590+
if(is_gen_eye<T1>::value && is_same_type<eop_type, eop_scalar_times>::value)
5591+
{
5592+
arma_conform_assert_same_size(n_rows, n_cols, X.get_n_rows(), X.get_n_cols(), "addition");
5593+
5594+
const eT k = X.aux;
5595+
const uword N = (std::min)(n_rows, n_cols);
5596+
5597+
for(uword ii=0; ii < N; ++ii) { at(ii,ii) += k; }
5598+
5599+
return *this;
5600+
}
5601+
55665602
eop_type::apply_inplace_plus(*this, X);
55675603

55685604
return *this;
@@ -5592,6 +5628,18 @@ Mat<eT>::operator-=(const eOp<T1, eop_type>& X)
55925628
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_minus(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
55935629
}
55945630

5631+
if(is_gen_eye<T1>::value && is_same_type<eop_type, eop_scalar_times>::value)
5632+
{
5633+
arma_conform_assert_same_size(n_rows, n_cols, X.get_n_rows(), X.get_n_cols(), "subtraction");
5634+
5635+
const eT k = X.aux;
5636+
const uword N = (std::min)(n_rows, n_cols);
5637+
5638+
for(uword ii=0; ii < N; ++ii) { at(ii,ii) -= k; }
5639+
5640+
return *this;
5641+
}
5642+
55955643
eop_type::apply_inplace_minus(*this, X);
55965644

55975645
return *this;

‎inst/include/armadillo_bits/arma_version.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#define ARMA_VERSION_MAJOR 15
2525
#define ARMA_VERSION_MINOR 6
26-
#define ARMA_VERSION_PATCH 1
26+
#define ARMA_VERSION_PATCH 2
2727
#define ARMA_VERSION_NAME "Medium Roast Cortado"
2828

2929

‎inst/include/armadillo_bits/traits.hpp‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,19 @@ struct is_op_diagmat< const Op<T1,op_diagmat> >
444444
{ static constexpr bool value = true; };
445445

446446

447+
template<typename T>
448+
struct is_gen_eye
449+
{ static constexpr bool value = false; };
450+
451+
template<typename eT>
452+
struct is_gen_eye< Gen<Mat<eT>, gen_eye> >
453+
{ static constexpr bool value = true; };
454+
455+
template<typename eT>
456+
struct is_gen_eye< const Gen<Mat<eT>, gen_eye> >
457+
{ static constexpr bool value = true; };
458+
459+
447460
//
448461
//
449462

0 commit comments

Comments
 (0)