https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
17class Uniform : public Distribution
18{
19public:
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
32protected:
34 const Real & _lower_bound;
35
37 const Real & _upper_bound;
38};
const std::vector< double > y
const std::vector< double > x
const InputParameters & parameters() const
A class used to generate uniform distribution.
Definition Uniform.h:18
static InputParameters validParams()
Definition Uniform.C:15
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 Real & _upper_bound
The upper bound for the uniform distribution.
Definition Uniform.h:37
static Real pdf(const Real &x, const Real &lower_bound, const Real &upper_bound)
Definition Uniform.C:34
static Real cdf(const Real &x, const Real &lower_bound, const Real &upper_bound)
Definition Uniform.C:43