MeVisLab Toolbox Reference
ml::less Struct Reference

Implement comparison operator for ClusterInfo used by std::sort. More...

#include <mlClusterInfo.h>

Public Member Functions

ML_FORCE_INLINE bool operator() (const ClusterInfo &x, const ClusterInfo &y)
 Comparison operator, sort decreasing by size/volume.
 

Detailed Description

Implement comparison operator for ClusterInfo used by std::sort.

Definition at line 148 of file mlClusterInfo.h.

Member Function Documentation

◆ operator()()

ML_FORCE_INLINE bool ml::less::operator() ( const ClusterInfo & x,
const ClusterInfo & y )
inline

Comparison operator, sort decreasing by size/volume.

If the size/volume is the same, the cluster with the lower id is considered to be 'less'; this is to produce deterministic results on all platforms where the 'sort' operation behaves differently for comparing same sizes.

Definition at line 155 of file mlClusterInfo.h.

References ml::ClusterInfo::getId(), and ml::ClusterInfo::numVoxels().


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