48#ifndef DOXYGEN_SHOULD_SKIP_THIS
61 GUM_CONS_CPY(ScoringCache);
65 INLINE ScoringCache::ScoringCache(ScoringCache&& from) : _scores_(
std::move(from._scores_)) {
66 GUM_CONS_MOV(ScoringCache);
70 INLINE ScoringCache* ScoringCache::clone()
const {
return new ScoringCache(*
this); }
73 INLINE ScoringCache::~ScoringCache() { GUM_DESTRUCTOR(ScoringCache); }
76 INLINE ScoringCache& ScoringCache::operator=(
const ScoringCache& from) {
77 if (&from !=
this) { _scores_ = from._scores_; }
82 INLINE ScoringCache& ScoringCache::operator=(ScoringCache&& from) {
83 if (&from !=
this) { _scores_ = std::move(from._scores_); }
88 INLINE
void ScoringCache::insert(
const IdCondSet& idset,
double score) {
89 _scores_.insert(idset, score);
93 INLINE
void ScoringCache::insert(IdCondSet&& idset,
double score) {
94 _scores_.insert(std::move(idset), std::move(score));
98 INLINE
void ScoringCache::erase(
const IdCondSet& idset) { _scores_.erase(idset); }
101 INLINE
bool ScoringCache::exists(
const IdCondSet& idset) {
return _scores_.exists(idset); }
104 INLINE
double ScoringCache::score(
const IdCondSet& idset) {
return _scores_[idset]; }
107 INLINE
void ScoringCache::clear() { _scores_.clear(); }
110 INLINE std::size_t ScoringCache::size()
const {
return _scores_.size(); }
a cache for caching scores and independence tests results
ScoringCache()
default constructor
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities
a cache for caching scores and independence tests results