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();
113 IdCondSet idset(ids,
false,
true);
114 std::vector< double > N_xyz(this->
counter_.counts(idset,
true));
115 const bool informative_external_prior = this->
prior_->isInformative();
116 if (informative_external_prior) this->
prior_->addJointPseudoCount(idset, N_xyz);
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
include the inlined functions if necessary
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