12 #ifndef MLPACK_METHODS_GMM_DIAGONAL_CONSTRAINT_HPP 13 #define MLPACK_METHODS_GMM_DIAGONAL_CONSTRAINT_HPP 30 covariance = arma::diagmat(arma::clamp(covariance.diag(), 1e-10, DBL_MAX));
34 template<
typename Archive>
35 static void serialize(Archive& ,
const unsigned int ) { }
Force a covariance matrix to be diagonal.
static void ApplyConstraint(arma::mat &covariance)
Force a covariance matrix to be diagonal.
The core includes that mlpack expects; standard C++ includes and Armadillo.
static void serialize(Archive &, const unsigned int)
Serialize the constraint (which holds nothing, so, nothing to do).