Poly1d¶
Poly1d is a data structure meant to capture 1D functions of the form
where
\(N\) is the order of the polynomial.
\(\mu\) is the mean.
\(\sigma\) is the norm.
\([c_0, c_1, ..., c_N]\) is the set of coefficients.
Factory¶
from isce3.core import poly1d
obj = poly1d(**kwds)
Documentation¶
-
class
isce3.core.Poly1d.
Poly1d
¶ Wrapper for pyPoly1d.
-
static
bind
(pyPoly1d poly)¶
-
coeffs
¶ Return a numpy view of underlying C++ array for coefficients.
Note
This method returns reference to actual C++ data. Modifying contents at python level will impact the C++ level data structure. Alternately, destroying the source poly1D python object will also impact the numpy array.
- Returns
Array of coefficients.
- Return type
numpy.array
-
copy
(poly)¶ Utility method for copying metadata from another python object.
- Parameters
poly (object) – Any python object that has attributes like pyPoly1D
- Returns
None
-
eval
(x)¶ Evaluate function at a given value.
- Parameters
x (float or np.array) – Value to evaluate polynomial at.
- Returns
Value of polynomial at x.
- Return type
float or np.array
-
evalWithNumpy
(x)¶ Evaluate using numpy’s polyval method
-
getCoeff
(int index)¶ Get coefficient at given index.
- Parameters
index (int) – Index into array of coefficients
- Returns
Value of coefficient
- Return type
float
-
mean
¶ Return mean value used for normalizing inputs.
- Returns
Mean value
- Return type
float
-
norm
¶ Return scale value used for normalizing inputs.
- Returns
norm value
- Return type
float
-
order
¶ Return order of the polynomial.
- Returns
Order of polynomial
- Return type
int
-
printPoly
()¶ Print poly structure at C++ level for debugging.
- Returns
None
-
setCoeff
(int index, double val)¶ Set coefficient at given index.
- Parameters
index (int) – Index into the array of coefficients
val (float) – Value of coefficient
- Returns
None
-
static