MLPACK
1.0.8
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
mlpack
methods
gmm
diagonal_constraint.hpp
Go to the documentation of this file.
1
22
#ifndef __MLPACK_METHODS_GMM_DIAGONAL_CONSTRAINT_HPP
23
#define __MLPACK_METHODS_GMM_DIAGONAL_CONSTRAINT_HPP
24
25
#include <
mlpack/core.hpp
>
26
27
namespace
mlpack {
28
namespace
gmm {
29
33
class
DiagonalConstraint
34
{
35
public
:
37
static
void
ApplyConstraint
(arma::mat& covariance)
38
{
39
// Save the diagonal only.
40
arma::vec diagonal = covariance.diag();
41
covariance = arma::diagmat(diagonal);
42
}
43
};
44
45
};
// namespace gmm
46
};
// namespace mlpack
47
48
#endif
Generated by
1.8.3.1