aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
gum::prm::StructuredInference< GUM_SCALAR >::PData Struct Reference

Private structure to represent data about a pattern. More...

Collaboration diagram for gum::prm::StructuredInference< GUM_SCALAR >::PData:

Public Member Functions

 PData (const gspan::Pattern &p, typename GSpan< GUM_SCALAR >::MatchedInstances &m)
 Default constructor.
 PData (const PData &source)
 Copy constructor.
 ~PData ()
 Destructor.
NodeSetinners ()
 Returns the set of inner nodes.
NodeSetobs ()
 Returns the set of inner and observed nodes given all the matches of pattern.
NodeSetoutputs ()
 Returns the set of outputs nodes given all the matches of pattern.
NodeSetqueries ()
 Returns the set of queried nodes given all the matches of pattern.
const List< NodeSet > * partial_order ()

Public Attributes

const gspan::Patternpattern
 The pattern for which this represents data about it.
GSpan< GUM_SCALAR >::MatchedInstances & matches
 A reference over the usable matches of pattern.
UndiGraph graph
 A yet to be triangulated undigraph.
NodeProperty< Sizemod
 The pattern's variables modalities.
Bijection< NodeId, std::string > node2attr
 A bijection to easily keep track between graph and attributes, its of the form instance_name DOT attr_name.
NodeProperty< std::pair< Idx, std::string > > map
 To ease translating tensors from one match to another.
Bijection< NodeId, const DiscreteVariable * > vars
 Bijection between graph's nodes and their corresponding DiscreteVariable, for inference purpose.
NodeProperty< Tensor< GUM_SCALAR > * > pots
 To handle barren nodes.
Set< NodeIdbarren
 Set of barren nodes.

Private Attributes

List< NodeSet_partial_order_
 We'll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside the pattern and the other nodes.
List< NodeSet > * _real_order_
 A copy of partial_order without empty sets.

Detailed Description

template<typename GUM_SCALAR>
struct gum::prm::StructuredInference< GUM_SCALAR >::PData

Private structure to represent data about a pattern.

Definition at line 161 of file structuredInference.h.

Constructor & Destructor Documentation

◆ PData() [1/2]

template<typename GUM_SCALAR>
gum::prm::StructuredInference< GUM_SCALAR >::PData::PData ( const gspan::Pattern & p,
typename GSpan< GUM_SCALAR >::MatchedInstances & m )

Default constructor.

Definition at line 789 of file structuredInference_tpl.h.

791 :
794
795 for (int i = 0; i < 4; ++i)
796 _partial_order_.push_front(NodeSet());
797 }
<agrum/PRM/structuredInference.h>
List< NodeSet > _partial_order_
We'll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside ...
const gspan::Pattern & pattern
The pattern for which this represents data about it.
List< NodeSet > * _real_order_
A copy of partial_order without empty sets.
GSpan< GUM_SCALAR >::MatchedInstances & matches
A reference over the usable matches of pattern.

References _partial_order_, _real_order_, matches, and pattern.

Referenced by PData().

Here is the caller graph for this function:

◆ PData() [2/2]

template<typename GUM_SCALAR>
gum::prm::StructuredInference< GUM_SCALAR >::PData::PData ( const PData & source)

Copy constructor.

References PData().

Here is the call graph for this function:

◆ ~PData()

template<typename GUM_SCALAR>
INLINE gum::prm::StructuredInference< GUM_SCALAR >::PData::~PData ( )

Destructor.

Definition at line 967 of file structuredInference_tpl.h.

Member Function Documentation

◆ inners()

◆ obs()

template<typename GUM_SCALAR>
NodeSet & gum::prm::StructuredInference< GUM_SCALAR >::PData::obs ( )
inline

Returns the set of inner and observed nodes given all the matches of pattern.

Definition at line 198 of file structuredInference.h.

198{ return _partial_order_[1]; }

References _partial_order_.

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::_buildPatternGraph_(), gum::prm::StructuredInference< GUM_SCALAR >::_eliminateObservedNodes_(), gum::prm::StructuredInference< GUM_SCALAR >::_eliminateObservedNodesInSource_(), gum::prm::StructuredInference< GUM_SCALAR >::_insertNodeInElimLists_(), and gum::prm::StructuredInference< GUM_SCALAR >::_reducePattern_().

Here is the caller graph for this function:

◆ outputs()

template<typename GUM_SCALAR>
NodeSet & gum::prm::StructuredInference< GUM_SCALAR >::PData::outputs ( )
inline

Returns the set of outputs nodes given all the matches of pattern.

Definition at line 201 of file structuredInference.h.

201{ return _partial_order_[2]; }

References _partial_order_.

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::_buildPatternGraph_(), and gum::prm::StructuredInference< GUM_SCALAR >::_insertNodeInElimLists_().

Here is the caller graph for this function:

◆ partial_order()

template<typename GUM_SCALAR>
const List< NodeSet > * gum::prm::StructuredInference< GUM_SCALAR >::PData::partial_order ( )

Definition at line 809 of file structuredInference_tpl.h.

809 {
810 if (!_real_order_) {
812
813 for (const auto& set: _partial_order_)
814 if (set.size() > 0) _real_order_->insert(set);
815 }
816
817 return _real_order_;
818 }

References _partial_order_, and _real_order_.

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::_reducePattern_().

Here is the caller graph for this function:

◆ queries()

template<typename GUM_SCALAR>
NodeSet & gum::prm::StructuredInference< GUM_SCALAR >::PData::queries ( )
inline

Returns the set of queried nodes given all the matches of pattern.

Definition at line 204 of file structuredInference.h.

204{ return _partial_order_[3]; }

References _partial_order_.

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::_buildPatternGraph_(), and gum::prm::StructuredInference< GUM_SCALAR >::_reducePattern_().

Here is the caller graph for this function:

Member Data Documentation

◆ _partial_order_

template<typename GUM_SCALAR>
List< NodeSet > gum::prm::StructuredInference< GUM_SCALAR >::PData::_partial_order_
private

We'll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside the pattern and the other nodes.

Definition at line 218 of file structuredInference.h.

Referenced by PData(), inners(), obs(), outputs(), partial_order(), and queries().

◆ _real_order_

template<typename GUM_SCALAR>
List< NodeSet >* gum::prm::StructuredInference< GUM_SCALAR >::PData::_real_order_
private

A copy of partial_order without empty sets.

Definition at line 220 of file structuredInference.h.

Referenced by PData(), and partial_order().

◆ barren

◆ graph

◆ map

◆ matches

◆ mod

◆ node2attr

template<typename GUM_SCALAR>
Bijection< NodeId, std::string > gum::prm::StructuredInference< GUM_SCALAR >::PData::node2attr

A bijection to easily keep track between graph and attributes, its of the form instance_name DOT attr_name.

Definition at line 174 of file structuredInference.h.

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::_buildPatternGraph_(), and gum::prm::StructuredInference< GUM_SCALAR >::_removeNode_().

◆ pattern

template<typename GUM_SCALAR>
const gspan::Pattern& gum::prm::StructuredInference< GUM_SCALAR >::PData::pattern

The pattern for which this represents data about it.

Definition at line 163 of file structuredInference.h.

Referenced by PData().

◆ pots

template<typename GUM_SCALAR>
NodeProperty< Tensor< GUM_SCALAR >* > gum::prm::StructuredInference< GUM_SCALAR >::PData::pots

To handle barren nodes.

Definition at line 183 of file structuredInference.h.

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::_removeNode_().

◆ vars


The documentation for this struct was generated from the following files: