OrthogonalUniVariatePolynomialFamily

class OrthogonalUniVariatePolynomialFamily(*args)

Base class for orthogonal univariate polynomial factories.

Methods

build(self, degree)

Build the k-th order orthogonal univariate polynomial.

getClassName(self)

Accessor to the object’s name.

getId(self)

Accessor to the object’s id.

getImplementation(self)

Accessor to the underlying implementation.

getMeasure(self)

Accessor to the associated probability measure.

getName(self)

Accessor to the object’s name.

getNodesAndWeights(self, n)

Build the k-th order quadrature scheme.

getRecurrenceCoefficients(self, n)

Accessor to the recurrence coefficients of the k-th order.

getRoots(self, n)

Accessor to the recurrence coefficients of the k-th order.

setName(self, name)

Accessor to the object’s name.

__init__(self, \*args)

Initialize self. See help(type(self)) for accurate signature.

build(self, degree)

Build the k-th order orthogonal univariate polynomial.

Parameters
kint, 0 \leq k

Polynomial order.

Returns
polynomialOrthogonalUniVariatePolynomial

Requested orthogonal univariate polynomial.

Examples

>>> import openturns as ot
>>> polynomial_factory = ot.HermiteFactory()
>>> print(polynomial_factory.build(2))
-0.707107 + 0.707107 * X^2
getClassName(self)

Accessor to the object’s name.

Returns
class_namestr

The object class name (object.__class__.__name__).

getId(self)

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

getImplementation(self)

Accessor to the underlying implementation.

Returns
implImplementation

The implementation class.

getMeasure(self)

Accessor to the associated probability measure.

Returns
measureDistribution

The associated probability measure (according to which the polynomials are orthogonal).

Notes

Two polynomials P and Q are orthogonal with respect to the probability measure w(x) \di{x} if and only if their dot product:

\langle P, Q \rangle = \int_{\alpha}^{\beta} P(x) Q(x) w(x)\di{x}
                     = 0

where \alpha \in \Rset \cup \{-\infty\} and \beta \in \Rset \cup \{+\infty\}.

Examples

>>> import openturns as ot
>>> polynomial_factory = ot.HermiteFactory()
>>> print(polynomial_factory.getMeasure())
Normal(mu = 0, sigma = 1)
getName(self)

Accessor to the object’s name.

Returns
namestr

The name of the object.

getNodesAndWeights(self, n)

Build the k-th order quadrature scheme.

Associated with the orthogonal univariate polynomials family.

Parameters
kint, 0 < k

Polynomial order.

Returns
nodesPoint

The nodes of the k-th order quadrature scheme.

weightsPoint

The weights of the k-th order quadrature scheme.

Examples

>>> import openturns as ot
>>> polynomial_factory = ot.HermiteFactory()
>>> nodes, weights = polynomial_factory.getNodesAndWeights(3)
>>> print(nodes)
[-1.73205,...,1.73205]
>>> print(weights)
[0.166667,0.666667,0.166667]
getRecurrenceCoefficients(self, n)

Accessor to the recurrence coefficients of the k-th order.

Of the orthogonal univariate polynomial.

Parameters
kint, 0 \leq k

Polynomial order.

Returns
recurrence_coefficientsPoint

The recurrence coefficients of the k-th order orthogonal univariate polynomial.

Notes

Any sequence of orthogonal polynomials has a recurrence formula relating any three consecutive polynomials as follows:

P_{-1}=0, P_0=1, P_{n + 1} = (a_n x + b_n) P_n + c_n P_{n - 1}, \quad n > 1

Examples

>>> import openturns as ot
>>> polynomial_factory = ot.HermiteFactory()
>>> print(polynomial_factory.getRecurrenceCoefficients(3))
[0.5,0,-0.866025]
getRoots(self, n)

Accessor to the recurrence coefficients of the k-th order.

Of the orthogonal univariate polynomial.

Parameters
kint, k > 0

Polynomial order.

Returns
rootsPoint

The roots of the k-th order orthogonal univariate polynomial.

Examples

>>> import openturns as ot
>>> polynomial_factory = ot.HermiteFactory()
>>> print(polynomial_factory.getRoots(3))
[-1.73205,...,1.73205]
setName(self, name)

Accessor to the object’s name.

Parameters
namestr

The name of the object.