summaryrefslogtreecommitdiff
path: root/klm/util/probing_hash_table.hh
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-02-21 14:13:55 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-02-21 14:13:55 +0000
commitb5491898549c61bd799d199aa9178a8394a1ef69 (patch)
treefb2686a2aae03ff07bcdf4cd47e8c3191eff8d1e /klm/util/probing_hash_table.hh
parent0187447a643c3ea262b13b3052cb1531990eafe6 (diff)
parentc17d9c23d023a5c08656376944f636180f0a437b (diff)
Merge branch 'master' of https://github.com/pauldb89/cdec
Diffstat (limited to 'klm/util/probing_hash_table.hh')
-rw-r--r--klm/util/probing_hash_table.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/klm/util/probing_hash_table.hh b/klm/util/probing_hash_table.hh
index 4a8aff35..6780489d 100644
--- a/klm/util/probing_hash_table.hh
+++ b/klm/util/probing_hash_table.hh
@@ -126,6 +126,11 @@ template <class EntryT, class HashT, class EqualT = std::equal_to<typename Entry
}
}
+ void Clear(Entry invalid) {
+ std::fill(begin_, end_, invalid);
+ entries_ = 0;
+ }
+
private:
MutableIterator begin_;
std::size_t buckets_;