OpenMS
Loading...
Searching...
No Matches
BSpline2d.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Stephan Aiche, Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <vector>
12
13#include <OpenMS/config.h>
16
17// forward declaration of impl class BSpline
18namespace eol_bspline
19{
20template <class T>
21class BSpline;
22}
23
24namespace OpenMS
25{
29 class OPENMS_DLLAPI BSpline2d
30 {
31public:
32
33 // Note: Don't change boundary condition constants as these are passed through to the eol-bspline implementation.
35 {
37 BC_ZERO_ENDPOINTS = 0,
39 BC_ZERO_FIRST = 1,
41 BC_ZERO_SECOND = 2
42 };
43
67 BSpline2d(const std::vector<double>& x, const std::vector<double>& y,
68 double wavelength = 0, BoundaryCondition boundary_condition = BC_ZERO_SECOND,
69 Size num_nodes = 0);
70
74 virtual ~BSpline2d();
75
83 bool solve(const std::vector<double>& y);
84
89 double eval(const double x) const;
90
95 double derivative(const double x) const;
96
100 bool ok() const;
101
105 static void debug(bool enable);
106
107private:
108
109 // Pointer to actual implementation. Note: This class follows the PIMPL idiom hiding the actual
110 // B-spline implementation behind this pointer to avoid any dependency of the interface to the
111 // implementation. Thus, the eol splines are only required during compilation of OpenMS and
112 // not when linking against OpenMS.
114 };
115
116}
117
b spline interpolation
Definition BSpline2d.h:30
bool ok() const
double eval(const double x) const
double derivative(const double x) const
eol_bspline::BSpline< double > * spline_
Definition BSpline2d.h:113
bool solve(const std::vector< double > &y)
virtual ~BSpline2d()
BSpline2d(const std::vector< double > &x, const std::vector< double > &y, double wavelength=0, BoundaryCondition boundary_condition=BC_ZERO_SECOND, Size num_nodes=0)
static void debug(bool enable)
BoundaryCondition
Definition BSpline2d.h:35
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition BSpline2d.h:19
Definition BSpline2d.h:21