|
| | FixedPolynom ()=default |
| | decault constructs the polynomials with the default values of their data type
|
| |
| | FixedPolynom (const FixedPolynom &)=default |
| | Copy constructor.
|
| |
| template<std::convertible_to< T > U> |
| | FixedPolynom (const U &value) |
| |
template<int M>
requires (M < Order) |
| | FixedPolynom (const FixedPolynom< T, M > &other) |
| |
| FixedPolynom & | operator= (const FixedPolynom &)=default |
| | Copy assignment operator.
|
| |
template<int M>
requires (M < Order) |
| FixedPolynom & | operator= (const FixedPolynom< T, M > &other) |
| |
| | FixedPolynom (const T(&values)[Order+1]) |
| | Constructs a polynomial from an array.
|
| |
template<int M>
requires (M < Order+1) |
| | FixedPolynom (const T(&values)[M]) |
| |
| | FixedPolynom (const Eigen::Vector< T, Order+1 > &vector) |
| | Constructs a polynomial from a vector.
|
| |
template<int M>
requires (M < Order+1) |
| | FixedPolynom (const Eigen::Vector< T, M > &vector) |
| |
| FixedPolynom & | operator= (const T(&values)[Order+1]) |
| |
template<int M>
requires (M < Order+1) |
| FixedPolynom & | operator= (const T(&values)[M]) |
| |
| | FixedPolynom (const Polynom< T, Order > &poly) |
| |
template<int M>
requires (M < Order) |
| | FixedPolynom (const Polynom< T, M > &poly) |
| |
| | operator Polynom< T, Order > () const |
| |
| FixedPolynom & | operator= (const Eigen::Vector< T, Order+1 > &vector) |
| | Assigns the values of a vector to this polynomial.
|
| |
template<int M>
requires (M < Order+1) |
| FixedPolynom & | operator= (const Eigen::Vector< T, M > &vector) |
| |
| const T & | operator[] (size_t i) const |
| | Access elements at the i-th position.
|
| |
| T & | operator[] (size_t i) |
| | Access elements at the i-th position.
|
| |
| const T & | at (size_t i) const |
| | Access elements at the i-th position.
|
| |
| T & | at (size_t i) |
| | Access elements at the i-th position.
|
| |
| vector_type & | vector () |
| | Returns the underlying vector that holds the values.
|
| |
| const vector_type & | vector () const |
| | Returns the underlying vector that holds the values.
|
| |
| size_t | size () const |
| | returns the size of the polynomial
|
| |
| size_t | order () const |
| | returns the order of the polynomial
|
| |
| void | setZero () |
| | sets all entries to zero
|
| |
| void | print (std::ostream &stream, std::string_view var="x") const |
| | prints polynomial to an output character stream with a variale
|
| |
template<int M>
requires (M <= Order) |
| FixedPolynom & | operator+= (const FixedPolynom< T, M > &other) |
| |
template<int M>
requires (M <= Order) |
| FixedPolynom & | operator-= (const FixedPolynom< T, M > &other) |
| |
template<class T, int Order>
class controlpp::FixedPolynom< T, Order >
Describes a mathematical polynomial of fixed size.
Does not grow in size like its sibling controlpp::Polynom as a result of operations.
Describes polynomials in the form of:
\[
a_1 + a_2 x + a_3 x^2 ..
\]
, where indices correspond to the parameter number and the potence
- Template Parameters
-
| T | The datatype of the polynomial parameters (e.g: float, double, complex) |
| N | The size of the polynomial, aka. number of parameters, aka. max order plus one |
| AutoGrow | If true for at least one polynomial of an operation the resulting polynomial will grow automatically in size to contain all values. Usually set false if one needs to sum over polynomials in a loop. |