Lines Matching defs:to
15 * in the file COPYING-LGPL-2.1; if not, output to the Free Software
20 * The contents of this file are subject to the Mozilla Public License
51 * SBasis to properly invert the original.
77 //segs[i] stretches from cuts[i] to cuts[i+1].
127 //TODO: maybe it is not a good idea to have this?
138 /**Convenience/implementation hiding function to add segment/cut pairs.
141 inline void push(const T &s, double to) {
144 push_cut(to);
147 inline void push(T &&s, double to) {
150 push_cut(to);
153 //Convenience/implementation hiding function to add cuts.
158 //Convenience/implementation hiding function to add segments.
164 /**Returns the segment index which corresponds to a 'global' piecewise time.
165 * Also takes optional low/high parameters to expedite the search for the segment.
186 * Also takes an optional index parameter which may be used for efficiency or to find the time on a
187 * segment outside its range. If it is left to its default, -1, it will call segN to find the index.
238 //Concatenates this Piecewise function with another, offseting time of the other to match the end.
341 * Returns a portion of a piece of a Piecewise<T>, given the piece's index and a to/from time.
345 T elem_portion(const Piecewise<T> &a, unsigned i, double from, double to) {
348 return portion( a[i], (from - a.cuts[i]) * rwidth, (to - a.cuts[i]) * rwidth );
353 * Precondition: c sorted lower to higher.
358 * //ac.cuts should be equivalent to bc.cuts
427 * Returns a Piecewise<T> with a defined domain of [min(from, to), max(from, to)].
431 Piecewise<T> portion(const Piecewise<T> &pw, double from, double to) {
432 if(pw.empty() || from == to) return Piecewise<T>();
437 from = std::min(from, to);
438 to = std::max(temp, to);
442 if(i == pw.size() - 1 || to <= pw.cuts[i + 1]) { //to/from inhabit the same segment
443 ret.push(elem_portion(pw, i, from, to), to);
448 unsigned fi = pw.segN(to, i);
450 if (to == pw.cuts[fi]) fi-=1;
455 ret.push_seg( portion(pw[fi], 0.0, pw.segT(to, fi)));
456 if(to != ret.cuts.back()) ret.push_cut(to);
741 //TODO: atm, relative error is ~(tol/a)%. Find a way to make it independant of a.
794 //TODO: find a way to recover from this error? the root finder missed some root;
842 * WARNING: It's up to the user to check that the second SBasis is indeed