maptrace.h
Go to the documentation of this file.
#pragma once
#include <vector>
#include <memory>
#include <QDataStream>
#include <QMetaType>
#include "../exportinmportconfig.h"
#include "../types.h"
#include "trace.h"
#include "datapoint.h"
#include "../mzrange.h"
namespace pappso
{
class MapTrace;
QDataStream &operator<<(QDataStream &out, const Trace &trace);
QDataStream &operator>>(QDataStream &out, Trace &trace);
typedef std::shared_ptr<MapTrace> MapTraceSPtr;
typedef std::shared_ptr<const MapTrace> MapTraceCstSPtr;
class TraceCombiner;
class TracePlusCombiner;
class TraceMinusCombiner;
class PMSPP_LIB_DECL MapTrace : public std::map<pappso_double, pappso_double>
{
public:
MapTrace();
MapTrace(
const std::vector<std::pair<pappso_double, pappso_double>> &dataPoints);
MapTrace(const std::vector<DataPoint> &dataPoints);
MapTrace(const MapTrace &other);
MapTrace(const Trace &trace);
virtual ~MapTrace();
size_t initialize(const std::vector<pappso_double> &xVector,
const std::vector<pappso_double> &yVector);
size_t initialize(const std::map<pappso_double, pappso_double> &map);
virtual MapTrace &operator=(const MapTrace &other);
MapTraceSPtr makeMapTraceSPtr() const;
MapTraceCstSPtr makeMapTraceCstSPtr() const;
std::vector<pappso_double> xValues();
std::vector<pappso_double> yValues();
void insertOrUpdate(const DataPoint &data_point);
void insertOrUpdate(const Trace &trace);
Trace toTrace() const;
QString toString() const;
protected:
private:
};
} // namespace pappso
Q_DECLARE_METATYPE(pappso::MapTrace);
Q_DECLARE_METATYPE(pappso::MapTrace *);
extern int mapTraceMetaTypeId;
extern int mapTracePtrMetaTypeId;
pappso::MapTrace
Definition: maptrace.h:33
pappso::TraceCombiner
Definition: tracecombiner.h:28
pappso::TraceMinusCombiner
Definition: traceminuscombiner.h:27
pappso::TracePlusCombiner
Definition: tracepluscombiner.h:27
pappso::Trace
A simple container of DataPoint instances.
Definition: trace.h:148
datapoint.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition: exportinmportconfig.h:14
mapTracePtrMetaTypeId
int mapTracePtrMetaTypeId
Definition: maptrace.cpp:23
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(pappso::MapTrace)
mapTraceMetaTypeId
int mapTraceMetaTypeId
Definition: maptrace.cpp:21
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 &instream, MassSpectrum &massSpectrum)
Definition: massspectrum.cpp:357
pappso::MapTraceSPtr
std::shared_ptr< MapTrace > MapTraceSPtr
Definition: maptrace.h:25
pappso::operator<<
QDataStream & operator<<(QDataStream &outstream, const MassSpectrum &massSpectrum)
Definition: massspectrum.cpp:343
pappso::MapTraceCstSPtr
std::shared_ptr< const MapTrace > MapTraceCstSPtr
Definition: maptrace.h:26
pappso::DataPoint
Definition: datapoint.h:21
trace.h