QuantLib_PolynomialFunction man page

PolynomialFunction — Cubic functional form

Synopsis

#include <ql/math/polynomialmathfunction.hpp>

Inherits unary_function< Time, Real >.

Public Member Functions

PolynomialFunction (const std::vector< Real > &coeff)

Real operator() (Time t) const
function value at time t: [ f(t) = sum_{i=0}^n{c_i t^i} ]
Real derivative (Time t) const

Real primitive (Time t) const

Real definiteIntegral (Time t1, Time t2) const

Size order () const

const std::vector< Real > & coefficients ()

const std::vector< Real > & derivativeCoefficients ()

const std::vector< Real > & primitiveCoefficients ()

std::vector< Real > definiteIntegralCoefficients (Time t, Time t2) const

std::vector< Real > definiteDerivativeCoefficients (Time t, Time t2) const

Detailed Description

Cubic functional form

[ f(t) = sum_{i=0}^n{c_i t^i} ]

Member Function Documentation

Real derivative (Time t) const

first derivative of the function at time t [ f'(t) = sum_{i=0}^{n-1}{(i+1) c_{i+1} t^i} ]

Real primitive (Time t) const

indefinite integral of the function at time t [ int f(t)dt = sum_{i=0}^n{c_i t^{i+1} / (i+1)} + K ]

Real definiteIntegral (Time t1, Time t2) const

definite integral of the function between t1 and t2 [ int_{t1}^{t2} f(t)dt ]

Size order () const

Inspectors

std::vector<Real> definiteIntegralCoefficients (Time t, Time t2) const

coefficients of a PolynomialFunction defined as definite integral on a rolling window of length tau, with tau = t2-t

std::vector<Real> definiteDerivativeCoefficients (Time t, Time t2) const

coefficients of a PolynomialFunction defined as definite derivative on a rolling window of length tau, with tau = t2-t

Author

Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

PolynomialFunction(3) and primitiveCoefficients(3) are aliases of QuantLib_PolynomialFunction(3).

Fri Sep 23 2016 Version 1.8.1 QuantLib