inference/dimmwitted/src/binary_format.cc
// Read meta data file, return Meta struct
Read meta data file, return Meta struct
Read meta data file return Meta struct
FactorGraphDescriptor read_meta(const std::string &meta_file) {
  FactorGraphDescriptor meta;
  std::ifstream file(meta_file);
  std::string buf;
  getline(file, buf, ',');
  meta.num_weights = atoll(buf.c_str());
  getline(file, buf, ',');
  meta.num_variables = atoll(buf.c_str());
  getline(file, buf, ',');
  meta.num_factors = atoll(buf.c_str());
  getline(file, buf, ',');
  meta.num_edges = atoll(buf.c_str());
  return meta;
}
FactorGraphDescriptor read_meta ( const std :: string & meta_file ) { FactorGraphDescriptor meta ; std :: ifstream file ( meta_file ) ; std :: string buf ; getline ( file , buf , ' ' ) ; meta . num_weights = atoll ( buf . c_str ( ) ) ; getline ( file , buf , ' ' ) ; meta . num_variables = atoll ( buf . c_str ( ) ) ; getline ( file , buf , ' ' ) ; meta . num_factors = atoll ( buf . c_str ( ) ) ; getline ( file , buf , ' ' ) ; meta . num_edges = atoll ( buf . c_str ( ) ) ; return meta ; }
Read meta data file, return Meta struct
Read meta data file return Meta struct