49#ifndef GUM_SLOT_CHAIN_H
50#define GUM_SLOT_CHAIN_H
60 template < GUM_Numeric GUM_SCALAR >
62 template < GUM_Numeric GUM_SCALAR >
90 template < GUM_Numeric GUM_SCALAR >
165 const Tensor< GUM_SCALAR >&
cpf()
const override;
229#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Headers of gum::PRMAggregate.
Headers of gum::PRMClassElement.
Inline implementation of gum::PRMSlotChain<GUM_SCALAR>.
The generic class for storing (ordered) sequences of objects.
PRMAttribute is a member of a Class in a PRM.
<agrum/PRM/classElementContainer.h>
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.
A PRMSlotChain represents a sequence of gum::prm::PRMClassElement<GUM_SCALAR> where the n-1 first gum...
bool _isMultiple_
Flag indicating if this slot chain is multiple or not.
void _copyLastElt_()
Copy the last element, this prevents unwanted DuplicateElement exceptions.
Sequence< PRMClassElement< GUM_SCALAR > * > * _chain_
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
PRMType & type() override
This is similar to the following call: this->lastElt().type().
PRMClassElement< GUM_SCALAR > & lastElt()
Returns the last element of the slot chain, typically this is an gum::PRMAttribute or a gum::PRMAggre...
Sequence< PRMClassElement< GUM_SCALAR > * > & chain()
Return the sequence representing the chain of elements in this PRMSlotChain.
void addParent(const PRMClassElement< GUM_SCALAR > &elt) override
See gum::PRMClassElement<GUM_SCALAR>::addParent_().
void addChild(const PRMClassElement< GUM_SCALAR > &elt) override
See gum::PRMClassElement<GUM_SCALAR>::addChild_().
PRMClassElement< GUM_SCALAR >::ClassElementType elt_type() const override
See gum::PRMClassElement<GUM_SCALAR>::elt_type().
PRMSlotChain(std::string_view name, const Sequence< PRMClassElement< GUM_SCALAR > * > &chain)
Default constructor.
bool isMultiple() const
Return true if this slot chain contains at least one multiple reference slot.
~PRMSlotChain() override
Destructor.
const Tensor< GUM_SCALAR > & cpf() const override
This is similar to the following call: this->lastElt().cpf().
PRMClassElementContainer< GUM_SCALAR > & end()
Returns the PRMClassElement<GUM_SCALAR>Container over which this slot chain ends.
PRMAttribute< GUM_SCALAR > * getCastDescendant() const override
Raise a gum::OperationNotAllowed exception See gum::PRMClassElement<GUM_SCALAR>::getCastDescendant().
PRMSlotChain & operator=(const PRMSlotChain &source)
Copy operator. Don't use it.
This is a decoration of the DiscreteVariable class.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities