libpappsomspp
Library for mass spectrometry
datapoint.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <vector>
4
#include <limits>
5
#include <memory>
6
7
#include <QDataStream>
8
9
10
#include "../exportinmportconfig.h"
11
#include "../types.h"
12
13
14
namespace
pappso
15
{
16
struct
DataPoint;
17
typedef
std::shared_ptr<const DataPoint>
DataPointCstSPtr
;
18
19
20
struct
PMSPP_LIB_DECL
DataPoint
21
{
22
pappso_double
x
= -1;
23
pappso_double
y
= 0;
24
25
DataPoint
();
26
DataPoint
(
const
DataPoint
&other);
27
DataPoint
(
pappso_double
x,
pappso_double
y);
28
DataPoint
(std::pair<pappso_double, pappso_double> pair);
29
DataPoint
(
const
QString &text);
30
31
// For debugging purposes.
32
//~DataPoint();
33
34
DataPointCstSPtr
makeDataPointCstSPtr()
const
;
35
36
void
initialize(
pappso_double
x,
pappso_double
y);
37
void
initialize(
const
DataPoint
&other);
38
bool
initialize(
const
QString &text);
39
40
void
reset();
41
42
void
incrementX(
pappso_double
value);
43
void
incrementY(
pappso_double
value);
44
45
bool
operator==
(
const
DataPoint
&other)
const
;
46
47
DataPoint
&operator=(
const
DataPoint
&other);
48
49
bool
isValid()
const
;
50
51
QString toString()
const
;
52
QString toString(
int
decimals)
const
;
53
};
54
55
QDataStream &
operator<<
(QDataStream &out,
const
DataPoint
&dataPoint);
56
QDataStream &
operator>>
(QDataStream &out,
DataPoint
&dataPoint);
57
}
// namespace pappso
58
59
Q_DECLARE_METATYPE
(
pappso::DataPoint
);
60
extern
int
dataPointMetaTypeId
;
61
62
Q_DECLARE_METATYPE
(
pappso::DataPointCstSPtr
);
63
extern
int
dataPointCstSPtrMetaTypeId
;
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition:
types.h:69
dataPointMetaTypeId
int dataPointMetaTypeId
Definition:
datapoint.cpp:23
dataPointCstSPtrMetaTypeId
int dataPointCstSPtrMetaTypeId
Definition:
datapoint.cpp:27
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::operator==
bool operator==(Aa const &l, Aa const &r)
Definition:
aa.cpp:301
pappso::DataPoint
Definition:
datapoint.h:21
pappso::PeptideIonCter::y
@ y
pappso::PeptideIonCter::x
@ x
pappso::DataPointCstSPtr
std::shared_ptr< const DataPoint > DataPointCstSPtr
Definition:
datapoint.h:16
pappso::operator>>
QDataStream & operator>>(QDataStream &instream, MassSpectrum &massSpectrum)
Definition:
massspectrum.cpp:378
pappso::operator<<
QDataStream & operator<<(QDataStream &outstream, const MassSpectrum &massSpectrum)
Definition:
massspectrum.cpp:364
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(pappso::DataPoint)
pappsomspp
trace
datapoint.h
Generated on Wed Oct 21 2020 12:29:32 for libpappsomspp by
1.8.18