This file is indexed.

/usr/include/openturns/swig/EnumerateFunctionImplementation_doc.i is in libopenturns-dev 1.7-3.

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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
%define OT_EnumerateFunction_doc
"Enumerate function.

Available constructors:
    EnumerateFunction(*dim=1*)

    EnumerateFunction(*dim, q*)

    EnumerateFunction(*weight, q*)

Parameters
----------
dim : positive int
    If *dim* is the only argument mentioned, it is used to create
    a :class:`~openturns.LinearEnumerateFunction` object of dimension *dim*.
    If *q* is also mentioned, it is used to create
    a :class:`~openturns.HyperbolicAnisotropicEnumerateFunction` object of
    dimension *dim* and parameter *q*.
q : float
    The q-quasi-norm parameter used to create a
    :class:`~openturns.HyperbolicAnisotropicEnumerateFunction` object.
weight : sequence of float
    The weights of the indices in each dimension used to create a
    :class:`~openturns.HyperbolicAnisotropicEnumerateFunction` object.

Notes
-----
*EnumerateFunction* represents a bijection from :math:`\\\\Nset` to
:math:`\\\\Nset^{dim}`. This bijection is based on a particular procedure of
enumerating the set of multi-indices. It begins from the multi-index
:math:`\\\\{0,0,\\\\dots,0\\\\}`.

We associate a multi-index :math:`\\\\{j_{p1}, j_{p2},\\\\dots, j_{pdim}\\\\}` for every
integer :math:`i_p` in :math:`\\\\Nset`:

For more details, let us consider any :math:`i_p, i_q \\\\in \\\\Nset`:

if :math:`|i_p-i_q|\\\\leq 1` then
:math:`|\\\\sum_{k=1}^{dim} (j_{pk}- j_{qk})| \\\\leq 1`. This proposition provides a
necessary but unsufficient condition for the construction of the bijection.
Another assumption was done indicating the way of iteration.
Below an example showing this assumption.

Example for :math:`dim=2`:

.. math::

    phi(0) &= [0 ~ 0] \\\\\\\\
    phi(1) &= [1 ~ 0] \\\\\\\\
    phi(2) &= [0 ~ 1] \\\\\\\\
    phi(3) &= [2 ~ 0] \\\\\\\\
    phi(4) &= [1 ~ 1] \\\\\\\\
    phi(5) &= [0 ~ 2] \\\\\\\\
    phi(6) &= [3 ~ 0]

For the functional expansion (respectively polynomial chaos expansion), the
multi-index :math:`\\\\vect{i_p}` represents the collection of degrees of the
selected orthogonal functions (respectively orthogonal polynomials). In fact,
after the selection of the type of orthogonal functions (respectively
orthogonal polynomials) for the construction of the orthogonal basis, the
*EnumerateFunction* characterizes the term of the basis by providing the
degrees of the univariate functions (respectively univariate polynomials).

In order to know the degree of the :math:`k^{th}` polynomial of the
multivariate basis, it is enough to sum all the integers given in the list.

Examples
--------
>>> import openturns as ot
>>> enumerateFunction = ot.EnumerateFunction(ot.LinearEnumerateFunction(2))
>>> for i in range(6):
...     print(enumerateFunction(i))
[0,0]
[1,0]
[0,1]
[2,0]
[1,1]
[0,2]"
%enddef
%feature("docstring") OT::EnumerateFunctionImplementation
OT_EnumerateFunction_doc

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

%define OT_EnumerateFunction_getDimension_doc
"Return the dimension of the *EnumerateFunction*.

Returns
-------
dim : int, :math:`dim \\\\geq 0`
    Dimension of the *EnumerateFunction*."
%enddef
%feature("docstring") OT::EnumerateFunctionImplementation::getDimension
OT_EnumerateFunction_getDimension_doc

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

%define OT_EnumerateFunction_getMaximumDegreeCardinal_doc
"Get the cardinal of indices of degree inferior or equal to a given value.

Parameters
----------
maximumDegree : int
    Number of polynoms of the basis.

Returns
-------
cardinal : int
    Cardinal of indices of degree :math:`max \\\\leq maximumDegree`.

Examples
--------
>>> import openturns as ot
>>> enumerateFunction = ot.EnumerateFunction(ot.LinearEnumerateFunction(2))
>>> for i in range(6):
...     indices = enumerateFunction(i)
...     degree = sum(indices)
...     print(str(int(degree))+' '+str(indices))
0 [0,0]
1 [1,0]
1 [0,1]
2 [2,0]
2 [1,1]
2 [0,2]
>>> print(enumerateFunction.getMaximumDegreeCardinal(2))
6"
%enddef
%feature("docstring") OT::EnumerateFunctionImplementation::getMaximumDegreeCardinal
OT_EnumerateFunction_getMaximumDegreeCardinal_doc

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

%define OT_EnumerateFunction_getMaximumDegreeStrataIndex_doc
"Get the index of the strata of degree inferior to a given value.

Parameters
----------
maximumDegree : int
    Degree.

Returns
-------
index : int
    Index of the strata of degree :math:`max < maximumDegree`.

Examples
--------
>>> import openturns as ot
>>> enumerateFunction = ot.EnumerateFunction(ot.LinearEnumerateFunction(2))
>>> for i in [1, 2]:
...     indices = enumerateFunction(i)
...     strataIndex = sum(indices) + 1
...     print(str(int(strataIndex))+' '+str(indices))
2 [1,0]
2 [0,1]
>>> print(enumerateFunction.getMaximumDegreeStrataIndex(2))
2"
%enddef
%feature("docstring") OT::EnumerateFunctionImplementation::getMaximumDegreeStrataIndex
OT_EnumerateFunction_getMaximumDegreeStrataIndex_doc

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

%define OT_EnumerateFunction_getStrataCardinal_doc
"Get the number of members of the basis associated to a given strata.

Parameters
----------
strataIndex : int
    Index of the strata in the hierarchical basis. In the context of product of
    polynomial basis, this is the total polynom degree.

Returns
-------
cardinal : int
    Number of members of the basis associated to the strata *strataIndex*. In
    the context of product of polynomial basis, this is the number of polynoms
    of the basis which total degree is *strataIndex*.

Examples
--------
>>> import openturns as ot
>>> enumerateFunction = ot.EnumerateFunction(ot.LinearEnumerateFunction(2))
>>> for i in [3, 4, 5]:
...     indices = enumerateFunction(i)
...     degree = sum(indices)
...     print(str(int(degree))+' '+str(indices))
2 [2,0]
2 [1,1]
2 [0,2]
>>> print(enumerateFunction.getStrataCardinal(2))
3"
%enddef
%feature("docstring") OT::EnumerateFunctionImplementation::getStrataCardinal
OT_EnumerateFunction_getStrataCardinal_doc

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

%define OT_EnumerateFunction_getStrataCumulatedCardinal_doc
"Get the cardinal of the cumulated strata above or equal to the given strata.

Parameters
----------
strataIndex : int
    Index of the strata in the hierarchical basis. In the context of product of
    polynomial basis, this is the total polynomial degree.

Returns
-------
cardinal : int
    Number of members of the basis associated to the strates inferior or equal
    to *strataIndex*. In the context of product of polynomial basis, this is
    the number of polynomials of the basis which total degree is inferior or
    equal to *strataIndex*.

Examples
--------
>>> import openturns as ot
>>> enumerateFunction = ot.EnumerateFunction(ot.LinearEnumerateFunction(2))
>>> for i in range(6):
...     indices = enumerateFunction(i)
...     degree = sum(indices)
...     print(str(int(degree))+' '+str(indices))
0 [0,0]
1 [1,0]
1 [0,1]
2 [2,0]
2 [1,1]
2 [0,2]
>>> print(enumerateFunction.getStrataCumulatedCardinal(2))
6"
%enddef
%feature("docstring") OT::EnumerateFunctionImplementation::getStrataCumulatedCardinal
OT_EnumerateFunction_getStrataCumulatedCardinal_doc

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

%define OT_EnumerateFunction_inverse_doc
"Get the antecedent of a indices list in the *EnumerateFunction*.

Parameters
----------
multiIndex : sequence of int
    List of indices.

Returns
-------
antecedent : int
    Represents the antecedent of the *multiIndex* in the *EnumerateFunction*.

Examples
--------
>>> import openturns as ot
>>> enumerateFunction = ot.EnumerateFunction(ot.LinearEnumerateFunction(2))
>>> for i in range(6):
...     print(str(i)+' '+str(enumerateFunction(i)))
0 [0,0]
1 [1,0]
2 [0,1]
3 [2,0]
4 [1,1]
5 [0,2]
>>> print(enumerateFunction.inverse([1,1]))
4"
%enddef
%feature("docstring") OT::EnumerateFunctionImplementation::inverse
OT_EnumerateFunction_inverse_doc

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

%define OT_EnumerateFunction_setDimension_doc
"Set the dimension of the *EnumerateFunction*.

Parameters
----------
dim : int, :math:`dim \\\\geq 0`
    Dimension of the *EnumerateFunction*."
%enddef
%feature("docstring") OT::EnumerateFunctionImplementation::setDimension
OT_EnumerateFunction_setDimension_doc

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