51#ifndef DOXYGEN_SHOULD_SKIP_THIS
66 Prior* new_prior = from.prior_->clone();
67 RecordCounter new_counter = from.counter_;
68 ScoringCache new_cache = from.cache_;
74 cache_ = std::move(new_cache);
84 std::swap(
prior_, from.prior_);
86 cache_ = std::move(from.cache_);
94 const std::vector< std::pair< std::size_t, std::size_t > >& new_ranges) {
95 std::vector< std::pair< std::size_t, std::size_t > > old_ranges =
ranges();
102 std::vector< std::pair< std::size_t, std::size_t > > old_ranges =
ranges();
Common counting infrastructure for independence tests and KNML scoring.
implementation of gum::learning::CachedContingencyCounter
Common counting infrastructure shared by IndependenceTest and KNML.
RecordCounter counter_
the record counter used for the counts over discrete variables
Prior * prior_
the expert knowledge prior added to the contingency tables
ScoringCache cache_
the scoring cache
void clearRanges()
reset the ranges to the one range corresponding to the whole database
const std::vector< std::pair< std::size_t, std::size_t > > & ranges() const
returns the current ranges
virtual void clear()
clears all the data structures from memory, including the cache
CachedContingencyCounter & operator=(const CachedContingencyCounter &from)
copy operator
void setRanges(const std::vector< std::pair< std::size_t, std::size_t > > &new_ranges)
sets new ranges to perform the counts
bool use_cache_
a Boolean indicating whether we wish to use the cache
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities