![]() |
|
Defined to be inherited by polynomial solvers: it provides convenient methods such as. More...
#include <PolynomialSolver.h>
Public Types | |
typedef Scalar_ | Scalar |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef std::complex< RealScalar > | RootType |
typedef Matrix< RootType, Deg_, 1 > | RootsType |
typedef DenseIndex | Index |
Public Member Functions | |
template<typename OtherPolynomial > | |
PolynomialSolverBase (const OtherPolynomial &poly) | |
PolynomialSolverBase () | |
const RootsType & | roots () const |
template<typename Stl_back_insertion_sequence > | |
void | realRoots (Stl_back_insertion_sequence &bi_seq, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const |
const RootType & | greatestRoot () const |
const RootType & | smallestRoot () const |
const RealScalar & | absGreatestRealRoot (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const |
const RealScalar & | absSmallestRealRoot (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const |
const RealScalar & | greatestRealRoot (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const |
const RealScalar & | smallestRealRoot (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const |
Protected Member Functions | |
template<typename OtherPolynomial > | |
void | setPolynomial (const OtherPolynomial &poly) |
template<typename squaredNormBinaryPredicate > | |
const RootType & | selectComplexRoot_withRespectToNorm (squaredNormBinaryPredicate &pred) const |
template<typename squaredRealPartBinaryPredicate > | |
const RealScalar & | selectRealRoot_withRespectToAbsRealPart (squaredRealPartBinaryPredicate &pred, bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const |
template<typename RealPartBinaryPredicate > | |
const RealScalar & | selectRealRoot_withRespectToRealPart (RealPartBinaryPredicate &pred, bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const |
Protected Attributes | |
RootsType | m_roots |
Defined to be inherited by polynomial solvers: it provides convenient methods such as.
It stores the set of roots as a vector of complexes.
typedef DenseIndex Eigen::PolynomialSolverBase< Scalar_, Deg_ >::Index |
typedef NumTraits<Scalar>::Real Eigen::PolynomialSolverBase< Scalar_, Deg_ >::RealScalar |
typedef Matrix<RootType, Deg_, 1> Eigen::PolynomialSolverBase< Scalar_, Deg_ >::RootsType |
typedef std::complex<RealScalar> Eigen::PolynomialSolverBase< Scalar_, Deg_ >::RootType |
typedef Scalar_ Eigen::PolynomialSolverBase< Scalar_, Deg_ >::Scalar |
|
inline |
References Eigen::PolynomialSolverBase< Scalar_, Deg_ >::setPolynomial().
|
inline |
|
inline |
[out] | hasArealRoot | : boolean true if a real root is found according to the absImaginaryThreshold criterion, false otherwise. |
[in] | absImaginaryThreshold | : threshold on the absolute imaginary part to decide whether or not a root is real. |
References Eigen::PolynomialSolverBase< Scalar_, Deg_ >::selectRealRoot_withRespectToAbsRealPart().
|
inline |
[out] | hasArealRoot | : boolean true if a real root is found according to the absImaginaryThreshold criterion, false otherwise. |
[in] | absImaginaryThreshold | : threshold on the absolute imaginary part to decide whether or not a root is real. |
References Eigen::PolynomialSolverBase< Scalar_, Deg_ >::selectRealRoot_withRespectToAbsRealPart().
|
inline |
[out] | hasArealRoot | : boolean true if a real root is found according to the absImaginaryThreshold criterion, false otherwise. |
[in] | absImaginaryThreshold | : threshold on the absolute imaginary part to decide whether or not a root is real. |
References Eigen::PolynomialSolverBase< Scalar_, Deg_ >::selectRealRoot_withRespectToRealPart().
|
inline |
References Eigen::PolynomialSolverBase< Scalar_, Deg_ >::selectComplexRoot_withRespectToNorm().
|
inline |
Clear and fills the back insertion sequence with the real roots of the polynomial i.e. the real part of the complex roots that have an imaginary part which absolute value is smaller than absImaginaryThreshold. absImaginaryThreshold takes the dummy_precision associated with the Scalar_ template parameter of the PolynomialSolver class as the default value.
[out] | bi_seq | : the back insertion sequence (stl concept) |
[in] | absImaginaryThreshold | : the maximum bound of the imaginary part of a complex number that is considered as real. |
References abs(), i, Eigen::imag(), Eigen::PolynomialSolverBase< Scalar_, Deg_ >::m_roots, and Eigen::real().
Referenced by evalSolverSugarFunction(), and main().
|
inline |
References Eigen::PolynomialSolverBase< Scalar_, Deg_ >::m_roots.
Referenced by main().
|
inlineprotected |
References Eigen::numext::abs2(), i, Eigen::PolynomialSolverBase< Scalar_, Deg_ >::m_roots, and res.
Referenced by Eigen::PolynomialSolverBase< Scalar_, Deg_ >::greatestRoot(), and Eigen::PolynomialSolverBase< Scalar_, Deg_ >::smallestRoot().
|
inlineprotected |
References abs(), Eigen::numext::abs2(), i, Eigen::imag(), Eigen::PolynomialSolverBase< Scalar_, Deg_ >::m_roots, Eigen::numext::real_ref(), and res.
Referenced by Eigen::PolynomialSolverBase< Scalar_, Deg_ >::absGreatestRealRoot(), and Eigen::PolynomialSolverBase< Scalar_, Deg_ >::absSmallestRealRoot().
|
inlineprotected |
|
inlineprotected |
References Eigen::PolynomialSolverBase< Scalar_, Deg_ >::m_roots, and Eigen::PlainObjectBase< Derived >::resize().
Referenced by Eigen::PolynomialSolverBase< Scalar_, Deg_ >::PolynomialSolverBase().
|
inline |
[out] | hasArealRoot | : boolean true if a real root is found according to the absImaginaryThreshold criterion, false otherwise. |
[in] | absImaginaryThreshold | : threshold on the absolute imaginary part to decide whether or not a root is real. |
References Eigen::PolynomialSolverBase< Scalar_, Deg_ >::selectRealRoot_withRespectToRealPart().
|
inline |
References Eigen::PolynomialSolverBase< Scalar_, Deg_ >::selectComplexRoot_withRespectToNorm().
|
protected |
Referenced by Eigen::PolynomialSolverBase< Scalar_, Deg_ >::realRoots(), Eigen::PolynomialSolverBase< Scalar_, Deg_ >::roots(), Eigen::PolynomialSolverBase< Scalar_, Deg_ >::selectComplexRoot_withRespectToNorm(), Eigen::PolynomialSolverBase< Scalar_, Deg_ >::selectRealRoot_withRespectToAbsRealPart(), Eigen::PolynomialSolverBase< Scalar_, Deg_ >::selectRealRoot_withRespectToRealPart(), and Eigen::PolynomialSolverBase< Scalar_, Deg_ >::setPolynomial().