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 204 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 210 of file nnet-optimize-utils.cc.

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

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