36 inline std::size_t operator()(
const int* conf)
const noexcept
38 std::size_t seed = conf[0];
39 for(
int i = 1; i < dim; ++i )
41 constexpr_if(
sizeof(std::size_t) == 8)
61 inline bool operator()(
const int* conf1,
const int* conf2)
const
70 return memcmp(conf1, conf2, size) == 0;
79 inline bool operator()(
void* conf1,
void* conf2)
const
81 return *
reinterpret_cast<double*
>(conf1) < *
reinterpret_cast<double*
>(conf2);
90 const double* logProbs;
95 inline bool operator()(
const Conf conf1,
const Conf conf2)
98 return unnormalized_logProb(conf1, logProbs, dim) < unnormalized_logProb(conf2, logProbs, dim);
105 const double* logProbs;
110 inline bool operator()(
const Conf conf1,
const Conf conf2)
113 return unnormalized_logProb(conf1, logProbs, dim) > unnormalized_logProb(conf2, logProbs, dim);
121 inline bool operator()(
const T a,
const T b)
const {
return a > b; }
128 inline explicit TableOrder(
const T* _tbl) : tbl(_tbl) {}
129 inline bool operator()(
unsigned int i,
unsigned int j) {
return tbl[i] < tbl[j]; }
134 #include "marginalTrek++.h"
136 class PrecalculatedMarginal;
143 T
const*
const*
const MT;
146 inline bool operator()(
int m1,
int m2) {
return MT[m1]->get_no_confs() > MT[m2]->get_no_confs(); }