TMB Documentation  v1.9.11
Public Member Functions | List of all members
tmbutils::splinefun< Type > Class Template Reference

Spline Interpolation. More...

#include <splines.hpp>

Public Member Functions

Type operator() (const Type &x_)
 Evaluate spline - scalar argument case.
 
vector< Type > operator() (const vector< Type > &x)
 Evaluate spline - vector argument case.
 
 splinefun (const vector< Type > &x_, const vector< Type > &y_, int method_=3)
 Construct spline function object. More...
 

Detailed Description

template<class Type>
class tmbutils::splinefun< Type >

Spline Interpolation.

R's spline function wrapped into template class that can be used with TMB.

Warning
Spline evaluation involves branching on the x-values and may thus be problematic for parameter dependent inputs.

Definition at line 59 of file splines.hpp.

Constructor & Destructor Documentation

§ splinefun()

template<class Type >
tmbutils::splinefun< Type >::splinefun ( const vector< Type > &  x_,
const vector< Type > &  y_,
int  method_ = 3 
)
inline

Construct spline function object.

Parameters
x_x values values
y_y values - same length as x.
methodInteger determining the spline type:
  1. Natural splines.
  2. Periodic splines
  3. Splines with end-conditions determined by fitting cubics in the start and end intervals (Forsythe et al).

Definition at line 137 of file splines.hpp.


The documentation for this class was generated from the following file:
License: GPL v2