All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ComputationRenumberer::PointerCompare< T > Struct Template Reference

Public Member Functions

bool operator() (const std::vector< T > *ptr1, const std::vector< T > *ptr2) const
 

Detailed Description

template<class T>
struct kaldi::nnet3::ComputationRenumberer::PointerCompare< T >

Definition at line 202 of file nnet-optimize-utils.cc.

Member Function Documentation

bool operator() ( const std::vector< T > *  ptr1,
const std::vector< T > *  ptr2 
) const
inline

Definition at line 208 of file nnet-optimize-utils.cc.

209  {
210  size_t size1 = ptr1->size(), size2 = ptr2->size();
211  if (size1 < size2) return true;
212  else if (size1 > size2) return false;
213  else return (*ptr1 < *ptr2); // use the std::vector operator <, which is
214  // lexicographical comparison.
215  }

The documentation for this struct was generated from the following file: