~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/2geom/piecewise.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 *
30
30
 */
31
31
 
32
 
#include "piecewise.h"
 
32
#include <2geom/piecewise.h>
33
33
#include <iterator>
34
34
#include <map>
35
35
 
158
158
    std::vector<double> result;
159
159
    for (unsigned i=0; i<f.size(); i++){
160
160
        std::vector<double> rts=roots(f.segs[i]);
161
 
        rts=roots(f.segs[i]);
162
161
 
163
162
        for (unsigned r=0; r<rts.size(); r++){
164
163
            result.push_back(f.mapToDomain(rts[r], i));
167
166
    return result;
168
167
}
169
168
 
 
169
std::vector<std::vector<double> > multi_roots(Piecewise<SBasis> const &f, std::vector<double> const &values) {
 
170
    std::vector<std::vector<double> > result(values.size());
 
171
    for (unsigned i=0; i<f.size(); i++) {
 
172
        std::vector<std::vector<double> > rts = multi_roots(f.segs[i], values);
 
173
        for(unsigned j=0; j<rts.size(); j++) {
 
174
            for(unsigned r=0; r<rts[j].size(); r++){
 
175
                result[j].push_back(f.mapToDomain(rts[j][r], i));
 
176
            }
 
177
        }
 
178
    }
 
179
    return result;
 
180
}
 
181
 
170
182
}
171
183
/*
172
184
  Local Variables: