stator
A math, geometry, and utility library
Public Member Functions | Public Attributes | List of all members
sym::detail::SturmChain< Order, Coeff_t, PolyVar > Struct Template Reference

A collection of Polynomials which form a Sturm chain. More...

#include <polynomial.hpp>

Public Member Functions

 SturmChain (const Polynomial< Order, Coeff_t, PolyVar > &p_n)
 Constructor if is the first Polynomial in the chain. More...
 
 SturmChain (const Polynomial< Order+1, Coeff_t, PolyVar > &p_nplus1, const Polynomial< Order, Coeff_t, PolyVar > &p_n)
 Constructor if is an intermediate Polynomial in the chain. More...
 
Polynomial< Order, Coeff_t, PolyVar > get (size_t i) const
 
void output_helper (std::ostream &os, const size_t max_order) const
 
template<class Coeff_t2 >
size_t roots (const Coeff_t2 &a, const Coeff_t2 &b) const
 
template<class Coeff_t2 >
size_t sign_change_helper (const int last_sign, const Coeff_t2 &x) const
 Helper function for calculating the sign changes in the Sturm chain. More...
 
template<class Coeff_t2 >
size_t sign_changes (const Coeff_t2 &x) const
 

Public Attributes

Polynomial< Order, Coeff_t, PolyVar > _p_n
 
SturmChain< Order-1, Coeff_t, PolyVar > _p_nminus1
 

Detailed Description

template<size_t Order, class Coeff_t, class PolyVar>
struct sym::detail::SturmChain< Order, Coeff_t, PolyVar >

Definition at line 969 of file polynomial.hpp.

Constructor & Destructor Documentation

◆ SturmChain() [1/2]

template<size_t Order, class Coeff_t , class PolyVar >
sym::detail::SturmChain< Order, Coeff_t, PolyVar >::SturmChain ( const Polynomial< Order, Coeff_t, PolyVar > &  p_n)
inline

Definition at line 973 of file polynomial.hpp.

◆ SturmChain() [2/2]

template<size_t Order, class Coeff_t , class PolyVar >
sym::detail::SturmChain< Order, Coeff_t, PolyVar >::SturmChain ( const Polynomial< Order+1, Coeff_t, PolyVar > &  p_nplus1,
const Polynomial< Order, Coeff_t, PolyVar > &  p_n 
)
inline

Definition at line 980 of file polynomial.hpp.

Member Function Documentation

◆ get()

template<size_t Order, class Coeff_t , class PolyVar >
Polynomial<Order, Coeff_t, PolyVar> sym::detail::SturmChain< Order, Coeff_t, PolyVar >::get ( size_t  i) const
inline

Accessor function for the ith Polynomial in the Sturm chain.

This promotes the order of the Sturm chain polynomial to the original order of the Polynomial as this is done at runtime.

Definition at line 994 of file polynomial.hpp.

◆ output_helper()

template<size_t Order, class Coeff_t , class PolyVar >
void sym::detail::SturmChain< Order, Coeff_t, PolyVar >::output_helper ( std::ostream &  os,
const size_t  max_order 
) const
inline

Definition at line 1038 of file polynomial.hpp.

◆ roots()

template<size_t Order, class Coeff_t , class PolyVar >
template<class Coeff_t2 >
size_t sym::detail::SturmChain< Order, Coeff_t, PolyVar >::roots ( const Coeff_t2 &  a,
const Coeff_t2 &  b 
) const
inline

Definition at line 1013 of file polynomial.hpp.

◆ sign_change_helper()

template<size_t Order, class Coeff_t , class PolyVar >
template<class Coeff_t2 >
size_t sym::detail::SturmChain< Order, Coeff_t, PolyVar >::sign_change_helper ( const int  last_sign,
const Coeff_t2 &  x 
) const
inline

These functions use -1, 0, and +1 to denote the sign of an evaluation of a polynomial. The sign of the previous Polynomial in the Strum chain is given as last_sign. If this is zero, then there has been no sign so far (all previous polynomials were zero or this is the first polynomial in the chain).

Definition at line 1029 of file polynomial.hpp.

◆ sign_changes()

template<size_t Order, class Coeff_t , class PolyVar >
template<class Coeff_t2 >
size_t sym::detail::SturmChain< Order, Coeff_t, PolyVar >::sign_changes ( const Coeff_t2 &  x) const
inline

Count the number of sign changes in the Sturm chain evaluated at $x$.

This actually uses a helper function sign_change_helper to carry out the calculation.

Definition at line 1008 of file polynomial.hpp.

Member Data Documentation

◆ _p_n

template<size_t Order, class Coeff_t , class PolyVar >
Polynomial<Order, Coeff_t, PolyVar> sym::detail::SturmChain< Order, Coeff_t, PolyVar >::_p_n

Definition at line 984 of file polynomial.hpp.

◆ _p_nminus1

template<size_t Order, class Coeff_t , class PolyVar >
SturmChain<Order-1, Coeff_t, PolyVar> sym::detail::SturmChain< Order, Coeff_t, PolyVar >::_p_nminus1

Definition at line 985 of file polynomial.hpp.


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