• Home
  • Raw
  • Download

Lines Matching refs:poly

28 T poly_eval_horner( const Polynomials& poly, const T& x )  in poly_eval_horner()  argument
30 T val=poly[poly.size()-1]; in poly_eval_horner()
31 for(DenseIndex i=poly.size()-2; i>=0; --i ){ in poly_eval_horner()
32 val = val*x + poly[i]; } in poly_eval_horner()
46 T poly_eval( const Polynomials& poly, const T& x ) in poly_eval() argument
51 return poly_eval_horner( poly, x ); } in poly_eval()
54 T val=poly[0]; in poly_eval()
56 for( DenseIndex i=1; i<poly.size(); ++i ){ in poly_eval()
57 val = val*inv_x + poly[i]; } in poly_eval()
59 return std::pow(x,(T)(poly.size()-1)) * val; in poly_eval()
75 typename NumTraits<typename Polynomial::Scalar>::Real cauchy_max_bound( const Polynomial& poly ) in cauchy_max_bound() argument
81 eigen_assert( Scalar(0) != poly[poly.size()-1] ); in cauchy_max_bound()
82 const Scalar inv_leading_coeff = Scalar(1)/poly[poly.size()-1]; in cauchy_max_bound()
85 for( DenseIndex i=0; i<poly.size()-1; ++i ){ in cauchy_max_bound()
86 cb += abs(poly[i]*inv_leading_coeff); } in cauchy_max_bound()
98 typename NumTraits<typename Polynomial::Scalar>::Real cauchy_min_bound( const Polynomial& poly ) in cauchy_min_bound() argument
105 while( i<poly.size()-1 && Scalar(0) == poly(i) ){ ++i; } in cauchy_min_bound()
106 if( poly.size()-1 == i ){ in cauchy_min_bound()
109 const Scalar inv_min_coeff = Scalar(1)/poly[i]; in cauchy_min_bound()
111 for( DenseIndex j=i+1; j<poly.size(); ++j ){ in cauchy_min_bound()
112 cb += abs(poly[j]*inv_min_coeff); } in cauchy_min_bound()
127 void roots_to_monicPolynomial( const RootVector& rv, Polynomial& poly ) in roots_to_monicPolynomial() argument
132 poly.setZero( rv.size()+1 ); in roots_to_monicPolynomial()
133 poly[0] = -rv[0]; poly[1] = Scalar(1); in roots_to_monicPolynomial()
136 for( DenseIndex j=i+1; j>0; --j ){ poly[j] = poly[j-1] - rv[i]*poly[j]; } in roots_to_monicPolynomial()
137 poly[0] = -rv[i]*poly[0]; in roots_to_monicPolynomial()