Loading...
Searching...
No Matches
opengv::math::Sturm Class Reference

`#include <Sturm.hpp>`

## Public Member Functions

| Sturm (const Eigen::MatrixXd &p)
| Contructor.
| Sturm (const std::vector< double > &p)
| Contructor.
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.
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.
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.

## Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::pair< double, double > | bracket_t

## Detailed Description

Sturm is initialized over polynomials of arbitrary order, and used to compute the real roots of the polynomial.

## Constructor & Destructor Documentation

## Sturm() [1/2]

opengv::math::Sturm::Sturm | ( | const Eigen::MatrixXd & | p | ) |

Contructor.

Parameters

  [in] | p | The polynomial coefficients (poly = p(0,0)*x^n + p(0,1)*x^(n-1) ...).

## Sturm() [2/2]

opengv::math::Sturm::Sturm | ( | const std::vector< double > & | p | ) |

Contructor.

Parameters

  [in] | p | The polynomial coefficients (poly = p[0]*x^n + p[1]*x^(n-1) ...).

## Member Function Documentation

## bracketRoots()

void opengv::math::Sturm::bracketRoots | ( | std::vector< double > & | roots,
|  | double | eps = -1.0 )

Finds brackets for the real roots of the polynomial.

Returns
  A list of brackets for the real roots of the polynomial.

## computeLagrangianBound()

double opengv::math::Sturm::computeLagrangianBound | ( |  | ) |

Composes an initial bracket for all the roots of the polynomial.

Returns
  The maximum of the absolute values of the bracket-values (That's what the Lagrangian bound is able to find).

## evaluateChain()

size_t opengv::math::Sturm::evaluateChain | ( | double | bound | ) |

Evaluates the Sturm chain at a single bound.

Parameters

  [in] | bound | The bound.

Returns
  The number of sign changes on the bound.

## evaluateChain2()

size_t opengv::math::Sturm::evaluateChain2 | ( | double | bound | ) |

Evaluates the Sturm chain at a single bound.

Parameters

  [in] | bound | The bound.

Returns
  The number of sign changes on the bound.

## findRoots()

std::vector< double > opengv::math::Sturm::findRoots | ( |  | ) |

Finds the roots of the polynomial.

Returns
  An array with the real roots of the polynomial.

## Member Data Documentation

## bracket_t

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::pair<double,double> opengv::math::Sturm::bracket_t

A pair of values bracketing a real root

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

- include/opengv/math/Sturm.hpp