Public Member Functions | List of all members
SurgSim::Math::PolynomialRoots< T, 2 > Class Template Reference

PolynomialRoots<T, 2> specializes the PolynomialRoots class for degree 2 (quadratic polynomials) More...

#include <SurgSim/Math/PolynomialRoots.h>

Inheritance diagram for SurgSim::Math::PolynomialRoots< T, 2 >:
SurgSim::Math::PolynomialRootsCommon< T, 2 >

Public Member Functions

 PolynomialRoots (const Polynomial< T, 2 > &p, const T &epsilon=1.0e-09)
 Constructor. More...
 
- Public Member Functions inherited from SurgSim::Math::PolynomialRootsCommon< T, 2 >
bool isDegenerate () const
 
int getNumRoots () const
 
operator[] (int i) const
 Read only access to the roots of the polynomial. More...
 

Additional Inherited Members

- Static Public Attributes inherited from SurgSim::Math::PolynomialRootsCommon< T, 2 >
static const int DEGENERATE
 Indicator for a degenerate polynomial (infinite number of roots). More...
 
- Protected Member Functions inherited from SurgSim::Math::PolynomialRootsCommon< T, 2 >
 PolynomialRootsCommon ()
 Constructor. Since the constructor must define the roots, only allow construction from a derived class. More...
 
- Protected Attributes inherited from SurgSim::Math::PolynomialRootsCommon< T, 2 >
int m_numRoots
 The number of roots available for the polynomial, or DEGENERATE if there are infinite roots. More...
 
std::array< T, N > m_roots
 An array of up to N roots for a degree N polynomial ordered ascendingly. More...
 

Detailed Description

template<typename T>
class SurgSim::Math::PolynomialRoots< T, 2 >

PolynomialRoots<T, 2> specializes the PolynomialRoots class for degree 2 (quadratic polynomials)

See also
PolynomialRoots<T, N>

Constructor & Destructor Documentation

◆ PolynomialRoots()

template<typename T >
SurgSim::Math::PolynomialRoots< T, 2 >::PolynomialRoots ( const Polynomial< T, 2 > &  p,
const T &  epsilon = 1.0e-09 
)
explicit

Constructor.

Parameters
pthe degree 2 polynomial for which the roots are to be calculated
epsilontolerance parameter for determining the number of valid, unique roots

The documentation for this class was generated from the following files: