declare options as constexp
This commit is contained in:
@@ -20,37 +20,37 @@
|
||||
//! @{
|
||||
|
||||
|
||||
struct gmm_dist_mode { const uword id; inline explicit gmm_dist_mode(const uword in_id) : id(in_id) {} };
|
||||
struct gmm_dist_mode { const uword id; inline constexpr explicit gmm_dist_mode(const uword in_id) : id(in_id) {} };
|
||||
|
||||
inline bool operator==(const gmm_dist_mode& a, const gmm_dist_mode& b) { return (a.id == b.id); }
|
||||
inline bool operator!=(const gmm_dist_mode& a, const gmm_dist_mode& b) { return (a.id != b.id); }
|
||||
|
||||
struct gmm_dist_eucl : public gmm_dist_mode { inline gmm_dist_eucl() : gmm_dist_mode(1) {} };
|
||||
struct gmm_dist_maha : public gmm_dist_mode { inline gmm_dist_maha() : gmm_dist_mode(2) {} };
|
||||
struct gmm_dist_prob : public gmm_dist_mode { inline gmm_dist_prob() : gmm_dist_mode(3) {} };
|
||||
struct gmm_dist_eucl : public gmm_dist_mode { inline constexpr gmm_dist_eucl() : gmm_dist_mode(1) {} };
|
||||
struct gmm_dist_maha : public gmm_dist_mode { inline constexpr gmm_dist_maha() : gmm_dist_mode(2) {} };
|
||||
struct gmm_dist_prob : public gmm_dist_mode { inline constexpr gmm_dist_prob() : gmm_dist_mode(3) {} };
|
||||
|
||||
static const gmm_dist_eucl eucl_dist;
|
||||
static const gmm_dist_maha maha_dist;
|
||||
static const gmm_dist_prob prob_dist;
|
||||
static constexpr gmm_dist_eucl eucl_dist;
|
||||
static constexpr gmm_dist_maha maha_dist;
|
||||
static constexpr gmm_dist_prob prob_dist;
|
||||
|
||||
|
||||
|
||||
struct gmm_seed_mode { const uword id; inline explicit gmm_seed_mode(const uword in_id) : id(in_id) {} };
|
||||
struct gmm_seed_mode { const uword id; inline constexpr explicit gmm_seed_mode(const uword in_id) : id(in_id) {} };
|
||||
|
||||
inline bool operator==(const gmm_seed_mode& a, const gmm_seed_mode& b) { return (a.id == b.id); }
|
||||
inline bool operator!=(const gmm_seed_mode& a, const gmm_seed_mode& b) { return (a.id != b.id); }
|
||||
|
||||
struct gmm_seed_keep_existing : public gmm_seed_mode { inline gmm_seed_keep_existing() : gmm_seed_mode(1) {} };
|
||||
struct gmm_seed_static_subset : public gmm_seed_mode { inline gmm_seed_static_subset() : gmm_seed_mode(2) {} };
|
||||
struct gmm_seed_static_spread : public gmm_seed_mode { inline gmm_seed_static_spread() : gmm_seed_mode(3) {} };
|
||||
struct gmm_seed_random_subset : public gmm_seed_mode { inline gmm_seed_random_subset() : gmm_seed_mode(4) {} };
|
||||
struct gmm_seed_random_spread : public gmm_seed_mode { inline gmm_seed_random_spread() : gmm_seed_mode(5) {} };
|
||||
struct gmm_seed_keep_existing : public gmm_seed_mode { inline constexpr gmm_seed_keep_existing() : gmm_seed_mode(1) {} };
|
||||
struct gmm_seed_static_subset : public gmm_seed_mode { inline constexpr gmm_seed_static_subset() : gmm_seed_mode(2) {} };
|
||||
struct gmm_seed_static_spread : public gmm_seed_mode { inline constexpr gmm_seed_static_spread() : gmm_seed_mode(3) {} };
|
||||
struct gmm_seed_random_subset : public gmm_seed_mode { inline constexpr gmm_seed_random_subset() : gmm_seed_mode(4) {} };
|
||||
struct gmm_seed_random_spread : public gmm_seed_mode { inline constexpr gmm_seed_random_spread() : gmm_seed_mode(5) {} };
|
||||
|
||||
static const gmm_seed_keep_existing keep_existing;
|
||||
static const gmm_seed_static_subset static_subset;
|
||||
static const gmm_seed_static_spread static_spread;
|
||||
static const gmm_seed_random_subset random_subset;
|
||||
static const gmm_seed_random_spread random_spread;
|
||||
static constexpr gmm_seed_keep_existing keep_existing;
|
||||
static constexpr gmm_seed_static_subset static_subset;
|
||||
static constexpr gmm_seed_static_spread static_spread;
|
||||
static constexpr gmm_seed_random_subset random_subset;
|
||||
static constexpr gmm_seed_random_spread random_spread;
|
||||
|
||||
|
||||
namespace gmm_priv
|
||||
|
||||
Reference in New Issue
Block a user