OpenMS
Loading...
Searching...
No Matches
TransformationModelLinear.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 $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/config.h>
12
15
16namespace OpenMS
17{
18
32 class OPENMS_DLLAPI TransformationModelLinear :
34 {
35public:
41 TransformationModelLinear(const DataPoints& data, const Param& params);
42
44 ~TransformationModelLinear() override = default;
45
47 double evaluate(double value) const override;
48
49 using TransformationModel::getParameters;
50
52 void getParameters(double& slope, double& intercept, String& x_weight, String& y_weight, double& x_datum_min, double& x_datum_max, double& y_datum_min, double& y_datum_max) const;
53
55 static void getDefaultParameters(Param& params);
56
62 void invert();
63
64protected:
66 double slope_, intercept_;
71 };
72} // namespace
73
Management and storage of parameters / INI files.
Definition Param.h:46
A more convenient string class.
Definition String.h:34
Linear model for transformations.
Definition TransformationModelLinear.h:34
TransformationModelLinear(const DataPoints &data, const Param &params)
Constructor.
static void getDefaultParameters(Param &params)
Gets the default parameters.
double evaluate(double value) const override
Evaluates the model at the given value.
void invert()
Computes the inverse.
bool data_given_
Was the model estimated from data?
Definition TransformationModelLinear.h:68
void getParameters(double &slope, double &intercept, String &x_weight, String &y_weight, double &x_datum_min, double &x_datum_max, double &y_datum_min, double &y_datum_max) const
Gets the "real" parameters.
bool symmetric_
Use symmetric regression?
Definition TransformationModelLinear.h:70
double intercept_
Definition TransformationModelLinear.h:66
~TransformationModelLinear() override=default
Destructor.
Base class for transformation models.
Definition TransformationModel.h:29
std::vector< DataPoint > DataPoints
Vector of coordinate pairs.
Definition TransformationModel.h:65
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19