Lines Matching defs:roots
36 * It is more efficient to find roots of f(t) = c_0, c_1, ... all at once, rather than iterating.
39 * multi-roots using bernstein method, one approach would be:
41 take median and find roots of that
47 * the gsl poly roots finder is faster than bernstein too, but we don't use it for 3 reasons:
53 c) it finds all roots, even complex ones. We don't want to accidently treat a nearly real root as a real root
55 From memory gsl poly roots was about 10 times faster than bernstein in the case where all the roots
96 vector<double>extrema = roots(df);
106 vector<double>extrema = roots(df);
196 From this we conclude there are no roots before a'=a+min((f(a)-c)/m,(C-f(a))/M).
197 Do the same for b: compute some b' such that there are no roots in (b',b].
199 unfortunately, extra care is needed about rounding errors, and also to avoid the repetition of roots,
202 //TODO: Make sure the code is "rounding-errors proof" and take care about repetition of roots!
217 std::vector<std::vector<double> > &roots,
229 roots[idx].push_back(a);
230 roots[idx].push_back(b);
240 // roots[a]=idxa;
241 // roots[b]=idxa;
250 // if(a<t&&t<b) roots[t]=i;
261 roots[idx].push_back((a+b)/2);
278 roots[idxa].push_back(a);
288 roots[idxb].push_back(b);
304 multi_roots_internal(f,df,levels,roots,htol,vtol,t0,f(t0),t1,f(t1));
311 roots[idx].push_back(t);
318 multi_roots_internal(f,df,levels,roots,htol,vtol,t0 ,f(t0) ,t_left,ft_left);
319 multi_roots_internal(f,df,levels,roots,htol,vtol,t_right,ft_right,t1 ,f(t1) );
328 \returns a vector of vectors, one for each y giving roots
331 results = roots(f(y_i)) for all y_i
338 From this we conclude there are no roots before a'=a+min((f(a)-c)/m,(C-f(a))/M).
339 Do the same for b: compute some b' such that there are no roots in (b',b].
341 unfortunately, extra care is needed about rounding errors, and also to avoid the repetition of roots,
344 TODO: Make sure the code is "rounding-errors proof" and take care about repetition of roots!
353 std::vector<std::vector<double> > roots(levels.size(), std::vector<double>());
356 multi_roots_internal(f,df,levels,roots,htol,vtol,a,f(a),b,f(b));
358 return(roots);
403 unfortunately, extra care is needed about rounding errors, and also to avoid the repetition of roots,
569 std::vector<double> & roots,
573 return; // no roots here
576 roots.push_back(left*(1-t) + t*right);
580 subdiv_sbasis(compose(s, Linear(0, 0.5)), roots, left, middle);
581 subdiv_sbasis(compose(s, Linear(0.5, 1.)), roots, middle, right);
610 \see Bezier::roots
611 \returns vector of zeros (roots)
614 std::vector<double> roots(SBasis const & s) {
625 return bz.roots();
629 std::vector<double> roots(SBasis const & s, Interval const ivl) {
640 return bz.roots(ivl);