24 #ifndef _PARABOLA_HPP_ 25 #define _PARABOLA_HPP_ 42 Parabola(
double a=0,
double b=0,
double c=0);
46 Parabola(
const std::vector< std::pair<double,double> >& samples);
49 Parabola(
const std::vector< std::pair<double,double> >& samples,
50 const std::vector<double>& weights);
55 double operator()(
double x)
const {
return a_[0]*x*x + a_[1]*x + a_[2];}
56 double center()
const {
return -a_[1]/(2*a_[0]);}
59 std::vector<double>
a_;
70 #endif // _PARABOLA_HPP_
std::ostream & operator<<(std::ostream &os, const OrderedPair &p)
const std::vector< double > & coefficients() const
double operator()(double x) const
std::vector< double > & coefficients()
KernelTraitsBase< Kernel >::space_type::abscissa_type x