Esempio n. 1
0
 void serialize(Archiver& ar) {
   std::map<std::string, std::string> sv;
   std::map<std::string, double> nv;
   std::map<std::string, std::string> bv;
   if (ar.is_read) {
     ar
         & JUBA_NAMED_MEMBER("string_values", sv)
         & JUBA_NAMED_MEMBER("num_values", nv)
         & JUBA_NAMED_MEMBER("binary_values", bv);
     string_values_ = sv_t(sv.begin(), sv.end());
     num_values_ = nv_t(nv.begin(), nv.end());
     binary_values_ = sv_t(bv.begin(), bv.end());
   } else {
     sv.insert(string_values_.begin(), string_values_.end());
     nv.insert(num_values_.begin(), num_values_.end());
     bv.insert(binary_values_.begin(), binary_values_.end());
     ar
         & JUBA_NAMED_MEMBER("string_values", sv)
         & JUBA_NAMED_MEMBER("num_values", nv)
         & JUBA_NAMED_MEMBER("binary_values", bv);
   }
 }
Esempio n. 2
0
 void serialize(Ar& ar) {
   ar & JUBA_NAMED_MEMBER("regularization_weight", regularization_weight)
      & JUBA_NAMED_MEMBER("sensitivity", sensitivity);
 }
Esempio n. 3
0
 void serialize(Ar& ar) {
     std::string t = type_as_string();
     ar
     & JUBA_NAMED_MEMBER("type", t)
     & JUBA_NAMED_MEMBER("bit_vector_length", bit_vector_length_);
 }
Esempio n. 4
0
 void serialize(Ar& ar) {
   ar
       & JUBA_NAMED_MEMBER("damping_factor", damping_factor)
       & JUBA_MEMBER(landmark_num);
 }
 void serialize(Ar& ar) {
   ar & JUBA_NAMED_MEMBER("regularization_weight", C);
 }