#include <interpolation.h>
Represent a linear interpolation.
| T | Type of interpolated values. |
Definition at line 37 of file interpolation.h.
Public Member Functions | |
| InterpolateLinear (T x0, T y0, T x1, T y1) | |
| Linear interpolation given two points (x0, y0) and (x1, y1). More... | |
| T | operator() (T x) const |
| Calculate linear interpolation at x. More... | |
Private Attributes | |
| T | slope_ {} |
| Slope of the linear interpolation. More... | |
| T | yintercept_ {} |
| y-axis intercept of the linear interpolation. More... | |
| smash::InterpolateLinear< T >::InterpolateLinear | ( | T | x0, |
| T | y0, | ||
| T | x1, | ||
| T | y1 | ||
| ) |
Linear interpolation given two points (x0, y0) and (x1, y1).
Definition at line 115 of file interpolation.h.
| T smash::InterpolateLinear< T >::operator() | ( | T | x | ) | const |
Calculate linear interpolation at x.
| x | Interpolation argument. |
Definition at line 122 of file interpolation.h.
|
private |
Slope of the linear interpolation.
Definition at line 56 of file interpolation.h.
|
private |
y-axis intercept of the linear interpolation.
Definition at line 58 of file interpolation.h.