Home
last modified time | relevance | path

Searched full:roots (Results 1 – 25 of 462) sorted by relevance

12345678910>>...19

/external/smali/util/src/test/java/org/jf/util/
DPathUtilTest.java39 File[] roots = File.listRoots(); in pathUtilTest1() local
41 if (roots.length > 1) { in pathUtilTest1()
42 …File basePath = new File(roots[0] + "some" + File.separatorChar + "dir" + File.separatorChar + "te… in pathUtilTest1()
43 …File relativePath = new File(roots[1] + "some" + File.separatorChar + "dir" + File.separatorChar +… in pathUtilTest1()
53 File[] roots = File.listRoots(); in pathUtilTest2() local
55 …File basePath = new File(roots[0] + "some" + File.separatorChar + "dir" + File.separatorChar + "te… in pathUtilTest2()
56 …File relativePath = new File(roots[0] + "some" + File.separatorChar + "dir" + File.separatorChar +… in pathUtilTest2()
68 File[] roots = File.listRoots(); in pathUtilTest3() local
70 … File basePath = new File(roots[0] + "some" + File.separatorChar + "dir" + File.separatorChar); in pathUtilTest3()
71 … File relativePath = new File(roots[0] + "some" + File.separatorChar + "dir" + File.separatorChar); in pathUtilTest3()
[all …]
/external/skia/experimental/Intersection/
DQuarticRoot_Test.cpp32 double roots[2]; in quadraticTest() local
33 const int rootCount = limit ? quadraticRootsValidT(A, b, c, roots) in quadraticTest()
34 : quadraticRootsReal(A, b, c, roots); in quadraticTest()
46 SkASSERT(approximately_equal(roots[0], -B) in quadraticTest()
47 || approximately_equal(roots[0], -C)); in quadraticTest()
49 SkASSERT(!approximately_equal(roots[0], roots[1])); in quadraticTest()
50 SkASSERT(approximately_equal(roots[1], -B) in quadraticTest()
51 || approximately_equal(roots[1], -C)); in quadraticTest()
71 double roots[3]; in testOneCubic() local
72 const int rootCount = limit ? cubicRootsValidT(A, b, c, d, roots) in testOneCubic()
[all …]
DQuarticRoot.cpp5 * 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]) { in reducedQuarticRoots()
85 return quadraticRootsReal(t2, t1, t0, roots); in reducedQuarticRoots()
88 return cubicRootsReal(t3, t2, t1, t0, roots); in reducedQuarticRoots()
95 int num = cubicRootsReal(t4, t3, t2, t1, roots); in reducedQuarticRoots()
97 if (approximately_zero(roots[i])) { in reducedQuarticRoots()
101 roots[num++] = 0; in reducedQuarticRoots()
106 int num = cubicRootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots); // note that -C==A+B+D+E in reducedQuarticRoots()
[all …]
DExtrema.cpp32 static int findUnitQuadRoots(double A, double B, double C, double roots[2]) in findUnitQuadRoots()
35 return validUnitDivide(-C, B, roots); in findUnitQuadRoots()
37 double* r = roots; in findUnitQuadRoots()
40 if (R < 0) { // complex roots in findUnitQuadRoots()
48 if (r - roots == 2 && AlmostEqualUlps(roots[0], roots[1])) { // nearly-equal? in findUnitQuadRoots()
51 return (int)(r - roots); in findUnitQuadRoots()
DCubicUtilities.cpp102 // cubic roots
125 double* roots = t; in cubicRootsValidT()
128 if (R2MinusQ3 < 0) // we have 3 real roots in cubicRootsValidT()
135 *roots++ = r; in cubicRootsValidT()
139 *roots++ = r; in cubicRootsValidT()
143 *roots++ = r; in cubicRootsValidT()
157 *roots++ = r; in cubicRootsValidT()
159 return (int)(roots - t); in cubicRootsValidT()
224 double* roots = s; in cubicRootsReal() local
228 *roots++ = -adiv3; in cubicRootsReal()
[all …]
DLineQuadraticIntersection.cpp100 int intersectRay(double roots[2]) { in intersectRay()
102 solve by rotating line+quad so line is horizontal, then finding the roots in intersectRay()
127 return quadraticRootsValidT(A, 2 * B, C, roots); in intersectRay()
133 int roots = intersectRay(rootVals); in intersect() local
134 for (int index = 0; index < roots; ++index) { in intersect()
146 int horizontalIntersect(double axisIntercept, double roots[2]) { in horizontalIntersect()
153 return quadraticRootsValidT(D, 2 * E, F, roots); in horizontalIntersect()
159 int roots = horizontalIntersect(axisIntercept, rootVals); in horizontalIntersect() local
160 for (int index = 0; index < roots; ++index) { in horizontalIntersect()
175 int verticalIntersect(double axisIntercept, double roots[2]) { in verticalIntersect()
[all …]
/external/chromium_org/third_party/skia/experimental/Intersection/
DQuarticRoot_Test.cpp32 double roots[2]; in quadraticTest() local
33 const int rootCount = limit ? quadraticRootsValidT(A, b, c, roots) in quadraticTest()
34 : quadraticRootsReal(A, b, c, roots); in quadraticTest()
46 SkASSERT(approximately_equal(roots[0], -B) in quadraticTest()
47 || approximately_equal(roots[0], -C)); in quadraticTest()
49 SkASSERT(!approximately_equal(roots[0], roots[1])); in quadraticTest()
50 SkASSERT(approximately_equal(roots[1], -B) in quadraticTest()
51 || approximately_equal(roots[1], -C)); in quadraticTest()
71 double roots[3]; in testOneCubic() local
72 const int rootCount = limit ? cubicRootsValidT(A, b, c, d, roots) in testOneCubic()
[all …]
DQuarticRoot.cpp5 * 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]) { in reducedQuarticRoots()
85 return quadraticRootsReal(t2, t1, t0, roots); in reducedQuarticRoots()
88 return cubicRootsReal(t3, t2, t1, t0, roots); in reducedQuarticRoots()
95 int num = cubicRootsReal(t4, t3, t2, t1, roots); in reducedQuarticRoots()
97 if (approximately_zero(roots[i])) { in reducedQuarticRoots()
101 roots[num++] = 0; in reducedQuarticRoots()
106 int num = cubicRootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots); // note that -C==A+B+D+E in reducedQuarticRoots()
[all …]
DExtrema.cpp32 static int findUnitQuadRoots(double A, double B, double C, double roots[2]) in findUnitQuadRoots()
35 return validUnitDivide(-C, B, roots); in findUnitQuadRoots()
37 double* r = roots; in findUnitQuadRoots()
40 if (R < 0) { // complex roots in findUnitQuadRoots()
48 if (r - roots == 2 && AlmostEqualUlps(roots[0], roots[1])) { // nearly-equal? in findUnitQuadRoots()
51 return (int)(r - roots); in findUnitQuadRoots()
DCubicUtilities.cpp102 // cubic roots
125 double* roots = t; in cubicRootsValidT()
128 if (R2MinusQ3 < 0) // we have 3 real roots in cubicRootsValidT()
135 *roots++ = r; in cubicRootsValidT()
139 *roots++ = r; in cubicRootsValidT()
143 *roots++ = r; in cubicRootsValidT()
157 *roots++ = r; in cubicRootsValidT()
159 return (int)(roots - t); in cubicRootsValidT()
224 double* roots = s; in cubicRootsReal() local
228 *roots++ = -adiv3; in cubicRootsReal()
[all …]
DLineQuadraticIntersection.cpp100 int intersectRay(double roots[2]) { in intersectRay()
102 solve by rotating line+quad so line is horizontal, then finding the roots in intersectRay()
127 return quadraticRootsValidT(A, 2 * B, C, roots); in intersectRay()
133 int roots = intersectRay(rootVals); in intersect() local
134 for (int index = 0; index < roots; ++index) { in intersect()
146 int horizontalIntersect(double axisIntercept, double roots[2]) { in horizontalIntersect()
153 return quadraticRootsValidT(D, 2 * E, F, roots); in horizontalIntersect()
159 int roots = horizontalIntersect(axisIntercept, rootVals); in horizontalIntersect() local
160 for (int index = 0; index < roots; ++index) { in horizontalIntersect()
175 int verticalIntersect(double axisIntercept, double roots[2]) { in verticalIntersect()
[all …]
/external/eigen/unsupported/doc/examples/
DPolynomialSolver1.cpp12 Vector5d roots = Vector5d::Random(); in main() local
13 cout << "Roots: " << roots.transpose() << endl; in main()
15 roots_to_monicPolynomial( roots, polynomial ); in main()
18 cout << "Complex roots: " << psolve.roots().transpose() << endl; in main()
23 cout << "Real roots: " << mapRR.transpose() << endl; in main()
33 cout << "Complex roots: " << psolvef.roots().transpose() << endl; in main()
35 …for( int i=0; i<6; ++i ){ evals[i] = std::abs( poly_eval( hardCase_polynomial, psolvef.roots()[i] … in main()
36 …cout << "Norms of the evaluations of the polynomial at the roots: " << evals.transpose() << endl <… in main()
41 cout << "Complex roots: " << psolve6d.roots().transpose() << endl; in main()
44 std::complex<float> castedRoot( psolve6d.roots()[i].real(), psolve6d.roots()[i].imag() ); in main()
[all …]
DPolynomialUtils1.cpp9 Vector4d roots = Vector4d::Random(); in main() local
10 cout << "Roots: " << roots.transpose() << endl; in main()
12 roots_to_monicPolynomial( roots, polynomial ); in main()
18 evaluation[i] = poly_eval( polynomial, roots[i] ); } in main()
19 cout << "Evaluation of the polynomial at the roots: " << evaluation.transpose(); in main()
/external/eigen/bench/
Deig33.cpp48 template<typename Matrix, typename Roots>
49 inline void computeRoots(const Matrix& m, Roots& roots) in computeRoots() argument
56 // eigenvalues are the roots to this equation, all guaranteed to be in computeRoots()
62 // Construct the parameters used in classifying the roots of the equation in computeRoots()
63 // and in solving the equation for the roots in closed form. in computeRoots()
75 // Compute the eigenvalues by solving for the roots of the polynomial. in computeRoots()
80 roots(0) = c2_over_3 + Scalar(2)*rho*cos_theta; in computeRoots()
81 roots(1) = c2_over_3 - rho*(cos_theta + s_sqrt3*sin_theta); in computeRoots()
82 roots(2) = c2_over_3 - rho*(cos_theta - s_sqrt3*sin_theta); in computeRoots()
85 if (roots(0) >= roots(1)) in computeRoots()
[all …]
/external/eigen/unsupported/test/
Dpolynomialsolver.cpp42 const RootsType& roots( psolve.roots() ); in aux_evalSolver() local
44 for( int i=0; i<roots.size(); ++i ){ in aux_evalSolver()
45 evr[i] = std::abs( poly_eval( pols, roots[i] ) ); } in aux_evalSolver()
52 cerr << "Roots found: " << roots.transpose() << endl; in aux_evalSolver()
53 cerr << "Abs value of the polynomial at the roots: " << evr.transpose() << endl; in aux_evalSolver()
57 std::vector<Scalar> rootModuli( roots.size() ); in aux_evalSolver()
58 Map< EvalRootsType > aux( &rootModuli[0], roots.size() ); in aux_evalSolver()
59 aux = roots.array().abs(); in aux_evalSolver()
92 template< int Deg, typename POLYNOMIAL, typename ROOTS, typename REAL_ROOTS >
93 void evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const REAL_ROOTS& real_ro… in evalSolverSugarFunction() argument
[all …]
Dpolynomialutils.cpp36 EvalRootsType roots = EvalRootsType::Random(deg); in realRoots_to_monicPolynomial_test() local
37 roots_to_monicPolynomial( roots, pols ); in realRoots_to_monicPolynomial_test()
40 for( int i=0; i<roots.size(); ++i ){ in realRoots_to_monicPolynomial_test()
41 evr[i] = std::abs( poly_eval( pols, roots[i] ) ); } in realRoots_to_monicPolynomial_test()
74 EvalRootsType roots = EvalRootsType::Random(deg); in CauchyBounds() local
75 roots_to_monicPolynomial( roots, pols ); in CauchyBounds()
78 _Scalar Max = roots.array().abs().maxCoeff(); in CauchyBounds()
79 _Scalar min = roots.array().abs().minCoeff(); in CauchyBounds()
83 cerr << "Roots: " << roots << endl; in CauchyBounds()
/external/skia/src/pathops/
DSkPathOpsRect.cpp21 int roots = 0; in setBounds() local
23 roots = SkDQuad::FindExtrema(quad[0].fX, quad[1].fX, quad[2].fX, tValues); in setBounds()
26 roots += SkDQuad::FindExtrema(quad[0].fY, quad[1].fY, quad[2].fY, &tValues[roots]); in setBounds()
28 for (int x = 0; x < roots; ++x) { in setBounds()
48 int roots = 0; in setBounds() local
50 roots = SkDCubic::FindExtrema(c[0].fX, c[1].fX, c[2].fX, c[3].fX, tValues); in setBounds()
53 roots += SkDCubic::FindExtrema(c[0].fY, c[1].fY, c[2].fY, c[3].fY, &tValues[roots]); in setBounds()
55 for (int x = 0; x < roots; ++x) { in setBounds()
DSkQuarticRoot.cpp5 * 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]) { in SkReducedQuarticRoots()
54 return SkDQuad::RootsReal(t2, t1, t0, roots); in SkReducedQuarticRoots()
57 return SkDCubic::RootsReal(t3, t2, t1, t0, roots); in SkReducedQuarticRoots()
64 int num = SkDCubic::RootsReal(t4, t3, t2, t1, roots); in SkReducedQuarticRoots()
66 if (approximately_zero(roots[i])) { in SkReducedQuarticRoots()
70 roots[num++] = 0; in SkReducedQuarticRoots()
78 int num = SkDCubic::RootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots); in SkReducedQuarticRoots()
[all …]
/external/chromium_org/third_party/skia/src/pathops/
DSkPathOpsRect.cpp21 int roots = 0; in setBounds() local
23 roots = SkDQuad::FindExtrema(quad[0].fX, quad[1].fX, quad[2].fX, tValues); in setBounds()
26 roots += SkDQuad::FindExtrema(quad[0].fY, quad[1].fY, quad[2].fY, &tValues[roots]); in setBounds()
28 for (int x = 0; x < roots; ++x) { in setBounds()
48 int roots = 0; in setBounds() local
50 roots = SkDCubic::FindExtrema(c[0].fX, c[1].fX, c[2].fX, c[3].fX, tValues); in setBounds()
53 roots += SkDCubic::FindExtrema(c[0].fY, c[1].fY, c[2].fY, c[3].fY, &tValues[roots]); in setBounds()
55 for (int x = 0; x < roots; ++x) { in setBounds()
DSkQuarticRoot.cpp5 * 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]) { in SkReducedQuarticRoots()
54 return SkDQuad::RootsReal(t2, t1, t0, roots); in SkReducedQuarticRoots()
57 return SkDCubic::RootsReal(t3, t2, t1, t0, roots); in SkReducedQuarticRoots()
64 int num = SkDCubic::RootsReal(t4, t3, t2, t1, roots); in SkReducedQuarticRoots()
66 if (approximately_zero(roots[i])) { in SkReducedQuarticRoots()
70 roots[num++] = 0; in SkReducedQuarticRoots()
78 int num = SkDCubic::RootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots); in SkReducedQuarticRoots()
[all …]
DSkDCubicLineIntersection.cpp97 int intersectRay(double roots[3]) { in intersectRay()
106 int count = SkDCubic::RootsValidT(A, B, C, D, roots); in intersectRay()
108 SkDPoint calcPt = c.ptAtT(roots[index]); in intersectRay()
116 count = c.searchRoots(extremeTs, extrema, 0, SkDCubic::kXAxis, roots); in intersectRay()
129 int roots = intersectRay(rootVals); in intersect() local
130 for (int index = 0; index < roots; ++index) { in intersect()
163 static int HorizontalIntersect(const SkDCubic& c, double axisIntercept, double roots[3]) { in HorizontalIntersect()
167 int count = SkDCubic::RootsValidT(A, B, C, D, roots); in HorizontalIntersect()
169 SkDPoint calcPt = c.ptAtT(roots[index]); in HorizontalIntersect()
173 count = c.searchRoots(extremeTs, extrema, axisIntercept, SkDCubic::kYAxis, roots); in HorizontalIntersect()
[all …]
/external/ceres-solver/internal/ceres/
Dpolynomial_test.cc78 // 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 }; in TEST() local
142 RunPolynomialTestRealRoots(roots, true, true, kEpsilon); in TEST()
146 const double roots[1] = { -42.42 }; in TEST() local
147 RunPolynomialTestRealRoots(roots, true, true, kEpsilon); in TEST()
151 const double roots[2] = { 1.0, 42.42 }; in TEST() local
152 RunPolynomialTestRealRoots(roots, true, true, kEpsilon); in TEST()
156 const double roots[2] = { -42.42, 1.0 }; in TEST() local
157 RunPolynomialTestRealRoots(roots, true, true, kEpsilon); in TEST()
[all …]
/external/eigen/unsupported/Eigen/src/Polynomials/
DPolynomialSolver.h20 * - real roots,
21 * - greatest, smallest complex roots,
22 * - real roots with greatest, smallest absolute real value,
23 * - greatest, smallest real roots.
25 * It stores the set of roots as a vector of complexes.
54 /** \returns the complex roots of the polynomial */
55 inline const RootsType& roots() const { return m_roots; } in roots() function
58 /** Clear and fills the back insertion sequence with the real roots of the polynomial
59 * i.e. the real part of the complex roots that have an imaginary part which
307 * Computes the complex roots of a real polynomial.
[all …]
/external/llvm/lib/CodeGen/
DShadowStackGC.cpp13 // to identify roots.
22 // In order to support this particular transformation, all stack roots are
44 /// roots.
52 /// Roots - GC roots in the current function. Each is a pair of the
54 std::vector<std::pair<CallInst*,AllocaInst*> > Roots; member in __anona77de0f30111::ShadowStackGC
210 for (unsigned I = 0; I != Roots.size(); ++I) { in GetFrameMap()
211 Constant *C = cast<Constant>(Roots[I].first->getArgOperand(1)); in GetFrameMap()
221 ConstantInt::get(Int32Ty, Roots.size(), false), in GetFrameMap()
263 for (size_t I = 0; I != Roots.size(); I++) in GetConcreteStackEntryType()
264 EltTys.push_back(Roots[I].second->getAllocatedType()); in GetConcreteStackEntryType()
[all …]
/external/llvm/include/llvm/CodeGen/
DGCMetadata.h19 // - Stack offsets for GC roots, as specified by calls to llvm.gcroot
21 // As a refinement, liveness analysis calculates the set of live roots at each
23 // generator, so all roots are assumed live.
95 std::vector<GCRoot> Roots; variable
105 // The bit vector is the more compact representation where >3.2% of roots
124 Roots.push_back(GCRoot(Num, Metadata)); in addStackRoot()
129 return Roots.erase(position); in removeStackRoot()
150 /// roots_begin/roots_end - Iterators for all roots in the function.
152 roots_iterator roots_begin() { return Roots.begin(); } in roots_begin()
153 roots_iterator roots_end () { return Roots.end(); } in roots_end()
[all …]

12345678910>>...19