/usr/include/openturns/swig/UniVariatePolynomialImplementation_doc.i is in libopenturns-dev 1.9-5.
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 | %define OT_UniVariatePolynomial_doc
"Base class for univariate polynomials.
Parameters
----------
coefficients : sequence of float
Polynomial coefficients in increasing polynomial order.
Examples
--------
>>> import openturns as ot
Create a univariate polynomial from a list of coefficients:
>>> P = ot.UniVariatePolynomial([1.0, 2.0, 3.0])
>>> print(P)
1 + 2 * X + 3 * X^2
Univariate polynomials are of course callable:
>>> print(P(1.0))
6.0
Addition, subtraction and multiplication of univariate polynomials:
>>> P = ot.UniVariatePolynomial([1.0, 2.0, 3.0])
>>> Q = ot.UniVariatePolynomial([1.0, 2.0])
>>> print('(%s) + (%s) = %s' % (P, Q, P + Q))
(1 + 2 * X + 3 * X^2) + (1 + 2 * X) = 2 + 4 * X + 3 * X^2
>>> print('(%s) - (%s) = %s' % (P, Q, P - Q))
(1 + 2 * X + 3 * X^2) - (1 + 2 * X) = 3 * X^2
>>> print('(%s) * (%s) = %s' % (P, Q, P * Q))
(1 + 2 * X + 3 * X^2) * (1 + 2 * X) = 1 + 4 * X + 7 * X^2 + 6 * X^3"
%enddef
%feature("docstring") OT::UniVariatePolynomialImplementation
OT_UniVariatePolynomial_doc
// ---------------------------------------------------------------------
%define OT_UniVariatePolynomial_derivate_doc
"Build the first-order derivative polynomial.
Returns
-------
derivated_polynomial : :class:`~openturns.Univariate`
The first-order derivated polynomial.
Examples
--------
>>> import openturns as ot
>>> P = ot.UniVariatePolynomial([1.0, 2.0, 3.0])
>>> print(P.derivate())
2 + 6 * X"
%enddef
%feature("docstring") OT::UniVariatePolynomialImplementation::derivate
OT_UniVariatePolynomial_derivate_doc
// ---------------------------------------------------------------------
%define OT_UniVariatePolynomial_getCoefficients_doc
"Accessor to the polynomials's coefficients.
Returns
-------
coefficients : :class:`~openturns.Point`
Polynomial coefficients in increasing polynomial order.
See Also
--------
setCoefficients
Examples
--------
>>> import openturns as ot
>>> P = ot.UniVariatePolynomial([1.0, 2.0, 3.0])
>>> print(P.getCoefficients())
[1,2,3]"
%enddef
%feature("docstring") OT::UniVariatePolynomialImplementation::getCoefficients
OT_UniVariatePolynomial_getCoefficients_doc
// ---------------------------------------------------------------------
%define OT_UniVariatePolynomial_getDegree_doc
"Accessor to the polynomials's degree.
Returns
-------
degree : int
Polynomial's degree.
Examples
--------
>>> import openturns as ot
>>> P = ot.UniVariatePolynomial([1.0, 2.0, 3.0])
>>> print(P.getDegree())
2"
%enddef
%feature("docstring") OT::UniVariatePolynomialImplementation::getDegree
OT_UniVariatePolynomial_getDegree_doc
// ---------------------------------------------------------------------
%define OT_UniVariatePolynomial_getRoots_doc
"Compute the roots of the polynomial.
Returns
-------
roots : list of complex values
Polynomial's roots.
Examples
--------
>>> import openturns as ot
>>> P = ot.UniVariatePolynomial([1.0, 2.0, 3.0])
>>> print(P.getRoots())
[(-0.333333,0.471405),(-0.333333,-0.471405)]"
%enddef
%feature("docstring") OT::UniVariatePolynomialImplementation::getRoots
OT_UniVariatePolynomial_getRoots_doc
// ---------------------------------------------------------------------
%define OT_UniVariatePolynomial_incrementDegree_doc
"Multiply the polynomial by :math:`x^k`.
Parameters
----------
degree : int, optional
The incremented degree :math:`k`.
Default uses :math:`k = 1`.
Returns
-------
incremented_degree_polynomial : :class:`~openturns.UniVariatePolynomial`
Polynomial with incremented degree.
Examples
--------
>>> import openturns as ot
>>> P = ot.UniVariatePolynomial([1.0, 2.0, 3.0])
>>> print(P.incrementDegree())
X + 2 * X^2 + 3 * X^3
>>> print(P.incrementDegree(2))
X^2 + 2 * X^3 + 3 * X^4"
%enddef
%feature("docstring") OT::UniVariatePolynomialImplementation::incrementDegree
OT_UniVariatePolynomial_incrementDegree_doc
// ---------------------------------------------------------------------
%define OT_UniVariatePolynomial_setCoefficients_doc
"Accessor to the polynomials's coefficients.
Parameters
----------
coefficients : sequence of float
Polynomial coefficients in increasing polynomial order.
See Also
--------
getCoefficients
Examples
--------
>>> import openturns as ot
>>> P = ot.UniVariatePolynomial([1.0, 2.0, 3.0])
>>> P.setCoefficients([4.0, 2.0, 1.0])
>>> print(P)
4 + 2 * X + X^2"
%enddef
%feature("docstring") OT::UniVariatePolynomialImplementation::setCoefficients
OT_UniVariatePolynomial_setCoefficients_doc
|