hermite  0.0.1
Functions
cubic_impl.hpp File Reference
#include <vector>
Include dependency graph for cubic_impl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void hermite::spline (const double t[], const double y[], const int n, const double yp1, const double ypn, double y2[])
 Calculates second derivatives at tabulated points. More...
 
bool hermite::splpos (const double xa[], const double ya[], const double y2a[], const int n, const double x, double *y)
 Calculates position of spline. More...
 
bool hermite::splvel (const double xa[], const double ya[], const double y2a[], const int n, const double x, double *y)
 Calculates velocity of spline. More...
 
bool hermite::splacc (const double xa[], const double ya[], const double y2a[], const int n, const double x, double *y)
 Calculates acceleration of spline. More...
 

Detailed Description

A lower-level spline solver for a natural cubic spline

Function Documentation

◆ splacc()

bool hermite::splacc ( const double  xa[],
const double  ya[],
const double  y2a[],
const int  n,
const double  x,
double *  y 
)
inline

Calculates acceleration of spline.

https://archive.org/details/NumericalRecipes/page/n139/mode/2up

Parameters
xaThe time values of each point where splines are supposed to join up.
yaThe y-values of each know point.
y2aSecond derivatives, calculated from spline()
nNumber of points
xPoint to evaluate
yPointer to result
Returns
True on success, false on failure

◆ spline()

void hermite::spline ( const double  t[],
const double  y[],
const int  n,
const double  yp1,
const double  ypn,
double  y2[] 
)
inline

Calculates second derivatives at tabulated points.

https://archive.org/details/NumericalRecipes/page/n139/mode/2up

Parameters
tThe time values of each point where splines are supposed to join up.
yThe y-values of each know point.
nNumber of points.
yp1The velocity at the first point
ypnThe velocity at the last point
y2Output array, filled with second derivatives at each point.

◆ splpos()

bool hermite::splpos ( const double  xa[],
const double  ya[],
const double  y2a[],
const int  n,
const double  x,
double *  y 
)
inline

Calculates position of spline.

https://archive.org/details/NumericalRecipes/page/n139/mode/2up

Parameters
xaThe time values of each point where splines are supposed to join up.
yaThe y-values of each know point.
y2aSecond derivatives, calculated from spline()
nNumber of points
xPoint to evaluate
yPointer to result
Returns
True on success, false on failure

◆ splvel()

bool hermite::splvel ( const double  xa[],
const double  ya[],
const double  y2a[],
const int  n,
const double  x,
double *  y 
)
inline

Calculates velocity of spline.

https://archive.org/details/NumericalRecipes/page/n139/mode/2up

Parameters
xaThe time values of each point where splines are supposed to join up.
yaThe y-values of each know point.
y2aSecond derivatives, calculated from spline()
nNumber of points
xPoint to evaluate
yPointer to result
Returns
True on success, false on failure