55 template < GUM_Numeric GUM_SCALAR >
57 std::string_view
name,
81 this->
lastElt().type().variable().setName(name);
86 template < GUM_Numeric GUM_SCALAR >
114 template < GUM_Numeric GUM_SCALAR >
118 switch (
_chain_->back()->elt_type()) {
123 for (
auto var: old_attr->cpf().variablesSequence()) {
124 if (var != &(old_attr->type().variable())) { bij.
insert(var, var); }
127 new_elt = old_attr->copy(bij);
151 template < GUM_Numeric GUM_SCALAR >
158 template < GUM_Numeric GUM_SCALAR >
167 template < GUM_Numeric GUM_SCALAR >
173 template < GUM_Numeric GUM_SCALAR >
179 template < GUM_Numeric GUM_SCALAR >
181 return _chain_->back()->type();
184 template < GUM_Numeric GUM_SCALAR >
186 return _chain_->back()->type();
189 template < GUM_Numeric GUM_SCALAR >
194 template < GUM_Numeric GUM_SCALAR >
200 template < GUM_Numeric GUM_SCALAR >
206 template < GUM_Numeric GUM_SCALAR >
211 template < GUM_Numeric GUM_SCALAR >
216 template < GUM_Numeric GUM_SCALAR >
221 template < GUM_Numeric GUM_SCALAR >
226 template < GUM_Numeric GUM_SCALAR >
229 template < GUM_Numeric GUM_SCALAR >
232 template < GUM_Numeric GUM_SCALAR >
237 template < GUM_Numeric GUM_SCALAR >
Headers of gum::PRMSlotChain.
void insert(const T1 &first, const T2 &second)
Inserts a new association in the gum::Bijection.
Set of pairs of elements with fast search for both elements.
Exception : fatal (unknown ?) error.
Exception : operation not allowed.
The generic class for storing (ordered) sequences of objects.
Exception: wrong PRMClassElement for this operation.
PRMType & type() override
See gum::PRMClassElement::type().
AggregateType agg_type() const
Returns the aggregate of *this.
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.
virtual void setId(NodeId id)
Used to assign the id of this element.
NodeId id() const
Returns the NodeId of this element in it's class DAG.
std::string safeName_
The safe name of this PRMClassElement.
const std::string & name() const
Returns the name of this object.
static std::string RIGHT_CAST()
Enumeration of the different types of objects handled by a PRM.
static std::string LEFT_CAST()
Enumeration of the different types of objects handled by a PRM.
A PRMReferenceSlot represent a relation between two PRMClassElementContainer.
bool isArray() const
Returns true if this reference slot is an array.
PRMClassElementContainer< GUM_SCALAR > & slotType()
Returns the type of this slot, which is a PRMClassElementContainer (it is not the type of PRMObject).
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.
#define GUM_ERROR(type, msg)
std::size_t Size
In aGrUM, hashed values are unsigned long int.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities