pyoptools.misc.function_2d.poly_2d package

Submodules

Module contents

class pyoptools.misc.function_2d.poly_2d.Poly2D

Bases: Function2D

Class to define a 2D polynomial

z=c0+
c1*x+c2*y+
c3*x^2+c4*x*y+c5*y^2+
c6*x^3+c7*x^2*y+c8*x*y^2+c9*y^3+...

coefficients
dxdy()

Calculate the derivative with respect to X and Y for the polynomial.

Returns:

A tuple (dx, dy) containing two Poly2D objects representing the derivatives with respect to X and Y, respectively.

Return type:

tuple

Note

This method caches the derivative results the first time it is called. If you modify the coeff attribute, the cache will not be updated.

eval_1d(x, y)
num_coefficients
order
pyoptools.misc.function_2d.poly_2d.indices_to_powers(indices)

Convert a vector of coefficient indices into the corresponding x and y exponents for a polynomial.

pyoptools.misc.function_2d.poly_2d.ord2i(o)

Method that returns the number of coefficients of a polynomial of order o

order

0

1

2

3

4

i

1

3

6

10

15

pyoptools.misc.function_2d.poly_2d.pxpy2i(px, py)

Method that returns the index given power in x and the power in y