25 #ifndef DOXYGEN_SHOULD_SKIP_THIS 33 template <
template <
typename >
class ALLOC >
35 const DatabaseTable< ALLOC >& database,
36 const Bijection<
NodeId, std::size_t, ALLOC< std::size_t > >&
39 Apriori< ALLOC >(database, nodeId2columns, alloc) {
46 template <
template <
typename >
class ALLOC >
48 const AprioriNoApriori< ALLOC >& from,
56 template <
template <
typename >
class ALLOC >
58 const AprioriNoApriori< ALLOC >& from) :
63 template <
template <
typename >
class ALLOC >
65 AprioriNoApriori< ALLOC >&& from,
73 template <
template <
typename >
class ALLOC >
75 AprioriNoApriori< ALLOC >&& from) :
80 template <
template <
typename >
class ALLOC >
83 ALLOC< AprioriNoApriori< ALLOC > > allocator(alloc);
84 AprioriNoApriori< ALLOC >* apriori = allocator.allocate(1);
86 allocator.construct(apriori, *
this, alloc);
88 allocator.deallocate(apriori, 1);
97 template <
template <
typename >
class ALLOC >
104 template <
template <
typename >
class ALLOC >
111 template <
template <
typename >
class ALLOC >
113 operator=(
const AprioriNoApriori< ALLOC >& from) {
120 template <
template <
typename >
class ALLOC >
122 operator=(AprioriNoApriori< ALLOC >&& from) {
129 template <
template <
typename >
class ALLOC >
134 template <
template <
typename >
class ALLOC >
141 template <
template <
typename >
class ALLOC >
148 template <
template <
typename >
class ALLOC >
155 template <
template <
typename >
class ALLOC >
157 const IdSet< ALLOC >& idset,
158 std::vector<
double, ALLOC< double > >& counts) {}
162 template <
template <
typename >
class ALLOC >
164 const IdSet< ALLOC >& idset,
165 std::vector<
double, ALLOC< double > >& counts) {}
AprioriNoApriori< ALLOC > & operator=(const AprioriNoApriori< ALLOC > &from)
copy operator
virtual bool isOfType(const std::string &type) final
indicates whether an apriori is of a certain type
virtual void setWeight(const double weight)
sets the weight of the a priori (kind of effective sample size)
AprioriNoApriori(const DatabaseTable< ALLOC > &database, const Bijection< NodeId, std::size_t, ALLOC< std::size_t > > &nodeId2columns=Bijection< NodeId, std::size_t, ALLOC< std::size_t > >(), const allocator_type &alloc=allocator_type())
default constructor
virtual const std::string & getType() const final
returns the type of the apriori
static const std::string type
static bool isOfType(const std::string &t)
virtual void addAllApriori(const IdSet< ALLOC > &idset, std::vector< double, ALLOC< double > > &counts) final
adds the apriori to a counting vector corresponding to the idset
gum is the global namespace for all aGrUM entities
AprioriNoAprioriType type
the type of the a priori
virtual bool isInformative() const final
indicates whether the apriori is potentially informative
virtual void setWeight(const double weight) final
sets the weight of the a priori (kind of effective sample size)
Apriori< ALLOC > & operator=(const Apriori< ALLOC > &from)
copy operator
allocator_type getAllocator() const
returns the allocator used by the internal apriori
virtual ~AprioriNoApriori()
destructor
virtual AprioriNoApriori< ALLOC > * clone() const
virtual copy constructor
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
Size NodeId
Type for node ids.
Apriori(const DatabaseTable< ALLOC > &database, const Bijection< NodeId, std::size_t, ALLOC< std::size_t > > &nodeId2columns=Bijection< NodeId, std::size_t, ALLOC< std::size_t > >(), const allocator_type &alloc=allocator_type())
default constructor
virtual void addConditioningApriori(const IdSet< ALLOC > &idset, std::vector< double, ALLOC< double > > &counts) final
adds the apriori to a counting vectordefined over the right hand side of the idset ...