28 QL_REQUIRE(!coeff.empty(),
"empty coefficient vector");
37 for (i=0; i<
order_-1; ++i) {
45 Real result=0.0, tPower=1.0;
47 result +=
c_[i] * tPower;
54 Real result=0.0, tPower=1.0;
56 result +=
derC_[i] * tPower;
65 result +=
prC_[i] * tPower;
95 std::vector<Real> result(coeff.
begin(), coeff.
end());
105 std::vector<Real> result(coeff.
begin(), coeff.
end());
1-D array used in linear algebra.
const_iterator end() const
const_iterator begin() const
Matrix used in linear algebra.
static const std::vector< BigNatural > & get(Size order)
Get and store one vector of coefficients after another.
Real definiteIntegral(Time t1, Time t2) const
void initializeEqs_(Time t, Time t2) const
std::vector< Real > definiteIntegralCoefficients(Time t, Time t2) const
Real derivative(Time t) const
std::vector< Real > derC_
Real operator()(Time t) const
function value at time t:
PolynomialFunction(const std::vector< Real > &coeff)
Real primitive(Time t) const
std::vector< Real > definiteDerivativeCoefficients(Time t, Time t2) const
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
Matrix inverse(const Matrix &m)
Pascal triangle coefficients calculator.