sturm.h revision 8001ba81cb851b38d86650a2fef5817facffb763
#ifndef LIB2GEOM_STURM_HEADER
#define LIB2GEOM_STURM_HEADER
push_back(X);
push_back(derivative(X));
Poly r;
Xi = -r;
}
}
unsigned count_signs(double t) {
unsigned n_signs = 0;/* Number of sign-changes */
if(t >= big) {
for (unsigned i = 1; i < size(); i++) {
n_signs++;
}
} else {
for (unsigned i = 1; i < size(); i++) {
n_signs++;
}
}
return n_signs;
}
unsigned n_roots_between(double l, double r) {
return count_signs(l) - count_signs(r);
}
};
} //namespace Geom
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :