Mantid
Loading...
Searching...
No Matches
ChebyshevPolyFit.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//-----------------------------------------------------------------------------
10// Includes
11//-----------------------------------------------------------------------------
12
13#include "MantidKernel/DllConfig.h"
14#include <memory>
15#include <vector>
16
17namespace Mantid {
18namespace Kernel {
19// Keep the implementation out of here
20class ChebyshevPolyFitImpl;
21
28class MANTID_KERNEL_DLL ChebyshevPolyFit {
29public:
30 ChebyshevPolyFit(const size_t n);
31 // Implemented in cpp so a unique_ptr member doesn't need to
32 // see full ChebyshevPolyFitPrivate implementation
34
35 std::vector<double> operator()(const std::vector<double> &xs, const std::vector<double> &ys,
36 const std::vector<double> &wgts);
37
38private:
39 std::unique_ptr<ChebyshevPolyFitImpl> m_impl;
40};
41
42} // namespace Kernel
43} // namespace Mantid
Compute a weighted least-squares polynomial approximations to an arbitrary set of data points.
std::unique_ptr< ChebyshevPolyFitImpl > m_impl
Helper class which provides the Collimation Length for SANS instruments.