HomeSort by relevance Sort by last modified time
    Searched refs:roots (Results 1 - 25 of 115) sorted by null

1 2 3 4 5

  /external/chromium_org/third_party/skia/experimental/Intersection/
QuarticRoot_Test.cpp 32 double roots[2]; local
33 const int rootCount = limit ? quadraticRootsValidT(A, b, c, roots)
34 : quadraticRootsReal(A, b, c, roots);
46 SkASSERT(approximately_equal(roots[0], -B)
47 || approximately_equal(roots[0], -C));
49 SkASSERT(!approximately_equal(roots[0], roots[1]));
50 SkASSERT(approximately_equal(roots[1], -B)
51 || approximately_equal(roots[1], -C));
71 double roots[3] local
130 double roots[4]; local
    [all...]
Extrema.cpp 32 static int findUnitQuadRoots(double A, double B, double C, double roots[2])
35 return validUnitDivide(-C, B, roots);
37 double* r = roots;
40 if (R < 0) { // complex roots
48 if (r - roots == 2 && AlmostEqualUlps(roots[0], roots[1])) { // nearly-equal?
51 return (int)(r - roots);
QuadraticBounds.cpp 28 int roots = 0; local
30 roots = findExtrema(quad[0].x, quad[1].x, quad[2].x, tValues);
33 roots += findExtrema(quad[0].y, quad[1].y, quad[2].y, &tValues[roots]);
35 for (int x = 0; x < roots; ++x) {
CubicBounds.cpp 47 int roots = 0; local
49 roots = findExtrema(cubic[0].x, cubic[1].x, cubic[2].x, cubic[3].x, tValues);
52 roots += findExtrema(cubic[0].y, cubic[1].y, cubic[2].y, cubic[3].y, &tValues[roots]);
54 for (int x = 0; x < roots; ++x) {
LineCubicIntersection.cpp 90 int intersectRay(double roots[3]) {
99 return cubicRootsValidT(A, B, C, D, roots);
105 int roots = intersectRay(rootVals); local
106 for (int index = 0; index < roots; ++index) {
118 int horizontalIntersect(double axisIntercept, double roots[3]) {
122 return cubicRootsValidT(A, B, C, D, roots);
128 int roots = horizontalIntersect(axisIntercept, rootVals); local
129 for (int index = 0; index < roots; ++index) {
144 int verticalIntersect(double axisIntercept, double roots[3]) {
148 return cubicRootsValidT(A, B, C, D, roots);
154 int roots = verticalIntersect(axisIntercept, rootVals); local
226 int roots = intersections.fUsed; local
    [all...]
LineQuadraticIntersection.cpp 100 int intersectRay(double roots[2]) {
102 solve by rotating line+quad so line is horizontal, then finding the roots
127 return quadraticRootsValidT(A, 2 * B, C, roots);
133 int roots = intersectRay(rootVals); local
134 for (int index = 0; index < roots; ++index) {
146 int horizontalIntersect(double axisIntercept, double roots[2]) {
153 return quadraticRootsValidT(D, 2 * E, F, roots);
159 int roots = horizontalIntersect(axisIntercept, rootVals); local
160 for (int index = 0; index < roots; ++index) {
175 int verticalIntersect(double axisIntercept, double roots[2])
188 int roots = verticalIntersect(axisIntercept, rootVals); local
261 int roots = intersections.fUsed; local
298 int roots = q.horizontalIntersect(pt.y, rootVals); local
313 int roots = q.verticalIntersect(pt.x, rootVals); local
    [all...]
QuarticRoot.cpp 5 * Utility functions to find cubic and quartic roots,
10 * The functions return the number of non-complex roots and
24 * correct but multiple roots might be reported more
34 const double t0, const bool oneHint, double roots[4]) {
85 return quadraticRootsReal(t2, t1, t0, roots);
88 return cubicRootsReal(t3, t2, t1, t0, roots);
95 int num = cubicRootsReal(t4, t3, t2, t1, roots);
97 if (approximately_zero(roots[i])) {
101 roots[num++] = 0;
106 int num = cubicRootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots); // note that -C==A+B+D+
141 int roots = cubicRootsReal(1, -p \/ 2, -r, r * p \/ 2 - q * q \/ 8, cubicRoots); local
    [all...]
LineCubicIntersection_Test.cpp 43 int roots = intersect(reduce1, reduce2, i); local
44 for (int pt = 0; pt < roots; ++pt) {
CubicUtilities.cpp 102 // cubic roots
125 double* roots = t;
128 if (R2MinusQ3 < 0) // we have 3 real roots
135 *roots++ = r;
139 *roots++ = r;
143 *roots++ = r;
157 *roots++ = r;
159 return (int)(roots - t);
224 double* roots = s; local
228 *roots++ = -adiv3
389 int roots = findExtrema(sub[0].y, sub[1].y, sub[2].y, sub[3].y, extremeTs); local
    [all...]
  /external/eigen/unsupported/doc/examples/
PolynomialSolver1.cpp 12 Vector5d roots = Vector5d::Random(); local
13 cout << "Roots: " << roots.transpose() << endl;
15 roots_to_monicPolynomial( roots, polynomial );
18 cout << "Complex roots: " << psolve.roots().transpose() << endl;
23 cout << "Real roots: " << mapRR.transpose() << endl;
33 cout << "Complex roots: " << psolvef.roots().transpose() << endl;
35 for( int i=0; i<6; ++i ){ evals[i] = std::abs( poly_eval( hardCase_polynomial, psolvef.roots()[i] ) );
    [all...]
PolynomialUtils1.cpp 9 Vector4d roots = Vector4d::Random(); local
10 cout << "Roots: " << roots.transpose() << endl;
12 roots_to_monicPolynomial( roots, polynomial );
18 evaluation[i] = poly_eval( polynomial, roots[i] ); }
19 cout << "Evaluation of the polynomial at the roots: " << evaluation.transpose();
  /external/chromium_org/third_party/skia/src/pathops/
SkPathOpsRect.cpp 21 int roots = 0; local
23 roots = SkDQuad::FindExtrema(quad[0].fX, quad[1].fX, quad[2].fX, tValues);
26 roots += SkDQuad::FindExtrema(quad[0].fY, quad[1].fY, quad[2].fY, &tValues[roots]);
28 for (int x = 0; x < roots; ++x) {
48 int roots = 0; local
50 roots = SkDCubic::FindExtrema(c[0].fX, c[1].fX, c[2].fX, c[3].fX, tValues);
53 roots += SkDCubic::FindExtrema(c[0].fY, c[1].fY, c[2].fY, c[3].fY, &tValues[roots]);
55 for (int x = 0; x < roots; ++x)
    [all...]
SkQuarticRoot.cpp 5 * Utility functions to find cubic and quartic roots,
10 * The functions return the number of non-complex roots and
24 * correct but multiple roots might be reported more
33 const double t0, const bool oneHint, double roots[4]) {
54 return SkDQuad::RootsReal(t2, t1, t0, roots);
57 return SkDCubic::RootsReal(t3, t2, t1, t0, roots);
64 int num = SkDCubic::RootsReal(t4, t3, t2, t1, roots);
66 if (approximately_zero(roots[i])) {
70 roots[num++] = 0;
78 int num = SkDCubic::RootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots);
114 int roots = SkDCubic::RootsReal(1, -p \/ 2, -r, r * p \/ 2 - q * q \/ 8, cubicRoots); local
    [all...]
SkDCubicLineIntersection.cpp 97 int intersectRay(double roots[3]) {
106 int count = SkDCubic::RootsValidT(A, B, C, D, roots);
108 SkDPoint calcPt = c.ptAtT(roots[index]);
116 count = c.searchRoots(extremeTs, extrema, 0, SkDCubic::kXAxis, roots);
129 int roots = intersectRay(rootVals); local
130 for (int index = 0; index < roots; ++index) {
163 static int HorizontalIntersect(const SkDCubic& c, double axisIntercept, double roots[3]) {
167 int count = SkDCubic::RootsValidT(A, B, C, D, roots);
169 SkDPoint calcPt = c.ptAtT(roots[index]);
173 count = c.searchRoots(extremeTs, extrema, axisIntercept, SkDCubic::kYAxis, roots);
185 double roots[3]; local
225 double roots[3]; local
    [all...]
SkDQuadLineIntersection.cpp 108 int intersectRay(double roots[2]) {
110 solve by rotating line+quad so line is horizontal, then finding the roots
135 return SkDQuad::RootsValidT(A, 2 * B, C, roots);
147 int roots = intersectRay(rootVals); local
148 for (int index = 0; index < roots; ++index) {
160 int horizontalIntersect(double axisIntercept, double roots[2]) {
167 return SkDQuad::RootsValidT(D, 2 * E, F, roots);
176 int roots = horizontalIntersect(axisIntercept, rootVals); local
177 for (int index = 0; index < roots; ++index) {
191 int verticalIntersect(double axisIntercept, double roots[2])
207 int roots = verticalIntersect(axisIntercept, rootVals); local
    [all...]
  /development/perftests/panorama/feature_stab/db_vlvm/
db_utilities_poly.cpp 28 void db_SolveCubic(double *roots,int *nr_roots,double a,double b,double c,double d)
35 /*For nondegenerate cubics with three roots
40 if(a==0.0) db_SolveQuadratic(roots,nr_roots,b,c,d);
68 roots[0]= -2.0*srq*cos_theta_through3-bp_through3;
69 roots[1]=srq*min2_cos_theta_plu-bp_through3;
70 roots[2]=srq*min2_cos_theta_min-bp_through3;
77 if(A!=0.0) roots[0]=A+q/A-bp_through3;
78 else roots[0]= -bp_through3;
87 roots[0]= -2.0*si_r_srq-bp_through3;
89 roots[1]=si_r_srq-bp_through3
    [all...]
  /external/eigen/unsupported/test/
polynomialutils.cpp 36 EvalRootsType roots = EvalRootsType::Random(deg); local
37 roots_to_monicPolynomial( roots, pols );
40 for( int i=0; i<roots.size(); ++i ){
41 evr[i] = std::abs( poly_eval( pols, roots[i] ) ); }
74 EvalRootsType roots = EvalRootsType::Random(deg); local
75 roots_to_monicPolynomial( roots, pols );
78 _Scalar Max = roots.array().abs().maxCoeff();
79 _Scalar min = roots.array().abs().minCoeff();
83 cerr << "Roots: " << roots << endl
    [all...]
polynomialsolver.cpp 42 const RootsType& roots( psolve.roots() );
44 for( int i=0; i<roots.size(); ++i ){
45 evr[i] = std::abs( poly_eval( pols, roots[i] ) ); }
52 cerr << "Roots found: " << roots.transpose() << endl;
53 cerr << "Abs value of the polynomial at the roots: " << evr.transpose() << endl;
57 std::vector<Scalar> rootModuli( roots.size() );
58 Map< EvalRootsType > aux( &rootModuli[0], roots.size() );
59 aux = roots.array().abs()
    [all...]
  /external/eigen/bench/
eig33.cpp 48 template<typename Matrix, typename Roots>
49 inline void computeRoots(const Matrix& m, Roots& roots)
56 // eigenvalues are the roots to this equation, all guaranteed to be
62 // Construct the parameters used in classifying the roots of the equation
63 // and in solving the equation for the roots in closed form.
75 // Compute the eigenvalues by solving for the roots of the polynomial.
80 roots(0) = c2_over_3 + Scalar(2)*rho*cos_theta;
81 roots(1) = c2_over_3 - rho*(cos_theta + s_sqrt3*sin_theta);
82 roots(2) = c2_over_3 - rho*(cos_theta - s_sqrt3*sin_theta)
    [all...]
  /external/ceres-solver/internal/ceres/
polynomial_test.cc 78 // Needed because the roots are not returned in sorted order.
85 // Run a test with the polynomial defined by the N real roots in roots_real.
141 const double roots[1] = { 42.42 }; local
142 RunPolynomialTestRealRoots(roots, true, true, kEpsilon);
146 const double roots[1] = { -42.42 }; local
147 RunPolynomialTestRealRoots(roots, true, true, kEpsilon);
151 const double roots[2] = { 1.0, 42.42 }; local
152 RunPolynomialTestRealRoots(roots, true, true, kEpsilon);
156 const double roots[2] = { -42.42, 1.0 }; local
157 RunPolynomialTestRealRoots(roots, true, true, kEpsilon)
161 const double roots[2] = { -42.42, -1.0 }; local
166 const double roots[2] = { 42.42, 42.43 }; local
189 const double roots[4] = { 1.23e-4, 1.23e-1, 1.23e+2, 1.23e+5 }; local
194 const double roots[4] = { 1.23e-1, 2.46e-1, 1.23e+5, 2.46e+5 }; local
199 const double roots[4] = { -42.42, 0.0, 0.0, 42.42 }; local
204 const double roots[4] = { 0.0, 0.0, 0.0, 0.0 }; local
209 const double roots[4] = { 1.23e-4, 1.23e-1, 1.23e+2, 1.23e+5 }; local
214 const double roots[4] = { 1.23e-4, 1.23e-1, 1.23e+2, 1.23e+5 }; local
219 const double roots[4] = { 1.23e-4, 1.23e-1, 1.23e+2, 1.23e+5 }; local
    [all...]
  /build/tools/
fileslist.py 26 roots = argv[1:]
27 for root in roots:
  /external/chromium_org/chrome/browser/
memory_details_android.cc 72 const std::set<ProcessId>& roots,
74 *out = roots;
77 for (std::set<ProcessId>::const_iterator i = roots.begin(); i != roots.end();
121 std::set<ProcessId> roots; local
122 roots.insert(base::GetCurrentProcId());
125 roots.insert(i->pid);
129 GetAllChildren(processes, roots, &current_browser_processes);
  /external/chromium_org/third_party/skia/src/core/
SkQuadClipper.cpp 32 SkScalar roots[2]; // we only expect one, but make room for 2 for safety local
33 int count = SkFindUnitQuadRoots(A, B, C, roots);
35 *t = roots[0];
  /external/chromium_org/chrome/browser/media_galleries/
media_folder_finder.h 65 void SetRootsForTesting(const std::vector<base::FilePath>& roots);
67 void OnInitialized(const std::vector<base::FilePath>& roots);
87 // Set of roots to scan for testing.
  /external/eigen/Eigen/src/Eigenvalues/
SelfAdjointEigenSolver.h 494 static inline void computeRoots(const MatrixType& m, VectorType& roots)
504 // eigenvalues are the roots to this equation, all guaranteed to be
510 // Construct the parameters used in classifying the roots of the equation
511 // and in solving the equation for the roots in closed form.
523 // Compute the eigenvalues by solving for the roots of the polynomial.
528 roots(0) = c2_over_3 + Scalar(2)*rho*cos_theta;
529 roots(1) = c2_over_3 - rho*(cos_theta + s_sqrt3*sin_theta);
530 roots(2) = c2_over_3 - rho*(cos_theta - s_sqrt3*sin_theta);
533 if (roots(0) >= roots(1)
    [all...]

Completed in 696 milliseconds

1 2 3 4 5