Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bool form signature of several callback methods #382

Merged
merged 2 commits into from
Nov 10, 2023
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
4 changes: 3 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### ensmallen ?.??.?: "???"
###### ????-??-??
* Fix return types of callbacks
([#382](https://github.com/mlpack/ensmallen/pull/382)).

### ensmallen 2.20.0: "Stripped Bolt Head"
###### 2023-10-02
Expand Down Expand Up @@ -36,7 +38,7 @@

* Add AdaSqrt optimizer
([#234](https://github.com/mlpack/ensmallen/pull/234)).

* Bump check for minimum supported version of Armadillo
([#342](https://github.com/mlpack/ensmallen/pull/342)).

Expand Down
12 changes: 6 additions & 6 deletions include/ensmallen_bits/callbacks/traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct TypedForms
//! This is the form of a bool Evaluate() callback method.
template<typename CallbackType>
using EvaluateBoolForm =
void(CallbackType::*)(OptimizerType&,
bool(CallbackType::*)(OptimizerType&,
FunctionType&,
const MatType&,
const double);
Expand All @@ -65,7 +65,7 @@ struct TypedForms
//! This is the form of a bool EvaluateConstraint() callback method.
template<typename CallbackType>
using EvaluateConstraintBoolForm =
void(CallbackType::*)(OptimizerType&,
bool(CallbackType::*)(OptimizerType&,
FunctionType&,
const MatType&,
const size_t,
Expand All @@ -83,7 +83,7 @@ struct TypedForms
//! This is the form of a bool Gradient() callback method.
template<typename CallbackType>
using GradientBoolForm =
void(CallbackType::*)(OptimizerType&,
bool(CallbackType::*)(OptimizerType&,
FunctionType&,
const MatType&,
const MatType&);
Expand All @@ -92,7 +92,7 @@ struct TypedForms
//! is modifiable.
template<typename CallbackType>
using GradientBoolModifiableForm =
void(CallbackType::*)(OptimizerType&,
bool(CallbackType::*)(OptimizerType&,
FunctionType&,
const MatType&,
MatType&);
Expand All @@ -117,7 +117,7 @@ struct TypedForms
//! This is the form of a bool GradientConstraint() callback method.
template<typename CallbackType>
using GradientConstraintBoolForm =
void(CallbackType::*)(OptimizerType&,
bool(CallbackType::*)(OptimizerType&,
FunctionType&,
const MatType&,
const size_t,
Expand All @@ -127,7 +127,7 @@ struct TypedForms
//! gradient is modifiable.
template<typename CallbackType>
using GradientConstraintBoolModifiableForm =
void(CallbackType::*)(OptimizerType&,
bool(CallbackType::*)(OptimizerType&,
FunctionType&,
const MatType&,
const size_t,
Expand Down