https://mooseframework.inl.gov
Uniform.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 "Distribution.h"
13 
17 class Uniform : public Distribution
18 {
19 public:
21 
23 
24  static Real pdf(const Real & x, const Real & lower_bound, const Real & upper_bound);
25  static Real cdf(const Real & x, const Real & lower_bound, const Real & upper_bound);
26  static Real quantile(const Real & y, const Real & lower_bound, const Real & upper_bound);
27 
28  virtual Real pdf(const Real & x) const override;
29  virtual Real cdf(const Real & x) const override;
30  virtual Real quantile(const Real & y) const override;
31 
32 protected:
34  const Real & _lower_bound;
35 
37  const Real & _upper_bound;
38 };
static Real pdf(const Real &x, const Real &lower_bound, const Real &upper_bound)
Definition: Uniform.C:34
static InputParameters validParams()
Definition: Uniform.C:15
A class used to generate uniform distribution.
Definition: Uniform.h:17
const std::vector< double > y
const std::vector< double > x
static Real cdf(const Real &x, const Real &lower_bound, const Real &upper_bound)
Definition: Uniform.C:43
Uniform(const InputParameters &parameters)
Definition: Uniform.C:24
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static Real quantile(const Real &y, const Real &lower_bound, const Real &upper_bound)
Definition: Uniform.C:54
const Real & _lower_bound
The lower bound for the uniform distribution.
Definition: Uniform.h:34
const InputParameters & parameters() const
const Real & _upper_bound
The upper bound for the uniform distribution.
Definition: Uniform.h:37