aGrUM  0.13.2
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 153 of file structuredInference.h.

Constructor & Destructor Documentation

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 812 of file structuredInference_tpl.h.

References gum::prm::StructuredInference< GUM_SCALAR >::PData::__partial_order, gum::prm::StructuredInference< GUM_SCALAR >::PData::__real_order, gum::prm::StructuredInference< GUM_SCALAR >::PData::graph, gum::prm::StructuredInference< GUM_SCALAR >::PData::matches, gum::prm::StructuredInference< GUM_SCALAR >::PData::mod, gum::prm::StructuredInference< GUM_SCALAR >::PData::node2attr, gum::prm::StructuredInference< GUM_SCALAR >::PData::pattern, and gum::prm::StructuredInference< GUM_SCALAR >::PData::vars.

813  :
814  pattern(p),
815  matches(m), __real_order(0) {
816  GUM_CONSTRUCTOR(StructuredInference< GUM_SCALAR >::PData);
817 
818  for (int i = 0; i < 4; ++i)
819  __partial_order.push_front(NodeSet());
820  }
GSpan< GUM_SCALAR >::MatchedInstances & matches
A reference over the usable matches of pattern.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
List< NodeSet > * __real_order
A copy of __partial_order without empty sets.
const gspan::Pattern & pattern
The pattern for which this represents data about it.
List< NodeSet > __partial_order
We&#39;ll use a PartialOrderedTriangulation with three sets: output, nodes and obs with children outside ...
template<typename GUM_SCALAR>
gum::prm::StructuredInference< GUM_SCALAR >::PData::PData ( const PData source)

Copy constructor.

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

Destructor.

Definition at line 1000 of file structuredInference_tpl.h.

1000  {
1001  GUM_DESTRUCTOR(StructuredInference< GUM_SCALAR >::PData);
1002  }

Member Function Documentation

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

Returns the set of inner nodes.

Definition at line 186 of file structuredInference.h.

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(), gum::prm::StructuredInference< GUM_SCALAR >::__removeBarrenNodes(), and gum::prm::StructuredInference< GUM_SCALAR >::__removeNode().

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

+ Here is the caller graph for this function:

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

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::__buildPatternGraph(), gum::prm::StructuredInference< GUM_SCALAR >::__eliminateObservedNodes(), gum::prm::StructuredInference< GUM_SCALAR >::__eliminateObservedNodesInSource(), and gum::prm::StructuredInference< GUM_SCALAR >::__insertNodeInElimLists().

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

+ Here is the caller graph for this function:

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

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::__buildPatternGraph(), and gum::prm::StructuredInference< GUM_SCALAR >::__insertNodeInElimLists().

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

+ Here is the caller graph for this function:

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

Definition at line 834 of file structuredInference_tpl.h.

References gum::prm::StructuredInference< GUM_SCALAR >::PData::__partial_order, and gum::prm::StructuredInference< GUM_SCALAR >::PData::__real_order.

834  {
835  if (!__real_order) {
836  __real_order = new List< NodeSet >();
837 
838  for (const auto set : __partial_order)
839  if (set.size() > 0) __real_order->insert(set);
840  }
841 
842  return __real_order;
843  }
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 ...
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 193 of file structuredInference.h.

References gum::prm::StructuredInference< GUM_SCALAR >::RGData::partial_order.

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

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

+ Here is the caller graph for this function:

Member Data Documentation

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

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::PData::partial_order(), and gum::prm::StructuredInference< GUM_SCALAR >::PData::PData().

template<typename GUM_SCALAR>
List< NodeSet >* gum::prm::StructuredInference< GUM_SCALAR >::PData::__real_order
private
template<typename GUM_SCALAR>
Set< NodeId > gum::prm::StructuredInference< GUM_SCALAR >::PData::barren
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 166 of file structuredInference.h.

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::__buildPatternGraph(), gum::prm::StructuredInference< GUM_SCALAR >::__removeNode(), and gum::prm::StructuredInference< GUM_SCALAR >::PData::PData().

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

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

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

To handle barren nodes.

Definition at line 175 of file structuredInference.h.

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


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