CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
MultiGaussianState< N > Class Template Reference

Mixture of multi-variate gaussian states. More...

#include <MultiGaussianState.h>

Public Types

typedef SingleGaussianState< N >::Matrix Matrix
 
typedef SingleGaussianState< NSingleState
 
typedef std::vector< SingleStatePtrSingleStateContainer
 
typedef std::shared_ptr< SingleStateSingleStatePtr
 
typedef SingleGaussianState< N >::Vector Vector
 

Public Member Functions

const SingleStateContainercomponents () const
 access to components (single Gaussian states) More...
 
const Matrixcovariance () const
 combined covariance matrix More...
 
int dimension () const
 dimension of parameter vector More...
 
const Vectormean () const
 combined mean More...
 
 MultiGaussianState ()
 
 MultiGaussianState (const SingleStateContainer &stateV)
 
void rescaleWeight (double scale)
 rescale weight More...
 
void setWeight (double newWeight)
 renormalize weight More...
 
double weight () const
 combined weight More...
 
const MatrixweightMatrix () const
 combined weight matrix More...
 
 ~MultiGaussianState ()
 

Private Member Functions

void checkCombinedState () const
 calculation of the combined state (on demand) More...
 

Private Attributes

SingleStatePtr theCombinedState
 
bool theCombinedStateUp2Date
 
const SingleStateContainer theComponents
 

Detailed Description

template<unsigned int N>
class MultiGaussianState< N >

Mixture of multi-variate gaussian states.

Multi-dimensional multi-Gaussian mixture: weighted sum of single Gaussian components.

Definition at line 18 of file MultiGaussianState.h.

Member Typedef Documentation

template<unsigned int N>
typedef SingleGaussianState<N>::Matrix MultiGaussianState< N >::Matrix

Definition at line 21 of file MultiGaussianState.h.

template<unsigned int N>
typedef SingleGaussianState<N> MultiGaussianState< N >::SingleState

Definition at line 22 of file MultiGaussianState.h.

template<unsigned int N>
typedef std::vector<SingleStatePtr> MultiGaussianState< N >::SingleStateContainer

Definition at line 25 of file MultiGaussianState.h.

template<unsigned int N>
typedef std::shared_ptr<SingleState> MultiGaussianState< N >::SingleStatePtr

Definition at line 23 of file MultiGaussianState.h.

template<unsigned int N>
typedef SingleGaussianState<N>::Vector MultiGaussianState< N >::Vector

Definition at line 20 of file MultiGaussianState.h.

Constructor & Destructor Documentation

template<unsigned int N>
MultiGaussianState< N >::MultiGaussianState ( )
inline

Definition at line 28 of file MultiGaussianState.h.

28  : theCombinedStateUp2Date(false) {
29  // ++instances_;++maxInstances_;
30  // std::cout << "MultiGaussianState() " << N << " " << instances_ << std::endl;
31  }
template<unsigned int N>
MultiGaussianState< N >::MultiGaussianState ( const SingleStateContainer stateV)
inline

Definition at line 33 of file MultiGaussianState.h.

33  : theComponents(stateV), theCombinedStateUp2Date(false) {
34  // theComponents[0]->rescaleWeight(1.);
35  // ++instances_;++maxInstances_;
36  // std::cout << "MultiGaussianState(const SingleStateContainer&) " << N << " "
37  // << instances_ << std::endl;
38  }
const SingleStateContainer theComponents
template<unsigned int N>
MultiGaussianState< N >::~MultiGaussianState ( )
inline

Definition at line 48 of file MultiGaussianState.h.

References MultiGaussianState< N >::covariance(), MultiGaussianState< N >::mean(), MultiGaussianState< N >::weight(), and MultiGaussianState< N >::weightMatrix().

48  {
49  // --instances_;
50  // std::cout << "~MultiGaussianState " << N << " " << instances_ << std::endl;
51  }

Member Function Documentation

template<unsigned int N>
void MultiGaussianState< N >::checkCombinedState ( ) const
private

calculation of the combined state (on demand)

Referenced by MultiGaussianState< N >::dimension().

template<unsigned int N>
const SingleStateContainer& MultiGaussianState< N >::components ( ) const
inline
template<unsigned int N>
const Matrix& MultiGaussianState< N >::covariance ( ) const
template<unsigned int N>
int MultiGaussianState< N >::dimension ( ) const
inline

dimension of parameter vector

Definition at line 85 of file MultiGaussianState.h.

References MultiGaussianState< N >::checkCombinedState(), N, MultiGaussianState< N >::rescaleWeight(), Scenarios_cff::scale, and MultiGaussianState< N >::setWeight().

85 { return N; }
#define N
Definition: blowfish.cc:9
template<unsigned int N>
const Vector& MultiGaussianState< N >::mean ( ) const
template<unsigned int N>
void MultiGaussianState< N >::rescaleWeight ( double  scale)

rescale weight

Referenced by MultiGaussianState< N >::dimension().

template<unsigned int N>
void MultiGaussianState< N >::setWeight ( double  newWeight)

renormalize weight

Referenced by MultiGaussianState< N >::dimension().

template<unsigned int N>
double MultiGaussianState< N >::weight ( ) const

combined weight

Creates a new multi-state with the given components. For this base class, no information is passed from the initial instance. Creates a new single-state with the given information. For this base class, no information is passed from the initial instance.

Referenced by GaussianSumUtilities< N >::weight(), and MultiGaussianState< N >::~MultiGaussianState().

template<unsigned int N>
const Matrix& MultiGaussianState< N >::weightMatrix ( ) const

combined weight matrix

Referenced by MultiGaussianState< N >::~MultiGaussianState().

Member Data Documentation

template<unsigned int N>
SingleStatePtr MultiGaussianState< N >::theCombinedState
mutableprivate

Definition at line 99 of file MultiGaussianState.h.

template<unsigned int N>
bool MultiGaussianState< N >::theCombinedStateUp2Date
mutableprivate

Definition at line 100 of file MultiGaussianState.h.

template<unsigned int N>
const SingleStateContainer MultiGaussianState< N >::theComponents
private

Definition at line 98 of file MultiGaussianState.h.

Referenced by MultiGaussianState< N >::components().