33 #ifndef GUM_LEARNING_SCORING_CACHE_H 34 #define GUM_LEARNING_SCORING_CACHE_H 38 #include <agrum/agrum.h> 39 #include <agrum/tools/stattests/idCondSet.h> 58 template <
template <
typename >
class ALLOC =
std::
allocator >
76 ScoringCache(
const ScoringCache< ALLOC >& from,
const allocator_type& alloc);
82 ScoringCache(ScoringCache< ALLOC >&& from,
const allocator_type& alloc);
120 void insert(
const IdCondSet< ALLOC >& idset,
double score);
127 void insert(IdCondSet< ALLOC >&& idset,
double score);
133 void erase(
const IdCondSet< ALLOC >& idset);
137 bool exists(
const IdCondSet< ALLOC >& idset);
142 double score(
const IdCondSet< ALLOC >& idset);
148 std::size_t
size()
const;
156 #ifndef DOXYGEN_SHOULD_SKIP_THIS 172 #include <agrum/BN/learning/scores_and_tests/scoringCache_tpl.h> virtual ~ScoringCache()
destructor
INLINE void emplace(Args &&... args)
virtual ScoringCache< ALLOC > * clone(const allocator_type &alloc) const
virtual copy constructor with a given allocator
ScoringCache< ALLOC > & operator=(ScoringCache< ALLOC > &&from)
move operator
ScoringCache(ScoringCache< ALLOC > &&from, const allocator_type &alloc)
move constructor with a given allocator
void erase(const IdCondSet< ALLOC > &idset)
removes a score (if it exists)
std::size_t size() const
returns the number of scores saved in the cache
ScoringCache(const ScoringCache< ALLOC > &from)
copy constructor
double score(const IdCondSet< ALLOC > &idset)
returns a given score
void clear()
removes all the stored scores
bool exists(const IdCondSet< ALLOC > &idset)
indicates whether a given score exists
ScoringCache< ALLOC > & operator=(const ScoringCache< ALLOC > &from)
copy operator
ScoringCache(ScoringCache< ALLOC > &&from)
move constructor
virtual ScoringCache< ALLOC > * clone() const
virtual copy constructor
a cache for caching scores and independence tests resultsCaching previously computed scores or the re...
allocator_type getAllocator() const
returns the allocator used by the translator
void insert(IdCondSet< ALLOC > &&idset, double score)
insert a new score into the cache
void insert(const IdCondSet< ALLOC > &idset, double score)
insert a new score into the cache
ScoringCache(const ScoringCache< ALLOC > &from, const allocator_type &alloc)
copy constructor with a given allocator
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)