60 template <
typename GUM_SCALAR >
62 GUM_SCALAR default_weight) :
69 template <
typename GUM_SCALAR >
80 template <
typename GUM_SCALAR >
99 template <
typename GUM_SCALAR >
104 template <
typename GUM_SCALAR >
109 template <
typename GUM_SCALAR >
111 GUM_SCALAR w)
const {
116 if (w == (GUM_SCALAR)0) {
GUM_ERROR(gum::OutOfBounds,
"causal weight in CI Model>0") }
121 template <
typename GUM_SCALAR >
126 template <
typename GUM_SCALAR >
131 template <
typename GUM_SCALAR >
143 template <
typename GUM_SCALAR >
153 for (
Idx i = 1; i < this->
nbrDim(); i++) {
155 p->causalWeight(this->variable(i)));
161 template <
typename GUM_SCALAR >
163 static const std::string str =
"MultiDimICIModel";
167 template <
typename GUM_SCALAR >
Set of pairs of elements with fast search for both elements.
const T1 & first(const T2 &second) const
Returns the first value of a pair given its second value.
Set of pairs of elements with fast search for both elements.
Base class for discrete random variable.
Safe Const Iterators for hashtables.
Exception: at least one argument passed to a function is not what was expected.
Abstract base class for all multi dimensionnal containers.
virtual void copyFrom(const MultiDimContainer< GUM_SCALAR > &src) const
Basic copy of a MultiDimContainer.
virtual void replace_(const DiscreteVariable *x, const DiscreteVariable *y) override
Replace variable x by y.
GUM_SCALAR externalWeight() const
Copy of a multiDimICIModel.
virtual const std::string & name() const override
returns the real name of the multiDimArray
GUM_SCALAR _default_weight_
in Henrion (89) in a hashtable with a default_value.
virtual void copyFrom(const MultiDimContainer< GUM_SCALAR > &src) const override
Copy of a multiDimICIModel.
MultiDimICIModel(GUM_SCALAR external_weight, GUM_SCALAR default_weight=(GUM_SCALAR) 1.0)
Default constructor.
virtual ~MultiDimICIModel()
Destructor.
std::string toString() const override
Copy of a multiDimICIModel.
HashTable< const DiscreteVariable *, GUM_SCALAR > _causal_weights_
in Henrion (89) in a hashtable with a default_value.
GUM_SCALAR causalWeight(const DiscreteVariable &v) const
Copy of a multiDimICIModel.
GUM_SCALAR _external_weight_
in Henrion (89).
virtual Idx nbrDim() const override
Returns the number of vars in the multidimensional container.
virtual void replace_(const DiscreteVariable *x, const DiscreteVariable *y) override
Replace variable x by y.
virtual bool contains(const DiscreteVariable &v) const override
Returns true if var is in *this.
const DiscreteVariable & variable(Idx i) const override
Returns a const ref to the ith var.
virtual Size domainSize() const =0
Returns the product of the variables domain size.
MultiDimReadOnly()
Default constructor.
Exception : the element we looked for cannot be found.
Exception : operation not allowed.
const std::string & name() const
returns the name of the variable
#define GUM_ERROR(type, msg)
Size Idx
Type for indexes.
Abstract base class for all multi dimensionnal Causal Independency models.
Header of the MultiDimReadOnly class.
gum is the global namespace for all aGrUM entities