sablib
Loading...
Searching...
No Matches
whittaker.cpp File Reference

Smoothing using Whittaker smoother(implementation). More...

#include "whittaker.h"

Go to the source code of this file.

Functions

const std::vector< double > sablib::Whittaker (const std::vector< double > &y, const std::vector< double > &w, const double lambda, const unsigned int s=2)
 Performs Whittaker smoothing (std::vector<double> version, with weights).
const std::vector< double > sablib::Whittaker (const std::vector< double > &y, const double lambda, const unsigned int s=2)
 Performs Whittaker smoothing (std::vector<double> version, without weights).

Detailed Description

Smoothing using Whittaker smoother(implementation).

Author
Izadori

Definition in file whittaker.cpp.

Function Documentation

◆ Whittaker() [1/2]

const std::vector< double > sablib::Whittaker ( const std::vector< double > & y,
const double lambda,
const unsigned int s = 2 )

Performs Whittaker smoothing (std::vector<double> version, without weights).

Parameters
yThe input data to be smoothed.
lambdaSmoothing parameter (larger values lead to more smoothing, but may flatten peaks).
sThe order of the difference (usually s = 1, 2, or 3).
Returns
The smoothed data.

Definition at line 58 of file whittaker.cpp.

◆ Whittaker() [2/2]

const std::vector< double > sablib::Whittaker ( const std::vector< double > & y,
const std::vector< double > & w,
const double lambda,
const unsigned int s = 2 )

Performs Whittaker smoothing (std::vector<double> version, with weights).

Parameters
yThe input data to be smoothed.
wWeights for each data point.
lambdaSmoothing parameter (larger values lead to more smoothing, but may flatten peaks).
sThe order of the difference (usually s = 1, 2, or 3).
Returns
The smoothed data.
Exceptions
std::invalid_argumentOne or more parameters wrong.

Definition at line 14 of file whittaker.cpp.