51#ifndef DOXYGEN_SHOULD_SKIP_THIS
64 const std::vector< std::pair< std::size_t, std::size_t > >& ranges,
65 const Bijection< NodeId, std::size_t >& nodeId2columns) :
66 Score(parser, prior, ranges, nodeId2columns),
67 _internal_prior_(parser.database(), nodeId2columns) {
68 GUM_CONSTRUCTOR(ScoreBDeu);
72 INLINE ScoreBDeu::ScoreBDeu(
const DBRowGeneratorParser& parser,
74 const Bijection< NodeId, std::size_t >& nodeId2columns) :
75 Score(parser, prior, nodeId2columns), _internal_prior_(parser.database(), nodeId2columns) {
76 GUM_CONSTRUCTOR(ScoreBDeu);
80 INLINE ScoreBDeu::ScoreBDeu(
const ScoreBDeu& from) :
81 Score(from), _internal_prior_(from._internal_prior_), _gammalog2_(from._gammalog2_) {
82 GUM_CONS_CPY(ScoreBDeu);
86 INLINE ScoreBDeu::ScoreBDeu(ScoreBDeu&& from) :
87 Score(
std::move(from)), _internal_prior_(
std::move(from._internal_prior_)),
88 _gammalog2_(
std::move(from._gammalog2_)) {
89 GUM_CONS_MOV(ScoreBDeu);
93 INLINE ScoreBDeu* ScoreBDeu::clone()
const {
return new ScoreBDeu(*
this); }
96 INLINE ScoreBDeu::~ScoreBDeu() { GUM_DESTRUCTOR(ScoreBDeu); }
99 INLINE std::string ScoreBDeu::isPriorCompatible(
const Prior& prior) {
100 return isPriorCompatible(prior.getType(), prior.weight());
104 INLINE std::string ScoreBDeu::isPriorCompatible()
const {
105 return isPriorCompatible(*(this->prior_));
109 INLINE
const Prior& ScoreBDeu::internalPrior()
const {
return _internal_prior_; }
112 INLINE
void ScoreBDeu::setEffectiveSampleSize(
double ess) {
115 "The effective sample size of the BDeu's "
116 "internal prior must be positive");
118 _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