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

◆ Matrix

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

Definition at line 21 of file MultiGaussianState.h.

◆ SingleState

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

Definition at line 22 of file MultiGaussianState.h.

◆ SingleStateContainer

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

Definition at line 25 of file MultiGaussianState.h.

◆ SingleStatePtr

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

Definition at line 23 of file MultiGaussianState.h.

◆ Vector

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

Definition at line 20 of file MultiGaussianState.h.

Constructor & Destructor Documentation

◆ MultiGaussianState() [1/2]

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  }

◆ MultiGaussianState() [2/2]

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

◆ ~MultiGaussianState()

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

Definition at line 48 of file MultiGaussianState.h.

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

Member Function Documentation

◆ checkCombinedState()

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

calculation of the combined state (on demand)

◆ components()

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

access to components (single Gaussian states)

Definition at line 83 of file MultiGaussianState.h.

References MultiGaussianState< N >::theComponents.

83 { return theComponents; }
const SingleStateContainer theComponents

◆ covariance()

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

combined covariance matrix

◆ dimension()

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

dimension of parameter vector

Definition at line 85 of file MultiGaussianState.h.

References N.

85 { return N; }
#define N
Definition: blowfish.cc:9

◆ mean()

template<unsigned int N>
const Vector& MultiGaussianState< N >::mean ( ) const

combined mean

◆ rescaleWeight()

template<unsigned int N>
void MultiGaussianState< N >::rescaleWeight ( double  scale)

rescale weight

◆ setWeight()

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

renormalize weight

◆ weight()

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.

◆ weightMatrix()

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

combined weight matrix

Member Data Documentation

◆ theCombinedState

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

Definition at line 99 of file MultiGaussianState.h.

◆ theCombinedStateUp2Date

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

Definition at line 100 of file MultiGaussianState.h.

◆ theComponents

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

Definition at line 98 of file MultiGaussianState.h.

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