This file is indexed.

/usr/include/openturns/swig/Collection_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
%feature("docstring") OT::Collection
"Collection.

Examples
--------
>>> import openturns as ot

- Collection of **real values**:

>>> ot.NumericalScalarCollection(2)
[0,0]
>>> ot.NumericalScalarCollection(2, 3.25)
[3.25,3.25]
>>> vector = ot.NumericalScalarCollection([2.0, 1.5, 2.6])
>>> vector
[2,1.5,2.6]
>>> vector[1] = 4.2
>>> vector
[2,4.2,2.6]
>>> vector.add(3.8)
>>> vector
[2,4.2,2.6,3.8]

- Collection of **complex values**:

>>> ot.NumericalComplexCollection(2)
[(0,0),(0,0)]
>>> ot.NumericalComplexCollection(2, 3+4j)
[(3,4),(3,4)]
>>> vector = ot.NumericalComplexCollection([2+3j, 1-4j, 3.])
>>> vector
[(2,3),(1,-4),(3,0)]
>>> vector[1] = 4+3j
>>> vector
[(2,3),(4,3),(3,0)]
>>> vector.add(5+1j)
>>> vector
[(2,3),(4,3),(3,0),(5,1)]

- Collection of **booleans**:

>>> ot.BoolCollection(3)
[0,0,0]
>>> ot.BoolCollection(3, 1)
[1,1,1]
>>> vector = ot.BoolCollection([0, 1, 0])
>>> vector
[0,1,0]
>>> vector[1] = 0
>>> vector
[0,0,0]
>>> vector.add(1)
>>> vector
[0,0,0,1]

- Collection of **UserDefinedPair**:

>>> ot.UserDefinedPairCollection(2)
[(class=NumericalPoint name=Unnamed dimension=1 values=[0],1),(class=NumericalPoint name=Unnamed dimension=1 values=[0],1)]
>>> ot.UserDefinedPairCollection(2, ot.UserDefinedPair([1, 2], 0.25))
[(class=NumericalPoint name=Unnamed dimension=2 values=[1,2],0.25),(class=NumericalPoint name=Unnamed dimension=2 values=[1,2],0.25)]
>>> vector = ot.UserDefinedPairCollection([ot.UserDefinedPair([1, 2], 0.25), ot.UserDefinedPair([3, 2.5], 0.15)])
>>> vector
[(class=NumericalPoint name=Unnamed dimension=2 values=[1,2],0.25),(class=NumericalPoint name=Unnamed dimension=2 values=[3,2.5],0.15)]
>>> vector[1] = ot.UserDefinedPair([1, 2], 0.35)
>>> vector
[(class=NumericalPoint name=Unnamed dimension=2 values=[1,2],0.25),(class=NumericalPoint name=Unnamed dimension=2 values=[1,2],0.35)]
>>> vector.add(ot.UserDefinedPair([0, 1], 0.6))
>>> vector
[(class=NumericalPoint name=Unnamed dimension=2 values=[1,2],0.25),(class=NumericalPoint name=Unnamed dimension=2 values=[1,2],0.35),(class=NumericalPoint name=Unnamed dimension=2 values=[0,1],0.6)]

- Collection of **distributions**:

>>> print(ot.DistributionCollection(2))
[Uniform(a = -1, b = 1),Uniform(a = -1, b = 1)]
>>> print(ot.DistributionCollection(2, ot.Gamma(2.75, 1.0)))
[Gamma(k = 2.75, lambda = 1, gamma = 0),Gamma(k = 2.75, lambda = 1, gamma = 0)]
>>> vector = ot.DistributionCollection([ot.Normal(), ot.Uniform()])
>>> print(vector)
[Normal(mu = 0, sigma = 1),Uniform(a = -1, b = 1)]
>>> vector[1] = ot.Uniform(-0.5, 1)
>>> print(vector)
[Normal(mu = 0, sigma = 1),Uniform(a = -0.5, b = 1)]
>>> vector.add(ot.Gamma(2.75, 1.0))
>>> print(vector)
[Normal(mu = 0, sigma = 1),Uniform(a = -0.5, b = 1),Gamma(k = 2.75, lambda = 1, gamma = 0)]"

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

%feature("docstring") OT::Collection::add
"Append a component (in-place).

Parameters
----------
value : type depends on the type of the collection.
    The component to append.

Examples
--------
>>> import openturns as ot
>>> x = ot.NumericalPoint(2)
>>> x.add(1.)
>>> print(x)
[0,0,1]"

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

%feature("docstring") OT::Collection::at
"Access to an element of the collection.

Parameters
----------
index : positive int
    Position of the element to access.

Returns
-------
element : type depends on the type of the collection
    Element of the collection at the position *index*."

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

%feature("docstring") OT::Collection::clear
"Reset the collection to zero dimension.

Examples
--------
>>> import openturns as ot
>>> x = ot.NumericalPoint(2)
>>> x.clear()
>>> x
class=NumericalPoint name=Unnamed dimension=0 values=[]"

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

%feature("docstring") OT::Collection::getSize
"Get the collection's dimension (or size).

Returns
-------
n : int
    The number of components in the collection."

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

%feature("docstring") OT::Collection::isEmpty
"Tell if the collection is empty.

Returns
-------
isEmpty : bool
    *True* if there is no element in the collection.

Examples
--------
>>> import openturns as ot
>>> x = ot.NumericalPoint(2)
>>> x.isEmpty()
False
>>> x.clear()
>>> x.isEmpty()
True"

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

%feature("docstring") OT::Collection::resize
"Change the size of the collection.

Parameters
----------
newSize : positive int
    New size of the collection.

Notes
-----
If the new size is smaller than the older one, the last elements are thrown
away, else the new elements are set to the default value of the element type.

Examples
--------
>>> import openturns as ot
>>> x = ot.NumericalPoint(2, 4)
>>> print(x)
[4,4]
>>> x.resize(1)
>>> print(x)
[4]
>>> x.resize(4)
>>> print(x)
[4,0,0,0]"