libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CRNMultivariateRandomTools.h
Go to the documentation of this file.
1 /* Copyright 2008-2014 INSA Lyon
2  *
3  * This file is part of libcrn.
4  *
5  * libcrn is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * libcrn is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libcrn. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * file: CRNMultivariateRandomTools.h
19  * \author Jean DUONG, Yann LEYDIER
20  */
21 
22 #ifndef CRNMULTIVARIATERANDOMTOOLS_HEADER
23 #define CRNMULTIVARIATERANDOMTOOLS_HEADER
24 
25 #include <CRN.h>
27 
28 namespace crn
29 {
30  class MultivariateGaussianMixture;
31  class MultivariateGaussianPDF;
32  class SquareMatrixDouble;
33  /****************************************************************************/
44  {
45  public:
47  static MatrixDouble NewGaussianSample(const MatrixDouble& Mu, const SquareMatrixDouble& Sigma, size_t n = 1, size_t m = 100, bool reseed = true);
49  static MatrixDouble NewGaussianSample(const MultivariateGaussianPDF& P, size_t n = 1, size_t m = 100, bool reseed = true);
51  static MatrixDouble NewGaussianMixtureSample(const MultivariateGaussianMixture& Mx, size_t n = 1, size_t m = 100, bool reseed = true);
52 
53  private:
55  static MatrixDouble makeMLTransform(const MatrixDouble& M, const SquareMatrixDouble& L, const MatrixDouble& X);
56 
57  };
58 }
59 #endif
static MatrixDouble NewGaussianSample(const MatrixDouble &Mu, const SquareMatrixDouble &Sigma, size_t n=1, size_t m=100, bool reseed=true)
Creates a data sample following a Gaussian probability law.
Multivariate random toolbox class.
static MatrixDouble NewGaussianMixtureSample(const MultivariateGaussianMixture &Mx, size_t n=1, size_t m=100, bool reseed=true)
Creates a data sample following a Gaussian probability law.
double matrix class
Square double matrix class.
Multivariate Gaussian distribution.