Gin
Classes | Public Member Functions | List of all members
Spline Class Reference

Cubic spline interpolation is a simple way to obtain a smooth curve from a set of discrete points. More...

Classes

class  Element
 

Public Member Functions

 Spline (const juce::Array< Point< double >> &points)
 
double operator[] (double x) const
 
double interpolate (double x) const
 

Detailed Description

Cubic spline interpolation is a simple way to obtain a smooth curve from a set of discrete points.

It has both C1 (first derivative) and C2 (second derivative) continuity, enabling it to produce a continuous piecewise function given a set of data points.

Add points in increasing x order

Constructor & Destructor Documentation

◆ Spline()

Spline::Spline ( const juce::Array< Point< double >> &  points)

Member Function Documentation

◆ operator[]()

double Spline::operator[] ( double  x) const

◆ interpolate()

double Spline::interpolate ( double  x) const

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