ICF 3.1.1.10
Technical documentation of ICF Libraries
CLinearInterpolator.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// Qt includes
10#include <QtCore/QMap>
11
12// ICF includes
14
15
16namespace imath
17{
18
19
24{
25public:
30 CLinearInterpolator(double* positions, double* values, int nodesCount, bool isExtrapolationEnabled = false);
31
32 // reimplemented (imath::IFunctionInterpolator)
33 void SetNodes(double* positions, double* values, int nodesCount) override;
34
35 // reimplemented (imath::TIMathFunction<double, double>)
36 bool GetValueAt(const double& argument, double& result) const override;
37 double GetValueAt(const double& argument) const override;
38
39private:
40 typedef QMap<double, double> Nodes;
41 Nodes m_nodes;
42 bool m_isExtrapolationEnabled;
43};
44
45
46} // namespace imath
47
48
Implementation of a linear interpolator.
void SetNodes(double *positions, double *values, int nodesCount) override
bool GetValueAt(const double &argument, double &result) const override
CLinearInterpolator(double *positions, double *values, int nodesCount, bool isExtrapolationEnabled=false)
double GetValueAt(const double &argument) const override
Interface for mathematical real functions interpolation.
Package with mathematical functions and algebraical primitives.

© Witold Gantzke and Kirill Lepskiy