21 double a()
const {
return da; }
22 double b()
const {
return db; }
23 double c()
const {
return dc; }
44 : da(fa), db(fb), dc(fc) {}
50 Parabola(
double x[3],
double y[3],
int);
52 Parabola(
double x1,
double x2,
double x3,
double y1,
double y2,
double y3);
60 double eval(
const double x)
const {
return da * x * x + db * x + dc; }
70 t.det = db * db - 4 * da * dc;
76 double da = 0., db = 0., dc = 0.;
77 mutable int s_det = 0;
78 mutable double det = 0.;
79 mutable int s_dxzero = 0;
80 mutable int qdxzero = 0;
81 mutable double dxzero[2];
84std::ostream&
operator<<(std::ostream& file,
const Parabola& f);
Solution of a quadratic equation.
void put_b(const double fb)
Parabola(double fa, double fb, double fc)
Constructor from coefficients.
void put_c(const double fc)
void put_a(const double fa)
double eval(const double x) const
Evaluate the function.
Parabola & operator=(const Parabola &p)=default
Copy assignment operator.
int find_zero(double xzero[2]) const
double determinant() const
Parabola()=default
Default constructor.
std::ostream & operator<<(std::ostream &file, const BGMesh &bgm)