CADETProcess.dataStructure.parameter.NdPolynomial

Contents

CADETProcess.dataStructure.parameter.NdPolynomial#

class CADETProcess.dataStructure.parameter.NdPolynomial(*args, n_entries=None, n_coeff=None, **kwargs)[source]#

Dependently sized polynomial for n entries.

This descriptor represents a polynomial whose size or dimensions may depend on other instance attributes. The polynomial can also be thought of as a 2D array, where each row represents a polynomial of a certain degree.

Important: Use [entries x n_coeff] for dependencies.

Parameters:
n_entriesint, optional

Number of polynomials or rows. Default is None.

n_coeffint, optional

Number of coefficients for each polynomial or columns. Default is None.

Notes

Currently, NdPolynomial is implemented as SizedNdArray. Consequently, no default values can be set since their size would depend on the dependent variables. In theory, this could be split into NdPolynomial and SizedNdPolynomial, but there is currently no use for this distinction.

Attributes:
sizetuple

The shape of the polynomial array, determined from n_entries and n_coeff.

Methods

fill_values(dims, value) -> np.ndarray:

Fills values to generate the polynomial matrix of the desired size.

_prepare(instance, value, recursive=False) -> np.ndarray:

Prepare the given polynomial matrix s.t. it adheres to the expected size.