1 #ifndef SimTK_SimTKCOMMON_POLYNOMIALROOTFINDER_H_
2 #define SimTK_SimTKCOMMON_POLYNOMIALROOTFINDER_H_
75 static void findRoots(
const Vec<3,complex<T> >& coefficients,
Vec<2,complex<T> >& roots);
91 static void findRoots(
const Vec<4,complex<T> >& coefficients,
Vec<3,complex<T> >& roots);
119 setMessage(
"Attempting to find roots of a polynomial whose leading coefficient is 0.");
#define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:224
This is the header which should be included in user programs that would like to make use of all the S...
Includes internal headers providing declarations for the basic SimTK Core classes.
Definition: Exception.h:46
Base(const char *fn="<UNKNOWN>", int ln=0)
Definition: Exception.h:48
void setMessage(const std::string &msgin)
Definition: Exception.h:57
This is an exception which is thrown by all of the PolynomialRootFinder::findRoots() methods.
Definition: PolynomialRootFinder.h:116
virtual ~ZeroLeadingCoefficient()
Definition: PolynomialRootFinder.h:121
ZeroLeadingCoefficient(const char *fn, int ln)
Definition: PolynomialRootFinder.h:118
This class provides static methods for finding the roots of polynomials.
Definition: PolynomialRootFinder.h:57
static void findRoots(const Vec< 4, T > &coefficients, Vec< 3, complex< T > > &roots)
Find the roots of a cubic polynomial with real coefficients.
static void findRoots(const Vector_< T > &coefficients, Vector_< complex< T > > &roots)
Find the roots of a polynomial of arbitrary degree with real coefficients.
static void findRoots(const Vec< 3, complex< T > > &coefficients, Vec< 2, complex< T > > &roots)
Find the roots of a quadratic polynomial with complex coefficients.
static void findRoots(const Vec< 4, complex< T > > &coefficients, Vec< 3, complex< T > > &roots)
Find the roots of a cubic polynomial with complex coefficients.
static void findRoots(const Vector_< complex< T > > &coefficients, Vector_< complex< T > > &roots)
Find the roots of a polynomial of arbitrary degree with complex coefficients.
static void findRoots(const Vec< 3, T > &coefficients, Vec< 2, complex< T > > &roots)
Find the roots of a quadratic polynomial with real coefficients.
This is a fixed-length column vector designed for no-overhead inline computation.
Definition: Vec.h:184
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37