summaryrefslogtreecommitdiffstats
path: root/include/shard
diff options
context:
space:
mode:
Diffstat (limited to 'include/shard')
-rw-r--r--include/shard/Alias.h8
-rw-r--r--include/shard/FSTrie.h6
-rw-r--r--include/shard/ISAMTree.h4
-rw-r--r--include/shard/LoudsPatricia.h6
-rw-r--r--include/shard/PGM.h8
-rw-r--r--include/shard/TrieSpline.h8
-rw-r--r--include/shard/VPTree.h6
7 files changed, 23 insertions, 23 deletions
diff --git a/include/shard/Alias.h b/include/shard/Alias.h
index 8fe70a5..15b0884 100644
--- a/include/shard/Alias.h
+++ b/include/shard/Alias.h
@@ -70,7 +70,7 @@ public:
}
}
- Alias(std::vector<Alias*> const &shards)
+ Alias(std::vector<const Alias*> const &shards)
: m_data(nullptr)
, m_alias(nullptr)
, m_total_weight(0)
@@ -146,15 +146,15 @@ public:
}
- size_t get_memory_usage() {
+ size_t get_memory_usage() const {
return 0;
}
- size_t get_aux_memory_usage() {
+ size_t get_aux_memory_usage() const {
return (m_bf) ? m_bf->memory_usage() : 0;
}
- W get_total_weight() {
+ W get_total_weight() const {
return m_total_weight;
}
diff --git a/include/shard/FSTrie.h b/include/shard/FSTrie.h
index 4e51037..d720aad 100644
--- a/include/shard/FSTrie.h
+++ b/include/shard/FSTrie.h
@@ -82,7 +82,7 @@ public:
delete[] temp_buffer;
}
- FSTrie(std::vector<FSTrie*> const &shards)
+ FSTrie(std::vector<const FSTrie*> const &shards)
: m_data(nullptr)
, m_reccnt(0)
, m_alloc_size(0)
@@ -181,11 +181,11 @@ public:
}
- size_t get_memory_usage() {
+ size_t get_memory_usage() const {
return m_fst->getMemoryUsage();
}
- size_t get_aux_memory_usage() {
+ size_t get_aux_memory_usage() const {
return m_alloc_size;
}
diff --git a/include/shard/ISAMTree.h b/include/shard/ISAMTree.h
index 64c0b2b..f6b525f 100644
--- a/include/shard/ISAMTree.h
+++ b/include/shard/ISAMTree.h
@@ -65,7 +65,7 @@ public:
}
}
- ISAMTree(std::vector<ISAMTree *> const &shards)
+ ISAMTree(std::vector<const ISAMTree *> const &shards)
: m_bf(nullptr), m_isam_nodes(nullptr), m_root(nullptr), m_reccnt(0),
m_tombstone_cnt(0), m_internal_node_cnt(0), m_deleted_cnt(0),
m_alloc_size(0) {
@@ -93,7 +93,7 @@ public:
delete m_bf;
}
- Wrapped<R> *point_lookup(const R &rec, bool filter = false) {
+ Wrapped<R> *point_lookup(const R &rec, bool filter = false) const {
if (filter && !m_bf->lookup(rec)) {
return nullptr;
}
diff --git a/include/shard/LoudsPatricia.h b/include/shard/LoudsPatricia.h
index 3452839..fe0c30e 100644
--- a/include/shard/LoudsPatricia.h
+++ b/include/shard/LoudsPatricia.h
@@ -82,7 +82,7 @@ public:
delete[] temp_buffer;
}
- LoudsPatricia(std::vector<LoudsPatricia*> &shards)
+ LoudsPatricia(std::vector<const LoudsPatricia*> &shards)
: m_data(nullptr)
, m_reccnt(0)
, m_alloc_size(0)
@@ -178,11 +178,11 @@ public:
}
- size_t get_memory_usage() {
+ size_t get_memory_usage() const {
return m_louds->size();
}
- size_t get_aux_memory_usage() {
+ size_t get_aux_memory_usage() const {
return m_alloc_size;
}
diff --git a/include/shard/PGM.h b/include/shard/PGM.h
index 7d1f492..5b39ab4 100644
--- a/include/shard/PGM.h
+++ b/include/shard/PGM.h
@@ -111,7 +111,7 @@ public:
}
}
- PGM(std::vector<PGM*> const &shards)
+ PGM(std::vector<const PGM*> const &shards)
: m_data(nullptr)
, m_bf(nullptr)
, m_reccnt(0)
@@ -190,7 +190,7 @@ public:
delete m_bf;
}
- Wrapped<R> *point_lookup(const R &rec, bool filter=false) {
+ Wrapped<R> *point_lookup(const R &rec, bool filter=false) const {
size_t idx = get_lower_bound(rec.key);
if (idx >= m_reccnt) {
return nullptr;
@@ -223,11 +223,11 @@ public:
}
- size_t get_memory_usage() {
+ size_t get_memory_usage() const {
return m_pgm.size_in_bytes();
}
- size_t get_aux_memory_usage() {
+ size_t get_aux_memory_usage() const {
return (m_bf) ? m_bf->memory_usage() : 0;
}
diff --git a/include/shard/TrieSpline.h b/include/shard/TrieSpline.h
index 9d8c3bb..7f4d4e5 100644
--- a/include/shard/TrieSpline.h
+++ b/include/shard/TrieSpline.h
@@ -124,7 +124,7 @@ public:
}
}
- TrieSpline(std::vector<TrieSpline*> const &shards)
+ TrieSpline(std::vector<const TrieSpline*> const &shards)
: m_reccnt(0)
, m_tombstone_cnt(0)
, m_alloc_size(0)
@@ -229,7 +229,7 @@ public:
delete m_bf;
}
- Wrapped<R> *point_lookup(const R &rec, bool filter=false) {
+ Wrapped<R> *point_lookup(const R &rec, bool filter=false) const {
if (filter && m_bf && !m_bf->lookup(rec)) {
return nullptr;
}
@@ -266,11 +266,11 @@ public:
}
- size_t get_memory_usage() {
+ size_t get_memory_usage() const {
return m_ts.GetSize();
}
- size_t get_aux_memory_usage() {
+ size_t get_aux_memory_usage() const {
return (m_bf) ? m_bf->memory_usage() : 0;
}
diff --git a/include/shard/VPTree.h b/include/shard/VPTree.h
index 477db5c..7130efe 100644
--- a/include/shard/VPTree.h
+++ b/include/shard/VPTree.h
@@ -86,7 +86,7 @@ public:
}
}
- VPTree(std::vector<VPTree*> shards)
+ VPTree(std::vector<const VPTree*> shards)
: m_reccnt(0), m_tombstone_cnt(0), m_node_cnt(0), m_root(nullptr) {
size_t attemp_reccnt = 0;
@@ -174,11 +174,11 @@ public:
return m_data + idx;
}
- size_t get_memory_usage() {
+ size_t get_memory_usage() const {
return m_node_cnt * sizeof(vpnode) + m_reccnt * sizeof(R*);
}
- size_t get_aux_memory_usage() {
+ size_t get_aux_memory_usage() const {
// FIXME: need to return the size of the unordered_map
return 0;
}