diagonal_constraint.hpp

Go to the documentation of this file.
00001 
00022 #ifndef __MLPACK_METHODS_GMM_DIAGONAL_CONSTRAINT_HPP
00023 #define __MLPACK_METHODS_GMM_DIAGONAL_CONSTRAINT_HPP
00024 
00025 #include <mlpack/core.hpp>
00026 
00027 namespace mlpack {
00028 namespace gmm {
00029 
00033 class DiagonalConstraint
00034 {
00035  public:
00037   static void ApplyConstraint(arma::mat& covariance)
00038   {
00039     // Save the diagonal only.
00040     arma::vec diagonal = covariance.diag();
00041     covariance = arma::diagmat(diagonal);
00042   }
00043 };
00044 
00045 }; // namespace gmm
00046 }; // namespace mlpack
00047 
00048 #endif

Generated on 13 Aug 2014 for MLPACK by  doxygen 1.6.1