コード例 #1
0
ファイル: index_bstree.hpp プロジェクト: mpetri/vlg_matching
 size_type serialize(std::ostream& out, sdsl::structure_tree_node* v=NULL, std::string name="")const
 {
     (void)name;
     auto size = m_sa.serialize(out, v, "sa");
     size += m_text.serialize(out, v, "text");
     return size;
 }
コード例 #2
0
ファイル: rank_functions.hpp プロジェクト: bojifengyu/pos-cmp
 size_type serialize(std::ostream& out, sdsl::structure_tree_node* v=NULL, std::string name="") const
 {
     sdsl::structure_tree_node* child = sdsl::structure_tree::add_child(v, name, sdsl::util::class_name(*this));
     size_type written_bytes = 0;
     written_bytes += sdsl::write_member(num_docs,out,child,"num_docs");
     written_bytes += sdsl::write_member(num_terms,out,child,"num_terms");
     written_bytes += sdsl::write_member(avg_doc_len,out,child,"avg_doc_len");
     written_bytes += doc_lengths.serialize(out,child,"doc lengths");
     sdsl::structure_tree::add_size(child, written_bytes);
     return written_bytes;
 }