/external/eigen/unsupported/doc/examples/ |
PolynomialUtils1.cpp | 11 Eigen::Matrix<double,5,1> polynomial; local 12 roots_to_monicPolynomial( roots, polynomial ); 13 cout << "Polynomial: "; 14 for( int i=0; i<4; ++i ){ cout << polynomial[i] << ".x^" << i << "+ "; } 15 cout << polynomial[4] << ".x^4" << endl; 18 evaluation[i] = poly_eval( polynomial, roots[i] ); } 19 cout << "Evaluation of the polynomial at the roots: " << evaluation.transpose();
|
PolynomialSolver1.cpp | 14 Eigen::Matrix<double,6,1> polynomial; local 15 roots_to_monicPolynomial( roots, polynomial ); 17 PolynomialSolver<double,5> psolve( polynomial ); 31 cout << "Hard case polynomial defined by floats: " << hardCase_polynomial.transpose() << endl; 36 cout << "Norms of the evaluations of the polynomial at the roots: " << evals.transpose() << endl << endl; 47 cout << "Norms of the evaluations of the polynomial at the roots: " << evals.transpose() << endl << endl;
|
/external/ceres-solver/internal/ceres/ |
polynomial.h | 44 // sum_{i=0}^N polynomial(i) x^{N-i}. 48 // Evaluate the polynomial at x using the Horner scheme. 49 inline double EvaluatePolynomial(const Vector& polynomial, double x) { 51 for (int i = 0; i < polynomial.size(); ++i) { 52 v = v * x + polynomial(i); 58 // polynomial. 61 // Failure indicates that the polynomial is invalid (of size 0) or 66 bool FindPolynomialRoots(const Vector& polynomial, 70 // Return the derivative of the given polynomial. It is assumed that 71 // the input polynomial is at least of degree zero [all...] |
polynomial.cc | 32 #include "ceres/polynomial.h" 102 void BuildCompanionMatrix(const Vector& polynomial, 107 const int degree = polynomial.size() - 1; 112 companion_matrix.col(degree - 1) = -polynomial.reverse().head(degree); 124 void FindLinearPolynomialRoots(const Vector& polynomial, 127 CHECK_EQ(polynomial.size(), 2); 130 (*real)(0) = -polynomial(1) / polynomial(0); 138 void FindQuadraticPolynomialRoots(const Vector& polynomial, 141 CHECK_EQ(polynomial.size(), 3) 190 Vector polynomial = RemoveLeadingZeros(polynomial_in); local 377 const Vector polynomial = FindInterpolatingPolynomial(samples); local [all...] |
polynomial_test.cc | 32 #include "ceres/polynomial.h" 49 // Return the constant polynomial p(x) = 1.23. 56 // Return the polynomial p(x) = poly(x) * (x - root). 65 // Return the polynomial 85 // Run a test with the polynomial defined by the N real roots in roots_real. 118 TEST(Polynomial, InvalidPolynomialOfZeroLengthIsRejected) { 129 TEST(Polynomial, ConstantPolynomialReturnsNoRoots) { 140 TEST(Polynomial, LinearPolynomialWithPositiveRootWorks) { 145 TEST(Polynomial, LinearPolynomialWithNegativeRootWorks) { 150 TEST(Polynomial, QuadraticPolynomialWithPositiveRootsWorks) 321 const Vector polynomial = FindInterpolatingPolynomial(samples); local 339 const Vector polynomial = FindInterpolatingPolynomial(samples); local 367 Vector polynomial = FindInterpolatingPolynomial(samples); local 397 const Vector polynomial = FindInterpolatingPolynomial(samples); local 440 const Vector polynomial = FindInterpolatingPolynomial(samples); local 477 const Vector polynomial = FindInterpolatingPolynomial(samples); local 508 const Vector polynomial = FindInterpolatingPolynomial(samples); local [all...] |
dogleg_strategy.cc | 39 #include "ceres/polynomial.h" 299 // polynomial in y, which can be solved using e.g. the companion matrix. 322 LOG(WARNING) << "Failed to compute polynomial roots. " 367 // Build the polynomial that defines the optimal Lagrange multipliers. 408 // So (7) is a polynomial in y of degree four. 426 Vector polynomial(5); 427 polynomial(0) = r2; 428 polynomial(1) = 2.0 * r2 * trB; 429 polynomial(2) = r2 * (trB * trB + 2.0 * detB) - subspace_g_.squaredNorm(); 430 polynomial(3) = -2.0 * (subspace_g_.transpose() * B_adj * subspace_g 478 const Vector polynomial = MakePolynomialForBoundaryConstrainedProblem(); local [all...] |
/external/chromium_org/third_party/mesa/src/src/gallium/auxiliary/gallivm/ |
f.cpp | 13 * This file allows to compute the minimax polynomial coefficients we use 34 * - For example, to compute exp2 5th order polynomial between [0, 1] do: 44 * - To compute log2 4th order polynomial between [0, 1/9] do: 58 #include <boost/math/tools/polynomial.hpp> 88 const boost::math::tools::polynomial<boost::math::ntl::RR>& n, 89 const boost::math::tools::polynomial<boost::math::ntl::RR>& d,
|
/external/mesa3d/src/gallium/auxiliary/gallivm/ |
f.cpp | 13 * This file allows to compute the minimax polynomial coefficients we use 34 * - For example, to compute exp2 5th order polynomial between [0, 1] do: 44 * - To compute log2 4th order polynomial between [0, 1/9] do: 58 #include <boost/math/tools/polynomial.hpp> 88 const boost::math::tools::polynomial<boost::math::ntl::RR>& n, 89 const boost::math::tools::polynomial<boost::math::ntl::RR>& d,
|
/external/chromium_org/v8/third_party/fdlibm/ |
fdlibm.js | 120 // 2. ieee_sin(x) is approximated by a polynomial of degree 13 on 157 // 2. ieee_cos(x) is approximated by a polynomial of degree 14 on 215 // 3. ieee_tan(x) is approximated by a odd polynomial of degree 27 on 382 // a polynomial of degree 14 to approximate R The maximum error 383 // of this polynomial approximation is bounded by 2**-58.45. In 545 // a polynomial of degree 5 in r*r to approximate R1. The 546 // maximum error of this polynomial approximation is bounded
|
/external/ceres-solver/ |
Android.mk | 165 $(CERES_SRC_PATH)/polynomial.cc \
|
/external/ceres-solver/jni/ |
Android.mk | 156 $(CERES_SRC_PATH)/polynomial.cc \
|