libpappsomspp
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
48
public
:
49
MzRange
(
pappso_double
mz
,
PrecisionPtr
precision);
50
51
MzRange
(
pappso_double
mz
,
pappso_double
delta);
52
53
MzRange
(
pappso_double
mz
,
54
PrecisionPtr
precision_lower,
55
PrecisionPtr
precision_upper);
56
57
MzRange
(
const
MzRange
&other);
58
59
virtual
~
MzRange
();
60
61
MzRange
&operator=(
const
MzRange
&other);
62
MzRange
&operator+=(
const
MzRange
&other);
63
MzRange
&operator*=(
double
number);
64
65
pappso_double
getMz()
const
;
66
67
bool
contains(
pappso_double
)
const
;
68
QString toString()
const
;
69
70
pappso_double
71
lower
()
const
72
{
73
return
(m_mz - m_delta);
74
};
75
76
pappso_double
77
upper
()
const
78
{
79
return
(m_mz + m_delta);
80
};
81
82
83
private
:
84
pappso_double
m_mz
;
85
pappso_double
m_delta
;
86
};
87
88
}
// namespace pappso
pappso::MzRange
Definition:
mzrange.h:46
pappso::MzRange::lower
pappso_double lower() const
Definition:
mzrange.h:71
pappso::MzRange::upper
pappso_double upper() const
Definition:
mzrange.h:77
pappso::MzRange::m_delta
pappso_double m_delta
Definition:
mzrange.h:85
pappso::MzRange::m_mz
pappso_double m_mz
Definition:
mzrange.h:80
pappso::PrecisionBase
Definition:
precision.h:44
exportinmportconfig.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition:
exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition:
aa.cpp:39
pappso::PrecisionUnit::mz
@ mz
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition:
types.h:49
precision.h
types.h
This header contains all the type re-definitions and all the global variables definitions used in the...
pappsomspp
mzrange.h
Generated on Sun Jan 1 2023 15:24:07 for libpappsomspp by
1.9.1