#include <Sturm.hpp>
Public Member Functions | |
Sturm (const Eigen::MatrixXd &p) | |
Contructor. More... | |
Sturm (const std::vector< double > &p) | |
Contructor. More... | |
virtual | ~Sturm () |
Destructor. | |
void | findRoots2 (std::vector< double > &roots, double eps_x=0.001, double eps_val=0.001) |
std::vector< double > | findRoots () |
Finds the roots of the polynomial. More... | |
void | bracketRoots (std::vector< double > &roots, double eps=-1.0) |
Finds brackets for the real roots of the polynomial. More... | |
size_t | evaluateChain (double bound) |
Evaluates the Sturm chain at a single bound. More... | |
size_t | evaluateChain2 (double bound) |
Evaluates the Sturm chain at a single bound. More... | |
double | computeLagrangianBound () |
Composes an initial bracket for all the roots of the polynomial. More... | |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::pair< double, double > | bracket_t |
Sturm is initialized over polynomials of arbitrary order, and used to compute the real roots of the polynomial.
opengv::math::Sturm::Sturm | ( | const Eigen::MatrixXd & | p | ) |
Contructor.
[in] | p | The polynomial coefficients (poly = p(0,0)*x^n + p(0,1)*x^(n-1) ...). |
opengv::math::Sturm::Sturm | ( | const std::vector< double > & | p | ) |
Contructor.
[in] | p | The polynomial coefficients (poly = p[0]*x^n + p[1]*x^(n-1) ...). |
void opengv::math::Sturm::bracketRoots | ( | std::vector< double > & | roots, |
double | eps = -1.0 |
||
) |
Finds brackets for the real roots of the polynomial.
double opengv::math::Sturm::computeLagrangianBound | ( | ) |
Composes an initial bracket for all the roots of the polynomial.
size_t opengv::math::Sturm::evaluateChain | ( | double | bound | ) |
Evaluates the Sturm chain at a single bound.
[in] | bound | The bound. |
size_t opengv::math::Sturm::evaluateChain2 | ( | double | bound | ) |
Evaluates the Sturm chain at a single bound.
[in] | bound | The bound. |
std::vector<double> opengv::math::Sturm::findRoots | ( | ) |
Finds the roots of the polynomial.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::pair<double,double> opengv::math::Sturm::bracket_t |
A pair of values bracketing a real root