51#ifndef DOXYGEN_SHOULD_SKIP_THIS
65 Prior* new_prior = from.prior_->clone();
66 RecordCounter new_counter = from.counter_;
79 std::swap(
prior_, from.prior_);
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();
virtual bool isInformative() const =0
indicates whether the prior is potentially informative
virtual void addJointPseudoCount(const IdCondSet &idset, std::vector< double > &counts)=0
adds the prior to a counting vector corresponding to the idset
The class for giving access to pseudo count : count in the database + prior.
virtual void clear()
clears all the data structures from memory, including the cache
void clearRanges()
reset the ranges to the one range corresponding to the whole database
std::vector< double > get(const std::vector< NodeId > &ids)
returns the pseudo-count of a pair of nodes given some other nodes
const std::vector< std::pair< std::size_t, std::size_t > > & ranges() const
returns the current ranges
PseudoCount & operator=(const PseudoCount &from)
copy operator
Prior * prior_
the expert knowledge a priorwe add to the contingency tables
void setRanges(const std::vector< std::pair< std::size_t, std::size_t > > &new_ranges)
sets new ranges to perform the counts used by the independence test
RecordCounter counter_
the record counter used for the counts over discrete variables
void setRanges(const std::vector< std::pair< std::size_t, std::size_t > > &new_ranges)
sets new ranges to perform the counting
void clearRanges()
reset the ranges to the one range corresponding to the whole database
const std::vector< double > & counts(const IdCondSet &ids, const bool check_discrete_vars=false)
returns the counts over all the variables in an IdCondSet
include the inlined functions if necessary
class GUM_SHARED_PUBLIC IdCondSet
gum is the global namespace for all aGrUM entities
the base class for all the independence tests used for learning
the base class for all the independence tests used for learning