www.mooseframework.org
TruncatedNormalDistribution.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 "NormalDistribution.h"
13 
15 
16 template <>
18 
23 {
24 public:
25  TruncatedNormalDistribution(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,
32  const Real & mean,
33  const Real & std_dev,
34  const Real & lower_bound,
35  const Real & upper_bound) const;
36  Real cdf(const Real & x,
37  const Real & mean,
38  const Real & std_dev,
39  const Real & lower_bound,
40  const Real & upper_bound) const;
41  Real quantile(const Real & p,
42  const Real & mean,
43  const Real & std_dev,
44  const Real & lower_bound,
45  const Real & upper_bound) const;
46 
47 protected:
49  const Real & _lower_bound;
50 
52  const Real & _upper_bound;
53 };
54 
virtual Real pdf(const Real &x) const override
const Real & _upper_bound
The upper bound for the distribution.
A class used to generate a truncated normal distribution.
const Real & _lower_bound
The lower bound for the distribution.
TruncatedNormalDistribution(const InputParameters &parameters)
InputParameters validParams< TruncatedNormalDistribution >()
virtual Real cdf(const Real &x) const override
A class used to generate a normal distribution.
virtual Real quantile(const Real &p) const override