aGrUM  0.16.0
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 286 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 445 of file gspan_tpl.h.

445  :
446  gspan(my_gspan) {
447  GUM_CONSTRUCTOR(GSpan< GUM_SCALAR >::LabelSort);
448  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:313

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

451  :
452  gspan(source.gspan) {
453  GUM_CONS_CPY(GSpan< GUM_SCALAR >::LabelSort);
454  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:313

◆ ~LabelSort()

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

Destructor.

Definition at line 457 of file gspan_tpl.h.

457  {
458  GUM_DESTRUCTOR(GSpan< GUM_SCALAR >::LabelSort);
459  }

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

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

463  {
464  // We want a descending order
465  // return gspan->__cost[i] > gspan->__cost[j];
466  return gspan->__tree.strategy()(i, j);
467  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:313
gspan::DFSTree< GUM_SCALAR > __tree
The DFSTree used to discover new patters.
Definition: gspan.h:219

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 313 of file gspan.h.

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


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