Go to the documentation of this file.
10 #ifndef EIGEN_POLYNOMIAL_SOLVER_H
11 #define EIGEN_POLYNOMIAL_SOLVER_H
28 template<
typename _Scalar,
int _Deg >
42 template< typename OtherPolynomial >
47 template<
typename OtherPolynomial >
68 template<
typename Stl_back_insertion_sequence>
69 inline void realRoots( Stl_back_insertion_sequence& bi_seq,
82 template<
typename squaredNormBinaryPredicate>
90 if( pred( currNorm2,
norm2 ) ){
102 std::greater<RealScalar> greater;
111 std::less<RealScalar> less;
116 template<
typename squaredRealPartBinaryPredicate>
118 squaredRealPartBinaryPredicate& pred,
123 hasArealRoot =
false;
140 if( pred( currAbs2,
abs2 ) )
147 else if(!hasArealRoot)
157 template<
typename RealPartBinaryPredicate>
159 RealPartBinaryPredicate& pred,
164 hasArealRoot =
false;
181 if( pred( curr, val ) )
216 std::greater<RealScalar> greater;
239 std::less<RealScalar> less;
262 std::greater<RealScalar> greater;
285 std::less<RealScalar> less;
293 #define EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES( BASE ) \
294 typedef typename BASE::Scalar Scalar; \
295 typedef typename BASE::RealScalar RealScalar; \
296 typedef typename BASE::RootType RootType; \
297 typedef typename BASE::RootsType RootsType;
330 template<
typename _Scalar,
int _Deg>
347 template< typename OtherPolynomial >
378 else if(poly.size () == 2)
386 template<
typename OtherPolynomial >
398 template<
typename _Scalar >
407 template<
typename OtherPolynomial >
416 template<
typename OtherPolynomial >
428 #endif // EIGEN_POLYNOMIAL_SOLVER_H
PolynomialSolverBase(const OtherPolynomial &poly)
Namespace containing all symbols from the Eigen library.
const RootType & selectComplexRoot_withRespectToNorm(squaredNormBinaryPredicate &pred) const
const RootsType & roots() const
EigenSolverType m_eigenSolver
Defined to be inherited by polynomial solvers: it provides convenient methods such as.
T poly_eval(const Polynomials &poly, const T &x)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Abs2ReturnType abs2() const
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
internal::conditional< NumTraits< Scalar >::IsComplex, Scalar, std::complex< Scalar > >::type ComplexScalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
const RealScalar & smallestRealRoot(bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
DenseCompanionMatrixType denseMatrix() const
#define EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES(BASE)
EIGEN_DEVICE_FUNC internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar &x)
const EIGEN_DEVICE_FUNC ImagReturnType imag() const
PolynomialSolver(const OtherPolynomial &poly)
const RealScalar & absGreatestRealRoot(bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
Jet< T, N > pow(const Jet< T, N > &f, double g)
const AutoDiffScalar< DerType > & real(const AutoDiffScalar< DerType > &x)
EIGEN_DEVICE_FUNC bool abs2(bool x)
DerType::Scalar imag(const AutoDiffScalar< DerType > &)
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
const RootType & smallestRoot() const
Computes eigenvalues and eigenvectors of general complex matrices.
NumTraits< Scalar >::Real RealScalar
PolynomialSolverBase< _Scalar, 1 > PS_Base
const RealScalar & selectRealRoot_withRespectToRealPart(RealPartBinaryPredicate &pred, bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
mp::number< mp::cpp_dec_float< 100 >, mp::et_on > Real
const RootType & greatestRoot() const
Computes eigenvalues and eigenvectors of general matrices.
const RealScalar & greatestRealRoot(bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
The matrix class, also used for vectors and row-vectors.
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE internal::enable_if< NumTraits< T >::IsSigned||NumTraits< T >::IsComplex, typename NumTraits< T >::Real >::type abs(const T &x)
void compute(const OtherPolynomial &poly)
double norm2(const Point2 &p, OptionalJacobian< 1, 2 > H)
Distance of the point from the origin, with Jacobian.
const RealScalar & selectRealRoot_withRespectToAbsRealPart(squaredRealPartBinaryPredicate &pred, bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
std::complex< RealScalar > RootType
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
void realRoots(Stl_back_insertion_sequence &bi_seq, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
void compute(const OtherPolynomial &poly)
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar, Size)
const RealScalar & absSmallestRealRoot(bool &hasArealRoot, const RealScalar &absImaginaryThreshold=NumTraits< Scalar >::dummy_precision()) const
void setPolynomial(const OtherPolynomial &poly)
PolynomialSolver(const OtherPolynomial &poly)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:36