annotate src/Modules/Features/ModuleGaussians.h @ 13:88fe02836a6b

-Updated the SWIG wrapper to include all the modules. Now employing a lazier strategy for the SWIG interface file.
author tomwalters
date Fri, 19 Feb 2010 14:17:42 +0000
parents bd370910aa05
children 491b1b1d1dc5
rev   line source
tomwalters@10 1 // Copyright 2008-2010, Thomas Walters
tomwalters@0 2 //
tomwalters@0 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@0 4 // http://www.acousticscale.org/AIMC
tomwalters@0 5 //
tomwalters@0 6 // This program is free software: you can redistribute it and/or modify
tomwalters@0 7 // it under the terms of the GNU General Public License as published by
tomwalters@0 8 // the Free Software Foundation, either version 3 of the License, or
tomwalters@0 9 // (at your option) any later version.
tomwalters@0 10 //
tomwalters@0 11 // This program is distributed in the hope that it will be useful,
tomwalters@0 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
tomwalters@0 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
tomwalters@0 14 // GNU General Public License for more details.
tomwalters@0 15 //
tomwalters@0 16 // You should have received a copy of the GNU General Public License
tomwalters@0 17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
tomwalters@0 18
tomwalters@0 19 /*! \file ModuleGaussians.h
tomwalters@0 20 * \brief Gaussian features
tomwalters@0 21 */
tomwalters@0 22
tomwalters@10 23 /*! \author Thomas Walters <tom@acousticscale.org>
tomwalters@0 24 * \date created 2008/06/23
tomwalters@0 25 * \version \$Id: ModuleGaussians.h 2 2010-02-02 12:59:50Z tcw $
tomwalters@0 26 */
tomwalters@0 27
tomwalters@11 28 #ifndef AIMC_MODULES_FEATURES_GAUSSIANS_H_
tomwalters@11 29 #define AIMC_MODULES_FEATURES_GAUSSIANS_H_
tomwalters@0 30
tomwalters@0 31 #include <vector>
tomwalters@0 32
tomwalters@0 33 #include "Support/Module.h"
tomwalters@0 34 #include "Support/Parameters.h"
tomwalters@0 35 #include "Support/SignalBank.h"
tomwalters@0 36
tomwalters@0 37 namespace aimc {
tomwalters@0 38 using std::vector;
tomwalters@8 39 class ModuleGaussians : public Module {
tomwalters@0 40 public:
tomwalters@8 41 explicit ModuleGaussians(Parameters *pParam);
tomwalters@0 42 virtual ~ModuleGaussians();
tomwalters@0 43
tomwalters@8 44 /*! \brief Process a buffer
tomwalters@8 45 */
tomwalters@0 46 virtual void Process(const SignalBank &input);
tomwalters@0 47
tomwalters@3 48 private:
tomwalters@8 49 /*! \brief Reset the internal state of the module
tomwalters@8 50 */
tomwalters@3 51 virtual void ResetInternal();
tomwalters@0 52
tomwalters@3 53 /*! \brief Prepare the module
tomwalters@3 54 * \param input Input signal
tomwalters@3 55 * \param output true on success false on failure
tomwalters@3 56 */
tomwalters@0 57 virtual bool InitializeInternal(const SignalBank &input);
tomwalters@0 58
tomwalters@0 59 bool RubberGMMCore(int iNumComponents, bool bDoInit);
tomwalters@0 60
tomwalters@0 61 /*! \brief Number of Gaussian Components
tomwalters@0 62 */
tomwalters@0 63 int m_iParamNComp;
tomwalters@0 64
tomwalters@0 65 /*! \brief Constant variance of Gaussians
tomwalters@0 66 */
tomwalters@8 67 float m_fParamVar;
tomwalters@0 68
tomwalters@0 69 /*! \brief posterior probability expansion exponent
tomwalters@0 70 */
tomwalters@8 71 float m_fParamPosteriorExp;
tomwalters@0 72
tomwalters@0 73 /*! \brief Maximum Number of iterations
tomwalters@0 74 */
tomwalters@1 75 int m_iParamMaxIt;
tomwalters@0 76
tomwalters@0 77 /*! \brief convergence criterion
tomwalters@0 78 */
tomwalters@8 79 float m_fParamPriorsConverged;
tomwalters@0 80
tomwalters@0 81 /*! \brief The amplitudes of the components (priors)
tomwalters@0 82 */
tomwalters@8 83 vector<float> m_pA;
tomwalters@0 84
tomwalters@0 85 /*! \brief The means of the components (priors)
tomwalters@0 86 */
tomwalters@8 87 vector<float> m_pMu;
tomwalters@0 88
tomwalters@0 89 /*! \brief The spectral profile of the incoming buffer
tomwalters@0 90 */
tomwalters@8 91 vector<float> m_pSpectralProfile;
tomwalters@0 92
tomwalters@0 93 int m_iNumChannels;
tomwalters@0 94 };
tomwalters@0 95 } // namespace aimc
tomwalters@0 96
tomwalters@11 97 #endif // AIMC_MODULES_FEATURES_GAUSSIANS_H_