aGrUM  0.13.2
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

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

469  :
470  gspan(my_gspan) {
471  GUM_CONSTRUCTOR(GSpan< GUM_SCALAR >::PatternSort);
472  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:345
template<typename GUM_SCALAR >
INLINE gum::prm::GSpan< GUM_SCALAR >::PatternSort::PatternSort ( const PatternSort source)

Copy constructor.

Parameters
sourceThe copied PatternSort.

Definition at line 476 of file gspan_tpl.h.

476  :
477  gspan(source.gspan) {
478  GUM_CONS_CPY(GSpan< GUM_SCALAR >::PatternSort);
479  }
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
Definition: gspan.h:345
template<typename GUM_SCALAR >
INLINE gum::prm::GSpan< GUM_SCALAR >::PatternSort::~PatternSort ( )

Destructor.

Definition at line 482 of file gspan_tpl.h.

482  {
483  GUM_DESTRUCTOR(GSpan< GUM_SCALAR >::PatternSort);
484  }

Member Function Documentation

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

References gum::prm::GSpan< GUM_SCALAR >::PatternSort::gspan, and gum::prm::GSpan< GUM_SCALAR >::tree().

488  {
489  // We want a descending order
490  return gspan->tree().strategy().operator()(i, j);
491  }
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:381

+ Here is the call graph for this function:

Member Data Documentation

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.

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


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