75 double integral(
const double &x_min,
const double &x_max)
const;
A class representing a polynomial.
Definition polynomials.hh:16
double operator()(const double &x) const
Evaluate the polynomial at a given point x.
Polynomial derivative() const
Compute the derivative of the polynomial.
void operator*=(const double &scalar)
Multiply the polynomial by a scalar.
const double & operator[](const uint &i) const
Access the i-th coefficient of the polynomial.
double integral(const double &x_min, const double &x_max) const
Compute the integral of the polynomial between two points.
std::vector< double > coefficients
Definition polynomials.hh:85
Polynomial anti_derivative(const double &integration_constant) const
Compute the antiderivative of the polynomial. An integration constant is given as an argument.
Polynomial square_argument() const
A utility function to obtain from this polynomial P(x) the polynomial Q(x) = P(x^2)
Polynomial(const std::vector< double > &coefficients)
Construct a new Polynomial object from a list of coefficients. The coefficients are ordered from the ...
double & operator[](const uint &i)
Access the i-th coefficient of the polynomial.
void operator*=(const Polynomial &other)
Multiply the polynomial by another polynomial.
Definition complex_math.hh:14
unsigned int uint
Definition utils.hh:22