Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
PolynomialSolverBase< _Scalar, _Deg > Class Template Reference

Defined to be inherited by polynomial solvers: it provides convenient methods such as. More...

#include <PolynomialSolver.h>

Inheritance diagram for PolynomialSolverBase< _Scalar, _Deg >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef DenseIndex Index
typedef NumTraits< Scalar >::Real RealScalar
typedef Matrix< RootType, _Deg, 1 > RootsType
typedef std::complex< RealScalarRootType
typedef _Scalar Scalar

Public Member Functions

const RealScalarabsGreatestRealRoot (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
const RealScalarabsSmallestRealRoot (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
const RealScalargreatestRealRoot (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
const RootTypegreatestRoot () const
template<typename OtherPolynomial >
 PolynomialSolverBase (const OtherPolynomial &poly)
 PolynomialSolverBase ()
template<typename Stl_back_insertion_sequence >
void realRoots (Stl_back_insertion_sequence &bi_seq, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
const RootsTyperoots () const
const RealScalarsmallestRealRoot (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
const RootTypesmallestRoot () const

Protected Member Functions

template<typename squaredNormBinaryPredicate >
const RootTypeselectComplexRoot_withRespectToNorm (squaredNormBinaryPredicate &pred) const
template<typename squaredRealPartBinaryPredicate >
const RealScalarselectRealRoot_withRespectToAbsRealPart (squaredRealPartBinaryPredicate &pred, bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
template<typename RealPartBinaryPredicate >
const RealScalarselectRealRoot_withRespectToRealPart (RealPartBinaryPredicate &pred, bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
template<typename OtherPolynomial >
void setPolynomial (const OtherPolynomial &poly)

Protected Attributes

RootsType m_roots

Detailed Description

template<typename _Scalar, int _Deg>
class PolynomialSolverBase< _Scalar, _Deg >

Defined to be inherited by polynomial solvers: it provides convenient methods such as.

It stores the set of roots as a vector of complexes.

Definition at line 42 of file PolynomialSolver.h.


Member Typedef Documentation

template<typename _Scalar, int _Deg>
typedef DenseIndex PolynomialSolverBase< _Scalar, _Deg >::Index

Definition at line 52 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
typedef NumTraits<Scalar>::Real PolynomialSolverBase< _Scalar, _Deg >::RealScalar

Definition at line 48 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
typedef Matrix<RootType,_Deg,1> PolynomialSolverBase< _Scalar, _Deg >::RootsType

Definition at line 50 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
typedef std::complex<RealScalar> PolynomialSolverBase< _Scalar, _Deg >::RootType

Definition at line 49 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
typedef _Scalar PolynomialSolverBase< _Scalar, _Deg >::Scalar

Definition at line 47 of file PolynomialSolver.h.


Constructor & Destructor Documentation

template<typename _Scalar, int _Deg>
template<typename OtherPolynomial >
PolynomialSolverBase< _Scalar, _Deg >::PolynomialSolverBase ( const OtherPolynomial &  poly) [inline]

Definition at line 61 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
PolynomialSolverBase< _Scalar, _Deg >::PolynomialSolverBase ( ) [inline]

Definition at line 64 of file PolynomialSolver.h.


Member Function Documentation

template<typename _Scalar, int _Deg>
const RealScalar& PolynomialSolverBase< _Scalar, _Deg >::absGreatestRealRoot ( bool hasArealRoot,
const RealScalar absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() 
) const [inline]
Returns:
a real root with greatest absolute magnitude. A real root is defined as the real part of a complex root with absolute imaginary part smallest than absImaginaryThreshold. absImaginaryThreshold takes the dummy_precision associated with the _Scalar template parameter of the PolynomialSolver class as the default value. If no real root is found the boolean hasArealRoot is set to false and the real part of the root with smallest absolute imaginary part is returned instead.
Parameters:
[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.

Definition at line 222 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
const RealScalar& PolynomialSolverBase< _Scalar, _Deg >::absSmallestRealRoot ( bool hasArealRoot,
const RealScalar absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() 
) const [inline]
Returns:
a real root with smallest absolute magnitude. A real root is defined as the real part of a complex root with absolute imaginary part smallest than absImaginaryThreshold. absImaginaryThreshold takes the dummy_precision associated with the _Scalar template parameter of the PolynomialSolver class as the default value. If no real root is found the boolean hasArealRoot is set to false and the real part of the root with smallest absolute imaginary part is returned instead.
Parameters:
[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.

Definition at line 245 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
const RealScalar& PolynomialSolverBase< _Scalar, _Deg >::greatestRealRoot ( bool hasArealRoot,
const RealScalar absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() 
) const [inline]
Returns:
the real root with greatest value. A real root is defined as the real part of a complex root with absolute imaginary part smallest than absImaginaryThreshold. absImaginaryThreshold takes the dummy_precision associated with the _Scalar template parameter of the PolynomialSolver class as the default value. If no real root is found the boolean hasArealRoot is set to false and the real part of the root with smallest absolute imaginary part is returned instead.
Parameters:
[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.

Definition at line 268 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
const RootType& PolynomialSolverBase< _Scalar, _Deg >::greatestRoot ( ) const [inline]
Returns:
the complex root with greatest norm.

Definition at line 112 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
template<typename Stl_back_insertion_sequence >
void PolynomialSolverBase< _Scalar, _Deg >::realRoots ( Stl_back_insertion_sequence &  bi_seq,
const RealScalar absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() 
) const [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.

Parameters:
[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.

Definition at line 82 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
const RootsType& PolynomialSolverBase< _Scalar, _Deg >::roots ( ) const [inline]
Returns:
the complex roots of the polynomial

Definition at line 68 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
template<typename squaredNormBinaryPredicate >
const RootType& PolynomialSolverBase< _Scalar, _Deg >::selectComplexRoot_withRespectToNorm ( squaredNormBinaryPredicate &  pred) const [inline, protected]

Definition at line 95 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
template<typename squaredRealPartBinaryPredicate >
const RealScalar& PolynomialSolverBase< _Scalar, _Deg >::selectRealRoot_withRespectToAbsRealPart ( squaredRealPartBinaryPredicate &  pred,
bool hasArealRoot,
const RealScalar absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() 
) const [inline, protected]

Definition at line 129 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
template<typename RealPartBinaryPredicate >
const RealScalar& PolynomialSolverBase< _Scalar, _Deg >::selectRealRoot_withRespectToRealPart ( RealPartBinaryPredicate &  pred,
bool hasArealRoot,
const RealScalar absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() 
) const [inline, protected]

Definition at line 169 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
template<typename OtherPolynomial >
void PolynomialSolverBase< _Scalar, _Deg >::setPolynomial ( const OtherPolynomial &  poly) [inline, protected]

Definition at line 56 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
const RealScalar& PolynomialSolverBase< _Scalar, _Deg >::smallestRealRoot ( bool hasArealRoot,
const RealScalar absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() 
) const [inline]
Returns:
the real root with smallest value. A real root is defined as the real part of a complex root with absolute imaginary part smallest than absImaginaryThreshold. absImaginaryThreshold takes the dummy_precision associated with the _Scalar template parameter of the PolynomialSolver class as the default value. If no real root is found the boolean hasArealRoot is set to false and the real part of the root with smallest absolute imaginary part is returned instead.
Parameters:
[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.

Definition at line 291 of file PolynomialSolver.h.

template<typename _Scalar, int _Deg>
const RootType& PolynomialSolverBase< _Scalar, _Deg >::smallestRoot ( ) const [inline]
Returns:
the complex root with smallest norm.

Definition at line 121 of file PolynomialSolver.h.


Member Data Documentation

template<typename _Scalar, int _Deg>
RootsType PolynomialSolverBase< _Scalar, _Deg >::m_roots [protected]

Definition at line 300 of file PolynomialSolver.h.


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


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:34:17