wnpoly package
A package to handle webnucleo polynomials.
wnpoly.symm
This module computes various symmetric polynomials.
- class wnpoly.symm.Complete[source]
Bases:
objectA class for complete homogeneous symmetric polynomials.
- compute(x, n)[source]
Method to compute complete homogeneous symmetric polynomials.
- Args:
x(listornumpy.array): An array containing the elements from which to compute the polynomials.n(int): A non-negative integer giving the order to which to compute the polynomials.- Returns:
A
numpy.arraycontaining the complete homogeneous symmetric polynomials.
- compute_normalized(x, n, m=0)[source]
Method to compute normalized complete homogeneous symmetric polynomials.
- Args:
x(listornumpy.array): An array containing the elements from which to compute the polynomials.n(int): A non-negative integer giving the order to which to compute the polynomials.m(int, optional): A non-negative integer giving the normalization degree. This must be less than the length of x.- Returns:
A
numpy.arraycontaining the complete homogeneous symmetric polynomials normalized by the number of terms in the polynomial.
- class wnpoly.symm.Elementary[source]
Bases:
objectA class for elementary homogeneous symmetric polynomials.
- compute(x, n)[source]
Method to compute elementary homogeneous symmetric polynomials.
- Args:
x(listornumpy.array): An array containing the elements from which to compute the polynomials.n(int): A non-negative integer giving the order to which to compute the polynomials. The value must be less than or equal to the length of the input array.- Returns:
A
numpy.arraycontaining the elementary homogeneous symmetric polynomials.
- compute_normalized(x, n)[source]
Method to compute normalized elementary homogeneous symmetric polynomials.
- Args:
x(listornumpy.array): An array containing the elements from which to compute the polynomials.n` (
int): A non-negative integer giving the order to which to compute the polynomials. The value must be less than or equal to the length of the input array.- Returns:
A
numpy.arraycontaining the elementary homogeneous symmetric polynomials normalized by the number of terms in each polynomial.
- class wnpoly.symm.PowerSum[source]
Bases:
objectA class for power sum polynomials.
- compute(x, n)[source]
Method to compute power sum symmetric polynomials.
- Args:
x(listornumpy.array): An array containing the elements from which to compute the polynomials.n(int): A non-negative integer giving the order to which to compute the polynomials.- Returns:
A
numpy.arraycontaining the power sum symmetric polynomials up to order n.
- compute_normalized(x, n)[source]
Method to compute normalized power sum symmetric polynomials.
- Args:
x(listornumpy.array): An array containing the elements from which to compute the polynomials.n(int): A non-negative integer giving the order to which to compute the polynomials.- Returns:
A
numpy.arraycontaining the power sum polynomials up to order n normalized by the number of terms in the polynomial.
wnpoly.bell
This module computes Bell polynomials.
- class wnpoly.bell.Bell[source]
Bases:
objectA class for complete Bell polynomials.
- compute(x)[source]
Method to compute Bell polynomials.
- Args:
x(listornumpy.array): An array containing the elements from which to compute the polynomials. The first element of x, that is, x[0], must be zero.- Returns:
A
numpy.arraycontaining the Bell polynomials for the input x up to order equal to the index of the last element of x.
- invert(b)[source]
Method to invert Bell polynomials, that is, to find the x elements that will give the input Bell polynomials.
- Args:
b(listornumpy.array): An array containing the Bell polynomials. The first element, b[0], must equal 1.- Returns:
A
numpy.arraycontaining the x’s giving rise to the input polynomials.
- class wnpoly.bell.PartialBell[source]
Bases:
objectA class for partial Bell polynomials.
- compute(x)[source]
Method to compute partial Bell polynomials.
- Args:
x(listornumpy.array): An array containing the elements from which to compute the polynomials. The first value, x[0], must equal zero.- Returns:
A 2-d
numpy.arraycontaining the partial Bell polynomials Bn,k. n equals the largest index of the input x array. k ranges from 0 to n.
- invert(pb)[source]
Method to invert the partial Bell polynomials, that is, to find the x elements that will give the input Bell polynomials.
- Args:
pb(numpy.array): A 2-d array giving the partial Bell polynomials Bn,k- Returns:
A
numpy.arraycontaining the input x values that give the input partial Bell polynomials.