This file is indexed.

/usr/include/openturns/swig/CenteredFiniteDifferenceHessian_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
%feature("docstring") OT::CenteredFiniteDifferenceHessian
"Second order centered finite-difference scheme.

Available constructors:
    CenteredFiniteDifferenceHessian(*epsilon, evalImpl*)

    CenteredFiniteDifferenceHessian(*step, evalImpl*)

Parameters
----------
evalImpl : :class:`~openturns.NumericalMathEvaluationImplementation`
    Implementation of the evaluation of a function.
epsilon : float, sequence of float
    Finite difference steps for each dimension.
step : :class:`~openturns.FiniteDifferenceStep`
    Defines how finite difference steps values are computed.

Notes
-----
*CenteredFiniteDifferenceHessian* provides a second order centered finite-
difference scheme:

.. math::

  \\\\frac{\\\\partial^2 f_k}{\\\\partial x_i \\\\partial x_j} \\\\approx
                                     \\\\frac{
                                        f_k(x + \\\\epsilon_i + \\\\epsilon_j) -
                                        f_k(x + \\\\epsilon_i - \\\\epsilon_j) +
                                        f_k(x - \\\\epsilon_i - \\\\epsilon_j) -
                                        f_k(x - \\\\epsilon_i + \\\\epsilon_j)}
                                     {4 \\\\epsilon_i \\\\epsilon_j}

Examples
--------
>>> import openturns as ot
>>> formulas = ['x1 * sin(x2)', 'cos(x1 + x2)', '(x2 + 1) * exp(x1 - 2 * x2)']
>>> myFunc = ot.NumericalMathFunction(['x1', 'x2'], ['y1', 'y2', 'y3'], formulas)
>>> epsilon = [0.01]*2
>>> myHessian = ot.CenteredFiniteDifferenceHessian(epsilon, myFunc.getEvaluation())
>>> inPoint = [1.]*2
>>> print(myHessian.hessian(inPoint))
sheet #0
[[  0         0.540293 ]
 [  0.540293 -0.841443 ]]
sheet #1
[[  0.416133  0.416133 ]
 [  0.416133  0.416133 ]]
sheet #2
[[  0.735783 -1.10368  ]
 [ -1.10368   1.47152  ]]"