https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
17class TruncatedNormal : public Normal
18{
19public:
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
44protected:
46 const Real & _lower_bound;
47
49 const Real & _upper_bound;
50};
const std::vector< double > x
const Real p
const InputParameters & parameters() const
A class used to generate a normal distribution.
Definition Normal.h:18
A class used to generate a truncated normal distribution.
virtual Real pdf(const Real &x) const override
virtual Real cdf(const Real &x) const override
static InputParameters validParams()
const Real & _lower_bound
The lower bound for the distribution.
virtual Real quantile(const Real &p) const override
const Real & _upper_bound
The upper bound for the distribution.