sablib
Loading...
Searching...
No Matches
polynomial.h
Go to the documentation of this file.
1
6
7#ifndef __SABLIB_POLYNOMIAL_H__
8#define __SABLIB_POLYNOMIAL_H__
9
10#include <stdexcept>
11#include <vector>
12
13#include "../misc/polyfit.h"
14
15namespace sablib {
16
26std::vector<double> BaselineLinear(std::vector<double> & y, const unsigned int index1, const unsigned int index2);
27
37std::vector<double> BaselinePolynomial(
38 std::vector<double> & y, const unsigned int polyorder, const std::vector<unsigned int> & indices
39);
40
41}; // namespace sablib
42
43#endif // __SABLIB_POLYNOMIAL_H__
Polynomial fitting using the least squares method (Gauss-Newton for linear models).
std::vector< double > BaselineLinear(std::vector< double > &y, const unsigned int index1, const unsigned int index2)
Performs baseline estimation with a linear line between two points.
std::vector< double > BaselinePolynomial(std::vector< double > &y, const unsigned int polyorder, const std::vector< unsigned int > &indices)
Performs baseline estimation by fitting a polynomial to specified points.