From 32020bdaca533276c7783b37bd7ac1ee66e39191 Mon Sep 17 00:00:00 2001 From: ZongyueQin Date: Sat, 15 Jul 2017 10:38:59 +0800 Subject: [PATCH] Add cache for Vlist Add functions and members used to add cache for Vlist --- Database/Database.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Database/Database.h b/Database/Database.h index 2c7b60b..dd8a2e2 100644 --- a/Database/Database.h +++ b/Database/Database.h @@ -150,7 +150,20 @@ private: void load_sub2values(int _mode); void load_obj2values(int _mode); void load_pre2values(int _mode); - + + // functions used to build cache + void load_cache(); + void get_important_preID(); + std::vector important_preID; + void load_important_sub2values(); + void load_important_obj2values(); + void build_CacheOfSub2values(); + void build_CacheOfObj2values(); + void get_important_subID(); + void get_important_objID(); + std::priority_queue important_subID; + std::priority_queue important_objID; + //triple num per group for insert/delete //can not be too high, otherwise the heap will over static const int GROUP_SIZE = 1000;