48#ifndef DOXYGEN_SHOULD_SKIP_THIS
57 const Bijection< NodeId, std::size_t >& nodeId2columns) :
58 Prior(database, nodeId2columns) {
59 GUM_CONSTRUCTOR(SmoothingPrior);
63 INLINE SmoothingPrior::SmoothingPrior(
const SmoothingPrior& from) : Prior(from) {
64 GUM_CONS_CPY(SmoothingPrior);
68 INLINE SmoothingPrior::SmoothingPrior(SmoothingPrior&& from) noexcept : Prior(std::move(from)) {
69 GUM_CONS_MOV(SmoothingPrior);
73 INLINE SmoothingPrior* SmoothingPrior::clone()
const {
return new SmoothingPrior(*
this); }
76 INLINE SmoothingPrior::~SmoothingPrior() { GUM_DESTRUCTOR(SmoothingPrior); }
79 INLINE SmoothingPrior& SmoothingPrior::operator=(
const SmoothingPrior& from) {
80 Prior::operator=(from);
85 INLINE SmoothingPrior& SmoothingPrior::operator=(SmoothingPrior&& from) {
86 Prior::operator=(std::move(from));
91 INLINE
PriorType SmoothingPrior::getType()
const {
return PriorType::SmoothingPriorType; }
94 INLINE
bool SmoothingPrior::isInformative()
const {
return this->weight_ != 0.0; }
97 INLINE
void SmoothingPrior::addJointPseudoCount(
const IdCondSet& idset,
98 std::vector< double >& counts) {
100 if (idset.empty() || (this->weight_ == 0.0))
return;
103 for (
auto& count: counts)
104 count += this->weight_;
The class representing a tabular database as used by learning tasks.
the base class for all a priori
SmoothingPrior(const DatabaseTable &database, const Bijection< NodeId, std::size_t > &nodeId2columns=Bijection< NodeId, std::size_t >())
default constructor
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities