[mlpack-git] master: Add serialization for statistic. (826c5e8)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Fri Jul 10 19:00:18 EDT 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/4a97187bbba7ce8a6191b714949dd818ef0f37d2...e5905e62c15d1bcff21e6359b11efcd7ab6d7ca0

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

commit 826c5e82972b8a64d60f825414c7c2a8c585034c
Author: ryan <ryan at ratml.org>
Date:   Tue Apr 28 12:13:01 2015 -0400

    Add serialization for statistic.


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

826c5e82972b8a64d60f825414c7c2a8c585034c
 src/mlpack/core/tree/statistic.hpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mlpack/core/tree/statistic.hpp b/src/mlpack/core/tree/statistic.hpp
index 2d03f21..f284c4b 100644
--- a/src/mlpack/core/tree/statistic.hpp
+++ b/src/mlpack/core/tree/statistic.hpp
@@ -32,7 +32,13 @@ class EmptyStatistic
     template<typename TreeType>
     EmptyStatistic(TreeType& /* node */) { }
 
-  public:
+    /**
+     * Serialize the statistic (there's nothing to be saved).
+     */
+    template<typename Archive>
+    void Serialize(Archive& /* ar */, const unsigned int /* version */)
+    { }
+
     /**
      * Returns a string representation of this object.
      */



More information about the mlpack-git mailing list