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

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

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

Public Attributes

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

Public Member Functions

 LabelSort (GSpan *my_gspan)
 Default constructor. More...
 
 LabelSort (const LabelSort &source)
 Copy constructor. More...
 
 ~LabelSort ()
 Destructor. More...
 
bool operator() (gspan::LabelData *i, gspan::LabelData *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 >::LabelSort

Private class used to sort LabelData using STL sort algorithms.

Definition at line 283 of file gspan.h.

Constructor & Destructor Documentation

◆ LabelSort() [1/2]

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

Default constructor.

Parameters
my_gspanA pointer over the GSpan using this class.

Definition at line 428 of file gspan_tpl.h.

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

428  : gspan(my_gspan) {
429  GUM_CONSTRUCTOR(GSpan< GUM_SCALAR >::LabelSort);
430  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:310
+ Here is the call graph for this function:

◆ LabelSort() [2/2]

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

Copy constructor.

Parameters
sourceThe copied LabelSort.

Definition at line 433 of file gspan_tpl.h.

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

433  :
434  gspan(source.gspan) {
435  GUM_CONS_CPY(GSpan< GUM_SCALAR >::LabelSort);
436  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:310
+ Here is the call graph for this function:

◆ ~LabelSort()

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

Destructor.

Definition at line 439 of file gspan_tpl.h.

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

439  {
440  GUM_DESTRUCTOR(GSpan< GUM_SCALAR >::LabelSort);
441  }
+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

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

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

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

Definition at line 444 of file gspan_tpl.h.

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

445  {
446  // We want a descending order
447  // return gspan-> _cost_[i] > gspan-> _cost_[j];
448  return gspan->_tree_.strategy()(i, j);
449  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:310
gspan::DFSTree< GUM_SCALAR > _tree_
The DFSTree used to discover new patters.
Definition: gspan.h:218
+ Here is the call graph for this function:

Member Data Documentation

◆ gspan

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

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

Definition at line 310 of file gspan.h.


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