|
|
| Quintic () |
| | Empty.
|
|
| Quintic (const double &, const double &, const double &, const double &, const double &, const double &) |
| | Creates a quintic polynomial.
|
| | Quintic (const Quadric &) |
| | Creates a quintic from a quadric.
|
| | Quintic (const Cubic &) |
| | Creates a quintic from a cubic.
|
| | Quintic (const Quartic &) |
| | Creates a quintic from a quartic.
|
|
| ~Quintic () |
| | Empty.
|
|
constexpr double & | operator[] (int) |
| | Access to the coefficients of the quintic.
|
|
constexpr double | operator[] (int) const |
| | Overloaded.
|
|
int | CheckDegree () const |
| | Check the degree of the quintic.
|
|
Quintic | operator- () const |
| | Unary.
|
|
Quintic & | operator+= (const Quintic &) |
| | Destructive sum.
|
|
Quintic & | operator-= (const Quintic &) |
| | Destructive difference.
|
|
Quintic & | operator*= (const double &) |
| | Scale.
|
|
Quintic & | operator/= (const double &) |
| | Scale.
|
|
Quartic | Prime () const |
| | Computes the first derivative of a quintic, which is a quartic.
|
|
Cubic | Second () const |
| | Computes the second derivative of a quintic, which is a cubic.
|
|
Quadric | Third () const |
| | Computes the third derivative of a quintic.
|
| double | K (const double &, const double &) const |
| | Compute the Lipschitz constant of the quintic.
|
| constexpr double | operator() (const double &) const |
| | Evaluates the quintic.
|
| constexpr double | Derivative (const double &) const |
| | Computes the derivative value at a given point.
|
| int | Solve (double *) const |
| | Solve the quintic equation.
|
| int | Solve (double *, const double &, const double &) const |
| | Search the roots of a quintic equation over a given interval.
|
| void | Range (double &, double &, const double &=0.0, const double &=1.0) const |
| | Compute the range of values taken by a quintic over a given interval.
|
|
| static Quintic | Hermite (const double &, const double &, const double &, const double &, const double &, const double &) |
| | Creates an Hermite quintic polynomial on interval [0,1].
|
| static Quintic | Bezier (const double &, const double &, const double &, const double &, const double &, const double &) |
| | Creates a quintic Bezier polynomial.
|
| static double | Smooth (const double &) |
| | Compute the value of smooth \( C^2 \) interpolating function over unit interval.
|
| static double | SmoothCompact (const double &, const double &) |
| | Compactly supported smooth interpolating function.
|
| static double | SmoothStep (const double &, const double &, const double &) |
| | Compute a quintic smooth step.
|
| static double | Gaussian (const double &, const double &, const double &) |
| | Compute a compactly supported Gaussian-like pulse.
|
| static double | GaussianThick (const double &, const double &, const double &, const double &) |
| | Compute a compactly supported Gaussian-like pulse with a thick plateau.
|
| static Quintic | FromRoots (const QVector< double > &) |
| | Create a quintic from a set of roots.
|
Quintic polynomials.
Closed form expression of roots does not exist for polynomials of degree five or greater.
Constructors should provide the coefficients in descending order. Example of how to code the quintic \( x^5 - x + 1 \):
Quintic p(1.0,0.0,0.0,0.0,-1.0,1.0);
Quintic()
Empty.
Definition quintic.h:12
Quintic implements some inline static member function such as:
{
return x * x * x * (x * (x * 6 - 15) + 10);
}
static double Smooth(const double &)
Compute the value of smooth interpolating function over unit interval.
Definition quintic.h:245
| int Quintic::Solve |
( |
double * | roots | ) |
const |
Solve the quintic equation.
This function stores the roots in an array and returns the number of roots. The roots are not guaranteed to be sorted, and when Polynomial::Solve() uses the Sturm sequences, as the degree is larger than four, only the roots in the interval [-1e7,1e7] are found. See (double*, const double&, const double&) to select the roots in a given interval.
Calls Polynomial::Solve() when the leading coefficient is non-zero. Otherwise cascades to lower-degree solvers (Quartic, Cubic, Quadric) by dropping zero leading coefficients.
- Parameters
-
- Returns
- The number of roots.