aGrUM  0.20.3
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 151 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 770 of file structuredInference_tpl.h.

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

772  :
773  pattern(p),
774  matches(m), _real_order_(0) {
775  GUM_CONSTRUCTOR(StructuredInference< GUM_SCALAR >::PData);
776 
777  for (int i = 0; i < 4; ++i)
778  _partial_order_.push_front(NodeSet());
779  }
List< NodeSet > * _real_order_
A copy of partial_order without empty sets.
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.
+ 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 953 of file structuredInference_tpl.h.

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

953  {
954  GUM_DESTRUCTOR(StructuredInference< GUM_SCALAR >::PData);
955  }
+ 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 183 of file structuredInference.h.

183 { 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 186 of file structuredInference.h.

186 { 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 188 of file structuredInference.h.

188 { 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 791 of file structuredInference_tpl.h.

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

791  {
792  if (!_real_order_) {
793  _real_order_ = new List< NodeSet >();
794 
795  for (const auto set: _partial_order_)
796  if (set.size() > 0) _real_order_->insert(set);
797  }
798 
799  return _real_order_;
800  }
List< NodeSet > * _real_order_
A copy of partial_order without empty sets.
List< NodeSet > _partial_order_
We&#39;ll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside ...
+ 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 190 of file structuredInference.h.

190 { 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

◆ _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 203 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 205 of file structuredInference.h.

◆ barren

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

Set of barren nodes.

Definition at line 175 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 157 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 166 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 155 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 159 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 164 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 153 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 173 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 171 of file structuredInference.h.


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