labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

XYInterpolationCurve.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : XYInterpolationCurve.h
3  Project : LabPlot
4  Description : A xy-curve defined by an interpolation
5  --------------------------------------------------------------------
6  Copyright : (C) 2016 Stefan Gerlach (stefan.gerlach@uni.kn)
7  Copyright : (C) 2017 Alexander Semke (alexander.semke@web.de)
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 
30 #ifndef XYINTERPOLATIONCURVE_H
31 #define XYINTERPOLATIONCURVE_H
32 
34 extern "C" {
35 #include <gsl/gsl_version.h>
36 #include "backend/nsl/nsl_interp.h"
37 }
38 
40 
42  Q_OBJECT
43 
44 public:
45  enum class PointsMode {Auto, Multiple, Custom};
48 
49  nsl_interp_type type{nsl_interp_type_linear}; // type of interpolation
50  nsl_interp_pch_variant variant{nsl_interp_pch_variant_finite_difference}; // variant of cubic Hermite interpolation
51  double tension{0.0}, continuity{0.0}, bias{0.0}; // TCB values
53  size_t npoints{100}; // nr. of points
55  bool autoRange{true}; // use all data?
56  QVector<double> xRange; // x range for interpolation
57  };
60 
61  bool available{false};
62  bool valid{false};
63  QString status;
64  qint64 elapsedTime{0};
65  };
66 
67  explicit XYInterpolationCurve(const QString& name);
69 
70  void recalculate() override;
71  QIcon icon() const override;
72  void save(QXmlStreamWriter*) const override;
73  bool load(XmlStreamReader*, bool preview) override;
74 
77 
79 
80 protected:
82 
83 private:
84  Q_DECLARE_PRIVATE(XYInterpolationCurve)
85 
86 signals:
88 };
89 
90 #endif
QString name() const
Base class for all analysis curves.
A xy-curve defined by an interpolation.
~XYInterpolationCurve() override
XYInterpolationCurvePrivate Private
void save(QXmlStreamWriter *) const override
Save as XML.
bool load(XmlStreamReader *, bool preview) override
Load from XML.
void interpolationDataChanged(const XYInterpolationCurve::InterpolationData &)
QIcon icon() const override
const InterpolationResult & interpolationResult() const
XYInterpolationCurve(const QString &name)
XML stream parser that supports errors as well as warnings. This class also adds line and column numb...
#define CLASS_D_ACCESSOR_DECL(type, method, Method)
Definition: macros.h:134
nsl_interp_evaluate
Definition: nsl_interp.h:44
@ nsl_interp_evaluate_function
Definition: nsl_interp.h:44
nsl_interp_pch_variant
Definition: nsl_interp.h:39
@ nsl_interp_pch_variant_finite_difference
Definition: nsl_interp.h:39
nsl_interp_type
Definition: nsl_interp.h:33
@ nsl_interp_type_linear
Definition: nsl_interp.h:33
XYInterpolationCurve::PointsMode pointsMode