pappsomspp
Library for mass spectrometry
mzrange.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/mass_range.h
3
* \date 4/3/2015
4
* \author Olivier Langella
5
* \brief object to handle a mass range (an mz value + or - some delta)
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
10
*
11
* This file is part of the PAPPSOms++ library.
12
*
13
* PAPPSOms++ 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 3 of the License, or
16
* (at your option) any later version.
17
*
18
* PAPPSOms++ 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 PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
25
*
26
* Contributors:
27
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
28
*implementation
29
******************************************************************************/
30
31
#pragma once
32
33
34
#include "
types.h
"
35
#include "
precision.h
"
36
37
#include "
exportinmportconfig.h
"
38
39
#include <QString>
40
#include <map>
41
42
namespace
pappso
43
{
44
45
class
PMSPP_LIB_DECL
MzRange
46
{
47
private
:
48
pappso_double
m_mz;
49
pappso_double
m_delta;
50
51
public
:
52
MzRange(
pappso_double
mz
,
PrecisionPtr
precision);
53
54
MzRange(
pappso_double
mz
,
pappso_double
delta);
55
56
MzRange(
pappso_double
mz
,
57
PrecisionPtr
precision_lower,
58
PrecisionPtr
precision_upper);
59
60
MzRange(
const
MzRange &other);
61
62
pappso_double
getMz()
const
;
63
64
bool
contains(
pappso_double
)
const
;
65
QString toString()
const
;
66
67
pappso_double
68
lower()
const
69
{
70
return
(m_mz - m_delta);
71
};
72
73
pappso_double
74
upper()
const
75
{
76
return
(m_mz + m_delta);
77
};
78
};
79
80
}
// namespace pappso
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition:
types.h:67
types.h
This header contains all the type re-definitions and all the global variables definitions used in the...
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition:
exportinmportconfig.h:12
pappso
Definition:
aa.cpp:38
pappso::PrecisionPtr
const typedef PrecisionBase * PrecisionPtr
Definition:
precision.h:141
precision.h
pappso::PrecisionUnit::mz
exportinmportconfig.h
pappsomspp
mzrange.h
Generated on Tue Apr 28 2020 14:35:52 for pappsomspp by
1.8.16