aGrUM  0.14.2
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 442 of file gspan_tpl.h.

442  :
443  gspan(my_gspan) {
444  GUM_CONSTRUCTOR(GSpan< GUM_SCALAR >::LabelSort);
445  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:310

◆ 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 448 of file gspan_tpl.h.

448  :
449  gspan(source.gspan) {
450  GUM_CONS_CPY(GSpan< GUM_SCALAR >::LabelSort);
451  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:310

◆ ~LabelSort()

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

Destructor.

Definition at line 454 of file gspan_tpl.h.

454  {
455  GUM_DESTRUCTOR(GSpan< GUM_SCALAR >::LabelSort);
456  }

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 459 of file gspan_tpl.h.

References gum::prm::GSpan< GUM_SCALAR >::__tree, and gum::prm::GSpan< GUM_SCALAR >::LabelSort::gspan.

460  {
461  // We want a descending order
462  // return gspan->__cost[i] > gspan->__cost[j];
463  return gspan->__tree.strategy()(i, j);
464  }
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:216

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.

Referenced by gum::prm::GSpan< GUM_SCALAR >::LabelSort::operator()().


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