Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::MonteCarloTransform Class Referenceabstract

monte carlo propagation of uncertainty More...

#include <MathAlgo/MonteCarloTransform.hh>

+ Inheritance diagram for BIAS::MonteCarloTransform:
+ Collaboration diagram for BIAS::MonteCarloTransform:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
 MonteCarloTransform ()
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void SetNumSamplesPerDimension (const int num)
 Sets the number of samples per dimension. More...
 
void SetUniformDistribution (const bool uqrn)
 switch gauss/uniform distribution More...
 
void SetUseQuasiRandomNumbers (const bool uqrn)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
void Skew (const std::vector< Vector< double > > &dst_samples, double skewnness) const
 
int Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const
 computes the Monte Carlo approximation of the transformations of the mean and the associated covariance for the point transformation Transform_(). More...
 
int Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< Vector< double > > &dst_samples) const
 
virtual ~MonteCarloTransform ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
int GetSamples_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< Vector< double > > &src_samples) const
 computes src_mean.Size()* NumSamplesPerDimension_ samples drawn from multidiemsional normal distribution with first two moments src_mean and src_cov More...
 
virtual int Transform_ (const Vector< double > &src, Vector< double > &dst) const =0
 implements a point transformation More...
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
int NumSamplesPerDimension_
 
bool uniformDistribution_
 set to true if you want to sample uniform instead of gauss More...
 
bool UseQuasiRandomNumbers_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

monte carlo propagation of uncertainty

Author
woelk 11/2006
Examples:
ExampleUncertaintyTransform.cpp.

Definition at line 43 of file MonteCarloTransform.hh.

Constructor & Destructor Documentation

MonteCarloTransform::MonteCarloTransform ( )

Definition at line 38 of file MonteCarloTransform.cpp.

References BIAS::Debug::NewDebugLevel().

MonteCarloTransform::~MonteCarloTransform ( )
virtual

Definition at line 52 of file MonteCarloTransform.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

int MonteCarloTransform::GetSamples_ ( const Vector< double > &  src_mean,
const Matrix< double > &  src_cov,
std::vector< Vector< double > > &  src_samples 
) const
protected
long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void BIAS::MonteCarloTransform::SetNumSamplesPerDimension ( const int  num)
inline

Sets the number of samples per dimension.

Definition at line 69 of file MonteCarloTransform.hh.

void BIAS::MonteCarloTransform::SetUniformDistribution ( const bool  uqrn)
inline

switch gauss/uniform distribution

Definition at line 76 of file MonteCarloTransform.hh.

void BIAS::MonteCarloTransform::SetUseQuasiRandomNumbers ( const bool  uqrn)
inline

Definition at line 72 of file MonteCarloTransform.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

void MonteCarloTransform::Skew ( const std::vector< Vector< double > > &  dst_samples,
double  skewnness 
) const

Definition at line 372 of file MonteCarloTransform.cpp.

int MonteCarloTransform::Transform ( const Vector< double > &  src_mean,
const Matrix< double > &  src_cov,
Vector< double > &  dst_mean,
Matrix< double > &  dst_cov 
) const
virtual

computes the Monte Carlo approximation of the transformations of the mean and the associated covariance for the point transformation Transform_().

Returns
0 on success -1 when transformation of mean failed +1 when transformation of sigma point failed

Implements BIAS::UncertaintyTransformBase.

Definition at line 119 of file MonteCarloTransform.cpp.

References BIAS::Matrix< T >::IsZero(), BIAS::MatrixZero, TNT::Vector< T >::newsize(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::Vector< T >::OuterProduct(), BIAS::Vector< T >::SetZero(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), and Transform_().

int MonteCarloTransform::Transform ( const Vector< double > &  src_mean,
const Matrix< double > &  src_cov,
std::vector< Vector< double > > &  dst_samples 
) const
virtual int BIAS::MonteCarloTransform::Transform_ ( const Vector< double > &  src,
Vector< double > &  dst 
) const
protectedpure virtual

implements a point transformation

Returns
0 on success

Referenced by Transform().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

int BIAS::MonteCarloTransform::NumSamplesPerDimension_
protected

Definition at line 81 of file MonteCarloTransform.hh.

Referenced by GetSamples_().

bool BIAS::MonteCarloTransform::uniformDistribution_
protected

set to true if you want to sample uniform instead of gauss

Definition at line 86 of file MonteCarloTransform.hh.

Referenced by GetSamples_().

bool BIAS::MonteCarloTransform::UseQuasiRandomNumbers_
protected

Definition at line 83 of file MonteCarloTransform.hh.

Referenced by GetSamples_().


The documentation for this class was generated from the following files: