1 #ifndef __JTOOLS__JQUANTILES__
2 #define __JTOOLS__JQUANTILES__
47 template<
class JFunction1D_t>
51 const JFunction1D_t& f,
53 const double eps = 1.0e-6)
55 static const double R = 0.61803399;
56 static const double C = 1.0 - R;
62 if (fabs(xc-xb) > fabs(xb-xa)) {
73 while (fabs(x3-x0) > eps*(fabs(x1)+fabs(x2))) {
131 template<
class JFunction1D_t>
133 const double Q = 1.0,
134 const double eps = 1.0e-6) :
152 template<
class JFunction1D_t>
154 const JFunction1D_t&
f1,
155 const double Q = 1.0,
156 const double eps = 1.0e-6) :
162 set(abscissa,
f1, Q, eps);
173 template<
class JFunction1D_t>
175 const double Q = 1.0,
176 const double eps = 1.0e-6)
178 typedef typename JFunction1D_t::const_iterator const_iterator;
187 const_iterator p =
f1.begin();
189 for (const_iterator i =
f1.begin(); i !=
f1.end(); ++i) {
190 if (i->getY() > p->getY()) {
200 if (p !=
f1.begin()) {
202 const double xa = (--p)->
getX();
203 const double xb = (++p)->
getX();
205 if (++p !=
f1.end()) {
207 const double xc = p->getX();
218 if (Q > 0.0 && Q <= 1.0) {
240 }
else if (Q <= 0.0) {
293 template<
class JFunction1D_t>
295 const JFunction1D_t&
f1,
296 const double Q = 1.0,
297 const double eps = 1.0e-6)
301 buffer.configure(abscissa,
f1);
The elements in a collection are sorted according to their abscissa values and a given distance opera...
Auxiliary class to define a range between two values.
This include file containes various data structures that can be used as specific return types for the...
Exception for an empty collection.
const JPolynome f1(1.0, 2.0, 3.0)
Function.
static const double C
Physics constants.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).