51#ifndef DOXYGEN_SHOULD_SKIP_THIS
62 std::vector< double >& counts) {
65 if ((idset.size() == idset.nbLHSIds()) || (this->weight_ == 0.0)
66 || (idset.nbLHSIds() == std::size_t(0)))
72 for (
auto i = std::size_t(0); i < idset.nbLHSIds(); ++i) {
76 for (
auto i = std::size_t(0); i < idset.nbLHSIds(); ++i) {
77 weight *= double(this->
database_->domainSize(this->nodeId2columns_.second(idset[i])));
82 for (
auto& count: counts)
A class for storing a pair of sets of NodeIds, the second one corresponding to a conditional set.
const DatabaseTable * database_
a reference to the database in order to have access to its variables
double weight_
the weight of the prior
Bijection< NodeId, std::size_t > nodeId2columns_
a mapping from the NodeIds of the variables to the indices of the columns in the database
double weight() const
returns the weight assigned to the prior
virtual void addConditioningPseudoCount(const IdCondSet &idset, std::vector< double > &counts) final
adds the prior to a counting vectordefined over the right hand side of the idset
include the inlined functions if necessary
the smooth a priori: adds a weight w to all the counts
the smooth a priori: adds a weight w to all the counts