OpenMS
TransformationModelBSpline.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: Hendrik Weisser $
6 // $Authors: Hendrik Weisser $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/config.h> // is this needed?
12 
15 
16 namespace OpenMS
17 {
18 
24  class OPENMS_DLLAPI TransformationModelBSpline :
25  public TransformationModel
26  {
27 public:
34  TransformationModelBSpline(const DataPoints& data, const Param& params);
35 
38 
40  double evaluate(double value) const override;
41 
43 
45  static void getDefaultParameters(Param& params);
46 
47 protected:
50 
52  double xmin_, xmax_;
53 
55  enum { EX_LINEAR, EX_BSPLINE, EX_CONSTANT, EX_GLOBAL_LINEAR } extrapolate_;
56 
58  double offset_min_, offset_max_, slope_min_, slope_max_;
59  };
60 } // namespace
61 
b spline interpolation
Definition: BSpline2d.h:31
Management and storage of parameters / INI files.
Definition: Param.h:44
B-spline (non-linear) model for transformations.
Definition: TransformationModelBSpline.h:26
BSpline2d * spline_
Pointer to the actual B-spline.
Definition: TransformationModelBSpline.h:49
static void getDefaultParameters(Param &params)
Gets the default parameters.
double xmax_
Definition: TransformationModelBSpline.h:52
double evaluate(double value) const override
Evaluates the model at the given value.
TransformationModelBSpline(const DataPoints &data, const Param &params)
Constructor.
@ EX_BSPLINE
Definition: TransformationModelBSpline.h:55
double offset_max_
Definition: TransformationModelBSpline.h:58
~TransformationModelBSpline() override
Destructor.
Base class for transformation models.
Definition: TransformationModel.h:29
const Param & getParameters() const
Gets the (actual) parameters.
std::vector< DataPoint > DataPoints
Vector of coordinate pairs.
Definition: TransformationModel.h:65
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19