aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::prm::GSpan< GUM_SCALAR >::PatternSort Class Reference

Private class used to sort Pattern using STL sort algorithms. More...

+ Collaboration diagram for gum::prm::GSpan< GUM_SCALAR >::PatternSort:

Public Attributes

GSpangspan
 A pointer over an instance of the GSpan class using this class. More...
 

Public Member Functions

 PatternSort (GSpan *my_gspan)
 Default constructor. More...
 
 PatternSort (const PatternSort &source)
 Copy constructor. More...
 
 ~PatternSort ()
 Destructor. More...
 
bool operator() (gspan::Pattern *i, gspan::Pattern *j)
 Returns true if i's cost is lesser than j's. More...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::prm::GSpan< GUM_SCALAR >::PatternSort

Private class used to sort Pattern using STL sort algorithms.

Definition at line 318 of file gspan.h.

Constructor & Destructor Documentation

◆ PatternSort() [1/2]

template<typename GUM_SCALAR >
INLINE gum::prm::GSpan< GUM_SCALAR >::PatternSort::PatternSort ( GSpan my_gspan)

Default constructor.

Parameters
my_gspanA pointer over the GSpan using this class.

Definition at line 454 of file gspan_tpl.h.

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

454  : gspan(my_gspan) {
455  GUM_CONSTRUCTOR(GSpan< GUM_SCALAR >::PatternSort);
456  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:345
+ Here is the call graph for this function:

◆ PatternSort() [2/2]

template<typename GUM_SCALAR >
INLINE gum::prm::GSpan< GUM_SCALAR >::PatternSort::PatternSort ( const PatternSort source)

Copy constructor.

Parameters
sourceThe copied PatternSort.

Definition at line 459 of file gspan_tpl.h.

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

459  :
460  gspan(source.gspan) {
461  GUM_CONS_CPY(GSpan< GUM_SCALAR >::PatternSort);
462  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:345
+ Here is the call graph for this function:

◆ ~PatternSort()

template<typename GUM_SCALAR >
INLINE gum::prm::GSpan< GUM_SCALAR >::PatternSort::~PatternSort ( )

Destructor.

Definition at line 465 of file gspan_tpl.h.

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

465  {
466  GUM_DESTRUCTOR(GSpan< GUM_SCALAR >::PatternSort);
467  }
+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

template<typename GUM_SCALAR >
INLINE bool gum::prm::GSpan< GUM_SCALAR >::PatternSort::operator() ( gspan::Pattern i,
gspan::Pattern j 
)

Returns true if i's cost is lesser than j's.

Parameters
iA Pattern.
jA Pattern.
Returns
true if i's cost is above j's cost.

Definition at line 470 of file gspan_tpl.h.

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

470  {
471  // We want a descending order
472  return gspan->tree().strategy().operator()(i, j);
473  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:345
gspan::DFSTree< GUM_SCALAR > & tree()
Returns the DFSTree used to discover new patters.
Definition: gspan_tpl.h:373
+ Here is the call graph for this function:

Member Data Documentation

◆ gspan

template<typename GUM_SCALAR >
GSpan* gum::prm::GSpan< GUM_SCALAR >::PatternSort::gspan

A pointer over an instance of the GSpan class using this class.

Definition at line 345 of file gspan.h.


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