template<typename Sample = double>
class signalsmith::curves::CubicSegmentCurve< Sample >
Smooth interpolation (optionally monotonic) between points, using cubic segments.
Example curve including a repeated point and an instantaneous jump. The curve is flat beyond the first/last points.
To produce a sharp corner, use a repeated point. The gradient is flat at the edges, unless you use repeated points at the start/end.
|
void | clear () |
| Clear existing points and segments. More...
|
|
CubicSegmentCurve & | add (Sample x, Sample y, bool corner=false) |
| Add a new point, but does not recalculate the segments. corner just writes the point twice, for convenience. More...
|
|
void | update (bool monotonic=false, bool extendGrad=true, Sample monotonicFactor=3) |
| Recalculates the segments. More...
|
|
Sample | operator() (Sample x) const |
| Reads a value out from the curve. More...
|
|
CubicSegmentCurve | dx () const |
|
Sample | dx (Sample x) const |
|
std::vector< Segment > & | segments () |
|
const std::vector< Segment > & | segments () const |
|