https://mooseframework.inl.gov
TruncatedNormal.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 "Normal.h"
13 
17 class TruncatedNormal : public Normal
18 {
19 public:
21 
23 
24  virtual Real pdf(const Real & x) const override;
25  virtual Real cdf(const Real & x) const override;
26  virtual Real quantile(const Real & p) const override;
27 
28  static Real pdf(const Real & x,
29  const Real & mean,
30  const Real & std_dev,
31  const Real & lower_bound,
32  const Real & upper_bound);
33  static Real cdf(const Real & x,
34  const Real & mean,
35  const Real & std_dev,
36  const Real & lower_bound,
37  const Real & upper_bound);
38  static Real quantile(const Real & p,
39  const Real & mean,
40  const Real & std_dev,
41  const Real & lower_bound,
42  const Real & upper_bound);
43 
44 protected:
46  const Real & _lower_bound;
47 
49  const Real & _upper_bound;
50 };
A class used to generate a normal distribution.
Definition: Normal.h:17
TruncatedNormal(const InputParameters &parameters)
A class used to generate a truncated normal distribution.
virtual Real cdf(const Real &x) const override
const Real & _lower_bound
The lower bound for the distribution.
const Real & _upper_bound
The upper bound for the distribution.
const std::vector< double > x
virtual Real pdf(const Real &x) const override
static InputParameters validParams()
virtual Real quantile(const Real &p) const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & parameters() const