nidas
v1.2-1520
|
Timetag and Id comparator of pointers to Samples: if two timetags are the same, then compare Ids, and if they're equal, compare data length. More...
#include <SortedSampleSet.h>
Public Member Functions | |
bool | operator() (const Sample *x, const Sample *y) const |
Return true if x is less than y. More... | |
Timetag and Id comparator of pointers to Samples: if two timetags are the same, then compare Ids, and if they're equal, compare data length.
This is useful when merging archives, where one expects duplicate samples. Otherwise, if one doesn't expect duplicates, which is the usual case, this is less efficient than the simple SampleTimetagComparator above. Warning: if a sensor can generate multiple samples with the same time tag AND the same data length but differing data, then a set using this comparator will discard all but one of the samples whose timetag and length match.
|
inline |
Return true if x is less than y.
References nidas::core::Sample::getDataLength(), nidas::core::Sample::getId(), and nidas::core::Sample::getTimeTag().