| 
    clipper
   
    
   
   | 
  
  
  
 
Represents a polynomial in standard monomial base. More...
  
 Public Member Functions | |
| PolynomialStandard () | |
| PolynomialStandard (const std::vector< Numeric > &coefficient) | |
| PolynomialStandard (Numeric factor, const std::vector< Numeric > &roots) | |
| Construct polynomial from roots and a scaling multiplier.   | |
| unsigned int | degree () const | 
| Return degree of the polynomial.   | |
| Numeric | coefficient (unsigned int i) const | 
| Return a monomial coefficient.   | |
| std::string | toString (const std::string &X="X") const | 
| Return polynomial as latex math string.   | |
| std::string | toStringPlot () const | 
| Return polynomial as string for plotting with gnuplot.   | |
| Numeric | evaluate (Numeric X) const | 
| Calculate polynomial's value at the position X using Horner's schema.   | |
| std::vector< Numeric > | findRoots () const | 
| Calculate all real roots for a quadratic or cubic polynomial using the p-q- or Cardano's formulas.   | |
| PolynomialStandard | scale (Numeric alpha, Numeric beta) const | 
| Apply the linear transformation "X * (beta - alpha) + alpha" to the polynomial.   | |
| class PolynomialBezier< Numeric > | toBezier () const | 
| Convert the polynomial from standard base to the Bernstein-Bezier basis in the unit interval.   | |
Private Attributes | |
| std::vector< Numeric > | m_coefficient | 
| Coefficients of the polynomial. Degree is m_coefficients.size()-1.   | |
Represents a polynomial in standard monomial base.
Definition at line 786 of file clipper.cc.
| PolynomialStandard< Numeric >::PolynomialStandard | ( | ) |  [inline] | 
        
Definition at line 794 of file clipper.cc.
| PolynomialStandard< Numeric >::PolynomialStandard | ( | const std::vector< Numeric > & | coefficient | ) |  [inline, explicit] | 
        
Definition at line 798 of file clipper.cc.
| PolynomialStandard< Numeric >::PolynomialStandard | ( | Numeric | factor, | 
| const std::vector< Numeric > & | roots | ||
| ) |  [inline] | 
        
Construct polynomial from roots and a scaling multiplier.
Definition at line 804 of file clipper.cc.
| Numeric PolynomialStandard< Numeric >::coefficient | ( | unsigned int | i | ) |  const [inline] | 
        
Return a monomial coefficient.
Definition at line 858 of file clipper.cc.
| unsigned int PolynomialStandard< Numeric >::degree | ( | ) |  const [inline] | 
        
Return degree of the polynomial.
Definition at line 852 of file clipper.cc.
| Numeric PolynomialStandard< Numeric >::evaluate | ( | Numeric | X | ) |  const [inline] | 
        
Calculate polynomial's value at the position X using Horner's schema.
Definition at line 913 of file clipper.cc.
| std::vector<Numeric> PolynomialStandard< Numeric >::findRoots | ( | ) |  const [inline] | 
        
Calculate all real roots for a quadratic or cubic polynomial using the p-q- or Cardano's formulas.
Definition at line 926 of file clipper.cc.
| PolynomialStandard PolynomialStandard< Numeric >::scale | ( | Numeric | alpha, | 
| Numeric | beta | ||
| ) |  const [inline] | 
        
Apply the linear transformation "X * (beta - alpha) + alpha" to the polynomial.
This remaps the interval [alpha,beta] to [0,1].
Definition at line 1033 of file clipper.cc.
| PolynomialBezier< Numeric > PolynomialStandard< Numeric >::toBezier | ( | ) | const | 
Convert the polynomial from standard base to the Bernstein-Bezier basis in the unit interval.
Convert the polynomial from monomial representation to the Bernstein-Bezier basis in the unit interval.
Use scale() to transform the coefficients before applying this base conversion.
Definition at line 1429 of file clipper.cc.
| std::string PolynomialStandard< Numeric >::toString | ( | const std::string & | X = "X" | ) |  const [inline] | 
        
Return polynomial as latex math string.
Definition at line 865 of file clipper.cc.
| std::string PolynomialStandard< Numeric >::toStringPlot | ( | ) |  const [inline] | 
        
Return polynomial as string for plotting with gnuplot.
Definition at line 890 of file clipper.cc.
std::vector<Numeric> PolynomialStandard< Numeric >::m_coefficient [private] | 
        
Coefficients of the polynomial. Degree is m_coefficients.size()-1.
Definition at line 791 of file clipper.cc.
 1.7.6.1