[mlpack-git] master: Allow serialization of dataset information. (3225f14)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Dec 23 11:43:40 EST 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/de9cc4b05069e1fa4793d9355f2f595af5ff45d2...6070527af14296cd99739de6c62666cc5d2a2125

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

commit 3225f14a0ffae67b499874c380f15c5d9fde56fc
Author: ryan <ryan at ratml.org>
Date:   Thu Oct 1 19:12:13 2015 -0400

    Allow serialization of dataset information.


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

3225f14a0ffae67b499874c380f15c5d9fde56fc
 src/mlpack/core/data/dataset_info.hpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mlpack/core/data/dataset_info.hpp b/src/mlpack/core/data/dataset_info.hpp
index faaf4d6..1f2110f 100644
--- a/src/mlpack/core/data/dataset_info.hpp
+++ b/src/mlpack/core/data/dataset_info.hpp
@@ -57,6 +57,12 @@ class DatasetInfo
 
   size_t NumMappings(const size_t dimension) const;
 
+  template<typename Archive>
+  void Serialize(Archive& ar, const unsigned int /* version */)
+  {
+    ar & data::CreateNVP(maps, "maps");
+  }
+
  private:
   // Map entries will only exist for dimensions that are categorical.
   std::unordered_map<size_t, std::pair<boost::bimap<std::string, size_t>,



More information about the mlpack-git mailing list