33 #include <itpp/itexports.h>
70 MOG_diag(
const std::string &name) { zero_all_ptrs(); load(name); }
77 MOG_diag(
const int &K_in,
const int &D_in,
bool full_in =
false) { zero_all_ptrs(); init(K_in, D_in, full_in); }
102 MOG_diag(
Array<vec> &means_in,
Array<mat> &full_covs_in, vec &weights_in) { zero_all_ptrs(); init(means_in, full_covs_in, weights_in); convert_to_diag(); }
118 void load(
const std::string &name_in);
124 double log_lhood_single_gaus(
const double * c_x_in,
const int k)
const;
127 double log_lhood_single_gaus(
const vec &x_in,
const int k)
const;
130 double log_lhood(
const double * c_x_in);
133 double log_lhood(
const vec &x_in);
136 double lhood(
const double * c_x_in);
139 double lhood(
const vec &x_in);
142 double avg_log_lhood(
const double ** c_x_in,
int N);
145 double avg_log_lhood(
const Array<vec> & X_in);
151 void setup_weights();
155 double log_lhood_single_gaus_internal(
const double * c_x_in,
const int k)
const;
157 double log_lhood_single_gaus_internal(
const vec &x_in,
const int k)
const;
159 double log_lhood_internal(
const double * c_x_in);
161 double log_lhood_internal(
const vec &x_in);
163 double lhood_internal(
const double * c_x_in);
165 double lhood_internal(
const vec &x_in);
174 double * enable_c_access(vec & v_in);
177 int * enable_c_access(ivec & v_in);
180 double ** disable_c_access(
double ** A_in);
183 int ** disable_c_access(
int ** A_in);
186 double * disable_c_access(
double * v_in);
189 int * disable_c_access(
int * v_in);
192 void zero_all_ptrs();
194 void free_all_ptrs();
223 #endif // #ifndef MOG_DIAG_H