Home
last modified time | relevance | path

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

12345678910>>...12

/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/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/skia/src/pathops/
DSkPathOpsRect.cpp17 int roots = 0; in setBounds() local
19 roots = SkDQuad::FindExtrema(&sub[0].fX, tValues); in setBounds()
22 roots += SkDQuad::FindExtrema(&sub[0].fY, &tValues[roots]); in setBounds()
24 for (int index = 0; index < roots; ++index) { in setBounds()
34 int roots = 0; in setBounds() local
36 roots = SkDConic::FindExtrema(&sub[0].fX, sub.fWeight, tValues); in setBounds()
39 roots += SkDConic::FindExtrema(&sub[0].fY, sub.fWeight, &tValues[roots]); in setBounds()
41 for (int index = 0; index < roots; ++index) { in setBounds()
51 int roots = 0; in setBounds() local
53 roots = SkDCubic::FindExtrema(&sub[0].fX, tValues); in setBounds()
[all …]
DSkPathOpsCurve.h272 static int line_intercept_h(const SkPoint a[2], SkScalar , SkScalar y, double* roots) { in line_intercept_h() argument
274 roots[0] = SkIntersections::HorizontalIntercept(line.set(a), y); in line_intercept_h()
275 return between(0, roots[0], 1); in line_intercept_h()
278 static int line_intercept_v(const SkPoint a[2], SkScalar , SkScalar x, double* roots) { in line_intercept_v() argument
280 roots[0] = SkIntersections::VerticalIntercept(line.set(a), x); in line_intercept_v()
281 return between(0, roots[0], 1); in line_intercept_v()
284 static int quad_intercept_h(const SkPoint a[2], SkScalar , SkScalar y, double* roots) { in quad_intercept_h() argument
286 return SkIntersections::HorizontalIntercept(quad.set(a), y, roots); in quad_intercept_h()
289 static int quad_intercept_v(const SkPoint a[2], SkScalar , SkScalar x, double* roots) { in quad_intercept_v() argument
291 return SkIntersections::VerticalIntercept(quad.set(a), x, roots); in quad_intercept_v()
[all …]
DSkDCubicLineIntersection.cpp120 int intersectRay(double roots[3]) { in intersectRay()
129 int count = SkDCubic::RootsValidT(A, B, C, D, roots); in intersectRay()
131 SkDPoint calcPt = c.ptAtT(roots[index]); in intersectRay()
139 count = c.searchRoots(extremeTs, extrema, 0, SkDCubic::kXAxis, roots); in intersectRay()
152 int roots = intersectRay(rootVals); in intersect() local
153 for (int index = 0; index < roots; ++index) { in intersect()
165 static int HorizontalIntersect(const SkDCubic& c, double axisIntercept, double roots[3]) { in HorizontalIntersect()
169 int count = SkDCubic::RootsValidT(A, B, C, D, roots); in HorizontalIntersect()
171 SkDPoint calcPt = c.ptAtT(roots[index]); in HorizontalIntersect()
175 count = c.searchRoots(extremeTs, extrema, axisIntercept, SkDCubic::kYAxis, roots); in HorizontalIntersect()
[all …]
DSkDConicLineIntersection.cpp66 int horizontalIntersect(double axisIntercept, double roots[2]) { in horizontalIntersect()
68 return this->validT(conicVals, axisIntercept, roots); in horizontalIntersect()
76 double roots[2]; in horizontalIntersect() local
77 int count = this->horizontalIntersect(axisIntercept, roots); in horizontalIntersect()
79 double conicT = roots[index]; in horizontalIntersect()
102 int roots = this->intersectRay(rootVals); in intersect() local
103 for (int index = 0; index < roots; ++index) { in intersect()
119 int intersectRay(double roots[2]) { in intersectRay()
126 return this->validT(r, 0, roots); in intersectRay()
129 int validT(double r[3], double axisIntercept, double roots[2]) { in validT()
[all …]
DSkDQuadLineIntersection.cpp138 int intersectRay(double roots[2]) { in intersectRay()
140 solve by rotating line+quad so line is horizontal, then finding the roots in intersectRay()
165 return SkDQuad::RootsValidT(A, 2 * B, C, roots); in intersectRay()
174 int roots = intersectRay(rootVals); in intersect() local
175 for (int index = 0; index < roots; ++index) { in intersect()
187 int horizontalIntersect(double axisIntercept, double roots[2]) { in horizontalIntersect()
194 return SkDQuad::RootsValidT(D, 2 * E, F, roots); in horizontalIntersect()
203 int roots = horizontalIntersect(axisIntercept, rootVals); in horizontalIntersect() local
204 for (int index = 0; index < roots; ++index) { in horizontalIntersect()
243 int verticalIntersect(double axisIntercept, double roots[2]) { in verticalIntersect()
[all …]
/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/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/
DShadowStackGCLowering.cpp31 /// roots.
39 /// Roots - GC roots in the current function. Each is a pair of the
41 std::vector<std::pair<CallInst *, AllocaInst *>> Roots; member in __anon7772e8a30111::ShadowStackGCLowering
198 for (unsigned I = 0; I != Roots.size(); ++I) { in GetFrameMap()
199 Constant *C = cast<Constant>(Roots[I].first->getArgOperand(1)); in GetFrameMap()
209 ConstantInt::get(Int32Ty, Roots.size(), false), in GetFrameMap()
249 for (size_t I = 0; I != Roots.size(); I++) in GetConcreteStackEntryType()
250 EltTys.push_back(Roots[I].second->getAllocatedType()); in GetConcreteStackEntryType()
269 // int32_t NumRoots; // Number of roots in stack frame. in doInitialization()
271 // void *Meta[]; // May be absent for roots without metadata. in doInitialization()
[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.
83 std::vector<GCRoot> Roots; variable
93 // The bit vector is the more compact representation where >3.2% of roots
112 Roots.push_back(GCRoot(Num, Metadata)); in addStackRoot()
117 return Roots.erase(position); in removeStackRoot()
138 /// roots_begin/roots_end - Iterators for all roots in the function.
140 roots_iterator roots_begin() { return Roots.begin(); } in roots_begin()
141 roots_iterator roots_end() { return Roots.end(); } in roots_end()
[all …]
/external/clang/unittests/Basic/
DVirtualFileSystemTest.cpp563 getFromYAMLString("{ 'roots': [\n" in TEST_F()
614 " 'roots': [\n" in TEST_F()
650 " 'roots': [\n" in TEST_F()
683 // invalid YAML in roots in TEST_F()
684 FS = getFromYAMLString("{ 'roots':[}", Lower); in TEST_F()
687 "{ 'roots':[ { 'name': 'foo', 'type': 'directory', 'contents': [}", in TEST_F()
692 FS = getFromYAMLString("{ 'knobular': 'true', 'roots':[] }", Lower); in TEST_F()
694 FS = getFromYAMLString("{ 'case-sensitive': 'maybe', 'roots':[] }", Lower); in TEST_F()
697 // invalid roots in TEST_F()
698 FS = getFromYAMLString("{ 'roots':'' }", Lower); in TEST_F()
[all …]
/external/skia/src/core/
DSkGeometry.cpp83 int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2]) { in SkFindUnitQuadRoots()
84 SkASSERT(roots); in SkFindUnitQuadRoots()
87 return valid_unit_divide(-C, B, roots); in SkFindUnitQuadRoots()
90 SkScalar* r = roots; in SkFindUnitQuadRoots()
93 if (R < 0 || SkScalarIsNaN(R)) { // complex roots in SkFindUnitQuadRoots()
101 if (r - roots == 2) { in SkFindUnitQuadRoots()
102 if (roots[0] > roots[1]) in SkFindUnitQuadRoots()
103 SkTSwap<SkScalar>(roots[0], roots[1]); in SkFindUnitQuadRoots()
104 else if (roots[0] == roots[1]) // nearly-equal? in SkFindUnitQuadRoots()
107 return (int)(r - roots); in SkFindUnitQuadRoots()
[all …]
/external/skia/src/effects/gradients/
DSkTwoPointConicalGradient.cpp32 // Return the number of distinct real roots, and write them into roots[] in
34 static int find_quad_roots(float A, float B, float C, float roots[2], bool descendingOrder = false)… in find_quad_roots()
35 SkASSERT(roots); in find_quad_roots()
38 return valid_divide(-C, B, roots); in find_quad_roots()
60 roots[0] = 0; in find_quad_roots()
66 roots[0] = r0 < r1 ? r0 : r1; in find_quad_roots()
67 roots[1] = r0 > r1 ? r0 : r1; in find_quad_roots()
69 SkTSwap(roots[0], roots[1]); in find_quad_roots()
108 float roots[2]; in nextT() local
111 int countRoots = find_quad_roots(fRec.fA, fB, C, roots, fRec.fFlipped); in nextT()
[all …]
/external/llvm/lib/Transforms/Scalar/
DLoopRerollPass.cpp341 // ST[y1] +1 +2 <-- Roots
359 SmallInstructionVector Roots; member
364 // The set of all DAG roots, and state tracking of all roots
372 /// Stage 1: Find all the DAG roots for the induction variable.
374 /// Stage 2: Validate if the found roots are valid.
388 std::map<int64_t,Instruction*> &Roots);
391 void collectInLoopUserSet(const SmallInstructionVector &Roots,
425 // The roots themselves.
615 const SmallInstructionVector &Roots, in collectInLoopUserSet() argument
619 for (SmallInstructionVector::const_iterator I = Roots.begin(), in collectInLoopUserSet()
[all …]
DFloat2Int.cpp65 void findRoots(Function &F, SmallPtrSet<Instruction*,8> &Roots);
70 void walkBackwards(const SmallPtrSetImpl<Instruction*> &Roots);
77 SmallPtrSet<Instruction*,8> Roots; member
125 // Find the roots - instructions that convert from the FP domain to
127 void Float2Int::findRoots(Function &F, SmallPtrSet<Instruction*,8> &Roots) { in findRoots() argument
133 Roots.insert(&I); in findRoots()
138 Roots.insert(&I); in findRoots()
172 // the roots. Populate "SeenInsts" with interesting
181 void Float2Int::walkBackwards(const SmallPtrSetImpl<Instruction*> &Roots) { in walkBackwards() argument
182 std::deque<Instruction*> Worklist(Roots.begin(), Roots.end()); in walkBackwards()
[all …]
/external/apache-commons-math/src/main/java/org/apache/commons/math/transform/
DFastFourierTransformer.java53 /** roots of unity */
54 private RootsOfUnity roots = new RootsOfUnity(); field in FastFourierTransformer
112 roots.computeOmega(f.length); in transform()
170 roots.computeOmega(f.length); in transform2()
229 roots.computeOmega(-f.length); // pass negative argument in inversetransform()
288 roots.computeOmega(-f.length); // pass negative argument in inversetransform2()
318 roots.computeOmega(isInverse ? -N : N); in fft()
322 roots.computeOmega(isInverse ? -2*N : 2*N); in fft()
329 //Complex D = roots.getOmega(i).multiply(Complex.I); in fft()
330 Complex D = new Complex(-roots.getOmegaImaginary(i), in fft()
[all …]
/external/eigen/unsupported/Eigen/
DPolynomials61 where \f$ p \f$ is known through its roots i.e. \f$ p(x) = (x-r_1)(x-r_2)...(x-r_n) \f$.
70 …omputes the coefficients in the monomial basis of the monic polynomial that has the provided roots;
99 …Computes the complex roots of a polynomial by computing the eigenvalues of the associated companio…
101 The roots of \f$ p(x) = a_0 + a_1 x + a_2 x^2 + a_{3} x^3 + x^4 \f$ are the eigenvalues of
114 …al solver is guaranteed to provide a correct result only when the complex roots \f$r_1,r_2,...,r_d…
127 …em with the QR algorithm is presented: a polynomial with almost conjugate roots is provided to the…
128 Those roots have almost same module therefore the QR algorithm failed to converge: the accuracy
/external/eigen/Eigen/src/Eigenvalues/
DSelfAdjointEigenSolver.h494 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))
534 std::swap(roots(0),roots(1));
[all …]
/external/fonttools/Lib/fontTools/misc/
DbezierTools.py36 roots = []
38 roots.append(-bx/ax2)
40 roots.append(-by/ay2)
41 points = [(ax*t*t + bx*t + cx, ay*t*t + by*t + cy) for t in roots if 0 <= t < 1] + [pt1, pt3]
64 roots = xRoots + yRoots
66 …points = [(ax*t*t*t + bx*t*t + cx * t + dx, ay*t*t*t + by*t*t + cy * t + dy) for t in roots] + [pt…
260 This function returns a list of roots. Note that the returned list
266 roots = []
269 roots = [-c/b]
271 # We have a true quadratic equation. Apply the quadratic formula to find two roots.
[all …]
/external/llvm/lib/Support/
DDAGDeltaAlgorithm.cpp66 std::vector<change_ty> Roots; member in __anon7ef96bbb0111::DAGDeltaAlgorithmImpl
195 // Compute the roots. in DAGDeltaAlgorithmImpl()
199 Roots.push_back(*it); in DAGDeltaAlgorithmImpl()
202 std::vector<change_ty> Worklist(Roots.begin(), Roots.end()); in DAGDeltaAlgorithmImpl()
247 llvm::errs() << "Roots: ["; in DAGDeltaAlgorithmImpl()
248 for (std::vector<change_ty>::const_iterator it = Roots.begin(), in DAGDeltaAlgorithmImpl()
249 ie = Roots.end(); it != ie; ++it) { in DAGDeltaAlgorithmImpl()
250 if (it != Roots.begin()) llvm::errs() << ", "; in DAGDeltaAlgorithmImpl()
303 // The current set of changes we are minimizing, starting at the roots. in Run()
304 changeset_ty CurrentSet(Roots.begin(), Roots.end()); in Run()

12345678910>>...12