ICF 3.0.5.47
Technical documentation of ICF Libraries
CLinRegressionInterpolator.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// ICF includes
11
12
13namespace imath
14{
15
16
21{
22public:
24 CLinRegressionInterpolator(double* positions, double* values, int nodesCount);
25
29 double GetFactorA() const;
33 double GetFactorB() const;
34
35 // reimplemented (imath::IFunctionInterpolator)
36 void SetNodes(double* positions, double* values, int nodesCount) override;
37
38 // reimplemented (imath::TIMathFunction<double, double>)
39 bool GetValueAt(const double& argument, double& result) const override;
40 double GetValueAt(const double& argument) const override;
41
42private:
43 double m_a;
44 double m_b;
45};
46
47
48// inline methods
49
51{
52 return m_a;
53}
54
55
57{
58 return m_b;
59}
60
61
62} // namespace imath
63
64
Interpolation using linear regression with polynomial 1st degree.
CLinRegressionInterpolator(double *positions, double *values, int nodesCount)
void SetNodes(double *positions, double *values, int nodesCount) override
bool GetValueAt(const double &argument, double &result) const override
double GetValueAt(const double &argument) const override
double GetFactorA() const
Get factor 'a' of linear equesion y = a*x + b.
double GetFactorB() const
Get factor 'b' of linear equesion y = a*x + b.
Interface for mathematical real functions interpolation.
Package with mathematical functions and algebraical primitives.

© Witold Gantzke and Kirill Lepskiy