aGrUM 3.1.1
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<GUM_Numeric 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<GUM_Numeric GUM_SCALAR>
gum::prm::StructuredInference< GUM_SCALAR >::PData::PData ( const gspan::Pattern & p,
typename GSpan< GUM_SCALAR >::MatchedInstances & m )

Default constructor.

Definition at line 793 of file structuredInference_tpl.h.

795 :
798
799 for (int i = 0; i < 4; ++i)
800 _partial_order_.push_front(NodeSet());
801 }
<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<GUM_Numeric 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<GUM_Numeric GUM_SCALAR>
gum::prm::StructuredInference< GUM_SCALAR >::PData::~PData ( )

Destructor.

Definition at line 971 of file structuredInference_tpl.h.

Member Function Documentation

◆ inners()

◆ obs()

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

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

Definition at line 1029 of file structuredInference_tpl.h.

1029 {
1030 return _partial_order_[1];
1031 }

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<GUM_Numeric GUM_SCALAR>
NodeSet & gum::prm::StructuredInference< GUM_SCALAR >::PData::outputs ( )

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

Definition at line 1034 of file structuredInference_tpl.h.

1034 {
1035 return _partial_order_[2];
1036 }

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<GUM_Numeric GUM_SCALAR>
const List< NodeSet > * gum::prm::StructuredInference< GUM_SCALAR >::PData::partial_order ( )

Definition at line 813 of file structuredInference_tpl.h.

813 {
814 if (!_real_order_) {
816
817 for (const auto& set: _partial_order_)
818 if (set.size() > 0) _real_order_->insert(set);
819 }
820
821 return _real_order_;
822 }

References _partial_order_, and _real_order_.

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

Here is the caller graph for this function:

◆ queries()

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

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

Definition at line 1039 of file structuredInference_tpl.h.

1039 {
1040 return _partial_order_[3];
1041 }

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<GUM_Numeric 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<GUM_Numeric 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<GUM_Numeric 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<GUM_Numeric 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<GUM_Numeric 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: