28 #ifndef GUM_BAYES_NET_JOINT_TARGETED_INFERENCE_H 29 #define GUM_BAYES_NET_JOINT_TARGETED_INFERENCE_H 53 template <
typename GUM_SCALAR >
54 class JointTargetedInference :
public MarginalTargetedInference< GUM_SCALAR > {
92 virtual const Potential< GUM_SCALAR >&
127 virtual const Potential< GUM_SCALAR >&
128 posterior(
const std::string& nodeName)
final;
199 Potential< GUM_SCALAR >
201 const
std::vector<
std::
string >& evs);
272 virtual const Potential< GUM_SCALAR >&
274 const
NodeSet& declared_target) = 0;
280 virtual Potential< GUM_SCALAR >*
296 #include <agrum/BN/inference/tools/jointTargetedInference_tpl.h> 299 #endif // GUM_BAYES_NET_JOINT_TARGETED_INFERENCE_H virtual void eraseAllMarginalTargets() final
Clear all the previously defined marginal targets.
virtual void eraseAllTargets()
Clear all previously defined targets (marginal and joint targets)
virtual void addJointTarget(const NodeSet &joint_target) final
Add a set of nodes as a new joint target. As a collateral effect, every node is added as a marginal t...
virtual ~JointTargetedInference()
destructor
JointTargetedInference(const IBayesNet< GUM_SCALAR > *bn)
default constructor
GUM_SCALAR I(NodeId X, NodeId Y)
Mutual information between X and Y.
virtual void _onAllJointTargetsErased()=0
fired before a all the joint targets are removed
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
virtual bool isJointTarget(const NodeSet &vars) const final
return true if target is a joint target.
virtual void _onAllTargetsErased()=0
fired before a all the marginal and joint targets are removed
virtual Potential< GUM_SCALAR > * _unnormalizedJointPosterior(const NodeSet &set)=0
returns a fresh unnormalized joint posterior of a given set of variables
gum is the global namespace for all aGrUM entities
virtual void _onJointTargetAdded(const NodeSet &set)=0
fired after a new joint target is inserted
This file contains the abstract inference class definition for computing (incrementally) marginal pos...
virtual void eraseJointTarget(const NodeSet &joint_target) final
removes an existing joint target
Representation of a setA Set is a structure that contains arbitrary elements.
virtual void eraseAllJointTargets() final
Clear all previously defined joint targets.
virtual const Set< NodeSet > & jointTargets() const noexcept final
returns the list of joint targets
virtual const Potential< GUM_SCALAR > & jointPosterior(const NodeSet &nodes) final
Compute the joint posterior of a set of nodes.
Potential< GUM_SCALAR > evidenceJointImpact(const NodeSet &targets, const NodeSet &evs)
Create a gum::Potential for P(joint targets|evs) (for all instanciation of targets and evs) ...
virtual void _onBayesNetChanged(const IBayesNet< GUM_SCALAR > *bn)
fired after a new Bayes net has been assigned to the engine
virtual const Potential< GUM_SCALAR > & _jointPosterior(const NodeSet &set)=0
asks derived classes for the joint posterior of a declared target set
virtual const Potential< GUM_SCALAR > & posterior(NodeId node) final
Computes and returns the posterior of a node.
virtual Size nbrJointTargets() const noexcept final
returns the number of joint targets
virtual const NodeSet & targets() const noexcept final
returns the list of marginal targets
GUM_SCALAR jointMutualInformation(const NodeSet &targets)
Mutual information between targets.
GUM_SCALAR VI(NodeId X, NodeId Y)
Variation of information between X and Y.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
virtual void _onJointTargetErased(const NodeSet &set)=0
fired before a joint target is removed
Set< NodeSet > __joint_targets
the set of joint targets
Size NodeId
Type for node ids.