/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CommonTools/Statistics/interface/RandomMultiGauss.h
39 строк
1 KB
Cms Build
Clang-Format
03 июн 2019, 06:44
03 июн 2019, 06:44
6a63925
Код
Авторство
О чём код?
#ifndef _CommonDet_RandomMultiGauss_H_ #define _CommonDet_RandomMultiGauss_H_ #include "DataFormats/CLHEP/interface/AlgebraicObjects.h" /** \class RandomMultiGauss * Vector of random numbers according to covariance matrix. * Generates vectors of random numbers given a vector of * mean values (optional) and a covariance matrix. * Will accept empty rows/columns in the input matrix. * Uses CLHEP::RandGauss with default engine for generation. */ class RandomMultiGauss { public: /** constructor with explicit vector of mean values */ RandomMultiGauss(const AlgebraicVector& aVector, const AlgebraicSymMatrix& aMatrix); /** constructor with covariance matrix only (all means = 0) */ RandomMultiGauss(const AlgebraicSymMatrix& aMatrix); // destructor ~RandomMultiGauss() {} /** Generation of a vector of random numbers. */ AlgebraicVector fire(); private: /** generation of the cholesky decomposition */ void initialise(const AlgebraicSymMatrix&); private: int theSize; AlgebraicVector theMeans; AlgebraicMatrix theTriangle; }; #endif