aGrUM  0.20.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 Attributes

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

Public Member Functions

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

Detailed Description

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

Private structure to represent data about a pattern.

Definition at line 155 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 825 of file structuredInference_tpl.h.

References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().

827  :
828  pattern(p),
829  matches(m), real_order__(0) {
830  GUM_CONSTRUCTOR(StructuredInference< GUM_SCALAR >::PData);
831 
832  for (int i = 0; i < 4; ++i)
833  partial_order__.push_front(NodeSet());
834  }
List< NodeSet > partial_order__
We&#39;ll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside ...
GSpan< GUM_SCALAR >::MatchedInstances & matches
A reference over the usable matches of pattern.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
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.
+ Here is the call graph for this function:

◆ PData() [2/2]

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

Copy constructor.

◆ ~PData()

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

Destructor.

Definition at line 1014 of file structuredInference_tpl.h.

References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().

1014  {
1015  GUM_DESTRUCTOR(StructuredInference< GUM_SCALAR >::PData);
1016  }
+ Here is the call graph for this function:

Member Function Documentation

◆ inners()

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

Returns the set of inner nodes.

Definition at line 188 of file structuredInference.h.

188 { return partial_order__[0]; }
List< NodeSet > partial_order__
We&#39;ll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside ...

◆ 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 191 of file structuredInference.h.

191 { return partial_order__[1]; }
List< NodeSet > partial_order__
We&#39;ll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside ...

◆ 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 193 of file structuredInference.h.

193 { return partial_order__[2]; }
List< NodeSet > partial_order__
We&#39;ll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside ...

◆ partial_order()

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

Definition at line 848 of file structuredInference_tpl.h.

References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().

848  {
849  if (!real_order__) {
850  real_order__ = new List< NodeSet >();
851 
852  for (const auto set: partial_order__)
853  if (set.size() > 0) real_order__->insert(set);
854  }
855 
856  return real_order__;
857  }
List< NodeSet > partial_order__
We&#39;ll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside ...
List< NodeSet > * real_order__
A copy of partial_order__ without empty sets.
+ Here is the call 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 195 of file structuredInference.h.

195 { return partial_order__[3]; }
List< NodeSet > partial_order__
We&#39;ll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside ...

Member Data Documentation

◆ barren

template<typename GUM_SCALAR >
Set< NodeId > gum::prm::StructuredInference< GUM_SCALAR >::PData::barren

Set of barren nodes.

Definition at line 179 of file structuredInference.h.

◆ graph

template<typename GUM_SCALAR >
UndiGraph gum::prm::StructuredInference< GUM_SCALAR >::PData::graph

A yet to be triangulated undigraph.

Definition at line 161 of file structuredInference.h.

◆ map

template<typename GUM_SCALAR >
NodeProperty< std::pair< Idx, std::string > > gum::prm::StructuredInference< GUM_SCALAR >::PData::map

To ease translating potentials from one match to another.

Definition at line 170 of file structuredInference.h.

◆ matches

template<typename GUM_SCALAR >
GSpan< GUM_SCALAR >::MatchedInstances& gum::prm::StructuredInference< GUM_SCALAR >::PData::matches

A reference over the usable matches of pattern.

Definition at line 159 of file structuredInference.h.

◆ mod

template<typename GUM_SCALAR >
NodeProperty< Size > gum::prm::StructuredInference< GUM_SCALAR >::PData::mod

The pattern's variables modalities.

Definition at line 163 of file structuredInference.h.

◆ 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 168 of file structuredInference.h.

◆ 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 208 of file structuredInference.h.

◆ 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 157 of file structuredInference.h.

◆ pots

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

To handle barren nodes.

Definition at line 177 of file structuredInference.h.

◆ 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 210 of file structuredInference.h.

◆ vars

template<typename GUM_SCALAR >
Bijection< NodeId, const DiscreteVariable* > gum::prm::StructuredInference< GUM_SCALAR >::PData::vars

Bijection between graph's nodes and their corresponding DiscreteVariable, for inference purpose.

Definition at line 175 of file structuredInference.h.


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