This file is indexed.

/usr/include/openturns/swig/LHSExperiment_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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
%feature("docstring") OT::LHSExperiment
"LHS experiment.

Available constructors:
    LHSExperiment(*size, alwaysShuffle, randomShift*)

    LHSExperiment(*distribution, size, alwaysShuffle, randomShift*)

Parameters
----------
distribution : :class:`~openturns.Distribution`
    Distribution :math:`\\\\mu` with an independent copula used to generate the
    set of input data.
size : positive int
    Number :math:`\\\\mathrm{card}\\\\,I` of points that will be generated in the experiment.
alwaysShuffle : bool
    Flag to tell if the shuffle must be regenerated at each call to generate
    or not.
    Default is *False*: the shuffle is generated once and for all.

randomShift : bool
    Flag to tell if the point selected in each cell of the shuffle is the center
    of the cell (*randomshift* is *False*) or if it is drawn wrt the restriction
    of the distribution to the cell.
    Default is *True*.

Notes
-----
LHSExperiment is a random weighted design of experiments.
The method generates a sample of points :math:`\\\\Xi_i` according to the
distribution :math:`\\\\mu` with the LHS technique: some cells are determined,
with the same probabilistic content according to the distribution, each line
and each column contains exactly one cell, then points are selected among these
selected cells. The weights associated to the points are all equal to
:math:`1/\\\\mathrm{card}\\\\,I`. When recalled, the :meth:`generate` method generates a new
sample: the point selection within the cells changes but not the cells
selection. To change the cell selection, it is necessary to create a new LHS
Experiment.

See also
--------
WeightedExperiment

Examples
--------
Create an *LHSExperiment*:

>>> import openturns as ot

Generate the sample reusing the initial shuffle and using a random shift:

>>> ot.RandomGenerator.SetSeed(0)
>>> experiment = ot.LHSExperiment(ot.Normal(2), 5, False, True)
>>> print(experiment.generate())
    [ X0        X1        ]
0 : [  0.887671 -0.647818 ]
1 : [  0.107683  1.15851  ]
2 : [  0.453077 -1.04742  ]
3 : [ -0.928012  0.409732 ]
4 : [ -0.290539  0.16153  ]
>>> print(experiment.generate())
    [ X0         X1         ]
0 : [  1.52938   -0.343515  ]
1 : [ -0.0703427  2.36353   ]
2 : [  0.576091  -1.79398   ]
3 : [ -2.11636    0.619315  ]
4 : [ -0.699601  -0.0570674 ]

Generate the sample using a new shuffle and a random shift:

>>> ot.RandomGenerator.SetSeed(0)
>>> experiment = ot.LHSExperiment(ot.Normal(2), 5, True, True)
>>> print(experiment.generate())
    [ X0        X1        ]
0 : [  0.887671 -0.647818 ]
1 : [  0.107683  1.15851  ]
2 : [  0.453077 -1.04742  ]
3 : [ -0.928012  0.409732 ]
4 : [ -0.290539  0.16153  ]
>>> print(experiment.generate())
    [ X0         X1         ]
0 : [ -1.72695   -0.591043  ]
1 : [ -0.240653  -0.0406593 ]
2 : [  0.828719   2.12547   ]
3 : [  2.37061    0.508903  ]
4 : [ -0.668296  -1.11573   ]

Generate the sample reusing the initial shuffle and using a constant shift:

>>> ot.RandomGenerator.SetSeed(0)
>>> experiment = ot.LHSExperiment(ot.Normal(2), 5, False, False)
>>> print(experiment.generate())
    [ X0        X1        ]
0 : [  1.28155  -0.524401 ]
1 : [  0         1.28155  ]
2 : [  0.524401 -1.28155  ]
3 : [ -1.28155   0.524401 ]
4 : [ -0.524401  0        ]
>>> print(experiment.generate())
    [ X0        X1        ]
0 : [  1.28155  -0.524401 ]
1 : [  0         1.28155  ]
2 : [  0.524401 -1.28155  ]
3 : [ -1.28155   0.524401 ]
4 : [ -0.524401  0        ]

Generate the sample using a new shuffle and using a constant shift:

>>> ot.RandomGenerator.SetSeed(0)
>>> experiment = ot.LHSExperiment(ot.Normal(2), 5, True, False)
>>> print(experiment.generate())
    [ X0        X1        ]
0 : [  1.28155  -0.524401 ]
1 : [  0         1.28155  ]
2 : [  0.524401 -1.28155  ]
3 : [ -1.28155   0.524401 ]
4 : [ -0.524401  0        ]
>>> print(experiment.generate())
    [ X0        X1        ]
0 : [  0.524401 -0.524401 ]
1 : [  0         1.28155  ]
2 : [ -1.28155   0        ]
3 : [ -0.524401  0.524401 ]
4 : [  1.28155  -1.28155  ]
"
// ---------------------------------------------------------------------

%feature("docstring") OT::LHSExperiment::getShuffle
"Return the cell randomization.

Returns
-------
shuffle : :class:`~openturns.Matrix`
    For each point, the indices of the shuffled components."

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

%feature("docstring") OT::LHSExperiment::ComputeShuffle
"Generate a new cell randomization for external use.

Parameters
----------
dimension : positive int
    Number of input dimension.
totalSize : positive int
    Number :math:`\\\\mathrm{card}\\\\,I` of points that need to be shuffled.

Returns
-------
shuffle : :class:`~openturns.Matrix`
    For each point, the indices of the shuffled components."

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

%feature("docstring") OT::LHSExperiment::getAlwaysShuffle
"Cell randomization flag accessor.

Returns
-------
alwaysShuffle : bool
    Flag to tell if the shuffle must be regenerated at each call to generate
    or not.
    Default is *False*: the shuffle is generated once and for all."

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

%feature("docstring") OT::LHSExperiment::setAlwaysShuffle
"Cell randomization flag accessor.

Parameters
----------
alwaysShuffle : bool
    Flag to tell if the shuffle must be regenerated at each call to generate
    or not.
    Default is *False*: the shuffle is generated once and for all."

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

%feature("docstring") OT::LHSExperiment::setRandomShift
"Randomization flag accessor.

Parameters
----------
randomShift : bool
    Flag to tell if the point selected in each cell of the shuffle is the center
    of the cell (*randomshift* is *False*) or if it is drawn wrt the restriction
    of the distribution to the cell.
    Default is *True*."

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

%feature("docstring") OT::LHSExperiment::getRandomShift
"Randomization flag accessor.

Returns
-------
randomShift : bool
    Flag to tell if the point selected in each cell of the shuffle is the center
    of the cell (*randomshift* is *False*) or if it is drawn wrt the restriction
    of the distribution to the cell.
    Default is *True*."