This file is indexed.

/usr/include/openturns/swig/WeightedExperimentImplementation_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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
%define OT_WeightedExperiment_doc
"Weighted experiment.

Available constructor:
    WeightedExperiment(*distribution=ot.Uniform(), size=100*)

Parameters
----------
distribution : :class:`~openturns.Distribution`
    Distribution :math:`\\\\mu` used to generate the set of input data.
size : positive int
    Number :math:`cardI` of points that will be generated in the experiment.

Notes
-----
WeightedExperiment is used to generate the points :math:`\\\\Xi_i` so that the
mean :math:`E_{\\\\mu}` is approximated as follows:

.. math::

    \\\\Expect{ f(\\\\vect{Z})}_{\\\\mu} \\\\simeq \\\\sum_{i \\\\in I} \\\\omega_i f(\\\\Xi_i)

where :math:`\\\\mu` is a distribution, :math:`f` is a function :math:`L_1(\\\\mu)`
and :math:`\\\\omega_i` are the weights associated with the points. By default,
all the weights are equal to :math:`1/cardI`.

A WeightedExperiment object can be created only through its derived classes
which are distributed in three groups:

1. The first category is made up of the random patterns, where the set of input
   data is generated from the joint distribution of the input random vector,
   according to these sampling techniques:

   - :class:`Monte Carlo <openturns.MonteCarloExperiment>`

   - :class:`LHS <openturns.LHSExperiment>`

   - :class:`Bootstrap <openturns.BootstrapExperiment>`

   - :class:`Importance Sampling <openturns.ImportanceSamplingExperiment>`

2. The second category contains the :class:`low discrepancy sequences
   <openturns.LowDiscrepancySequence>`. OpenTURNS proposes the Faure, Halton,
   Haselgrove, Reverse Halton and Sobol sequences.

3. The third category consists of deterministic patterns:

   - :class:`Gauss product <openturns.GaussProductExperiment>`

   - :class:`~openturns.FixedExperiment`

   - :class:`~openturns.LowDiscrepancyExperiment`"
%enddef
%feature("docstring") OT::WeightedExperimentImplementation
OT_WeightedExperiment_doc

// ---------------------------------------------------------------------

%define OT_WeightedExperiment_generate_doc
"Generate points according to the type of the experiment.

Returns
-------
sample : :class:`~openturns.Sample`
    Points :math:`(\\\\Xi_i)_{i \\\\in I}` which constitute the design of experiments
    with :math:`card I = size`. The sampling method is defined by the nature of
    the weighted experiment.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> myExperiment = ot.MonteCarloExperiment(ot.Normal(2), 5)
>>> sample = myExperiment.generate()
>>> print(sample)
    [ X0        X1        ]
0 : [  0.608202 -1.26617  ]
1 : [ -0.438266  1.20548  ]
2 : [ -2.18139   0.350042 ]
3 : [ -0.355007  1.43725  ]
4 : [  0.810668  0.793156 ]"
%enddef
%feature("docstring") OT::WeightedExperimentImplementation::generate
OT_WeightedExperiment_generate_doc

// ---------------------------------------------------------------------

%define OT_WeightedExperiment_generateWithWeights_doc
"Generate points and their associated weight according to the type of the experiment.

Returns
-------
sample : :class:`~openturns.Sample`
    The points which constitute the design of experiments. The sampling method
    is defined by the nature of the experiment.
weights : :class:`~openturns.Point` of size :math:`cardI`
    Weights :math:`(\\\\omega_i)_{i \\\\in I}` associated with the points. By default,
    all the weights are equal to :math:`1/cardI`.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> myExperiment = ot.MonteCarloExperiment(ot.Normal(2), 5)
>>> sample, weights = myExperiment.generateWithWeights()
>>> print(sample)
    [ X0        X1        ]
0 : [  0.608202 -1.26617  ]
1 : [ -0.438266  1.20548  ]
2 : [ -2.18139   0.350042 ]
3 : [ -0.355007  1.43725  ]
4 : [  0.810668  0.793156 ]
>>> print(weights)
[0.2,0.2,0.2,0.2,0.2]"
%enddef
%feature("docstring") OT::WeightedExperimentImplementation::generateWithWeights
OT_WeightedExperiment_generateWithWeights_doc

// ---------------------------------------------------------------------

%define OT_WeightedExperiment_getDistribution_doc
"Accessor to the distribution.

Returns
-------
distribution : :class:`~openturns.Distribution`
    Distribution used to generate the set of input data."
%enddef
%feature("docstring") OT::WeightedExperimentImplementation::getDistribution
OT_WeightedExperiment_getDistribution_doc

// ---------------------------------------------------------------------

%define OT_WeightedExperiment_setDistribution_doc
"Accessor to the distribution.

Parameters
----------
distribution : :class:`~openturns.Distribution`
    Distribution used to generate the set of input data."
%enddef
%feature("docstring") OT::WeightedExperimentImplementation::setDistribution
OT_WeightedExperiment_setDistribution_doc

// ---------------------------------------------------------------------

%define OT_WeightedExperiment_getSize_doc
"Accessor to the size of the generated sample.

Returns
-------
size : positive int
    Number :math:`cardI` of points constituting the design of experiments."
%enddef
%feature("docstring") OT::WeightedExperimentImplementation::getSize
OT_WeightedExperiment_getSize_doc

// ---------------------------------------------------------------------

%define OT_WeightedExperiment_setSize_doc
"Accessor to the size of the generated sample.

Parameters
----------
size : positive int
    Number :math:`cardI` of points constituting the design of experiments."
%enddef
%feature("docstring") OT::WeightedExperimentImplementation::setSize
OT_WeightedExperiment_setSize_doc