/usr/include/openturns/swig/CovarianceMatrix_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 | %feature("docstring") OT::CovarianceMatrix
"Covariance (real symmetric positive definite) matrix.
Parameters
----------
size : int, :math:`n > 0`, optional
Matrix size.
Default is 1.
values : sequence of float with size :math:`n^2`, optional
Values. OpenTURNS uses **column-major** ordering (like Fortran) for
reshaping the flat list of values.
Default creates an identity matrix.
Raises
------
TypeError : If the matrix is not symmetric.
Examples
--------
Create a matrix
>>> import openturns as ot
>>> C = ot.CovarianceMatrix(2, [1., .5, .5, 1.])
>>> print(C)
[[ 1 0.5 ]
[ 0.5 1 ]]
Get or set terms
>>> print(C[0, 1])
0.5
>>> C[0, 1] = .6
>>> print(C[0, 1])
0.6
>>> print(C[:, 0])
[[ 1 ]
[ 0.6 ]]
Create an openturns matrix from a **symmetric** numpy 2d-array (or matrix, or
2d-list)...
>>> import numpy as np
>>> np_2d_array = np.array([[1., .5], [.5, 1.]])
>>> ot_matrix = ot.CovarianceMatrix(np_2d_array)
and back
>>> np_matrix = np.matrix(ot_matrix)"
// ---------------------------------------------------------------------
%feature("docstring") OT::CovarianceMatrix::computeCholesky
"Compute the Cholesky factor.
The Cholesky factor of a covariance (real symmetric positive definite) matrix
:math:`\\\\mat{C}` is the lower triangular matrix :math:`\\\\mat{L}` such that:
.. math::
\\\\mat{C} = \\\\mat{L} \\\\Tr{\\\\mat{L}}
Parameters
----------
keep_intact : bool, optional
A flag telling whether the present matrix can be overwritten or not.
Default is *True* and leaves the present matrix unchanged.
Notes
-----
This uses LAPACK's `DPOTRF <http://www.netlib.org/lapack/lapack-3.1.1/html/dpotrf.f.html>`_.
Returns
-------
cholesky_factor : :class:`~openturns.SquareMatrix`
The left (lower) Cholesky factor."
// ---------------------------------------------------------------------
%feature("docstring") OT::CovarianceMatrix::isPositiveDefinite
"Test whether the matrix is positive definite or not.
A matrix :math:`\\\\mat{M}` is positive definite if :math:`\\\\Tr{\\\\vect{z}} \\\\mat{M} \\\\vect{z}`
is positive for every compatible non-zero column vector :math:`\\\\vect{z}`.
Parameters
----------
keep_intact : bool, optional
A flag telling whether the present matrix can be overwritten or not.
Default is *True* and leaves the present matrix unchanged.
Notes
-----
This uses LAPACK's `DPOTRF <http://www.netlib.org/lapack/lapack-3.1.1/html/dpotrf.f.html>`_.
Returns
-------
test : bool
Answer."
|