49#ifndef GUM_AGGREGATE_H
50#define GUM_AGGREGATE_H
82 template < GUM_Numeric GUM_SCALAR >
114 static AggregateType
str2enum(std::string_view str);
211 virtual Tensor< GUM_SCALAR >&
cpf();
218 const Tensor< GUM_SCALAR >&
cpf()
const override;
267#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Inline implementation of gum::PRMAggregate.
Headers of gum::PRMScalarAttribute.
PRMAttribute< GUM_SCALAR > * getCastDescendant() const override
See gum::PRMClassElement::elt_type().
PRMType & type() override
See gum::PRMClassElement::type().
void addParent(const PRMClassElement< GUM_SCALAR > &elt) override
See gum::PRMClassElement::addParent_().
std::shared_ptr< Idx > sharedLabel() const
Returns the shared_ptr holding this Aggregate label.
void addChild(const PRMClassElement< GUM_SCALAR > &elt) override
See gum::PRMClassElement::addChild_().
PRMAggregate(std::string_view name, AggregateType aggType, const PRMType &rvType)
Default constructor.
AggregateType
The different type of aggregates we can have.
void setLabel(Idx idx)
Set the aggregator's label.
PRMAggregate< GUM_SCALAR > & operator=(const PRMAggregate< GUM_SCALAR > &source)
Copy operator. Don't use it.
bool hasLabel() const
Returns true if the label is defined.
~PRMAggregate() override
Destructor.
AggregateType _agg_type_
The AggregateType of this aggregate.
AggregateType agg_type() const
Returns the aggregate of *this.
std::string _label_value_
The AggregateType of this aggregate.
std::shared_ptr< Idx > _label_
Some aggregators applies only on a given label. This attribute must have the concerned Idx....
MultiDimImplementation< GUM_SCALAR > * buildImpl() const
Returns a pointer over an empty gum::MultiDimImplementation of the good type for this PRMAggregate.
virtual Tensor< GUM_SCALAR > & cpf()
Aggregates don't have Tensor until they are instantiated as PRMAttribute, so this will raise an Opera...
const std::string & labelValue() const
See gum::PRMClassElement::elt_type().
static AggregateType str2enum(std::string_view str)
Static method which returns the AggregateType given its string representation.
PRMType * _type_
The random variable type of this aggregate It is deleted with the aggregate.
PRMClassElement< GUM_SCALAR >::ClassElementType elt_type() const override
See gum::PRMClassElement::elt_type().
Idx label() const
Returns the label's index on which this aggregate applies.
bool isDecomposable() const
Returns true if the aggregator is decomposable.
PRMAttribute is a member of a Class in a PRM.
Abstract class representing an element of PRM class.
PRMClassElement(std::string_view name)
Default constructor of a PRMClassElement.
ClassElementType
Returns true if obj_ptr is of type PRMReferenceSlot.
A PRMClass is an object of a PRM representing a fragment of a Bayesian network which can be instantia...
const std::string & name() const
Returns the name of this object.
This is a decoration of the DiscreteVariable class.
Size Idx
Type for indexes.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities