www.mooseframework.org
NormalDistribution.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "Distribution.h"
13 
14 class NormalDistribution;
15 
16 template <>
17 InputParameters validParams<NormalDistribution>();
18 
22 class NormalDistribution : public Distribution
23 {
24 public:
25  NormalDistribution(const InputParameters & parameters);
26 
27  virtual Real pdf(const Real & x) const override;
28  virtual Real cdf(const Real & x) const override;
29  virtual Real quantile(const Real & p) const override;
30 
31  Real pdf(const Real & x, const Real & mean, const Real & std_dev) const;
32  Real cdf(const Real & x, const Real & mean, const Real & std_dev) const;
33  Real quantile(const Real & p, const Real & mean, const Real & std_dev) const;
34 
35 protected:
38  const std::vector<Real> _a = {
39  -0.322232431088, -1.0, -0.342242088547, -0.0204231210245, -0.0000453642210148};
40 
41  const std::vector<Real> _b = {
42  0.099348462606, 0.588581570495, 0.531103462366, 0.10353775285, 0.0038560700634};
44 
46  const Real & _mean;
47 
49  const Real & _standard_deviation;
50 };
51 
const Real & _standard_deviation
The standard deviation of the distribution (sigma)
virtual Real quantile(const Real &p) const override
InputParameters validParams< NormalDistribution >()
const std::vector< Real > _a
const Real & _mean
The mean (or expectation) of the distribution (mu)
const std::vector< Real > _b
NormalDistribution(const InputParameters &parameters)
A class used to generate a normal distribution.
virtual Real cdf(const Real &x) const override
virtual Real pdf(const Real &x) const override