SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::base::DistributionTruncNormal Class Reference

Truncated normal distribution. More...

#include <DistributionTruncNormal.hpp>

Inheritance diagram for sgpp::base::DistributionTruncNormal:
sgpp::base::Distribution

Public Member Functions

 DistributionTruncNormal (double mean, double stddev, double lower, double upper, long int seed=777)
 Constructor.
 
double eval (double x)
 
sgpp::base::DataVector getBounds ()
 
sgpp::base::DataVector getCharacteristics ()
 return all relevant characteristic values (e.g.
 
sgpp::base::DistributionType getType ()
 
double sample ()
 
virtual ~DistributionTruncNormal ()
 Destructor.
 
- Public Member Functions inherited from sgpp::base::Distribution
 Distribution (typename std::chrono::system_clock::duration::rep seed=777)
 Constructor.
 
sgpp::base::DataVector samples (size_t num)
 
virtual ~Distribution ()
 Destructor.
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::base::Distribution
std::default_random_engine gen
 

Detailed Description

Truncated normal distribution.

Only accepts samples within [lower,upper] Results should be normalized by dividing them by mean(f(x)==1) w.r.t. the same truncated normal distribution

Constructor & Destructor Documentation

◆ DistributionTruncNormal()

sgpp::base::DistributionTruncNormal::DistributionTruncNormal ( double  mean,
double  stddev,
double  lower,
double  upper,
long int  seed = 777 
)
inline

Constructor.

◆ ~DistributionTruncNormal()

virtual sgpp::base::DistributionTruncNormal::~DistributionTruncNormal ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ eval()

double sgpp::base::DistributionTruncNormal::eval ( double  x)
inlinevirtual

◆ getBounds()

sgpp::base::DataVector sgpp::base::DistributionTruncNormal::getBounds ( )
inlinevirtual

◆ getCharacteristics()

sgpp::base::DataVector sgpp::base::DistributionTruncNormal::getCharacteristics ( )
inlinevirtual

return all relevant characteristic values (e.g.

mean and standarddeviation for normal distribution)

Implements sgpp::base::Distribution.

◆ getType()

sgpp::base::DistributionType sgpp::base::DistributionTruncNormal::getType ( )
inlinevirtual

◆ sample()

double sgpp::base::DistributionTruncNormal::sample ( )
inlinevirtual

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