aGrUM  0.14.2
PRMFuncAttribute_tpl.h
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
28 namespace gum {
29  namespace prm {
30 
31  template < typename GUM_SCALAR >
33  const std::string& name,
34  const PRMType& type,
36  PRMScalarAttribute< GUM_SCALAR >(name, type, impl) {
37  std::stringstream str;
38  str << "In FuncAttribute(" << name << ", " << type.name() << ", " << impl
39  << ")";
40  GUM_CONSTRUCTOR(PRMFuncAttribute);
41  }
42 
43  template < typename GUM_SCALAR >
45  GUM_DESTRUCTOR(PRMFuncAttribute);
46  }
47 
48  template < typename GUM_SCALAR >
50  const PRMClassElement< GUM_SCALAR >& elt) {}
51 
52  template < typename GUM_SCALAR >
54  const PRMClassElement< GUM_SCALAR >& elt) {}
55 
56  template < typename GUM_SCALAR >
58  const PRMFuncAttribute< GUM_SCALAR >& source) :
59  PRMScalarAttribute< GUM_SCALAR >(source) {
60  GUM_CONS_CPY(PRMFuncAttribute);
61  GUM_ERROR(FatalError, "illegal call to copy constructor");
62  }
63 
64  template < typename GUM_SCALAR >
67  GUM_ERROR(FatalError, "illegal call to copy operator");
68  }
69 
70  template < typename GUM_SCALAR >
71  INLINE void
74  "Cannot change CPF of a functional attribute");
75  }
76 
77  } /* namespace prm */
78 } /* namespace gum */
aGrUM&#39;s Potential is a multi-dimensional array with tensor operators.
Definition: potential.h:57
const std::string & name() const
Returns the name of this object.
Definition: PRMType_inl.h:65
PRMFuncAttribute< GUM_SCALAR > & operator=(const PRMFuncAttribute< GUM_SCALAR > &from)
Copy operator. Don&#39;t use it.
Abstract class representing an element of PRM class.
virtual void addChild(const PRMClassElement< GUM_SCALAR > &elt)
See gum::PRMClassElement::_addChild().
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
virtual const Potential< GUM_SCALAR > & cpf() const
See gum::PRMClassElement::cpf().
<agrum/PRM/elements/funcAttribute.h>
This is a decoration of the DiscreteVariable class.
Definition: PRMType.h:60
PRMFuncAttribute(const std::string &name, const PRMType &type, MultiDimImplementation< GUM_SCALAR > *impl=new MultiDimArray< GUM_SCALAR >())
Constructor used by gum::Class.
virtual ~PRMFuncAttribute()
Destructor.
<agrum/multidim/multiDimImplementation.h>
virtual void addParent(const PRMClassElement< GUM_SCALAR > &elt)
See gum::PRMClassElement::_addParent().
virtual void _setCpf(Potential< GUM_SCALAR > *cpf)
<agrum/PRM/elements/scalarAttribute.h>
#define GUM_ERROR(type, msg)
Definition: exceptions.h:52