This file is indexed.

/usr/include/openturns/swig/SpatialFunction_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
%feature("docstring") OT::SpatialFunction
"Spatial function.

Available constructors:
    SpatialFunction(*meshDimension=1*)

    SpatialFunction(*g, meshDimension=1*)

Parameters
----------
g : :class:`~openturns.NumericalMathFunction`
    Function :math:`g: \\\\Rset^d \\\\mapsto \\\\Rset^q`.
meshDimension : int, :math:`n \\\\geq 0`
    Dimension of the vertices of the mesh :math:`\\\\cM`. This data is required
    for tests on the compatibility of dimension when a composite process is
    created using the spatial function.

Notes
-----
A spatial function
:math:`f_{spat}: \\\\cD \\\\times \\\\Rset^d \\\\mapsto \\\\cD \\\\times \\\\Rset^q`, with
:math:`\\\\cD \\\\in \\\\Rset^n`, is a particular
:class:`dynamical function <openturns.DynamicalFunction>` that lets invariant
the mesh of a field and defined by a function
:math:`g : \\\\Rset^d  \\\\mapsto \\\\Rset^q` such that:

.. math::

    f_{spat}(\\\\vect{t}, \\\\vect{x})=(\\\\vect{t}, g(\\\\vect{x}))

Let's note that the input dimension of :math:`f_{spat}` still designs the
dimension of :math:`\\\\vect{x}`: :math:`d`. Its output dimension is equal to
:math:`q`.

See also
--------
TemporalFunction

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

Create a function :math:`g : \\\\Rset^d \\\\mapsto \\\\Rset^q` such as:

.. math::

    g: \\\\left|\\\\begin{array}{rcl}
                \\\\Rset & \\\\rightarrow & \\\\Rset \\\\\\\\
                x & \\\\mapsto & x^2
            \\\\end{array}\\\\right.

>>> g = ot.NumericalMathFunction('x', 'x^2')

Convert :math:`g` into a spatial function with :math:`n` the dimension of the
mesh of the field on which :math:`g` will be applied:

>>> n = 1
>>> mySpatialFunction = ot.SpatialFunction(g, n)
>>> # Create a TimeSeries
>>> tg = ot.RegularGrid(0.0, 0.2, 6)
>>> data = ot.NumericalSample(tg.getN(), g.getInputDimension())
>>> for i in range(data.getSize()):
...     for j in range(data.getDimension()):
...         data[i, j] = i * data.getDimension() + j
>>> ts = ot.TimeSeries(tg, data)
>>> print(ts)
0 : [ 0   0   ]
1 : [ 0.2 1   ]
2 : [ 0.4 2   ]
3 : [ 0.6 3   ]
4 : [ 0.8 4   ]
5 : [ 1   5   ]
>>> print(mySpatialFunction(ts))
    [                outputVariable ]
0 : [  0              0             ]
1 : [  0.2            1             ]
2 : [  0.4            4             ]
3 : [  0.6            9             ]
4 : [  0.8           16             ]
5 : [  1             25             ]"

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

%feature("docstring") OT::SpatialFunction::getEvaluation
"Get the evaluation function of :math:`g`.

Returns
-------
g : :class:`~openturns.NumericalMathEvaluationImplementation`
    Evaluation function of :math:`g: \\\\Rset^d \\\\mapsto \\\\Rset^q`.

Examples
--------
>>> import openturns as ot
>>> g = ot.NumericalMathFunction('x', 'x^2')
>>> n = 1
>>> mySpatialFunction = ot.SpatialFunction(g, n)
>>> print(mySpatialFunction.getEvaluation())
[x]->[x^2]"