TrigonometricInterpolation<T>

Models & Types · AiDotNet.Interpolation

Implements trigonometric interpolation for periodic data using Fourier series.

Implements: IInterpolation<T>

For Beginners

Think of trigonometric interpolation like finding a musical chord that matches a set of notes. Just as a complex sound can be broken down into simple sine waves of different frequencies (harmonics), this method breaks down your data into simple wave patterns. It works best when your data has a repeating pattern, like daily temperature cycles, seasonal sales data, or sound waves. The interpolation creates a smooth curve that passes through all your data points and can predict values between them.

How It Works

Trigonometric interpolation is a method for fitting a trigonometric polynomial (a sum of sines and cosines) to a set of data points. It is particularly effective for periodic data, such as seasonal patterns, wave forms, or any data that repeats over a fixed interval.

Constructors

Constructor Summary
TrigonometricInterpolation(Vector<T> x, Vector<T> y) Creates a trigonometric interpolation whose period is N times the sample spacing, (max(x) - min(x)) * N / (N - 1), so that for evenly spaced x the interpolant passes through every sample.
TrigonometricInterpolation(Vector<T> x, Vector<T> y, T customPeriod) Initializes a new instance of trigonometric interpolation with the specified data points.

Methods

Method Summary
T Interpolate(T x) Interpolates a y-value for the given x coordinate using trigonometric interpolation.