54 template <
typename GUM_SCALAR >
56 const std::string&
name,
80 this->
lastElt().type().variable().setName(name);
85 template <
typename GUM_SCALAR >
113 template <
typename GUM_SCALAR >
117 switch (
_chain_->back()->elt_type()) {
122 for (
auto var: old_attr->cpf().variablesSequence()) {
123 if (var != &(old_attr->type().variable())) { bij.
insert(var, var); }
126 new_elt = old_attr->copy(bij);
150 template <
typename GUM_SCALAR >
157 template <
typename GUM_SCALAR >
166 template <
typename GUM_SCALAR >
172 template <
typename GUM_SCALAR >
178 template <
typename GUM_SCALAR >
180 return _chain_->back()->type();
183 template <
typename GUM_SCALAR >
185 return _chain_->back()->type();
188 template <
typename GUM_SCALAR >
193 template <
typename GUM_SCALAR >
199 template <
typename GUM_SCALAR >
205 template <
typename GUM_SCALAR >
210 template <
typename GUM_SCALAR >
215 template <
typename GUM_SCALAR >
220 template <
typename GUM_SCALAR >
226 template <
typename GUM_SCALAR >
229 template <
typename GUM_SCALAR >
232 template <
typename GUM_SCALAR >
237 template <
typename 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.
virtual PRMType & type()
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(const std::string &name)
Default constructor of a PRMClassElement.
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.
ClassElementType
Returns true if obj_ptr is of type PRMReferenceSlot.
std::string safeName_
The safe name of this PRMClassElement.
const std::string & name() const
Returns the name of this object.
static std::string LEFT_CAST()
Enumeration of the different types of objects handled by a PRM.
static std::string RIGHT_CAST()
Enumeration of the different types of objects handled by a PRM.
A PRMReferenceSlot represent a relation between two PRMClassElementContainer.
PRMClassElementContainer< GUM_SCALAR > & slotType()
Returns the type of this slot, which is a PRMClassElementContainer (it is not the type of PRMObject).
bool isArray() const
Returns true if this reference slot is an array.
PRMSlotChain(const std::string &name, const Sequence< PRMClassElement< GUM_SCALAR > * > &chain)
Default constructor.
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()
Return the sequence representing the chain of elements in this PRMSlotChain.
virtual void addChild(const PRMClassElement< GUM_SCALAR > &elt)
See gum::PRMClassElement<GUM_SCALAR>::addChild_().
Sequence< PRMClassElement< GUM_SCALAR > * > * _chain_
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
virtual void addParent(const PRMClassElement< GUM_SCALAR > &elt)
See gum::PRMClassElement<GUM_SCALAR>::addParent_().
PRMClassElementContainer< GUM_SCALAR > & end()
Returns the PRMClassElement<GUM_SCALAR>Container over which this slot chain ends.
virtual PRMAttribute< GUM_SCALAR > * getCastDescendant() const
Raise a gum::OperationNotAllowed exception See gum::PRMClassElement<GUM_SCALAR>::getCastDescendant().
PRMClassElement< GUM_SCALAR > & lastElt()
Returns the last element of the slot chain, typically this is an gum::PRMAttribute or a gum::PRMAggre...
virtual PRMType & type()
This is similar to the following call: this->lastElt().type().
virtual PRMClassElement< GUM_SCALAR >::ClassElementType elt_type() const
See gum::PRMClassElement<GUM_SCALAR>::elt_type().
PRMSlotChain & operator=(const PRMSlotChain &source)
Copy operator. Don't use it.
virtual ~PRMSlotChain()
Destructor.
virtual const Tensor< GUM_SCALAR > & cpf() const
This is similar to the following call: this->lastElt().cpf().
bool isMultiple() const
Return true if this slot chain contains at least one multiple reference slot.
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