![]() |
aGrUM
0.16.0
|
aGrUM's Potential is a multi-dimensional array with tensor operators. More...
#include <agrum/multidim/potential.h>
Public Member Functions | |
Constructors, Destructors and Copy | |
Potential () | |
Default constructor. More... | |
Potential (MultiDimImplementation< GUM_SCALAR > *aContent) | |
Creates an potential around aContent. More... | |
Potential (MultiDimImplementation< GUM_SCALAR > *aContent, const MultiDimContainer< GUM_SCALAR > &src) | |
Copy constructor. More... | |
Potential (const Potential< GUM_SCALAR > &src) | |
Copy constructor & assignment. More... | |
Potential< GUM_SCALAR > & | operator= (const Potential< GUM_SCALAR > &src) |
Default constructor. More... | |
Potential (Potential< GUM_SCALAR > &&from) | |
move constructor & assignement More... | |
Potential< GUM_SCALAR > & | operator= (Potential< GUM_SCALAR > &&src) |
Default constructor. More... | |
~Potential () | |
Destructor. More... | |
MultiDimContainer implementation | |
virtual Potential< GUM_SCALAR > * | newFactory () const |
Default implementation of MultiDimContainer::set(). More... | |
Class operation for Potential instances | |
const Potential< GUM_SCALAR > & | random () const |
generate a random Potential with each parameter in [0,1] More... | |
const Potential< GUM_SCALAR > & | randomDistribution () const |
generate a random Distribution in the Potential More... | |
const Potential< GUM_SCALAR > & | randomCPT () const |
generate a random CPT in the Potential More... | |
const Potential< GUM_SCALAR > & | noising (GUM_SCALAR alpha) const |
add a noise in a CPT by mixing (1-alpha)this+alpha.randomCPT() More... | |
Potential< GUM_SCALAR > | margSumOut (const Set< const DiscreteVariable * > &del_vars) const |
Projection using sum as operation (and implementation-optimized operations) More... | |
Potential< GUM_SCALAR > | margSumIn (const Set< const DiscreteVariable * > &kept_vars) const |
Projection using sum as operation (and implementation-optimized operations) More... | |
Potential< GUM_SCALAR > | margProdOut (const Set< const DiscreteVariable * > &del_vars) const |
Projection using multiplication as operation (and implementation-optimized operations) More... | |
Potential< GUM_SCALAR > | margProdIn (const Set< const DiscreteVariable * > &kept_vars) const |
Projection using multiplication as operation (and implementation-optimized operations) More... | |
Potential< GUM_SCALAR > | margMinOut (const Set< const DiscreteVariable * > &del_vars) const |
Projection using min as operation (and implementation-optimized operations) More... | |
Potential< GUM_SCALAR > | margMinIn (const Set< const DiscreteVariable * > &kept_vars) const |
Projection using min as operation (and implementation-optimized operations) More... | |
Potential< GUM_SCALAR > | margMaxOut (const Set< const DiscreteVariable * > &del_vars) const |
Projection using max as operation (and implementation-optimized operations) More... | |
Potential< GUM_SCALAR > | margMaxIn (const Set< const DiscreteVariable * > &kept_vars) const |
Projection using max as operation (and implementation-optimized operations) More... | |
Potential< GUM_SCALAR > | isNonZeroMap () const |
create a boolean-like potential using the predicate isNonZero More... | |
GUM_SCALAR | sum () const |
sum of all elements in the Potential More... | |
GUM_SCALAR | product () const |
product of all elements in the Potential More... | |
GUM_SCALAR | max () const |
max of all elements in the Potential More... | |
GUM_SCALAR | min () const |
min of all elements in the Potential More... | |
GUM_SCALAR | maxNonOne () const |
max of all non one elements in the Potential More... | |
GUM_SCALAR | minNonZero () const |
min of all non zero elements in the Potential More... | |
Set< Instantiation > | findAll (GUM_SCALAR v) const |
set of instantiation corresponding to the parameter v in the Potential More... | |
Set< Instantiation > | argmax () const |
set of instantiation corresponding to the max in the Potential More... | |
Set< Instantiation > | argmin () const |
set of instantiation corresponding to the min in the Potential More... | |
GUM_SCALAR | entropy () const |
entropy of the Potential More... | |
Potential< GUM_SCALAR > | reorganize (const std::vector< const DiscreteVariable * > &vars) const |
create a new Potential with another order More... | |
Potential< GUM_SCALAR > | extract (const Instantiation &inst) const |
create a new Potential extracted from *this given a partial instantiation More... | |
Potential< GUM_SCALAR > | putFirst (const DiscreteVariable *var) const |
create a new Potential with a certain variable in first More... | |
const Potential< GUM_SCALAR > & | fillWith (const Potential< GUM_SCALAR > &src) const |
copy a Potential data using name of variables and labels (not necessarily the same variables in the same orders) More... | |
const Potential< GUM_SCALAR > & | fillWith (const Potential< GUM_SCALAR > &src, const std::vector< std::string > &mapSrc) const |
copy a Potential data using the sequence of names in mapSrc to find the corresponding variables. More... | |
const Potential< GUM_SCALAR > & | fillWith (const std::vector< GUM_SCALAR > &v) const |
Automatically fills the potential with the values in v. More... | |
const Potential< GUM_SCALAR > & | fillWith (const GUM_SCALAR &v) const |
Automatically fills this MultiDimContainer with the value v. More... | |
const Potential< GUM_SCALAR > & | abs () const |
Apply abs on every element of the container. More... | |
const Potential< GUM_SCALAR > & | normalize () const |
normalisation of this do nothing if sum is 0 More... | |
const Potential< GUM_SCALAR > & | sq () const |
apply $x^2$ on every element of the container More... | |
GUM_SCALAR | KL (const Potential< GUM_SCALAR > &p) const |
compute KL divergence between this and p Checks the compatibility and then compute KL divergence More... | |
const Potential< GUM_SCALAR > & | normalizeAsCPT () const |
normalisation of this as a CPT More... | |
const Potential< GUM_SCALAR > & | scale (GUM_SCALAR v) const |
create a new potential multiplied by v from *this More... | |
const Potential< GUM_SCALAR > & | translate (GUM_SCALAR v) const |
create a new potential added with v from *this More... | |
Idx | draw () const |
get a value at random from a 1-D distribution More... | |
Potential algebra operators | |
Potential< GUM_SCALAR > | operator+ (const Potential< GUM_SCALAR > &p2) const |
the function to be used to add two Potentials More... | |
Potential< GUM_SCALAR > | operator- (const Potential< GUM_SCALAR > &p2) const |
the function to be used to subtract two Potentials More... | |
Potential< GUM_SCALAR > | operator* (const Potential< GUM_SCALAR > &p2) const |
the function to be used to multiply two Potentials More... | |
Potential< GUM_SCALAR > | operator/ (const Potential< GUM_SCALAR > &p2) const |
the function to be used to divide two Potentials More... | |
Potential< GUM_SCALAR > & | operator+= (const Potential< GUM_SCALAR > &r) |
the function to be used to add two Potentials More... | |
Potential< GUM_SCALAR > & | operator*= (const Potential< GUM_SCALAR > &r) |
the function to be used to add two Potentials More... | |
Potential< GUM_SCALAR > & | operator-= (const Potential< GUM_SCALAR > &r) |
the function to be used to add two Potentials More... | |
Potential< GUM_SCALAR > & | operator/= (const Potential< GUM_SCALAR > &r) |
the function to be used to add two Potentials More... | |
bool | operator== (const Potential< GUM_SCALAR > &r) const |
the function to be used to add two Potentials More... | |
bool | operator!= (const Potential< GUM_SCALAR > &r) const |
the function to be used to add two Potentials More... | |
virtual const std::string | toString () const |
the function to be used to add two Potentials More... | |
MultiDimInterface implementation | |
virtual Idx | nbrDim () const final |
Returns the number of vars in the multidimensional container. More... | |
virtual Size | domainSize () const final |
Returns the product of the variables domain size. More... | |
virtual void | add (const DiscreteVariable &v) final |
Adds a new var to the variables of the multidimensional matrix. More... | |
virtual void | erase (const DiscreteVariable &var) final |
Removes a var from the variables of the multidimensional matrix. More... | |
virtual const Sequence< const DiscreteVariable *> & | variablesSequence () const final |
Returns a const ref to the sequence of DiscreteVariable*. More... | |
virtual const DiscreteVariable & | variable (Idx) const final |
Returns a const ref to the ith var. More... | |
virtual const DiscreteVariable & | variable (const std::string &name) const final |
Returns the variable with the name. More... | |
virtual Idx | pos (const DiscreteVariable &var) const final |
Returns the index of a variable. More... | |
virtual bool | contains (const DiscreteVariable &var) const final |
Returns true if var is in *this. More... | |
virtual bool | empty () const final |
Returns true if no var is in *this. More... | |
MultiDimAdressable implementation | |
virtual bool | unregisterSlave (Instantiation &i) final |
Unregister i as a slave of this MultiDimAdressable. More... | |
virtual bool | registerSlave (Instantiation &i) final |
Register i as a slave of this MultiDimAdressable. More... | |
virtual void | changeNotification (const Instantiation &i, const DiscreteVariable *const var, Idx oldval, Idx newval) final |
Listen to changes in a given Instantiation. More... | |
virtual void | setChangeNotification (const Instantiation &i) final |
Listen to an assignment of a value in a Instantiation. More... | |
virtual void | setFirstNotification (const Instantiation &i) final |
Listen to setFirst in a given Instantiation. More... | |
virtual void | setLastNotification (const Instantiation &i) final |
Listen to setLast in a given Instantiation. More... | |
virtual void | setIncNotification (const Instantiation &i) final |
Listen to increment in a given Instantiation. More... | |
virtual void | setDecNotification (const Instantiation &i) final |
Listen to increment in each recorded Instantiation. More... | |
virtual void | notifyChange () const final |
MultiDimContainer implementation | |
virtual void | set (const Instantiation &i, const GUM_SCALAR &value) const final |
Default implementation of MultiDimContainer::set(). More... | |
virtual GUM_SCALAR | get (const Instantiation &i) const final |
Default implementation of MultiDimContainer::get(). More... | |
virtual void | fill (const GUM_SCALAR &d) const final |
Default implementation of MultiDimContainer::set(). More... | |
virtual void | populate (const std::vector< GUM_SCALAR > &v) const final |
Automatically fills this MultiDimContainer with the values in v. More... | |
virtual void | apply (std::function< GUM_SCALAR(GUM_SCALAR) > f) const final |
Apply a function on every element of the container. More... | |
virtual GUM_SCALAR | reduce (std::function< GUM_SCALAR(GUM_SCALAR, GUM_SCALAR) > f, GUM_SCALAR base) const final |
compute lfold for this container More... | |
virtual void | beginMultipleChanges () final |
Default implementation of MultiDimContainer::set(). More... | |
virtual void | endMultipleChanges () final |
Default implementation of MultiDimContainer::set(). More... | |
virtual void | endMultipleChanges (const GUM_SCALAR &) final |
Default implementation of MultiDimContainer::set(). More... | |
virtual const std::string | toString (const Instantiation *i) const |
Default implementation of MultiDimContainer::set(). More... | |
Accessors / Modifiers | |
virtual void | populate (std::initializer_list< GUM_SCALAR > l) const |
Automatically fills this MultiDimContainer with the values in l. More... | |
GUM_SCALAR | operator[] (const Instantiation &i) const |
An [] operator using a Instantiation as argument. More... | |
Various methods. | |
virtual const MultiDimImplementation< GUM_SCALAR > * | content () const final |
Returns the implementation for this object (may be *this). More... | |
virtual MultiDimImplementation< GUM_SCALAR > * | content () final |
Returns the implementation for this object (may be *this). More... | |
Copy methods. | |
virtual void | copyFrom (const MultiDimContainer< GUM_SCALAR > &src) const |
Basic copy of a MultiDimContainer. More... | |
virtual void | copyFrom (const MultiDimContainer< GUM_SCALAR > &src, Instantiation *p_i) const |
Basic copy of a MultiDimContainer. More... | |
virtual void | extractFrom (const MultiDimContainer< GUM_SCALAR > &src, const Instantiation &mask) |
Basic extraction of a MultiDimContainer. More... | |
virtual MultiDimAdressable & | getMasterRef () |
In order to insure the dereference for decorators, we need to virtualize the access to master pointer. More... | |
virtual const MultiDimAdressable & | getMasterRef () const |
In order to insure the dereference for decorators, we need to virtualize the access to master pointer. More... | |
virtual void | copy (const MultiDimContainer< GUM_SCALAR > &src) |
Removes all variables in this MultiDimContainer and copy the content of src, variables included. More... | |
Various methods. | |
bool | operator== (const MultiDimContainer< GUM_SCALAR > &p) const |
Test if this MultiDimContainer is equal to p. More... | |
bool | operator!= (const MultiDimContainer< GUM_SCALAR > &p) const |
Test if this MultiDimContainer is different of p. More... | |
Accessors / Modifiers | |
void | replace (const DiscreteVariable &x, const DiscreteVariable &y) |
Replace variables in this multidim. More... | |
Protected Attributes | |
MultiDimImplementation< GUM_SCALAR > * | _content |
The true container. More... | |
GUM_SCALAR | _empty_value |
value of the MultiDimDecorator if no dimension. More... | |
Protected Member Functions | |
Set< const DiscreteVariable *> | _complementVars (const Set< const DiscreteVariable * > &del_vars) const |
virtual void | _replace (const DiscreteVariable *x, const DiscreteVariable *y) |
This is called by MultiDimContainer::replace() to proceed with the replacing between x and y. More... | |
void | _swapContent (MultiDimImplementation< GUM_SCALAR > *aContent) const |
protecte method to swap the implementation behind the Potential More... | |
GUM_SCALAR & | _get (const Instantiation &i) const final |
Return a data, given a Insantiation - final method. More... | |
aGrUM's Potential is a multi-dimensional array with tensor operators.
It is used to represent probabilities and utilities in aGrUMs' multidimensional (graphical) models.
Using the decorator pattern, this representation is independent from the implementation of the multidimensional matrix.
GUM_SCALAR | The type of the scalar stored in this multidimensional matrix. |
Definition at line 60 of file potential.h.
INLINE gum::Potential< GUM_SCALAR >::Potential | ( | ) |
Default constructor.
Creates an empty null dimensional matrix with a MultiDimArray as its implementation.
Definition at line 38 of file potential_tpl.h.
INLINE gum::Potential< GUM_SCALAR >::Potential | ( | MultiDimImplementation< GUM_SCALAR > * | aContent | ) |
Creates an potential around aContent.
aContent | The implementation of this Potential. |
Definition at line 46 of file potential_tpl.h.
gum::Potential< GUM_SCALAR >::Potential | ( | MultiDimImplementation< GUM_SCALAR > * | aContent, |
const MultiDimContainer< GUM_SCALAR > & | src | ||
) |
Copy constructor.
The newly created Potential share the variables and the values from src, but no instantiation is associated to it. It allows to force the chosen implementation and to copy the data from src.
aContent | The implementation to use in this Potential. |
src | The MultiDimContainer to copy. |
Definition at line 74 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::add(), gum::MultiDimDecorator< GUM_SCALAR >::beginMultipleChanges(), gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimContainer< GUM_SCALAR >::content(), gum::MultiDimInterface::empty(), gum::MultiDimDecorator< GUM_SCALAR >::endMultipleChanges(), gum::Potential< GUM_SCALAR >::operator=(), and gum::MultiDimInterface::variablesSequence().
INLINE gum::Potential< GUM_SCALAR >::Potential | ( | const Potential< GUM_SCALAR > & | src | ) |
Copy constructor & assignment.
Definition at line 54 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_empty_value.
INLINE gum::Potential< GUM_SCALAR >::Potential | ( | Potential< GUM_SCALAR > && | from | ) |
gum::Potential< GUM_SCALAR >::~Potential | ( | ) |
|
protected |
Definition at line 506 of file potential_tpl.h.
References gum::Set< Key, Alloc >::contains(), gum::Set< Key, Alloc >::insert(), and gum::MultiDimDecorator< GUM_SCALAR >::variablesSequence().
Referenced by gum::Potential< GUM_SCALAR >::margMaxIn(), gum::Potential< GUM_SCALAR >::margMinIn(), gum::Potential< GUM_SCALAR >::margProdIn(), gum::Potential< GUM_SCALAR >::margSumIn(), and gum::Potential< GUM_SCALAR >::toString().
|
finalprotectedvirtualinherited |
Return a data, given a Insantiation - final method.
i | The instantiation. |
NullElement | |
NotFound |
Implements gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 142 of file multiDimDecorator_tpl.h.
References GUM_ERROR.
|
protectedvirtualinherited |
This is called by MultiDimContainer::replace() to proceed with the replacing between x and y.
This is called only when everything have been checked.
x | The variable to replace in |
y | The second variable to swap. |
Implements gum::MultiDimInterface.
Definition at line 416 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::content().
|
protectedinherited |
protecte method to swap the implementation behind the Potential
Definition at line 393 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::abs | ( | ) | const |
Apply abs on every element of the container.
Definition at line 343 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::apply().
|
finalvirtualinherited |
Adds a new var to the variables of the multidimensional matrix.
v | The new var. |
DuplicateElement | Raised if the variable already belongs to the sequence of variables. |
OperationNotAllowed | Raised if this object is non mutable. |
Implements gum::MultiDimInterface.
Definition at line 176 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::DiscreteVariable::domainSize(), and GUM_ERROR.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__elimination_cost(), gum::prm::PRMSystem< double >::__groundPotential(), gum::prm::GroundedInference< GUM_SCALAR >::_evidenceAdded(), gum::prm::PRMInference< double >::addEvidence(), gum::BayesNetInference< GUM_SCALAR >::addEvidence(), gum::BayesNetInference< GUM_SCALAR >::chgEvidence(), gum::prm::copyPotential(), gum::MarginalTargetedInference< GUM_SCALAR >::evidenceImpact(), gum::JointTargetedInference< GUM_SCALAR >::evidenceJointImpact(), gum::prm::PRMInference< double >::joint(), gum::prm::PRMInference< double >::marginal(), gum::prm::PRMInference< double >::operator=(), gum::Potential< GUM_SCALAR >::Potential(), gum::prm::PRMInference< double >::PRMInference(), and gum::Potential< GUM_SCALAR >::reorganize().
|
finalvirtualinherited |
Apply a function on every element of the container.
f | the function to apply |
Reimplemented from gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 339 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, and gum::MultiDimDecorator< GUM_SCALAR >::empty().
Referenced by gum::Potential< GUM_SCALAR >::abs(), gum::Potential< GUM_SCALAR >::isNonZeroMap(), gum::Potential< GUM_SCALAR >::normalize(), gum::Potential< GUM_SCALAR >::operator-(), gum::Potential< GUM_SCALAR >::operator/(), gum::Potential< GUM_SCALAR >::scale(), gum::Potential< GUM_SCALAR >::sq(), and gum::Potential< GUM_SCALAR >::translate().
INLINE Set< Instantiation > gum::Potential< GUM_SCALAR >::argmax | ( | ) | const |
set of instantiation corresponding to the max in the Potential
Definition at line 603 of file potential_tpl.h.
References gum::Potential< GUM_SCALAR >::findAll(), and gum::Potential< GUM_SCALAR >::max().
INLINE Set< Instantiation > gum::Potential< GUM_SCALAR >::argmin | ( | ) | const |
set of instantiation corresponding to the min in the Potential
Definition at line 608 of file potential_tpl.h.
References gum::Potential< GUM_SCALAR >::findAll(), and gum::Potential< GUM_SCALAR >::min().
|
finalvirtualinherited |
Default implementation of MultiDimContainer::set().
Calls _get as a r-value.
Implements gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 374 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::BayesNet< double >::__copyPotentials(), gum::BayesNetInference< GUM_SCALAR >::__createHardEvidence(), gum::Potential< GUM_SCALAR >::Potential(), and gum::Potential< GUM_SCALAR >::reorganize().
|
finalvirtualinherited |
Listen to changes in a given Instantiation.
i | The Instantiation to listen. |
var | The changed dim. |
oldval | The old value. |
newval | The changed value. |
Implements gum::MultiDimAdressable.
Definition at line 187 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
|
finalvirtualinherited |
Returns true if var is in *this.
v | A DiscreteVariable. |
Implements gum::MultiDimInterface.
Definition at line 275 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::prm::StructuredInference< GUM_SCALAR >::_marginal(), gum::prm::PRMInference< double >::addEvidence(), gum::Potential< GUM_SCALAR >::KL(), gum::Potential< GUM_SCALAR >::putFirst(), and gum::Potential< GUM_SCALAR >::reorganize().
|
finalvirtualinherited |
Returns the implementation for this object (may be *this).
Implements gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 369 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::MultiDimDecorator< GUM_SCALAR >::_replace(), gum::prm::copyPotential(), gum::Potential< GUM_SCALAR >::margMaxIn(), gum::Potential< GUM_SCALAR >::margMaxOut(), gum::Potential< GUM_SCALAR >::margMinIn(), gum::Potential< GUM_SCALAR >::margMinOut(), gum::Potential< GUM_SCALAR >::margProdIn(), gum::Potential< GUM_SCALAR >::margProdOut(), gum::Potential< GUM_SCALAR >::margSumIn(), gum::Potential< GUM_SCALAR >::margSumOut(), gum::Potential< GUM_SCALAR >::max(), gum::Potential< GUM_SCALAR >::min(), gum::MultiDimDecorator< GUM_SCALAR >::MultiDimDecorator(), gum::Potential< GUM_SCALAR >::newFactory(), gum::Potential< GUM_SCALAR >::operator*(), gum::Potential< GUM_SCALAR >::operator+(), gum::Potential< GUM_SCALAR >::operator-(), gum::Potential< GUM_SCALAR >::operator/(), gum::MultiDimDecorator< GUM_SCALAR >::operator=(), gum::Potential< GUM_SCALAR >::Potential(), gum::Potential< GUM_SCALAR >::product(), and gum::Potential< GUM_SCALAR >::sum().
|
finalvirtualinherited |
Returns the implementation for this object (may be *this).
Implements gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 362 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
|
virtualinherited |
Removes all variables in this MultiDimContainer and copy the content of src, variables included.
src | The MultiDimContainer to copy. |
Reimplemented in gum::MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >, gum::MultiDimFunctionGraph< GUM_SCALAR >, and gum::MultiDimFunctionGraph< GUM_SCALAR, ExactTerminalNodePolicy >.
Definition at line 282 of file multiDimContainer_tpl.h.
References gum::MultiDimInterface::add(), gum::MultiDimContainer< GUM_SCALAR >::beginMultipleChanges(), gum::MultiDimContainer< GUM_SCALAR >::copyFrom(), gum::MultiDimContainer< GUM_SCALAR >::endMultipleChanges(), gum::MultiDimInterface::erase(), gum::MultiDimInterface::nbrDim(), and gum::MultiDimInterface::variable().
Referenced by gum::MCBayesNetGenerator< GUM_SCALAR, ICPTGenerator, ICPTDisturber >::__eraseArc(), and gum::MCBayesNetGenerator< GUM_SCALAR, ICPTGenerator, ICPTDisturber >::disturbBN().
|
virtualinherited |
Basic copy of a MultiDimContainer.
This method is virtual because it should be optimized in certain MultiDimContainer.
src | The MultiDimContainer src which values are copied. This is a full copy with no verification of dimensions. |
OperationNotAllowed | Raised if src does not have the same domain size than this MultiDimContainer. |
Reimplemented in gum::aggregator::MultiDimAggregator< GUM_SCALAR >, gum::MultiDimICIModel< GUM_SCALAR >, and gum::MultiDimArray< GUM_SCALAR >.
Definition at line 265 of file multiDimContainer_tpl.h.
References gum::MultiDimInterface::domainSize(), gum::Instantiation::end(), GUM_ERROR, and gum::Instantiation::setFirst().
Referenced by gum::BayesNet< double >::__copyPotentials(), gum::MultiDimContainer< GUM_SCALAR >::copy(), gum::MultiDimArray< GUM_SCALAR >::copyFrom(), gum::MultiDimICIModel< GUM_SCALAR >::copyFrom(), gum::aggregator::MultiDimAggregator< GUM_SCALAR >::copyFrom(), and gum::Potential< GUM_SCALAR >::reorganize().
|
virtualinherited |
Basic copy of a MultiDimContainer.
This method is virtual because it should be optimized in certain MultiDimContainer.
src | The MultiDimContainer src which values are copied. |
p_i | Give the order to iterate in this MultiDimContainer during the copy (nullptr will correctly copy if this is a reorganization of src). |
OperationNotAllowed | Raised if src does not have the same domain size than this MultiDimContainer. |
Reimplemented in gum::MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >, gum::MultiDimFunctionGraph< GUM_SCALAR >, and gum::MultiDimFunctionGraph< GUM_SCALAR, ExactTerminalNodePolicy >.
Definition at line 218 of file multiDimContainer_tpl.h.
References gum::MultiDimInterface::domainSize(), gum::Instantiation::end(), GUM_ERROR, gum::Instantiation::incIn(), and gum::Instantiation::setFirst().
|
finalvirtualinherited |
Returns the product of the variables domain size.
Implements gum::MultiDimInterface.
Definition at line 169 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__elimination_cost(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__verticesSampling(), gum::credal::CredalNet< GUM_SCALAR >::approximatedBinarization(), gum::credal::CredalNet< GUM_SCALAR >::fillConstraint(), gum::Potential< GUM_SCALAR >::fillWith(), gum::SimpleUTGenerator::generateUT(), gum::Potential< GUM_SCALAR >::random(), and gum::credal::CredalNet< GUM_SCALAR >::toString().
Idx gum::Potential< GUM_SCALAR >::draw | ( | ) | const |
get a value at random from a 1-D distribution
Definition at line 566 of file potential_tpl.h.
References gum::DiscreteVariable::domainSize(), gum::Instantiation::end(), GUM_ERROR, gum::Instantiation::inc(), gum::MultiDimDecorator< GUM_SCALAR >::nbrDim(), gum::randomProba(), gum::Instantiation::setFirst(), gum::Instantiation::val(), and gum::MultiDimDecorator< GUM_SCALAR >::variable().
Referenced by gum::GibbsOperator< GUM_SCALAR >::__GibbsSample().
|
finalvirtualinherited |
Returns true if no var is in *this.
Implements gum::MultiDimInterface.
Definition at line 280 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::MultiDimDecorator< GUM_SCALAR >::apply(), gum::Potential< GUM_SCALAR >::entropy(), gum::MultiDimDecorator< GUM_SCALAR >::fill(), gum::Potential< GUM_SCALAR >::findAll(), gum::MultiDimDecorator< GUM_SCALAR >::get(), gum::Potential< GUM_SCALAR >::margMaxIn(), gum::Potential< GUM_SCALAR >::margMaxOut(), gum::Potential< GUM_SCALAR >::margMinIn(), gum::Potential< GUM_SCALAR >::margMinOut(), gum::Potential< GUM_SCALAR >::margProdIn(), gum::Potential< GUM_SCALAR >::margProdOut(), gum::Potential< GUM_SCALAR >::margSumIn(), gum::Potential< GUM_SCALAR >::margSumOut(), gum::Potential< GUM_SCALAR >::max(), gum::Potential< GUM_SCALAR >::maxNonOne(), gum::Potential< GUM_SCALAR >::min(), gum::Potential< GUM_SCALAR >::minNonZero(), gum::Potential< GUM_SCALAR >::normalize(), gum::Potential< GUM_SCALAR >::normalizeAsCPT(), gum::Potential< GUM_SCALAR >::operator*(), gum::Potential< GUM_SCALAR >::operator+(), gum::Potential< GUM_SCALAR >::operator-(), gum::Potential< GUM_SCALAR >::operator/(), gum::Potential< GUM_SCALAR >::operator==(), gum::MultiDimDecorator< GUM_SCALAR >::populate(), gum::Potential< GUM_SCALAR >::product(), gum::MultiDimDecorator< GUM_SCALAR >::reduce(), gum::Potential< GUM_SCALAR >::sum(), and gum::MultiDimDecorator< GUM_SCALAR >::toString().
|
finalvirtualinherited |
Default implementation of MultiDimContainer::set().
Calls _get as a r-value.
Implements gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 380 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::BayesNet< double >::__copyPotentials(), gum::MultiDimDecorator< GUM_SCALAR >::endMultipleChanges(), gum::Potential< GUM_SCALAR >::Potential(), and gum::Potential< GUM_SCALAR >::reorganize().
|
finalvirtualinherited |
Default implementation of MultiDimContainer::set().
Calls _get as a r-value.
Implements gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 387 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, and gum::MultiDimDecorator< GUM_SCALAR >::endMultipleChanges().
INLINE GUM_SCALAR gum::Potential< GUM_SCALAR >::entropy | ( | ) | const |
entropy of the Potential
Definition at line 210 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::MultiDimDecorator< GUM_SCALAR >::reduce().
|
finalvirtualinherited |
Removes a var from the variables of the multidimensional matrix.
OperationNotAllowed | Raised if this object is non mutable. |
NotFound | Raised if v does not belong to this. |
Implements gum::MultiDimInterface.
Definition at line 250 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__elimination_cost(), gum::prm::StructuredInference< GUM_SCALAR >::__removeBarrenNodes(), gum::prm::GroundedInference< GUM_SCALAR >::_evidenceRemoved(), and gum::prm::eliminateNode().
Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::extract | ( | const Instantiation & | inst | ) | const |
create a new Potential extracted from *this given a partial instantiation
Definition at line 558 of file potential_tpl.h.
References gum::MultiDimContainer< GUM_SCALAR >::extractFrom().
|
virtualinherited |
Basic extraction of a MultiDimContainer.
This method is virtual because it should be optimized in certain MultiDimContainer.
src | The MultiDimContainer src which datas are copied. |
mask | partial instantiation of variables of the Potential : the extraction will concern every variable not in the instantiation and the copy of data will use the values in this instantiation. |
Definition at line 240 of file multiDimContainer_tpl.h.
References gum::MultiDimInterface::add(), gum::MultiDimContainer< GUM_SCALAR >::beginMultipleChanges(), gum::Instantiation::contains(), gum::Instantiation::end(), gum::MultiDimContainer< GUM_SCALAR >::endMultipleChanges(), gum::MultiDimInterface::erase(), GUM_ERROR, gum::Instantiation::incOut(), gum::MultiDimInterface::nbrDim(), gum::Instantiation::setFirstOut(), gum::Instantiation::setVals(), and gum::MultiDimInterface::variable().
Referenced by gum::Potential< GUM_SCALAR >::extract().
|
finalvirtualinherited |
Default implementation of MultiDimContainer::set().
Calls _get as a r-value.
Implements gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 292 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, and gum::MultiDimDecorator< GUM_SCALAR >::empty().
Referenced by gum::Potential< GUM_SCALAR >::fillWith().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::fillWith | ( | const Potential< GUM_SCALAR > & | src | ) | const |
copy a Potential data using name of variables and labels (not necessarily the same variables in the same orders)
InvalidArgument | if the Potential is not compatible with this |
Definition at line 238 of file potential_tpl.h.
References gum::Instantiation::chgVal(), gum::Set< Key, Alloc >::contains(), gum::MultiDimDecorator< GUM_SCALAR >::domainSize(), gum::MultiDimDecorator< GUM_SCALAR >::get(), GUM_ERROR, gum::Set< Key, Alloc >::insert(), gum::MultiDimDecorator< GUM_SCALAR >::nbrDim(), gum::Potential< GUM_SCALAR >::toString(), gum::MultiDimDecorator< GUM_SCALAR >::variable(), and gum::MultiDimDecorator< GUM_SCALAR >::variablesSequence().
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__insertEvidence(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__verticesSampling(), gum::Potential< GUM_SCALAR >::margMaxIn(), gum::Potential< GUM_SCALAR >::margMaxOut(), gum::Potential< GUM_SCALAR >::margMinIn(), gum::Potential< GUM_SCALAR >::margMinOut(), gum::Potential< GUM_SCALAR >::margProdIn(), gum::Potential< GUM_SCALAR >::margProdOut(), gum::Potential< GUM_SCALAR >::margSumIn(), gum::Potential< GUM_SCALAR >::margSumOut(), gum::Potential< GUM_SCALAR >::noising(), gum::Estimator< GUM_SCALAR >::posterior(), and gum::Potential< GUM_SCALAR >::random().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::fillWith | ( | const Potential< GUM_SCALAR > & | src, |
const std::vector< std::string > & | mapSrc | ||
) | const |
copy a Potential data using the sequence of names in mapSrc to find the corresponding variables.
For instance, to copy the potential P(A,B,C) in Q(D,E,A) with the mapping P.A<->Q.E, P.B<->Q.A, P.C<->Q.D (assuming that the corresponding variables have the same domain size and the order of labels):
InvalidArgument | if the Potential is not compatible with this |
Definition at line 271 of file potential_tpl.h.
References gum::Instantiation::add(), gum::DiscreteVariable::domainSize(), gum::Instantiation::end(), gum::MultiDimDecorator< GUM_SCALAR >::get(), GUM_ERROR, gum::MultiDimDecorator< GUM_SCALAR >::nbrDim(), gum::Instantiation::setFirst(), and gum::MultiDimDecorator< GUM_SCALAR >::variable().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::fillWith | ( | const std::vector< GUM_SCALAR > & | v | ) | const |
Automatically fills the potential with the values in v.
v | Vector of values. |
SizeError | Raised if v size's does not matches this MultiDimContainer domain size. |
Definition at line 224 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::populate().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::fillWith | ( | const GUM_SCALAR & | v | ) | const |
Automatically fills this MultiDimContainer with the value v.
v | contains the data. |
Definition at line 231 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::fill().
Set< Instantiation > gum::Potential< GUM_SCALAR >::findAll | ( | GUM_SCALAR | v | ) | const |
set of instantiation corresponding to the parameter v in the Potential
Definition at line 589 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Instantiation::end(), gum::Set< Key, Alloc >::insert(), and gum::Instantiation::setFirst().
Referenced by gum::Potential< GUM_SCALAR >::argmax(), and gum::Potential< GUM_SCALAR >::argmin().
|
finalvirtualinherited |
Default implementation of MultiDimContainer::get().
Calls _get as a l-value.
Reimplemented from gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 148 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, and gum::MultiDimDecorator< GUM_SCALAR >::empty().
Referenced by gum::prm::StructuredBayesBall< GUM_SCALAR >::__isHardEvidence(), gum::prm::GroundedInference< GUM_SCALAR >::_evidenceAdded(), gum::prm::StructuredInference< GUM_SCALAR >::_marginal(), gum::prm::PRMInference< double >::addEvidence(), gum::credal::CredalNet< GUM_SCALAR >::bnToCredal(), gum::SimpleCPTDisturber< GUM_SCALAR >::disturbAugmCPT(), gum::SimpleCPTDisturber< GUM_SCALAR >::disturbReducCPT(), gum::Potential< GUM_SCALAR >::fillWith(), gum::Potential< GUM_SCALAR >::KL(), gum::prm::PRMInference< double >::marginal(), and gum::prm::o3prmr::O3prmrInterpreter::query().
|
virtualinherited |
In order to insure the dereference for decorators, we need to virtualize the access to master pointer.
Implements gum::MultiDimAdressable.
Reimplemented in gum::MultiDimBucket< GUM_SCALAR >.
Definition at line 301 of file multiDimContainer_tpl.h.
References gum::MultiDimContainer< GUM_SCALAR >::content().
|
virtualinherited |
In order to insure the dereference for decorators, we need to virtualize the access to master pointer.
Implements gum::MultiDimAdressable.
Reimplemented in gum::MultiDimBucket< GUM_SCALAR >.
Definition at line 307 of file multiDimContainer_tpl.h.
References gum::MultiDimContainer< GUM_SCALAR >::content().
INLINE Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::isNonZeroMap | ( | ) | const |
create a boolean-like potential using the predicate isNonZero
Definition at line 494 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::apply().
INLINE GUM_SCALAR gum::Potential< GUM_SCALAR >::KL | ( | const Potential< GUM_SCALAR > & | p | ) | const |
compute KL divergence between this and p Checks the compatibility and then compute KL divergence
gum::InvalidArgument | if p is not compatible with $this (dimension, variables) |
gum::FatalError | if a zero is found in p or this and not in the other. |
Definition at line 308 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::contains(), gum::Instantiation::end(), gum::MultiDimDecorator< GUM_SCALAR >::get(), GUM_ERROR, gum::Instantiation::inc(), gum::MultiDimDecorator< GUM_SCALAR >::nbrDim(), gum::Instantiation::setFirst(), and gum::MultiDimDecorator< GUM_SCALAR >::variablesSequence().
INLINE Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::margMaxIn | ( | const Set< const DiscreteVariable * > & | kept_vars | ) | const |
Projection using max as operation (and implementation-optimized operations)
kept_vars | is the set of vars to keep |
Definition at line 484 of file potential_tpl.h.
References gum::Potential< GUM_SCALAR >::_complementVars(), gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Potential< GUM_SCALAR >::fillWith(), and gum::projectMax().
INLINE Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::margMaxOut | ( | const Set< const DiscreteVariable * > & | del_vars | ) | const |
Projection using max as operation (and implementation-optimized operations)
del_vars | is the set of vars to eliminate |
Definition at line 446 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Potential< GUM_SCALAR >::fillWith(), and gum::projectMax().
INLINE Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::margMinIn | ( | const Set< const DiscreteVariable * > & | kept_vars | ) | const |
Projection using min as operation (and implementation-optimized operations)
kept_vars | is the set of vars to keep |
Definition at line 474 of file potential_tpl.h.
References gum::Potential< GUM_SCALAR >::_complementVars(), gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Potential< GUM_SCALAR >::fillWith(), and gum::projectMin().
INLINE Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::margMinOut | ( | const Set< const DiscreteVariable * > & | del_vars | ) | const |
Projection using min as operation (and implementation-optimized operations)
del_vars | is the set of vars to eliminate |
Definition at line 437 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Potential< GUM_SCALAR >::fillWith(), and gum::projectMin().
INLINE Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::margProdIn | ( | const Set< const DiscreteVariable * > & | kept_vars | ) | const |
Projection using multiplication as operation (and implementation-optimized operations)
kept_vars | is the set of vars to keep |
Definition at line 464 of file potential_tpl.h.
References gum::Potential< GUM_SCALAR >::_complementVars(), gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Potential< GUM_SCALAR >::fillWith(), and gum::projectProduct().
INLINE Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::margProdOut | ( | const Set< const DiscreteVariable * > & | del_vars | ) | const |
Projection using multiplication as operation (and implementation-optimized operations)
del_vars | is the set of vars to eliminate |
Definition at line 427 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Potential< GUM_SCALAR >::fillWith(), and gum::projectProduct().
INLINE Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::margSumIn | ( | const Set< const DiscreteVariable * > & | kept_vars | ) | const |
Projection using sum as operation (and implementation-optimized operations)
kept_vars | is the set of vars to keep |
Definition at line 454 of file potential_tpl.h.
References gum::Potential< GUM_SCALAR >::_complementVars(), gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Potential< GUM_SCALAR >::fillWith(), and gum::projectSum().
INLINE Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::margSumOut | ( | const Set< const DiscreteVariable * > & | del_vars | ) | const |
Projection using sum as operation (and implementation-optimized operations)
del_vars | is the set of vars to eliminate |
Definition at line 418 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Potential< GUM_SCALAR >::fillWith(), and gum::projectSum().
Referenced by gum::prm::eliminateNode(), gum::JointTargetedInference< GUM_SCALAR >::I(), gum::LPNewprojPotential(), gum::BayesNet< double >::reverseArc(), gum::SSNewprojPotential(), and gum::VENewprojPotential().
INLINE GUM_SCALAR gum::Potential< GUM_SCALAR >::max | ( | ) | const |
max of all elements in the Potential
Definition at line 147 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::projectMax().
Referenced by gum::Potential< GUM_SCALAR >::argmax().
GUM_SCALAR gum::Potential< GUM_SCALAR >::maxNonOne | ( | ) | const |
max of all non one elements in the Potential
NotFound | if all value == 1.0 |
Definition at line 164 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::empty(), GUM_ERROR, and gum::MultiDimDecorator< GUM_SCALAR >::reduce().
INLINE GUM_SCALAR gum::Potential< GUM_SCALAR >::min | ( | ) | const |
min of all elements in the Potential
Definition at line 155 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::projectMin().
Referenced by gum::Potential< GUM_SCALAR >::argmin().
INLINE GUM_SCALAR gum::Potential< GUM_SCALAR >::minNonZero | ( | ) | const |
min of all non zero elements in the Potential
NotFound | if all value == 0.0 |
Definition at line 187 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::empty(), GUM_ERROR, and gum::MultiDimDecorator< GUM_SCALAR >::reduce().
|
finalvirtualinherited |
Returns the number of vars in the multidimensional container.
Implements gum::MultiDimInterface.
Definition at line 320 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::GibbsOperator< GUM_SCALAR >::__GibbsSample(), gum::prm::SVED< GUM_SCALAR >::_marginal(), gum::prm::PRMInference< double >::addEvidence(), gum::BayesNet< double >::changePotential(), gum::BayesNetInference< GUM_SCALAR >::chgEvidence(), gum::Potential< GUM_SCALAR >::draw(), gum::Potential< GUM_SCALAR >::fillWith(), gum::BayesNetFragment< GUM_SCALAR >::installCPT(), gum::BayesNetFragment< GUM_SCALAR >::installMarginal(), gum::prm::PRMInference< double >::joint(), gum::Potential< GUM_SCALAR >::KL(), gum::prm::PRMInference< double >::marginal(), gum::Potential< GUM_SCALAR >::putFirst(), gum::Potential< GUM_SCALAR >::reorganize(), gum::MultiDimDecorator< GUM_SCALAR >::set(), and gum::BayesNetFragment< GUM_SCALAR >::uninstallCPT().
|
virtual |
Default implementation of MultiDimContainer::set().
Calls _get as a r-value.
Implements gum::MultiDimDecorator< GUM_SCALAR >.
Definition at line 123 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::content().
const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::noising | ( | GUM_SCALAR | alpha | ) | const |
add a noise in a CPT by mixing (1-alpha)this+alpha.randomCPT()
Definition at line 645 of file potential_tpl.h.
References gum::Potential< GUM_SCALAR >::fillWith(), GUM_ERROR, gum::Potential< GUM_SCALAR >::normalizeAsCPT(), gum::Potential< GUM_SCALAR >::randomCPT(), and gum::Potential< GUM_SCALAR >::scale().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::normalize | ( | ) | const |
normalisation of this do nothing if sum is 0
Definition at line 357 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::apply(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::Potential< GUM_SCALAR >::sum().
Referenced by gum::GibbsOperator< GUM_SCALAR >::__GibbsSample(), gum::prm::SVED< GUM_SCALAR >::_marginal(), gum::prm::SVE< GUM_SCALAR >::_marginal(), gum::prm::StructuredInference< GUM_SCALAR >::_marginal(), gum::JointTargetedInference< GUM_SCALAR >::I(), and gum::Estimator< GUM_SCALAR >::posterior().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::normalizeAsCPT | ( | ) | const |
normalisation of this as a CPT
FatalError | it some distribution sums to 0 |
Definition at line 373 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::Instantiation::end(), GUM_ERROR, gum::Instantiation::incNotVar(), gum::Instantiation::incVar(), gum::Instantiation::setFirst(), gum::Instantiation::setFirstVar(), and gum::MultiDimDecorator< GUM_SCALAR >::variable().
Referenced by gum::ImportanceSampling< GUM_SCALAR >::_unsharpenBN(), and gum::Potential< GUM_SCALAR >::noising().
|
finalvirtualinherited |
|
inherited |
Test if this MultiDimContainer is different of p.
p | The MultiDimContainer to test for inequality. |
Definition at line 160 of file multiDimContainer_tpl.h.
References gum::MultiDimContainer< GUM_SCALAR >::operator==().
Referenced by gum::MultiDimContainer< GUM_SCALAR >::operator==().
|
inline |
the function to be used to add two Potentials
Definition at line 430 of file potential.h.
References gum::Potential< GUM_SCALAR >::operator==().
|
inline |
the function to be used to multiply two Potentials
Definition at line 376 of file potential.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::Potential< GUM_SCALAR >::scale().
|
inline |
the function to be used to add two Potentials
Definition at line 401 of file potential.h.
|
inline |
the function to be used to add two Potentials
Definition at line 354 of file potential.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::Potential< GUM_SCALAR >::translate().
|
inline |
the function to be used to add two Potentials
Definition at line 396 of file potential.h.
|
inline |
the function to be used to subtract two Potentials
Definition at line 364 of file potential.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::apply(), gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::Potential< GUM_SCALAR >::translate().
|
inline |
the function to be used to add two Potentials
Definition at line 406 of file potential.h.
|
inline |
the function to be used to divide two Potentials
Definition at line 385 of file potential.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::apply(), gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::Potential< GUM_SCALAR >::scale().
|
inline |
the function to be used to add two Potentials
Definition at line 411 of file potential.h.
Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::operator= | ( | const Potential< GUM_SCALAR > & | src | ) |
Default constructor.
Creates an empty null dimensional matrix with a MultiDimArray as its implementation.
Definition at line 96 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::operator=().
Referenced by gum::Potential< GUM_SCALAR >::Potential().
Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::operator= | ( | Potential< GUM_SCALAR > && | src | ) |
Default constructor.
Creates an empty null dimensional matrix with a MultiDimArray as its implementation.
Definition at line 106 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::operator=().
|
inherited |
Test if this MultiDimContainer is equal to p.
p | The MultiDimContainer to test for equality. |
Definition at line 129 of file multiDimContainer_tpl.h.
References gum::MultiDimInterface::domainSize(), gum::Instantiation::end(), gum::MultiDimContainer< GUM_SCALAR >::get(), gum::MultiDimInterface::nbrDim(), gum::MultiDimContainer< GUM_SCALAR >::operator!=(), gum::Instantiation::setFirst(), and gum::MultiDimInterface::variablesSequence().
Referenced by gum::MultiDimContainer< GUM_SCALAR >::operator!=(), and gum::MultiDimContainer< GUM_SCALAR >::toString().
|
inline |
the function to be used to add two Potentials
Definition at line 416 of file potential.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, and gum::MultiDimDecorator< GUM_SCALAR >::empty().
Referenced by gum::Potential< GUM_SCALAR >::operator!=().
|
inherited |
An [] operator using a Instantiation as argument.
i | An Instantiation. |
Definition at line 82 of file multiDimContainer_tpl.h.
Referenced by gum::MultiDimContainer< GUM_SCALAR >::~MultiDimContainer().
|
finalvirtualinherited |
Automatically fills this MultiDimContainer with the values in v.
The order used to fill this MultiDimContainer is the same as with an instantiation over it.
v | Vector of values. |
SizeError | Raised if v size's does not matches this MultiDimContainer domain size. |
Reimplemented from gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 325 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::empty(), and GUM_ERROR.
Referenced by gum::Potential< GUM_SCALAR >::fillWith(), and gum::SimpleUTGenerator::generateUT().
|
virtualinherited |
Automatically fills this MultiDimContainer with the values in l.
The order used to fill this MultiDimContainer is the same as with an instantiation over it.
l | contains the data. |
SizeError | Raised if l size's does not matches this MultiDimContainer domain size. |
Reimplemented in gum::MultiDimBijArray< GUM_SCALAR >, gum::MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >, gum::MultiDimFunctionGraph< GUM_SCALAR >, and gum::MultiDimFunctionGraph< GUM_SCALAR, ExactTerminalNodePolicy >.
Definition at line 181 of file multiDimContainer_tpl.h.
References gum::MultiDimInterface::domainSize(), and GUM_ERROR.
|
finalvirtualinherited |
Returns the index of a variable.
v | The variable for which the index is returned. |
NotFound | Raised if v is not in this multidimensional matrix. |
Implements gum::MultiDimInterface.
Definition at line 269 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::credal::CredalNet< GUM_SCALAR >::approximatedBinarization().
INLINE GUM_SCALAR gum::Potential< GUM_SCALAR >::product | ( | ) | const |
product of all elements in the Potential
Definition at line 139 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::projectProduct().
Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::putFirst | ( | const DiscreteVariable * | var | ) | const |
create a new Potential with a certain variable in first
InvalidArgument | if the var is not in the potential |
Definition at line 541 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::contains(), GUM_ERROR, gum::MultiDimDecorator< GUM_SCALAR >::nbrDim(), gum::Potential< GUM_SCALAR >::reorganize(), and gum::MultiDimDecorator< GUM_SCALAR >::variable().
const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::random | ( | ) | const |
generate a random Potential with each parameter in [0,1]
Definition at line 613 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::domainSize(), gum::Potential< GUM_SCALAR >::fillWith(), gum::randomProba(), and gum::Potential< GUM_SCALAR >::sum().
Referenced by gum::SimpleCPTGenerator< GUM_SCALAR >::generateCPT(), gum::Potential< GUM_SCALAR >::randomCPT(), and gum::Potential< GUM_SCALAR >::randomDistribution().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::randomCPT | ( | ) | const |
generate a random CPT in the Potential
Definition at line 639 of file potential_tpl.h.
References gum::Potential< GUM_SCALAR >::random().
Referenced by gum::Potential< GUM_SCALAR >::noising().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::randomDistribution | ( | ) | const |
generate a random Distribution in the Potential
Definition at line 633 of file potential_tpl.h.
References gum::Potential< GUM_SCALAR >::random().
|
finalvirtualinherited |
compute lfold for this container
f | the function to apply |
base | the initial value |
Reimplemented from gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 349 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, and gum::MultiDimDecorator< GUM_SCALAR >::empty().
Referenced by gum::Potential< GUM_SCALAR >::entropy(), gum::Potential< GUM_SCALAR >::maxNonOne(), and gum::Potential< GUM_SCALAR >::minNonZero().
|
finalvirtualinherited |
Register i as a slave of this MultiDimAdressable.
i | The Instantiation to enslave. |
Implements gum::MultiDimAdressable.
Definition at line 244 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Potential< GUM_SCALAR > gum::Potential< GUM_SCALAR >::reorganize | ( | const std::vector< const DiscreteVariable * > & | vars | ) | const |
create a new Potential with another order
InvalidArgument | if not all and only the vars of the potential are in vars |
Definition at line 517 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::add(), gum::MultiDimDecorator< GUM_SCALAR >::beginMultipleChanges(), gum::MultiDimDecorator< GUM_SCALAR >::contains(), gum::MultiDimContainer< GUM_SCALAR >::copyFrom(), gum::MultiDimDecorator< GUM_SCALAR >::endMultipleChanges(), GUM_ERROR, and gum::MultiDimDecorator< GUM_SCALAR >::nbrDim().
Referenced by gum::Potential< GUM_SCALAR >::putFirst().
|
inherited |
Replace variables in this multidim.
If x is in this MultiDim and y has the same domain size, then x will be replace by y in this MultiDim.
x | The variable in this which will be replaced. |
y | The variable replacing y. |
NotFound | Raised if x does not belong to this MultiDim. |
OperationNotAllowed | If y and x are not interchangeable. |
DuplicateElement | If y is already in this MultiDim. |
Definition at line 36 of file multiDimInterface_inl.h.
References gum::MultiDimInterface::_replace(), gum::MultiDimInterface::contains(), gum::DiscreteVariable::domainSize(), and GUM_ERROR.
Referenced by gum::MultiDimImplementation< std::string >::_replace(), gum::MultiDimBucket< GUM_SCALAR >::_replace(), and gum::MultiDimInterface::~MultiDimInterface().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::scale | ( | GUM_SCALAR | v | ) | const |
create a new potential multiplied by v from *this
Definition at line 405 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::apply().
Referenced by gum::Potential< GUM_SCALAR >::noising(), gum::Potential< GUM_SCALAR >::operator*(), and gum::Potential< GUM_SCALAR >::operator/().
|
finalvirtualinherited |
Default implementation of MultiDimContainer::set().
Calls _get as a r-value.
Reimplemented from gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 157 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, and gum::MultiDimDecorator< GUM_SCALAR >::nbrDim().
Referenced by gum::BayesNetFactory< GUM_SCALAR >::__fillProbaWithValuesTable(), gum::prm::PRMSystem< double >::__groundPotential(), gum::prm::GroundedInference< GUM_SCALAR >::_evidenceAdded(), gum::prm::StructuredInference< GUM_SCALAR >::_marginal(), gum::prm::PRMInference< double >::addEvidence(), gum::credal::CredalNet< GUM_SCALAR >::bnToCredal(), gum::BayesNetInference< GUM_SCALAR >::chgEvidence(), gum::MarginalTargetedInference< GUM_SCALAR >::evidenceImpact(), gum::JointTargetedInference< GUM_SCALAR >::evidenceJointImpact(), gum::credal::CredalNet< GUM_SCALAR >::fillConstraint(), gum::SimpleCPTGenerator< GUM_SCALAR >::generateCPT(), gum::credal::CredalNet< GUM_SCALAR >::idmLearning(), gum::prm::PRMInference< double >::marginal(), gum::prm::PRMInference< double >::operator=(), gum::learning::DAG2BNLearner< ALLOC >::operator=(), and gum::prm::PRMInference< double >::PRMInference().
|
finalvirtualinherited |
Listen to an assignment of a value in a Instantiation.
i | The Instantiation to listen. |
Implements gum::MultiDimAdressable.
Definition at line 199 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
|
finalvirtualinherited |
Listen to increment in each recorded Instantiation.
i | The Instantiation to listen. |
Implements gum::MultiDimAdressable.
Definition at line 236 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
|
finalvirtualinherited |
Listen to setFirst in a given Instantiation.
i | The Instantiation to listen. |
Implements gum::MultiDimAdressable.
Definition at line 208 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
|
finalvirtualinherited |
Listen to increment in a given Instantiation.
i | The Instantiation to listen. |
Implements gum::MultiDimAdressable.
Definition at line 227 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
|
finalvirtualinherited |
Listen to setLast in a given Instantiation.
i | The Instantiation to listen. |
Implements gum::MultiDimAdressable.
Definition at line 218 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::sq | ( | ) | const |
apply $x^2$ on every element of the container
Definition at line 301 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::apply().
INLINE GUM_SCALAR gum::Potential< GUM_SCALAR >::sum | ( | ) | const |
sum of all elements in the Potential
Definition at line 131 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, gum::MultiDimDecorator< GUM_SCALAR >::_empty_value, gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), and gum::projectSum().
Referenced by gum::GibbsOperator< GUM_SCALAR >::__GibbsSample(), gum::Potential< GUM_SCALAR >::normalize(), and gum::Potential< GUM_SCALAR >::random().
|
virtualinherited |
Default implementation of MultiDimContainer::set().
Calls _get as a r-value.
Implements gum::MultiDimContainer< GUM_SCALAR >.
Definition at line 409 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
|
inlinevirtual |
the function to be used to add two Potentials
Reimplemented from gum::MultiDimDecorator< GUM_SCALAR >.
Definition at line 434 of file potential.h.
References gum::Potential< GUM_SCALAR >::_complementVars(), and gum::MultiDimDecorator< GUM_SCALAR >::toString().
Referenced by gum::Potential< GUM_SCALAR >::fillWith(), and gum::operator<<().
INLINE const Potential< GUM_SCALAR > & gum::Potential< GUM_SCALAR >::translate | ( | GUM_SCALAR | v | ) | const |
create a new potential added with v from *this
Definition at line 412 of file potential_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::apply().
Referenced by gum::Potential< GUM_SCALAR >::operator+(), and gum::Potential< GUM_SCALAR >::operator-().
|
finalvirtualinherited |
Unregister i as a slave of this MultiDimAdressable.
i | The Instantiation to free. |
Implements gum::MultiDimAdressable.
Definition at line 286 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
|
finalvirtualinherited |
Returns a const ref to the ith var.
param i An index of this multidimensional matrix.
NotFound | Raised if i does not reference a variable in this multidimensional matrix. |
Implements gum::MultiDimInterface.
Definition at line 256 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::BayesNetFactory< GUM_SCALAR >::__fillProbaWithValuesTable(), gum::credal::CredalNet< GUM_SCALAR >::__intervalToCredal(), gum::BayesNet< double >::changePotential(), gum::BayesNetInference< GUM_SCALAR >::chgEvidence(), gum::Potential< GUM_SCALAR >::draw(), gum::Potential< GUM_SCALAR >::fillWith(), gum::SimpleCPTGenerator< GUM_SCALAR >::generateCPT(), gum::BayesNetFragment< GUM_SCALAR >::installCPT(), gum::BayesNetFragment< GUM_SCALAR >::installMarginal(), gum::credal::CredalNet< GUM_SCALAR >::intervalToCredal(), gum::credal::CredalNet< GUM_SCALAR >::intervalToCredalWithFiles(), gum::credal::CredalNet< GUM_SCALAR >::lagrangeNormalization(), gum::Potential< GUM_SCALAR >::normalizeAsCPT(), gum::Potential< GUM_SCALAR >::putFirst(), gum::credal::CredalNet< GUM_SCALAR >::setCPT(), gum::credal::CredalNet< GUM_SCALAR >::setCPTs(), gum::BayesNetFragment< GUM_SCALAR >::uninstallCPT(), and gum::MultiDimDecorator< GUM_SCALAR >::variable().
|
finalvirtualinherited |
Returns the variable with the name.
name | The index of the variable |
NotFound | Raised if the element cannot be found. |
Implements gum::MultiDimInterface.
Definition at line 262 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content, and gum::MultiDimDecorator< GUM_SCALAR >::variable().
|
finalvirtualinherited |
Returns a const ref to the sequence of DiscreteVariable*.
Implements gum::MultiDimInterface.
Definition at line 312 of file multiDimDecorator_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::_content.
Referenced by gum::prm::StructuredInference< GUM_SCALAR >::__buildPatternGraph(), gum::prm::__print_pot__(), gum::BayesNetFactory< GUM_SCALAR >::__setCPTAndParents(), gum::Potential< GUM_SCALAR >::_complementVars(), gum::prm::SVED< GUM_SCALAR >::_marginal(), gum::prm::StructuredInference< GUM_SCALAR >::_marginal(), gum::learning::DAG2BNLearner< ALLOC >::createBN(), gum::credal::CredalNet< GUM_SCALAR >::fillConstraint(), gum::Potential< GUM_SCALAR >::fillWith(), gum::Potential< GUM_SCALAR >::KL(), and gum::learning::DAG2BNLearner< ALLOC >::operator=().
|
mutableprotectedinherited |
The true container.
Definition at line 250 of file multiDimDecorator.h.
Referenced by gum::MultiDimDecorator< GUM_SCALAR >::_swapContent(), gum::MultiDimDecorator< GUM_SCALAR >::add(), gum::MultiDimDecorator< GUM_SCALAR >::apply(), gum::MultiDimDecorator< GUM_SCALAR >::beginMultipleChanges(), gum::MultiDimDecorator< GUM_SCALAR >::changeNotification(), gum::MultiDimDecorator< GUM_SCALAR >::contains(), gum::MultiDimDecorator< GUM_SCALAR >::content(), gum::MultiDimDecorator< GUM_SCALAR >::domainSize(), gum::MultiDimDecorator< GUM_SCALAR >::empty(), gum::MultiDimDecorator< GUM_SCALAR >::endMultipleChanges(), gum::Potential< GUM_SCALAR >::entropy(), gum::MultiDimDecorator< GUM_SCALAR >::erase(), gum::MultiDimDecorator< GUM_SCALAR >::fill(), gum::Potential< GUM_SCALAR >::findAll(), gum::MultiDimDecorator< GUM_SCALAR >::get(), gum::Potential< GUM_SCALAR >::margMaxIn(), gum::Potential< GUM_SCALAR >::margMaxOut(), gum::Potential< GUM_SCALAR >::margMinIn(), gum::Potential< GUM_SCALAR >::margMinOut(), gum::Potential< GUM_SCALAR >::margProdIn(), gum::Potential< GUM_SCALAR >::margProdOut(), gum::Potential< GUM_SCALAR >::margSumIn(), gum::Potential< GUM_SCALAR >::margSumOut(), gum::Potential< GUM_SCALAR >::max(), gum::Potential< GUM_SCALAR >::maxNonOne(), gum::Potential< GUM_SCALAR >::min(), gum::Potential< GUM_SCALAR >::minNonZero(), gum::MultiDimDecorator< GUM_SCALAR >::MultiDimDecorator(), gum::MultiDimDecorator< GUM_SCALAR >::nbrDim(), gum::Potential< GUM_SCALAR >::normalize(), gum::Potential< GUM_SCALAR >::normalizeAsCPT(), gum::MultiDimDecorator< GUM_SCALAR >::operator=(), gum::Potential< GUM_SCALAR >::operator==(), gum::MultiDimDecorator< GUM_SCALAR >::populate(), gum::MultiDimDecorator< GUM_SCALAR >::pos(), gum::Potential< GUM_SCALAR >::product(), gum::MultiDimDecorator< GUM_SCALAR >::reduce(), gum::MultiDimDecorator< GUM_SCALAR >::registerSlave(), gum::MultiDimDecorator< GUM_SCALAR >::set(), gum::MultiDimDecorator< GUM_SCALAR >::setChangeNotification(), gum::MultiDimDecorator< GUM_SCALAR >::setDecNotification(), gum::MultiDimDecorator< GUM_SCALAR >::setFirstNotification(), gum::MultiDimDecorator< GUM_SCALAR >::setIncNotification(), gum::MultiDimDecorator< GUM_SCALAR >::setLastNotification(), gum::Potential< GUM_SCALAR >::sum(), gum::MultiDimDecorator< GUM_SCALAR >::toString(), gum::MultiDimDecorator< GUM_SCALAR >::unregisterSlave(), gum::MultiDimDecorator< GUM_SCALAR >::variable(), gum::MultiDimDecorator< GUM_SCALAR >::variablesSequence(), and gum::MultiDimDecorator< GUM_SCALAR >::~MultiDimDecorator().
|
mutableprotectedinherited |
value of the MultiDimDecorator if no dimension.
Definition at line 264 of file multiDimDecorator.h.
Referenced by gum::MultiDimDecorator< GUM_SCALAR >::apply(), gum::MultiDimDecorator< GUM_SCALAR >::fill(), gum::MultiDimDecorator< GUM_SCALAR >::get(), gum::Potential< GUM_SCALAR >::margMaxIn(), gum::Potential< GUM_SCALAR >::margMaxOut(), gum::Potential< GUM_SCALAR >::margMinIn(), gum::Potential< GUM_SCALAR >::margMinOut(), gum::Potential< GUM_SCALAR >::margProdIn(), gum::Potential< GUM_SCALAR >::margProdOut(), gum::Potential< GUM_SCALAR >::margSumIn(), gum::Potential< GUM_SCALAR >::margSumOut(), gum::Potential< GUM_SCALAR >::max(), gum::Potential< GUM_SCALAR >::maxNonOne(), gum::Potential< GUM_SCALAR >::min(), gum::Potential< GUM_SCALAR >::minNonZero(), gum::MultiDimDecorator< GUM_SCALAR >::MultiDimDecorator(), gum::Potential< GUM_SCALAR >::normalize(), gum::Potential< GUM_SCALAR >::normalizeAsCPT(), gum::Potential< GUM_SCALAR >::operator*(), gum::Potential< GUM_SCALAR >::operator+(), gum::Potential< GUM_SCALAR >::operator-(), gum::Potential< GUM_SCALAR >::operator/(), gum::MultiDimDecorator< GUM_SCALAR >::operator=(), gum::Potential< GUM_SCALAR >::operator==(), gum::MultiDimDecorator< GUM_SCALAR >::populate(), gum::Potential< GUM_SCALAR >::Potential(), gum::Potential< GUM_SCALAR >::product(), gum::MultiDimDecorator< GUM_SCALAR >::set(), gum::Potential< GUM_SCALAR >::sum(), and gum::MultiDimDecorator< GUM_SCALAR >::toString().