50#ifndef DOXYGEN_SHOULD_SKIP_THIS
63 GUM_CONS_CPY(ScoringCache);
67 INLINE ScoringCache::ScoringCache(ScoringCache&& from) : _scores_(
std::move(from._scores_)) {
68 GUM_CONS_MOV(ScoringCache);
72 INLINE ScoringCache* ScoringCache::clone()
const {
return new ScoringCache(*
this); }
75 INLINE ScoringCache::~ScoringCache() { GUM_DESTRUCTOR(ScoringCache); }
78 INLINE ScoringCache& ScoringCache::operator=(
const ScoringCache& from) {
79 if (&from !=
this) { _scores_ = from._scores_; }
84 INLINE ScoringCache& ScoringCache::operator=(ScoringCache&& from) {
85 if (&from !=
this) { _scores_ = std::move(from._scores_); }
90 INLINE
void ScoringCache::insert(
const IdCondSet& idset,
double score) {
91 _scores_.insert(idset, score);
95 INLINE
void ScoringCache::insert(IdCondSet&& idset,
double score) {
96 _scores_.insert(std::move(idset), std::move(score));
100 INLINE
void ScoringCache::erase(
const IdCondSet& idset) { _scores_.erase(idset); }
103 INLINE
bool ScoringCache::exists(
const IdCondSet& idset)
const {
104 return _scores_.exists(idset);
108 INLINE
double ScoringCache::score(
const IdCondSet& idset)
const {
return _scores_[idset]; }
111 INLINE optional_ref< double > ScoringCache::tryGet(
const IdCondSet& idset) {
112 return _scores_.tryGet(idset);
116 INLINE
void ScoringCache::clear() { _scores_.clear(); }
119 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