37 template <
typename GUM_SCALAR >
40 GUM_SCALAR default_weight) :
42 __external_weight(external_weight), __default_weight(default_weight) {
47 template <
typename GUM_SCALAR >
58 template <
typename GUM_SCALAR >
78 template <
typename GUM_SCALAR >
83 template <
typename GUM_SCALAR >
89 template <
typename GUM_SCALAR >
97 if (w == (GUM_SCALAR)0) {
104 template <
typename GUM_SCALAR >
109 template <
typename GUM_SCALAR >
114 template <
typename GUM_SCALAR >
119 for (
Idx i = 1; i < this->
nbrDim(); i++) {
129 template <
typename GUM_SCALAR >
141 for (
Idx i = 1; i < this->
nbrDim(); i++) {
143 const_cast< const DiscreteVariable* >(&this->
variable(i)),
144 p->causalWeight(this->variable(i)));
150 template <
typename GUM_SCALAR >
152 static const std::string str =
"MultiDimICIModel";
156 template <
typename GUM_SCALAR >
virtual ~MultiDimICIModel()
Destructor.
Header of the MultiDimReadOnly class.
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.
gum is the global namespace for all aGrUM entities
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.
Abstract base class for all multi dimensionnal Causal Independency models.
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
Set of pairs of elements with fast search for both elements.
#define GUM_ERROR(type, msg)