Polynomial
beignet.add_polynomial
add_polynomial(input, other)
Returns the sum of two polynomials.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
other
|
Tensor
|
Polynomial coefficients. |
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Polynomial coefficients. |
Source code in src/beignet/_add_polynomial.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
beignet.differentiate_polynomial
differentiate_polynomial(input, order=None, scale=None, dim=0)
Returns the derivative of a polynomial.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
order
|
Tensor
|
|
None
|
scale
|
Tensor
|
|
None
|
dim
|
int
|
|
0
|
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Polynomial coefficients of the derivative. |
Source code in src/beignet/_differentiate_polynomial.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
beignet.divide_polynomial
divide_polynomial(input, other)
Returns the quotient and remainder of two polynomials.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
other
|
Tensor
|
Polynomial coefficients. |
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tuple[Tensor, Tensor]
|
Polynomial coefficients of the quotient and remainder. |
Source code in src/beignet/_divide_polynomial.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
beignet.evaluate_polynomial
evaluate_polynomial(input, coefficients, tensor=True)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
|
required |
coefficients
|
Tensor
|
|
required |
tensor
|
bool
|
|
True
|
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
|
Source code in src/beignet/_evaluate_polynomial.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
beignet.evaluate_polynomial_2d
evaluate_polynomial_2d(x, y, coefficients)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Tensor
|
|
required |
y
|
Tensor
|
|
required |
coefficients
|
Tensor
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
|
Source code in src/beignet/_evaluate_polynomial_2d.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
beignet.evaluate_polynomial_3d
evaluate_polynomial_3d(x, y, z, coefficients)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Tensor
|
|
required |
y
|
Tensor
|
|
required |
z
|
Tensor
|
|
required |
coefficients
|
Tensor
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
|
Source code in src/beignet/_evaluate_polynomial_3d.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
beignet.evaluate_polynomial_cartesian_2d
evaluate_polynomial_cartesian_2d(x, y, coefficients)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Tensor
|
|
required |
y
|
Tensor
|
|
required |
coefficients
|
Tensor
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
|
Source code in src/beignet/_evaluate_polynomial_cartesian_2d.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
beignet.evaluate_polynomial_cartesian_3d
evaluate_polynomial_cartesian_3d(x, y, z, coefficients)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Tensor
|
|
required |
y
|
Tensor
|
|
required |
z
|
Tensor
|
|
required |
coefficients
|
Tensor
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
out |
Tensor
|
|
Source code in src/beignet/_evaluate_polynomial_cartesian_3d.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
beignet.evaluate_polynomial_from_roots
evaluate_polynomial_from_roots(input, other, tensor=True)
Source code in src/beignet/_evaluate_polynomial_from_roots.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
beignet.fit_polynomial
fit_polynomial(input, other, degree, relative_condition=None, full=False, weight=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Independent variable. |
required |
other
|
Tensor
|
Dependent variable. |
required |
degree
|
Tensor or int
|
Degree of the fitting polynomial. |
required |
relative_condition
|
float
|
Relative condition number. |
None
|
full
|
bool
|
Return additional information. |
False
|
weight
|
Tensor
|
Weights. |
None
|
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Polynomial coefficients of the fit. |
Source code in src/beignet/_fit_polynomial.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
beignet.integrate_polynomial
integrate_polynomial(input, order=1, k=None, lower_bound=0, scale=1, dim=0)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
order
|
int
|
|
1
|
k
|
int
|
|
None
|
lower_bound
|
float
|
|
0
|
scale
|
float
|
|
1
|
dim
|
int
|
|
0
|
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Polynomial coefficients of the integral. |
Source code in src/beignet/_integrate_polynomial.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
beignet.linear_polynomial
linear_polynomial(input, other)
Source code in src/beignet/_linear_polynomial.py
5 6 |
|
beignet.multiply_polynomial
multiply_polynomial(input, other, mode='full')
Returns the product of two polynomials.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
other
|
Tensor
|
Polynomial coefficients. |
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Polynomial coefficients of the product. |
Source code in src/beignet/_multiply_polynomial.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
beignet.multiply_polynomial_by_x
multiply_polynomial_by_x(input, mode='full')
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
mode
|
Literal['full', 'same', 'valid']
|
|
'full'
|
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Polynomial coefficients of the product of the polynomial and the independent variable. |
Source code in src/beignet/_multiply_polynomial_by_x.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
beignet.polynomial_companion
polynomial_companion(input)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor, shape=(degree, degree)
|
Companion matrix. |
Source code in src/beignet/_polynomial_companion.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
beignet.polynomial_domain
module-attribute
polynomial_domain = tensor([-1.0, 1.0])
beignet.polynomial_from_roots
polynomial_from_roots(input)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Roots. |
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Polynomial coefficients. |
Source code in src/beignet/_polynomial_from_roots.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
beignet.polynomial_one
module-attribute
polynomial_one = tensor([1.0])
beignet.polynomial_power
polynomial_power(input, exponent, maximum_exponent=16.0)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
exponent
|
float or Tensor
|
|
required |
maximum_exponent
|
float or Tensor
|
|
16.0
|
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Polynomial coefficients of the power. |
Source code in src/beignet/_polynomial_power.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
beignet.polynomial_roots
polynomial_roots(input)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Roots. |
Source code in src/beignet/_polynomial_roots.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
beignet.polynomial_to_chebyshev_polynomial
polynomial_to_chebyshev_polynomial(input)
Source code in src/beignet/_polynomial_to_chebyshev_polynomial.py
8 9 10 11 12 13 14 15 16 17 18 |
|
beignet.polynomial_to_laguerre_polynomial
polynomial_to_laguerre_polynomial(input)
Source code in src/beignet/_polynomial_to_laguerre_polynomial.py
8 9 10 11 12 13 14 15 16 17 18 |
|
beignet.polynomial_to_legendre_polynomial
polynomial_to_legendre_polynomial(input)
Source code in src/beignet/_polynomial_to_legendre_polynomial.py
8 9 10 11 12 13 14 15 16 17 18 |
|
beignet.polynomial_to_physicists_hermite_polynomial
polynomial_to_physicists_hermite_polynomial(input)
Source code in src/beignet/_polynomial_to_physicists_hermite_polynomial.py
10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
beignet.polynomial_to_probabilists_hermite_polynomial
polynomial_to_probabilists_hermite_polynomial(input)
Source code in src/beignet/_polynomial_to_probabilists_hermite_polynomial.py
10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
beignet.polynomial_vandermonde
polynomial_vandermonde(input, degree)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
|
required |
degree
|
Tensor
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
|
Source code in src/beignet/_polynomial_vandermonde.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
beignet.polynomial_vandermonde_2d
polynomial_vandermonde_2d(x, y, degree)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Tensor
|
|
required |
y
|
Tensor
|
|
required |
degree
|
Tensor
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
|
Source code in src/beignet/_polynomial_vandermonde_2d.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
beignet.polynomial_vandermonde_3d
polynomial_vandermonde_3d(x, y, z, degree)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Tensor
|
|
required |
y
|
Tensor
|
|
required |
z
|
Tensor
|
|
required |
degree
|
Tensor
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
|
Source code in src/beignet/_polynomial_vandermonde_3d.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
beignet.polynomial_x
module-attribute
polynomial_x = tensor([0.0, 1.0])
beignet.polynomial_zero
module-attribute
polynomial_zero = tensor([0.0])
beignet.subtract_polynomial
subtract_polynomial(input, other)
Returns the difference of two polynomials.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
Tensor
|
Polynomial coefficients. |
required |
other
|
Tensor
|
Polynomial coefficients. |
required |
Returns:
Name | Type | Description |
---|---|---|
output |
Tensor
|
Polynomial coefficients of the difference. |
Source code in src/beignet/_subtract_polynomial.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
beignet.trim_polynomial_coefficients
trim_polynomial_coefficients(input, tol=0.0)
Source code in src/beignet/_trim_polynomial_coefficients.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|