[mlpack-git] master: Add SFINAE pattern for the RecurrentParameter function. (2e59b7d)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Fri Nov 13 12:45:42 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/0f4e83dc9cc4dcdc315d2cceee32b23ebab114c2...7388de71d5398103ee3a0b32b4026902a40a67b3

>---------------------------------------------------------------

commit 2e59b7d2740c9ceedb124fbbe1d9ae3b472ad402
Author: marcus <marcus.edel at fu-berlin.de>
Date:   Thu Nov 5 21:30:38 2015 +0100

    Add SFINAE pattern for the RecurrentParameter function.


>---------------------------------------------------------------

2e59b7d2740c9ceedb124fbbe1d9ae3b472ad402
 src/mlpack/methods/ann/layer/layer_traits.hpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mlpack/methods/ann/layer/layer_traits.hpp b/src/mlpack/methods/ann/layer/layer_traits.hpp
index a8be63a..9a491b7 100644
--- a/src/mlpack/methods/ann/layer/layer_traits.hpp
+++ b/src/mlpack/methods/ann/layer/layer_traits.hpp
@@ -59,6 +59,11 @@ HAS_MEM_FUNC(Gradient, HasGradientCheck);
 // function.
 HAS_MEM_FUNC(Deterministic, HasDeterministicCheck);
 
+// This gives us a HasRecurrentParameterCheck<T, U> type (where U is a function
+// pointer) we can use with SFINAE to catch when a type has a
+// RecurrentParameter() function.
+HAS_MEM_FUNC(RecurrentParameter, HasRecurrentParameterCheck);
+
 }; // namespace ann
 }; // namespace mlpack
 



More information about the mlpack-git mailing list