| 
    Core 1.0
    
   | 
 
Septic (heptic) polynomials. More...
#include <septic.h>
Public Member Functions | |
| Septic () | |
| Empty.  | |
| Septic (const double &, const double &, const double &, const double &, const double &, const double &, const double &, const double &) | |
| Creates a septic polynomial.  | |
| Septic (const Sextic &) | |
| Creates a septic given a sextic.   | |
| Septic (const Quintic &) | |
| Creates a septic given a quintic.   | |
| Septic (const Quadric &) | |
| Creates a septic given a quadric.   | |
| Septic (const Cubic &) | |
| Creates a septic given a cubic.   | |
| Septic (const Quartic &) | |
| Creates a septic given a quartic.   | |
| ~Septic () | |
| Empty.  | |
| constexpr double & | operator[] (int) | 
| Access to the coefficients of the septic.  | |
| constexpr double | operator[] (int) const | 
| Overloaded.  | |
| int | CheckDegree () const | 
| Check the degree of the septic.  | |
| Septic | operator- () const | 
| Unary.  | |
| Septic & | operator+= (const Septic &) | 
| Destructive sum of two septics.  | |
| Septic & | operator-= (const Septic &) | 
| Destructive difference of two septics.  | |
| Septic & | operator*= (const double &) | 
| Scale a septics by a double value.  | |
| Septic & | operator/= (const double &) | 
| Scale a septics by a double value.  | |
| Sextic | Prime () const | 
| Computes the first derivative of a septic, which is a quintic.  | |
| Quintic | Second () const | 
| Computes the second derivative of a septic.  | |
| Quartic | Third () const | 
| Computes the third derivative of a septic.  | |
| double | K (const double &, const double &) const | 
| Compute the Lipschitz constant of the septic.   | |
| constexpr double | operator() (const double &) const | 
| Evaluates the septic.   | |
| constexpr double | Derivative (const double &) const | 
| Computes the derivative of the septic.   | |
| int | Solve (double *) const | 
| Solve the septics equation over a given interval.   | |
| int | Solve (double *, const double &, const double &) const | 
| Search the roots of a septic 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 septic over a given interval.   | |
Static Public Member Functions | |
| static double | Smooth (const double &) | 
| Compute the value of smooth C3 interpolating function over unit interval.   | |
| static double | SmoothStep (const double &, const double &, const double &) | 
| Compute a septic smooth step.   | |
| static double | Gaussian (const double &, const double &, const double &) | 
| Compute a compactly supported Gaussian-like pulse.   | |
| static Septic | Hermite (const double &, const double &, const double &, const double &, const double &, const double &, const double &, const double &) | 
| Creates an Hermite septic polynomial on interval [0,1].   | |
Static Public Attributes | |
| static double | epsilon = 1.0e-10 | 
| Epsilon value used to check discriminant terms in the root finding process.  | |
Protected Attributes | |
| double | c [8] = { 0.0 } | 
| Array of coefficients.  | |
Friends | |
| Septic | operator+ (const Septic &u, const Septic &v) | 
| Overloaded.  | |
| Septic | operator- (const Septic &v, const Septic &u) | 
| Overloaded.  | |
| Septic | operator* (const Septic &u, const double &e) | 
| Overloaded.  | |
| Septic | operator* (const double &a, const Septic &p) | 
| Overloaded.  | |
| Septic | operator/ (const Septic &p, const double &a) | 
| Overloaded.  | |
| std::ostream & | operator<< (std::ostream &s, const Septic &p) | 
| Overloaded output-stream operator.   | |
Septic (heptic) polynomials.
Constructors should provide the coefficients in descending order. Example of how to code the septic 12x7-x+1:
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inlineconstexpr | 
Computes the derivative of the septic.
This function is more efficient than using Prime() and then evaluating the derivative for a given input value.
| x | Real. | 
      
  | 
  inlinestatic | 
Compute a compactly supported Gaussian-like pulse.
The function has C3 continuity.
| c | Center. | 
| r | Radius. | 
| x | Value. | 
      
  | 
  static | 
Creates an Hermite septic polynomial on interval [0,1].
| a,b | Values at t=0 and t=1. | 
| da,db | Derivatives. | 
| sa,sb | Second derivatives. | 
| ta,tb | Third derivatives. | 
| double Septic::K | ( | const double & | a, | 
| const double & | b ) const | 
Compute the Lipschitz constant of the septic.
| a,b | Interval. | 
      
  | 
  inlineconstexpr | 
Evaluates the septic.
| x | Argument value of the function. | 
| void Septic::Range | ( | double & | x, | 
| double & | y, | ||
| const double & | a = 0.0, | ||
| const double & | b = 1.0 ) const | 
Compute the range of values taken by a septic over a given interval.
| a,b | Interval. | 
| x,y | Returned range. | 
      
  | 
  inlinestatic | 
Compute the value of smooth C3 interpolating function over unit interval.
The septic is defined as x4(-20 x3 + 70 x2 -84 x + 35). Its first, second and third derivatives at 0.0 and 1.0 are 0.0.
The Lipschitz constant of the smooth septic over [0,1] is λ=35/16.
| x | Argument in [0,1]. | 
      
  | 
  inlinestatic | 
Compute a septic smooth step.
The code is slightly more efficient than:
| x | Input value. | 
| a,b | Interval values. | 
| int Septic::Solve | ( | double * | roots | ) | const | 
Solve the septics equation over a given interval.
This function stores the sorted roots in an array and returns the number of roots.
This function calls Polynomial::Solve() if the highest coefficient is not nul, otherwise it calls Quartic::Solve() and other lower degree polynomial solvers which are more efficient.
| roots | The array of roots. | 
| int Septic::Solve | ( | double * | roots, | 
| const double & | a, | ||
| const double & | b ) const | 
Search the roots of a septic equation over a given interval.
| roots | Array for storing the roots. | 
| a,b | Interval range. | 
      
  | 
  friend | 
Overloaded output-stream operator.
| s | Stream. | 
| p | The septic. |