libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
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
#include <QMetaType>
10
11
#include "
pappsomspp/export-import-config.h
"
12
#include "
pappsomspp/core/types.h
"
13
14
15
namespace
pappso
16
{
17
struct
DataPoint
;
18
typedef
std::shared_ptr<const DataPoint>
DataPointCstSPtr
;
19
20
21
struct
PMSPP_LIB_DECL
DataPoint
22
{
23
public
:
24
pappso_double
x
= -1;
25
pappso_double
y
= 0;
26
27
DataPoint
() =
default
;
28
DataPoint
(
pappso_double
x
,
pappso_double
y
);
29
DataPoint
(std::pair<pappso_double, pappso_double> pair);
30
DataPoint
(
const
QString &text);
31
DataPoint
(
const
DataPoint
&other);
32
33
// For debugging purposes.
34
//~DataPoint();
35
36
DataPointCstSPtr
makeDataPointCstSPtr
()
const
;
37
38
void
initialize
(
pappso_double
x
,
pappso_double
y
);
39
void
initialize
(
const
DataPoint
&other);
40
bool
initialize
(
const
QString &text);
41
42
void
reset
();
43
44
void
incrementX
(
pappso_double
value);
45
void
incrementY
(
pappso_double
value);
46
47
bool
operator==
(
const
DataPoint
&other)
const
;
48
49
DataPoint
&
operator=
(
const
DataPoint
&other);
50
51
bool
isValid
()
const
;
52
53
QString
toString
()
const
;
54
QString
toString
(
int
decimals)
const
;
55
};
56
57
PMSPP_LIB_DECL
QDataStream &
operator<<
(QDataStream &out,
const
DataPoint
&dataPoint);
58
PMSPP_LIB_DECL
QDataStream &
operator>>
(QDataStream &out,
DataPoint
&dataPoint);
59
}
// namespace pappso
60
61
Q_DECLARE_METATYPE
(
pappso::DataPoint
);
62
extern
int
dataPointMetaTypeId
;
63
64
Q_DECLARE_METATYPE
(
pappso::DataPointCstSPtr
);
65
extern
int
dataPointCstSPtrMetaTypeId
;
dataPointCstSPtrMetaTypeId
int dataPointCstSPtrMetaTypeId
Definition
datapoint.cpp:27
dataPointMetaTypeId
int dataPointMetaTypeId
Definition
datapoint.cpp:24
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(pappso::DataPoint)
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.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<<
QDataStream & operator<<(QDataStream &outstream, const MassSpectrum &massSpectrum)
Definition
massspectrum.cpp:339
pappso::operator>>
QDataStream & operator>>(QDataStream &instream, MassSpectrum &massSpectrum)
Definition
massspectrum.cpp:353
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition
types.h:60
pappso::DataPointCstSPtr
std::shared_ptr< const DataPoint > DataPointCstSPtr
Definition
datapoint.h:18
pappso::DataPoint
Definition
datapoint.h:22
pappso::DataPoint::incrementY
void incrementY(pappso_double value)
Definition
datapoint.cpp:183
pappso::DataPoint::DataPoint
DataPoint()=default
pappso::DataPoint::x
pappso_double x
Definition
datapoint.h:24
pappso::DataPoint::isValid
bool isValid() const
Definition
datapoint.cpp:128
pappso::DataPoint::toString
QString toString() const
Definition
datapoint.cpp:135
pappso::DataPoint::initialize
void initialize(pappso_double x, pappso_double y)
Definition
datapoint.cpp:72
pappso::DataPoint::operator==
bool operator==(const DataPoint &other) const
Definition
datapoint.cpp:189
pappso::DataPoint::incrementX
void incrementX(pappso_double value)
Definition
datapoint.cpp:176
pappso::DataPoint::operator=
DataPoint & operator=(const DataPoint &other)
Definition
datapoint.cpp:196
pappso::DataPoint::reset
void reset()
Definition
datapoint.cpp:120
pappso::DataPoint::y
pappso_double y
Definition
datapoint.h:25
pappso::DataPoint::makeDataPointCstSPtr
DataPointCstSPtr makeDataPointCstSPtr() const
Definition
datapoint.cpp:65
types.h
pappsomspp
core
trace
datapoint.h
Generated on
for libpappsomspp by
1.17.0