Skip to content

Commit

Permalink
Upgrade ensmallen to 2.22.0 (#65)
Browse files Browse the repository at this point in the history
* Upgrade ensmallen to 2.22.0

* Add local patch of changes sent upstream

* Add revdep check update

---------

Co-authored-by: coatless <[email protected]>
Co-authored-by: [email protected] <[email protected]>
  • Loading branch information
3 people authored Nov 30, 2024
1 parent 8101425 commit 84f286d
Show file tree
Hide file tree
Showing 38 changed files with 4,801 additions and 87 deletions.
16 changes: 16 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
2024-11-29 James Balamuta <[email protected]>

* inst/include/ensmallen_bits/agemoea/agemoea.hpp: removed unused private field variable
* inst/include/problems/dtlz/dtlz2_function.hpp: removed unused variable.
* inst/include/problems/dtlz/dtlz4_function.hpp: ditto
* inst/include/problems/dtlz/dtlz5_function.hpp: ditto
* inst/include/problems/dtlz/dtlz6_function.hpp: ditto
* inst/include/problems/dtlz/dtlz7_function.hpp: ditto
* inst/include/problems/maf/maf5_function.hpp: ditto
* inst/include/problems/maf/maf6_function.hpp: ditto

* DESCRIPTION (Version): Release 2.22.0
* NEWS.md: Update for Ensmallen release 2.22.0
* inst/include/ensmallen_bits: Upgraded to Ensmallen 2.22.0
* inst/include/ensmallen.hpp: ditto

2024-02-16 James Balamuta <[email protected]>

* DESCRIPTION (Version): Release 2.21.1
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: RcppEnsmallen
Title: Header-Only C++ Mathematical Optimization Library for 'Armadillo'
Version: 0.2.21.1.1
Version: 0.2.22.0.1
Authors@R: c(
person("James Joseph", "Balamuta", email = "[email protected]",
role = c("aut", "cre", "cph"),
Expand Down
14 changes: 14 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# RcppEnsmallen 0.2.22.0.1

- Upgraded to ensmallen 2.22.0: "E-Bike Excitement" (2024-11-29)
- Update to C++14 standard
([#400](https://github.com/mlpack/ensmallen/pull/400)).
- Bump minimum Armadillo version to 10.8
([#404](https://github.com/mlpack/ensmallen/pull/404)).
- For Armadillo 14.2.0 switch to `.index_min()` and `.index_max()`
([#409](https://github.com/mlpack/ensmallen/pull/409)).
- Added IPOP and BIPOP restart mechanisms for CMA-ES.
([#403](https://github.com/mlpack/ensmallen/pull/403)).
- Addressed uninitialized variable and private field warnings
([#65](https://github.com/coatless-rpkg/rcppensmallen/pull/65))

# RcppEnsmallen 0.2.21.1.1

- Upgraded to ensmallen 2.21.1: "Bent Antenna" (2024-02-16)
Expand Down
30 changes: 19 additions & 11 deletions inst/include/ensmallen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,27 @@
#ifndef ENSMALLEN_HPP
#define ENSMALLEN_HPP

// certain compilers are way behind the curve
#if (defined(_MSVC_LANG) && (_MSVC_LANG >= 201402L))
#undef ARMA_USE_CXX11
#define ARMA_USE_CXX11
#undef ENS_HAVE_CXX14

#if (__cplusplus >= 201402L)
#define ENS_HAVE_CXX14
#endif

#include <armadillo>
#if defined(_MSVC_LANG)
#if (_MSVC_LANG >= 201402L)
#undef ENS_HAVE_CXX14
#define ENS_HAVE_CXX14
#endif
#endif

#if !defined(ARMA_USE_CXX11)
// armadillo automatically enables ARMA_USE_CXX11
// when a C++11/C++14/C++17/etc compiler is detected
#error "please enable C++11/C++14 mode in your compiler"
#if !defined(ENS_HAVE_CXX14)
#error "*** C++14 compiler required; enable C++14 mode in your compiler, or use an earlier version of ensmallen"
#endif

#if ((ARMA_VERSION_MAJOR < 9) || ((ARMA_VERSION_MAJOR == 9) && (ARMA_VERSION_MINOR < 800)))
#error "need Armadillo version 9.800 or later"
#include <armadillo>

#if ((ARMA_VERSION_MAJOR < 10) || ((ARMA_VERSION_MAJOR == 10) && (ARMA_VERSION_MINOR < 8)))
#error "need Armadillo version 10.8 or newer"
#endif

#include <cctype>
Expand Down Expand Up @@ -66,6 +71,7 @@
#include "ensmallen_bits/utility/any.hpp"
#include "ensmallen_bits/utility/arma_traits.hpp"
#include "ensmallen_bits/utility/indicators/epsilon.hpp"
#include "ensmallen_bits/utility/indicators/igd.hpp"
#include "ensmallen_bits/utility/indicators/igd_plus.hpp"

// Contains traits, must be placed before report callback.
Expand Down Expand Up @@ -98,6 +104,7 @@
#include "ensmallen_bits/bigbatch_sgd/bigbatch_sgd.hpp"
#include "ensmallen_bits/cmaes/cmaes.hpp"
#include "ensmallen_bits/cmaes/active_cmaes.hpp"
#include "ensmallen_bits/cmaes/pop_cmaes.hpp"
#include "ensmallen_bits/cd/cd.hpp"
#include "ensmallen_bits/cne/cne.hpp"
#include "ensmallen_bits/de/de.hpp"
Expand All @@ -111,6 +118,7 @@
#include "ensmallen_bits/katyusha/katyusha.hpp"
#include "ensmallen_bits/lbfgs/lbfgs.hpp"
#include "ensmallen_bits/lookahead/lookahead.hpp"
#include "ensmallen_bits/agemoea/agemoea.hpp"
#include "ensmallen_bits/moead/moead.hpp"
#include "ensmallen_bits/nsga2/nsga2.hpp"
#include "ensmallen_bits/padam/padam.hpp"
Expand Down
Loading

0 comments on commit 84f286d

Please sign in to comment.