aGrUM  0.16.0
PRMParameter.h
Go to the documentation of this file.
1 
30 #ifndef GUM_PARAMETER_H
31 #define GUM_PARAMETER_H
32 
34 
38 
39 
40 namespace gum {
41  namespace prm {
42 
51  template < typename GUM_SCALAR >
52  class PRMParameter : public PRMClassElement< GUM_SCALAR > {
53  public:
54  enum ParameterType { INT, REAL };
55 
56  // ========================================================================
58  // ========================================================================
60 
68  PRMParameter(const std::string& name, ParameterType type, GUM_SCALAR value);
69 
71  virtual ~PRMParameter();
72 
74  // ========================================================================
76  // ========================================================================
78 
81  elt_type() const;
82 
83  GUM_SCALAR value() const;
84 
85  void value(GUM_SCALAR value);
86 
87  ParameterType valueType() const;
88 
90  virtual PRMType& type();
91 
93  virtual const PRMType& type() const;
94 
96  virtual Potential< GUM_SCALAR >& cpf();
97 
99  virtual const Potential< GUM_SCALAR >& cpf() const;
100 
103 
106 
110 
112  protected:
115 
119 
120  private:
121  // ========================================================================
123  // ========================================================================
125 
127 
128  GUM_SCALAR __value;
129 
131  };
132 
133 
134 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
135  extern template class PRMParameter< double >;
136 #endif
137 
138 
139  } /* namespace prm */
140 } // namespace gum
141 
143 
144 #endif /* GUM_PARAMETER_H */
aGrUM&#39;s Potential is a multi-dimensional array with tensor operators.
Definition: potential.h:60
PRMParameter is a member of a Class in a PRM.
Definition: PRMParameter.h:52
virtual Potential< GUM_SCALAR > & cpf()
See gum::PRMClassElement::cpf().
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:35
virtual ~PRMParameter()
Destructor.
PRMParameter< GUM_SCALAR > & operator=(const PRMParameter< GUM_SCALAR > &from)
Copy operator. Don&#39;t use it.
GUM_SCALAR value() const
See gum::PRMClassElement::elt_type().
Abstract class representing an element of PRM class.
void addParent(const gum::prm::PRMClassElement< GUM_SCALAR > &)
See gum::PRMClassElement::addParent().
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
PRMParameter(const std::string &name, ParameterType type, GUM_SCALAR value)
Constructor used by gum::Class.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
This is a decoration of the DiscreteVariable class.
Definition: PRMType.h:63
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual PRMAttribute< GUM_SCALAR > * getCastDescendant() const
Raise a gum::OperationNotAllowed See gum::PRMClassElement::getCastDescendant()
virtual PRMType & type()
See gum::PRMClassElement::type().
ParameterType __type
Definition: PRMParameter.h:126
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
ParameterType valueType() const
See gum::PRMClassElement::elt_type().
void addChild(const gum::prm::PRMClassElement< GUM_SCALAR > &)
See gum::PRMClassElement::addChild().
PRMAttribute is a member of a Class in a PRM.
Definition: PRMAttribute.h:61
virtual PRMClassElement< GUM_SCALAR >::ClassElementType elt_type() const
See gum::PRMClassElement::elt_type().
ClassElementType
Returns true if obj_ptr is of type PRMReferenceSlot.