1%feature("docstring") OT::Uniform 2"Uniform distribution. 3 4Available constructors: 5 Uniform(*a=-1.0, b=1.0*) 6 7Parameters 8---------- 9a : float 10 Lower bound. 11b : float, :math:`b > a` 12 Upper bound. 13 14Notes 15----- 16Its probability density function is defined as: 17 18.. math:: 19 20 f_X(x) = \frac{1}{b-a}, \quad x \in [a; b] 21 22with :math:`a < b`. 23 24Its first moments are defined as: 25 26.. math:: 27 :nowrap: 28 29 \begin{eqnarray*} 30 \Expect{X} & = & \frac{a+b}{2} \\ 31 \Var{X} & = & \frac{(b-a)^2}{12} 32 \end{eqnarray*} 33 34Examples 35-------- 36Create a distribution: 37 38>>> import openturns as ot 39>>> distribution = ot.Uniform(2.0, 3.0) 40 41Draw a sample: 42 43>>> sample = distribution.getSample(5)" 44 45// --------------------------------------------------------------------- 46 47%feature("docstring") OT::Uniform::getA 48"Accessor to the distribution's lower bound. 49 50Returns 51------- 52a : float 53 Lower bound." 54 55// --------------------------------------------------------------------- 56 57%feature("docstring") OT::Uniform::getB 58"Accessor to the distribution's upper bound. 59 60Returns 61------- 62b : float 63 Upper bound." 64 65// --------------------------------------------------------------------- 66 67%feature("docstring") OT::Uniform::setA 68"Accessor to the distribution's lower bound. 69 70Parameters 71---------- 72a : float, :math:`a < b` 73 Lower bound." 74 75// --------------------------------------------------------------------- 76 77%feature("docstring") OT::Uniform::setB 78"Accessor to the distribution's upper bound. 79 80Parameters 81---------- 82b : float, :math:`a < b` 83 Upper bound." 84