NumCpp
2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
#include <Poly1d.hpp>
Public Member Functions | |
Poly1d ()=default | |
Poly1d (const NdArray< dtype > &inValues, IsRoots isRoots=IsRoots::NO) | |
double | area (double a, double b) const |
template<typename dtypeOut > | |
Poly1d< dtypeOut > | astype () const |
NdArray< dtype > | coefficients () const |
Poly1d< dtype > | deriv () const |
NdArray< dtype > | eval (const NdArray< dtype > &xValues) const noexcept |
dtype | eval (dtype xValue) const noexcept |
Poly1d< double > | integ () const |
NdArray< dtype > | operator() (const NdArray< dtype > &xValues) const noexcept |
dtype | operator() (dtype inValue) const noexcept |
Poly1d< dtype > | operator* (const Poly1d< dtype > &inOtherPoly) const |
Poly1d< dtype > & | operator*= (const Poly1d< dtype > &inOtherPoly) |
Poly1d< dtype > | operator+ (const Poly1d< dtype > &inOtherPoly) const |
Poly1d< dtype > & | operator+= (const Poly1d< dtype > &inOtherPoly) |
Poly1d< dtype > | operator- (const Poly1d< dtype > &inOtherPoly) const |
Poly1d< dtype > & | operator-= (const Poly1d< dtype > &inOtherPoly) |
Poly1d< dtype > | operator^ (uint32 inPower) const |
Poly1d< dtype > & | operator^= (uint32 inPower) |
uint32 | order () const noexcept |
void | print () const |
std::string | str () const |
Static Public Member Functions | |
static Poly1d< double > | fit (const NdArray< dtype > &xValues, const NdArray< dtype > &yValues, const NdArray< dtype > &weights, uint8 polyOrder) |
static Poly1d< double > | fit (const NdArray< dtype > &xValues, const NdArray< dtype > &yValues, uint8 polyOrder) |
Friends | |
std::ostream & | operator<< (std::ostream &inOStream, const Poly1d< dtype > &inPoly) |
A one-dimensional polynomial class. A convenience class, used to encapsulate "natural" operations on polynomials
|
default |
Default Constructor (not very usefull, but needed for other containers.
|
inline |
Constructor
inValues | (polynomial coefficients in ascending order of power if second input is false, polynomial roots if second input is true) |
isRoots |
|
inline |
Returns the area under the curve between the two bounds
a | the lower bound |
b | the upper bound |
|
inline |
Returns a copy of the polynomial of the new type
|
inline |
|
inline |
Takes the derivative of the polynomial
|
inlinenoexcept |
Evaluates the Poly1D object for the input value
xValues |
|
inlinenoexcept |
Evaluates the Poly1D object for the input value
xValue |
|
inlinestatic |
Polynomial linear least squares regression: Ax = b
xValues | the x measurements [1, n] or [n, 1] array |
yValues | the y measurements [n, 1] array |
weights | the measurement weights [1, n] or [n, 1] array |
polyOrder | the order of the poly nomial to fit |
|
inlinestatic |
Polynomial linear least squares regression: Ax = b
xValues | the x measurements [1, n] or [n, 1] array |
yValues | the y measurements [n, 1] array |
polyOrder | the order of the poly nomial to fit |
|
inline |
Calculates the integral of the polynomial
|
inlinenoexcept |
Evaluates the Poly1D object for the input value
xValues |
|
inlinenoexcept |
Evaluates the Poly1D object for the input value
inValue |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
Prints the string representation of the Poly1d object to the console
|
inline |
Converts the polynomial to a string representation
|
friend |