49#ifndef DOXYGEN_SHOULD_SKIP_THIS
62 const std::vector< std::pair< std::size_t, std::size_t > >& ranges,
63 const Bijection< NodeId, std::size_t >& nodeId2columns) :
64 Score(parser, prior, ranges, nodeId2columns),
65 _internal_prior_(parser.database(), nodeId2columns) {
66 GUM_CONSTRUCTOR(ScoreBDeu);
70 INLINE ScoreBDeu::ScoreBDeu(
const DBRowGeneratorParser& parser,
72 const Bijection< NodeId, std::size_t >& nodeId2columns) :
73 Score(parser, prior, nodeId2columns), _internal_prior_(parser.database(), nodeId2columns) {
74 GUM_CONSTRUCTOR(ScoreBDeu);
78 INLINE ScoreBDeu::ScoreBDeu(
const ScoreBDeu& from) :
79 Score(from), _internal_prior_(from._internal_prior_), _gammalog2_(from._gammalog2_) {
80 GUM_CONS_CPY(ScoreBDeu);
84 INLINE ScoreBDeu::ScoreBDeu(ScoreBDeu&& from) :
85 Score(
std::move(from)), _internal_prior_(
std::move(from._internal_prior_)),
86 _gammalog2_(
std::move(from._gammalog2_)) {
87 GUM_CONS_MOV(ScoreBDeu);
91 INLINE ScoreBDeu* ScoreBDeu::clone()
const {
return new ScoreBDeu(*
this); }
94 INLINE ScoreBDeu::~ScoreBDeu() { GUM_DESTRUCTOR(ScoreBDeu); }
97 INLINE std::string ScoreBDeu::isPriorCompatible(
const Prior& prior) {
98 return isPriorCompatible(prior.getType(), prior.weight());
102 INLINE std::string ScoreBDeu::isPriorCompatible()
const {
103 return isPriorCompatible(*(this->prior_));
107 INLINE
const Prior& ScoreBDeu::internalPrior()
const {
return _internal_prior_; }
110 INLINE
void ScoreBDeu::setEffectiveSampleSize(
double ess) {
113 "The effective sample size of the BDeu's "
114 "internal prior must be positive");
116 _internal_prior_.setEffectiveSampleSize(ess);
Exception : out of bound.
the class used to read a row in the database and to transform it into a set of DBRow instances that c...
the base class for all a priori
ScoreBDeu(const DBRowGeneratorParser &parser, const Prior &prior, const std::vector< std::pair< std::size_t, std::size_t > > &ranges, const Bijection< NodeId, std::size_t > &nodeId2columns=Bijection< NodeId, std::size_t >())
default constructor
The base class for all the scores used for learning (BIC, BDeu, etc).
#define GUM_ERROR(type, msg)
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities
the class for computing BDeu scores