29 #ifndef GUM_SCALAR_ATTRIBUTE_H 30 #define GUM_SCALAR_ATTRIBUTE_H 32 #include <agrum/agrum.h> 33 #include <agrum/tools/core/bijection.h> 34 #include <agrum/tools/multidim/potential.h> 35 #include <agrum/PRM/elements/PRMAttribute.h> 65 template <
typename GUM_SCALAR >
87 MultiDimImplementation< GUM_SCALAR >* impl
103 virtual void copyCpf(
const Bijection<
const DiscreteVariable*,
const DiscreteVariable* >& bif,
104 const PRMAttribute< GUM_SCALAR >& source);
119 virtual void addParent(
const PRMClassElement< GUM_SCALAR >& elt);
122 virtual void addChild(
const PRMClassElement< GUM_SCALAR >& elt);
129 virtual void swap(
const PRMType& old_type,
const PRMType& new_type);
140 virtual void type_(PRMType* t);
158 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 166 #include <agrum/PRM/elements/PRMScalarAttribute_tpl.h> virtual void addChild(const PRMClassElement< GUM_SCALAR > &elt)
See gum::PRMClassElement::addChild_().
virtual void becomeCastDescendant(PRMType &subtype)
See gum::PRMClassElement::elt_type().
virtual ~PRMScalarAttribute()
Destructor.
virtual void swap(const PRMType &old_type, const PRMType &new_type)
Swap old_type with new_type in the PRMClassElement cpt.
INLINE void emplace(Args &&... args)
PRMType * _type_
The random variable type of this attribute.
virtual PRMType & type()
See gum::PRMClassElement::type().
virtual PRMType * type_()
virtual PRMAttribute< GUM_SCALAR > * newFactory(const PRMClass< GUM_SCALAR > &c) const
See gum::PRMClassElement::elt_type().
virtual PRMClassElement< GUM_SCALAR >::ClassElementType elt_type() const
See gum::PRMClassElement::elt_type().
virtual void copyCpf(const Bijection< const DiscreteVariable *, const DiscreteVariable * > &bif, const PRMAttribute< GUM_SCALAR > &source)
See gum::PRMClassElement::elt_type().
virtual const Potential< GUM_SCALAR > & cpf() const
See gum::PRMClassElement::cpf().
ParamScopeData(const std::string &s, const PRMReferenceSlot< GUM_SCALAR > &ref, Idx d)
virtual PRMAttribute< GUM_SCALAR > * copy(Bijection< const DiscreteVariable *, const DiscreteVariable * > bij) const
See gum::PRMClassElement::elt_type().
PRMScalarAttribute(const PRMScalarAttribute &source)
Copy constructor. Don't use it.
virtual void setAsCastDescendant(PRMAttribute< GUM_SCALAR > *attr)
See gum::PRMClassElement::elt_type().
virtual PRMAttribute< GUM_SCALAR > * getCastDescendant() const
See gum::PRMClassElement::elt_type().
virtual void addParent(const PRMClassElement< GUM_SCALAR > &elt)
See gum::PRMClassElement::addParent_().
virtual void type_(PRMType *t)
Potential< GUM_SCALAR > * _cpf_
A pointer on the Potential of this attribute.
PRMScalarAttribute(const std::string &name, const PRMType &type, MultiDimImplementation< GUM_SCALAR > *impl=new MultiDimArray< GUM_SCALAR >())
Constructor used by gum::Class.
virtual const PRMType & type() const
See gum::PRMClassElement::type().
PRMScalarAttribute & operator=(const PRMScalarAttribute &from)
Copy operator. Don't use it.