37#ifndef OPENGV_STURM_HPP_
38#define OPENGV_STURM_HPP_
45#include <Eigen/src/Core/util/DisableStupidWarnings.h>
61 typedef std::shared_ptr<Bracket> Ptr;
62 typedef std::shared_ptr<const Bracket> ConstPtr;
64 Bracket(
double lowerBound,
double upperBound );
65 Bracket(
double lowerBound,
double upperBound,
size_t changes,
bool setUpperBoundChanges );
68 bool dividable(
double eps )
const;
69 void divide( std::list<Ptr> & brackets )
const;
70 double lowerBound()
const;
71 double upperBound()
const;
72 bool lowerBoundChangesComputed()
const;
73 bool upperBoundChangesComputed()
const;
74 void setLowerBoundChanges(
size_t changes );
75 void setUpperBoundChanges(
size_t changes );
76 size_t numberRoots()
const;
81 bool _lowerBoundChangesComputed;
82 bool _upperBoundChangesComputed;
83 size_t _lowerBoundChanges;
84 size_t _upperBoundChanges;
95 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
108 Sturm(
const std::vector<double> & p );
114 void findRoots2( std::vector<double> & roots,
double eps_x = 0.001,
double eps_val = 0.001 );
151 void computeNegatedRemainder(
152 const Eigen::MatrixXd & p1,
153 const Eigen::MatrixXd & p2,
154 Eigen::MatrixXd & r );
Sturm(const Eigen::MatrixXd &p)
Contructor.
virtual ~Sturm()
Destructor.
Sturm(const std::vector< double > &p)
Contructor.
std::vector< double > findRoots()
Finds the roots of the polynomial.
size_t evaluateChain2(double bound)
Evaluates the Sturm chain at a single bound.
double computeLagrangianBound()
Composes an initial bracket for all the roots of the polynomial.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::pair< double, double > bracket_t
Definition: Sturm.hpp:97
void bracketRoots(std::vector< double > &roots, double eps=-1.0)
Finds brackets for the real roots of the polynomial.
size_t evaluateChain(double bound)
Evaluates the Sturm chain at a single bound.
The namespace of this library.
Definition: AbsoluteAdapterBase.hpp:48