/usr/include/openturns/swig/Trapezoidal_doc.i is in libopenturns-dev 1.9-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | %feature("docstring") OT::Trapezoidal
"Trapezoidal distribution.
Available constructors:
Trapezoidal(*a=-2.0, b=-1.0, c=1.0, d=2.0*)
Parameters
----------
a : float, :math:`a < d`
Lower bound.
b : float, :math:`a \\\\leq b < c`
Level start.
c : float, :math:`b < c \\\\leq d`
Level end.
d : float, :math:`c \\\\leq d`
Upper bound.
Notes
-----
Its probability density function is defined as:
.. math::
f_X(x) = \\\\left\\\\{
\\\\begin{array}{ll}
\\\\displaystyle h \\\\frac{x - a}{b - a} & a \\\\leq x < b \\\\\\\\
\\\\displaystyle h & b \\\\leq x < c \\\\\\\\
\\\\displaystyle h \\\\frac{d - x}{d - c} & c \\\\leq x \\\\leq d \\\\\\\\
\\\\end{array}
\\\\right., \\\\quad x \\\\in [a, d]
with: :math:`h=\\\\frac{2}{d+c-a-b}`
Its first moments are:
.. math::
:nowrap:
\\\\begin{eqnarray*}
\\\\Expect{X} & = & \\\\frac{h}{6}(d^2 + cd + c^2 - b^2 - ab - a^2) \\\\\\\\
\\\\Var{X} & = & \\\\frac{h^2}{72}(d^4 + 2cd^3 - 3bd^3 - 3ad^3 ...\\\\\\\\
& & - 3bcd^2 - 3acd^2 + 4b^2d^2 + 4abd^2 ...\\\\\\\\
& & + 4a^2d^2 + 2c^3d - 3bc^2d - 3ac^2d ...\\\\\\\\
& & + 4b^2cd + 4abcd + 4a^2cd - 3b^3d - 3ab^2d ...\\\\\\\\
& & - 3a^2bd - 3a^3d + c^4 - 3bc^3 - 3ac^3 + 4b^2c^2 ...\\\\\\\\
& & + 4abc^2 + 4a^2c^2 - 3b^3c - 3ab^2c - 3a^2bc ...\\\\\\\\
& & - 3a^3c + b^4 + 2ab^3 + 2a^3b + a^4)
\\\\end{eqnarray*}
Examples
--------
Create a distribution:
>>> import openturns as ot
>>> distribution = ot.Trapezoidal(1.0, 2.3, 4.5, 5.0)
Draw a sample:
>>> sample = distribution.getSample(5)"
// ---------------------------------------------------------------------
%feature("docstring") OT::Trapezoidal::getA
"Accessor to the distribution's lower bound.
Returns
-------
a : float
Lower bound."
// ---------------------------------------------------------------------
%feature("docstring") OT::Trapezoidal::getB
"Accessor to the distribution's level start.
Returns
-------
b : float
Level start."
// ---------------------------------------------------------------------
%feature("docstring") OT::Trapezoidal::getC
"Accessor to the distribution's level end.
Returns
-------
c : float
Level end."
// ---------------------------------------------------------------------
%feature("docstring") OT::Trapezoidal::getD
"Accessor to the distribution's upper bound.
Returns
-------
d : float
Upper bound."
// ---------------------------------------------------------------------
%feature("docstring") OT::Trapezoidal::setA
"Accessor to the distribution's lower bound.
Returns
-------
a : float, :math:`a \\\\leq b < c \\\\leq d`
Lower bound."
// ---------------------------------------------------------------------
%feature("docstring") OT::Trapezoidal::setB
"Accessor to the distribution's level start.
Returns
-------
b : float, :math:`a \\\\leq b < c \\\\leq d`
Level start."
// ---------------------------------------------------------------------
%feature("docstring") OT::Trapezoidal::setC
"Accessor to the distribution's level end.
Returns
-------
c : float, :math:`a \\\\leq b < c \\\\leq d`
Level end."
// ---------------------------------------------------------------------
%feature("docstring") OT::Trapezoidal::setD
"Accessor to the distribution's upper bound.
Returns
-------
d : float, :math:`a \\\\leq b < c \\\\leq d`
Upper bound."
|