OpenMS
SplinePackage.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Lars Nilse $
6 // $Authors: Lars Nilse $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 
15 #include <vector>
16 
17 namespace OpenMS
18 {
28 class OPENMS_DLLAPI SplinePackage
29 {
30 public:
34 SplinePackage(std::vector<double> pos, const std::vector<double>& intensity);
35 
40 
44 double getPosMin() const;
45 
49 double getPosMax() const;
50 
54 double getPosStepWidth() const;
55 
59 bool isInPackage(double pos) const;
60 
64 double eval(double pos) const;
65 
66 private:
70 double pos_min_;
71 double pos_max_;
72 
80 
85 
86 };
87 
88 }
89 
cubic spline interpolation as described in R.L. Burden, J.D. Faires, Numerical Analysis,...
Definition: CubicSpline2d.h:28
fundamental data structure for SplineInterpolatedPeaks
Definition: SplinePackage.h:29
double getPosMax() const
returns the maximum position for which the spline fit is valid
double eval(double pos) const
returns interpolated intensity position pos
SplinePackage(std::vector< double > pos, const std::vector< double > &intensity)
constructor
bool isInPackage(double pos) const
returns true if position in [posMin:posMax] interval else false
~SplinePackage()
destructor
double getPosStepWidth() const
returns a sensible position step width for the package
double pos_step_width_
sensible position step width with which to scan through the package
Definition: SplinePackage.h:79
double pos_max_
Definition: SplinePackage.h:71
CubicSpline2d spline_
spline object for interpolation of intensity profile
Definition: SplinePackage.h:84
double getPosMin() const
returns the minimum position for which the spline fit is valid
double pos_min_
position limits of the package in the raw data spectrum
Definition: SplinePackage.h:70
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19