Skip to content

Commit

Permalink
Merge pull request #458 from RcppCore/feature/arma_14.2.0rc
Browse files Browse the repository at this point in the history
RcppArmadillo 14.2.0-1 with Armadillo 14.2.0
  • Loading branch information
eddelbuettel authored Nov 18, 2024
2 parents bb5aab7 + cacf478 commit 7b4bd34
Show file tree
Hide file tree
Showing 70 changed files with 1,654 additions and 694 deletions.
26 changes: 26 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
2024-11-16 Dirk Eddelbuettel <[email protected]>

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

2024-11-14 Dirk Eddelbuettel <[email protected]>

* inst/include/armadillo_bits/: Re-sync Armadillo 14.2.0-rc1

2024-11-07 Dirk Eddelbuettel <[email protected]>

* DESCRIPTION (Depends): Increase to Rcpp (>= 1.0.12) as it supplies
the required printf format change more current R versions need

* inst/include/armadillo_bits/: Re-sync Armadillo 14.2.0-rc0

2024-11-05 Dirk Eddelbuettel <[email protected]>

* inst/include/armadillo_bits/: Re-sync Armadillo 14.2.0-rc0

2024-11-03 Dirk Eddelbuettel <[email protected]>

* inst/include/armadillo_bits/: Armadillo 14.2.0-rc0

2024-09-29 Dirk Eddelbuettel <[email protected]>

* inst/include/RcppArmadillo/interface/RcppArmadilloAs.h: Add icube
Expand Down
6 changes: 3 additions & 3 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: 14.0.2-1.1
Date: 2024-09-10
Version: 14.2.0-1
Date: 2024-11-16
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0001-6419-907X")),
person("Romain", "Francois", role = "aut",
Expand All @@ -29,7 +29,7 @@ License: GPL (>= 2)
LazyLoad: yes
Depends: R (>= 3.3.0)
LinkingTo: Rcpp
Imports: Rcpp (>= 1.0.8), stats, utils, methods
Imports: Rcpp (>= 1.0.12), stats, utils, methods
Suggests: tinytest, Matrix (>= 1.3.0), pkgKitten, reticulate, slam
URL: https://github.com/RcppCore/RcppArmadillo, https://dirk.eddelbuettel.com/code/rcpp.armadillo.html
BugReports: https://github.com/RcppCore/RcppArmadillo/issues
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.71 for RcppArmadillo 14.0.2-0.
# Generated by GNU Autoconf 2.71 for RcppArmadillo 14.2.0-1.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -610,8 +610,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='RcppArmadillo'
PACKAGE_TARNAME='rcpparmadillo'
PACKAGE_VERSION='14.0.2-0'
PACKAGE_STRING='RcppArmadillo 14.0.2-0'
PACKAGE_VERSION='14.2.0-1'
PACKAGE_STRING='RcppArmadillo 14.2.0-1'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL=''

Expand Down Expand Up @@ -1229,7 +1229,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 14.0.2-0 to adapt to many kinds of systems.
\`configure' configures RcppArmadillo 14.2.0-1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1291,7 +1291,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of RcppArmadillo 14.0.2-0:";;
short | recursive ) echo "Configuration of RcppArmadillo 14.2.0-1:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1372,7 +1372,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
RcppArmadillo configure 14.0.2-0
RcppArmadillo configure 14.2.0-1
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1486,7 +1486,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 14.0.2-0, which was
It was created by RcppArmadillo $as_me 14.2.0-1, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3944,7 +3944,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 14.0.2-0, which was
This file was extended by RcppArmadillo $as_me 14.2.0-1, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -3999,7 +3999,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 14.0.2-0
RcppArmadillo config.status 14.2.0-1
configured by $0, generated by GNU Autoconf 2.71,
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],[14.0.2-0],[[email protected]])
AC_INIT([RcppArmadillo],[14.2.0-1],[[email protected]])

## Set R_HOME, respecting an environment variable if one is set
: ${R_HOME=$(R RHOME)}
Expand Down
17 changes: 17 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
\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 14.2.0-1 (2024-11-16)}{
\itemize{
\item Upgraded to Armadillo release 14.2.0 (Smooth Caffeine)
\itemize{
\item Faster handling of symmetric matrices by \code{inv()} and
\code{rcond()}
\item Faster handling of hermitian matrices by \code{inv()},
\code{rcond()}, \code{cond()}, \code{pinv()}, \code{rank()}
\item Added \code{solve_opts::force_sym} option to \code{solve()} to
force the use of the symmetric solver
\item More efficient handling of compound expressions by \code{solve()}
}
\item Added exporter specialisation for \code{icube} for the
\code{ARMA_64BIT_WORD} case
}
}

\section{Changes in RcppArmadillo version 14.0.2-1 (2024-09-11)}{
\itemize{
\item Upgraded to Armadillo release 14.0.2 (Stochastic Parrot)
Expand Down
8 changes: 4 additions & 4 deletions inst/include/armadillo_bits/Base_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ struct Base
arma_warn_unused inline elem_type min() const;
arma_warn_unused inline elem_type max() const;

inline elem_type min(uword& index_of_min_val) const;
inline elem_type max(uword& index_of_max_val) const;
arma_frown("use .index_min() instead") inline elem_type min(uword& index_of_min_val) const;
arma_frown("use .index_max() instead") inline elem_type max(uword& index_of_max_val) const;

inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
arma_deprecated inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
arma_deprecated inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;

arma_warn_unused inline uword index_min() const;
arma_warn_unused inline uword index_max() const;
Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/CubeToMatOp_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class CubeToMatOp : public Base< typename T1::elem_type, CubeToMatOp<T1, op_type
arma_aligned const T1& m; //!< the operand; must be derived from BaseCube
arma_aligned uword aux_uword; //!< auxiliary data, uword format

template<typename eT2>
constexpr bool is_alias(const Mat<eT2>&) const { return false; }

static constexpr bool is_row = op_type::template traits<T1>::is_row;
static constexpr bool is_col = op_type::template traits<T1>::is_col;
static constexpr bool is_xvec = op_type::template traits<T1>::is_xvec;
Expand Down
9 changes: 4 additions & 5 deletions inst/include/armadillo_bits/Cube_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,11 @@ class Cube : public BaseCube< eT, Cube<eT> >
arma_warn_unused inline eT min() const;
arma_warn_unused inline eT max() const;

inline eT min(uword& index_of_min_val) const;
inline eT max(uword& index_of_max_val) const;

inline eT min(uword& row_of_min_val, uword& col_of_min_val, uword& slice_of_min_val) const;
inline eT max(uword& row_of_max_val, uword& col_of_max_val, uword& slice_of_max_val) const;
arma_frown("use .index_min() instead") inline eT min(uword& index_of_min_val) const;
arma_frown("use .index_max() instead") inline eT max(uword& index_of_max_val) const;

arma_deprecated inline eT min(uword& row_of_min_val, uword& col_of_min_val, uword& slice_of_min_val) const;
arma_deprecated inline eT max(uword& row_of_max_val, uword& col_of_max_val, uword& slice_of_max_val) const;

arma_cold inline bool save(const std::string name, const file_type type = arma_binary) const;
arma_cold inline bool save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/Gen_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class Gen
inline void apply_inplace_div (Mat<elem_type>& out) const;

inline void apply(subview<elem_type>& out) const;

template<typename eT2>
constexpr bool is_alias(const Mat<eT2>&) const { return false; }
};


Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/Glue_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class Glue
inline Glue(const T1& in_A, const T2& in_B, const uword in_aux_uword);
inline ~Glue();

template<typename eT2>
inline bool is_alias(const Mat<eT2>& X) const;

const T1& A; //!< first operand; must be derived from Base
const T2& B; //!< second operand; must be derived from Base
uword aux_uword; //!< storage of auxiliary data, uword format
Expand Down
13 changes: 13 additions & 0 deletions inst/include/armadillo_bits/Glue_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,17 @@ Glue<T1,T2,glue_type>::~Glue()



template<typename T1, typename T2, typename glue_type>
template<typename eT2>
inline
bool
Glue<T1,T2,glue_type>::is_alias(const Mat<eT2>& X) const
{
arma_debug_sigprint();

return (A.is_alias(X) || B.is_alias(X));
}



//! @}
11 changes: 7 additions & 4 deletions inst/include/armadillo_bits/Mat_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,11 @@ class Mat : public Base< eT, Mat<eT> >
arma_warn_unused inline eT min() const;
arma_warn_unused inline eT max() const;

inline eT min(uword& index_of_min_val) const;
inline eT max(uword& index_of_max_val) const;
arma_frown("use .index_min() instead") inline eT min(uword& index_of_min_val) const;
arma_frown("use .index_max() instead") inline eT max(uword& index_of_max_val) const;

inline eT min(uword& row_of_min_val, uword& col_of_min_val) const;
inline eT max(uword& row_of_max_val, uword& col_of_max_val) const;
arma_deprecated inline eT min(uword& row_of_min_val, uword& col_of_min_val) const;
arma_deprecated inline eT max(uword& row_of_max_val, uword& col_of_max_val) const;


arma_cold inline bool save(const std::string name, const file_type type = arma_binary) const;
Expand Down Expand Up @@ -771,6 +771,9 @@ class Mat : public Base< eT, Mat<eT> >

inline void steal_mem_col(Mat& X, const uword max_n_rows);

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


template<uword fixed_n_rows, uword fixed_n_cols> class fixed;

Expand Down
13 changes: 13 additions & 0 deletions inst/include/armadillo_bits/Mat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,19 @@ Mat<eT>::steal_mem_col(Mat<eT>& x, const uword max_n_rows)



template<typename eT>
template<typename eT2>
arma_inline
bool
Mat<eT>::is_alias(const Mat<eT2>& X) const
{
arma_debug_sigprint();

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



//! construct a matrix from a given auxiliary array of eTs.
//! if copy_aux_mem is true, new memory is allocated and the array is copied.
//! if copy_aux_mem is false, the auxiliary array is used directly (without allocating memory and copying).
Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/Op_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class Op
inline Op(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
inline ~Op();

template<typename eT2>
inline bool is_alias(const Mat<eT2>& X) const;

arma_aligned const T1& m; //!< the operand; must be derived from Base
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
Expand Down
13 changes: 13 additions & 0 deletions inst/include/armadillo_bits/Op_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,17 @@ Op<T1, op_type>::~Op()



template<typename T1, typename op_type>
template<typename eT2>
inline
bool
Op<T1, op_type>::is_alias(const Mat<eT2>& X) const
{
arma_debug_sigprint();

return m.is_alias(X);
}



//! @}
16 changes: 8 additions & 8 deletions inst/include/armadillo_bits/Proxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ struct Proxy< Mat<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&Q) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
Expand Down Expand Up @@ -235,7 +235,7 @@ struct Proxy< Col<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&Q) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
Expand Down Expand Up @@ -282,7 +282,7 @@ struct Proxy< Row<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&Q) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
Expand Down Expand Up @@ -1013,7 +1013,7 @@ struct Proxy< subview<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
Expand Down Expand Up @@ -1060,7 +1060,7 @@ struct Proxy< subview_col<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
Expand Down Expand Up @@ -1109,7 +1109,7 @@ struct Proxy< subview_cols<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(sv.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(sv.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return sv.check_overlap(X); }
Expand Down Expand Up @@ -1156,7 +1156,7 @@ struct Proxy< subview_row<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
Expand Down Expand Up @@ -1304,7 +1304,7 @@ struct Proxy< diagview<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
Expand Down
8 changes: 4 additions & 4 deletions inst/include/armadillo_bits/SpBase_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ struct SpBase
arma_warn_unused inline elem_type min() const;
arma_warn_unused inline elem_type max() const;

inline elem_type min(uword& index_of_min_val) const;
inline elem_type max(uword& index_of_max_val) const;
arma_frown("use .index_min() instead") inline elem_type min(uword& index_of_min_val) const;
arma_frown("use .index_max() instead") inline elem_type max(uword& index_of_max_val) const;

inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
arma_deprecated inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
arma_deprecated inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;

arma_warn_unused inline uword index_min() const;
arma_warn_unused inline uword index_max() const;
Expand Down
Loading

0 comments on commit 7b4bd34

Please sign in to comment.