|
PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
The namespace for the Polynomial module. More...
Classes | |
| struct | DivergenceFreeBasis |
| Divergence-free polynomial basis \( \left\{ \mathbf{P}_i(X) \; \text{s.t.} \; \nabla_X
\mathbf{P}_i = 0 \right\} \) in dimensions \( d \) and order \( p \). More... | |
| struct | MonomialBasis |
| Polynomial basis \( \left\{ \Pi_{i=1}^{d} \mathbf{X}_i^{p_i} \; \text{s.t.} \; 0 \leq
\sum_{i=1}^d p_i \leq p \right\} \) in dimensions \( d \) and order \( p \). More... | |
| struct | OrthonormalBasis |
| Orthonormal polynomial basis \( \left\{ P_i(X) \right\} \) in dimensions \( d \) and order \( p
\). More... | |
Concepts | |
| concept | CBasis |
| concept | CVectorBasis |
Functions | |
| template<auto N, class TScalar = Scalar> | |
| bool | HasRoot (std::array< TScalar, N+1 > const &coeffs, TScalar min=std::numeric_limits< TScalar >::lowest(), TScalar max=std::numeric_limits< TScalar >::max()) |
| Check if a polynomial has a root in the range [min,max]. | |
| template<auto N, class TScalar = Scalar> | |
| std::array< TScalar, N > | Roots (std::array< TScalar, N+1 > const &coeffs, TScalar min=std::numeric_limits< TScalar >::lowest(), TScalar max=std::numeric_limits< TScalar >::max()) |
| Computes all real roots of a degree N polynomial in the range [min,max]. | |
| template<auto N, class FOnRoot, class TScalar = Scalar> | |
| bool | ForEachRoot (FOnRoot &&fOnRoot, std::array< TScalar, N+1 > const &coeffs, TScalar min=std::numeric_limits< TScalar >::lowest(), TScalar max=std::numeric_limits< TScalar >::max()) |
| Computes the each real root of a degree N polynomial in the range [min,max] in increasing order. | |
The namespace for the Polynomial module.
|
inline |
Computes the each real root of a degree N polynomial in the range [min,max] in increasing order.
| N | Degree of the polynomial. |
| FOnRoot | Callable type with signature bool(TScalar root). |
| TScalar | Scalar type of the polynomial. |
| fOnRoot | Callable object to be called for each root. If the callable returns true, the iteration stops. |
| coeffs | Coefficients of the polynomial. |
| min | Minimum value of the search range. |
| max | Maximum value of the search range. |
|
inline |
Check if a polynomial has a root in the range [min,max].
| N | The degree of the polynomial. |
| TScalar | The scalar type of the polynomial. |
| coeffs | The coefficients of the polynomial. |
| min | The minimum value of the search range. |
| max | The maximum value of the search range. |
|
inline |
Computes all real roots of a degree N polynomial in the range [min,max].
| N | Degree of the polynomial. |
| TScalar | Scalar type of the polynomial. |
| coeffs | Coefficients of the polynomial. |
| min | Minimum value of the search range. |
| max | Maximum value of the search range. |