[mlpack-git] master: Add Serialize(). (752b783)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Mon Nov 2 12:19:20 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/f86acf8be2c01568d8b3dcd2e529ee9f20f7585e...156787dd4f372a7fd740f733127ac200ea2564b7
>---------------------------------------------------------------
commit 752b783acdf61940b8e76165c9c7bfaf549f8a56
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Nov 2 17:17:26 2015 +0000
Add Serialize().
>---------------------------------------------------------------
752b783acdf61940b8e76165c9c7bfaf549f8a56
src/mlpack/methods/range_search/range_search_stat.hpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/methods/range_search/range_search_stat.hpp b/src/mlpack/methods/range_search/range_search_stat.hpp
index e03502e..5041674 100644
--- a/src/mlpack/methods/range_search/range_search_stat.hpp
+++ b/src/mlpack/methods/range_search/range_search_stat.hpp
@@ -39,12 +39,19 @@ class RangeSearchStat
//! Modify the last distance evaluation.
double& LastDistance() { return lastDistance; }
+ //! Serialize the statistic.
+ template<typename Archive>
+ void Serialize(Archive& ar, const unsigned int /* version */)
+ {
+ ar & data::CreateNVP(lastDistance, "lastDistance");
+ }
+
private:
//! The last distance evaluation.
double lastDistance;
};
-}; // namespace neighbor
-}; // namespace mlpack
+} // namespace neighbor
+} // namespace mlpack
#endif
More information about the mlpack-git
mailing list