Class monthlyCubicBSpline

Class Documentation

class monthlyCubicBSpline

A class for constructing cubib b-splines for equally spaced monthly data. The functions ensure that the result is fully cyclic and takes leap years into account. The heavy lifting is done by boost’s cardinal_cubic_b_spline.

Public Types

typedef boost::math::cubic_b_spline<FloatType> bSpline

Public Functions

inline explicit monthlyCubicBSpline(const std::vector<FloatType> &f)

The constructor for a monthlyCubicBSpline object.

Parameters:

f – A vector of length 12 containing the monthly values for the spline

inline FloatType operator()(FloatType dayOfYear, bool isLeap)

The operator for returning spline value at a given day of year.

Parameters:
  • dayOfYear – The day of year and fraction

  • isLeap – Boolean to indicate if its a leap year

Returns: