Wrappers Package

TODO

Authors:

  • Philipp Schuette

class pyzeal.algorithms.wrappers.polynomial_wrapper.PolynomialWrapper(coefficients)[source]

Abstract base class for a simple wrapper of polynomials with complex coefficients.

In particular it exposes an abstract method to find roots of a polynomial. To implement alternative methods (like non-classical approaches based e.g. on neural networks) just implement this interface.

__init__(coefficients)[source]

Initialize a polynomial wrapper from a given set of coefficients. The resulting instance will represent the polynomial \(coeffcients[0] + coefficients[1] * z + ...\).

Parameters:

coefficients (List[complex]) – the coefficients of the polynomial

abstract getRootsWithOrders(precision)[source]

Return the distinct roots of the polynomial together with their orders.

Parameters:

precision (Tuple[int, int]) – proximity where roots are considered equal

Returns:

Tuple[ndarray[Any, dtype[complex128]], ndarray[Any, dtype[int32]]] – parallel arrays of roots and orders

TODO

Authors:

  • Philipp Schuette

class pyzeal.algorithms.wrappers.classical_polynomial.ClassicalPolynomial(coefficients)[source]

Simple wrapper for the polynomial implementation provided by numpy.

getRootsWithOrders(precision)[source]

Return the distinct roots of the polynomial together with their orders.

Parameters:

precision (Tuple[int, int]) – proximity where roots are considered equal

Returns:

Tuple[ndarray[Any, dtype[complex128]], ndarray[Any, dtype[int32]]] – parallel arrays of roots and orders