40 template <
typename GUM_SCALAR >
43 GUM_SCALAR default_weight) :
45 __external_weight(external_weight), __default_weight(default_weight) {
50 template <
typename GUM_SCALAR >
61 template <
typename GUM_SCALAR >
81 template <
typename GUM_SCALAR >
86 template <
typename GUM_SCALAR >
92 template <
typename GUM_SCALAR >
100 if (w == (GUM_SCALAR)0) {
107 template <
typename GUM_SCALAR >
112 template <
typename GUM_SCALAR >
117 template <
typename GUM_SCALAR >
122 for (
Idx i = 1; i < this->
nbrDim(); i++) {
132 template <
typename GUM_SCALAR >
144 for (
Idx i = 1; i < this->
nbrDim(); i++) {
146 const_cast< const DiscreteVariable* >(&this->
variable(i)),
147 p->causalWeight(this->variable(i)));
153 template <
typename GUM_SCALAR >
155 static const std::string str =
"MultiDimICIModel";
159 template <
typename GUM_SCALAR >
virtual ~MultiDimICIModel()
Destructor.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
HashTable< const DiscreteVariable *, GUM_SCALAR > __causal_weights
in Henrion (89) in a hashtable with a default_value.
const T1 & first(const T2 &second) const
Returns the first value of a pair given its second value.
Safe Const Iterators for hashtables.
virtual const DiscreteVariable & variable(Idx i) const override
Returns a const ref to the ith var.
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Abstract base class for all multi dimensionnal containers.
Abstract base class for all multi dimensionnal read only structure.
GUM_SCALAR __external_weight
in Henrion (89).
GUM_SCALAR externalWeight() const
Copy of a multiDimICIModel.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual void _replace(const DiscreteVariable *x, const DiscreteVariable *y) override
Replace variable x by y.
abstract class for Conditional Indepency Models
virtual Size domainSize() const =0
Returns the product of the variables domain size.
GUM_SCALAR __default_weight
in Henrion (89) in a hashtable with a default_value.
virtual const std::string & name() const override
returns the real name of the multiDimArray
Set of pairs of elements with fast search for both elements.
virtual void _replace(const DiscreteVariable *x, const DiscreteVariable *y) override
Replace variable x by y.
virtual void copyFrom(const MultiDimContainer< GUM_SCALAR > &src) const
Basic copy of a MultiDimContainer.
virtual void copyFrom(const MultiDimContainer< GUM_SCALAR > &src) const override
Copy of a multiDimICIModel.
const std::string toString() const override
Copy of a multiDimICIModel.
virtual Idx nbrDim() const override
Returns the number of vars in the multidimensional container.
virtual Size domainSize() const override
Returns the product of the variables domain size.
GUM_SCALAR causalWeight(const DiscreteVariable &v) const
Copy of a multiDimICIModel.
MultiDimICIModel(GUM_SCALAR external_weight, GUM_SCALAR default_weight=(GUM_SCALAR) 1.0)
Default constructor.
Size Idx
Type for indexes.
virtual bool contains(const DiscreteVariable &v) const override
Returns true if var is in *this.
const std::string & name() const
returns the name of the variable
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
#define GUM_ERROR(type, msg)