Loading...
Searching...
No Matches
maptrace.h
Go to the documentation of this file.
#pragma once
#include <vector>
#include <memory>
#include <QObject>
#include <QDataStream>
#include <QMetaType>
#include "pappsomspp/export-import-config.h"
#include "pappsomspp/core/types.h"
#include "trace.h"
#include "datapoint.h"
#include "pappsomspp/core/mzrange.h"
namespace pappso
{
class MapTrace;
// FIXME: not sure how these are actually used?
PMSPP_LIB_DECL QDataStream &operator<<(QDataStream &out, const Trace &trace);
PMSPP_LIB_DECL 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:36
pappso::MapTrace::toString
QString toString() const
Definition maptrace.cpp:226
pappso::MapTrace::makeMapTraceSPtr
MapTraceSPtr makeMapTraceSPtr() const
Definition maptrace.cpp:149
pappso::MapTrace::MapTrace
MapTrace()
Definition maptrace.cpp:29
pappso::MapTrace::operator=
virtual MapTrace & operator=(const MapTrace &other)
Definition maptrace.cpp:128
pappso::MapTrace::toTrace
Trace toTrace() const
Definition maptrace.cpp:214
pappso::MapTrace::xValues
std::vector< pappso_double > xValues()
Definition maptrace.cpp:163
pappso::MapTrace::makeMapTraceCstSPtr
MapTraceCstSPtr makeMapTraceCstSPtr() const
Definition maptrace.cpp:156
pappso::MapTrace::initialize
size_t initialize(const std::vector< pappso_double > &xVector, const std::vector< pappso_double > &yVector)
Definition maptrace.cpp:85
pappso::MapTrace::insertOrUpdate
void insertOrUpdate(const DataPoint &data_point)
Definition maptrace.cpp:187
pappso::MapTrace::yValues
std::vector< pappso_double > yValues()
Definition maptrace.cpp:175
pappso::TraceCombiner
Definition tracecombiner.h:24
pappso::TraceMinusCombiner
Definition traceminuscombiner.h:27
pappso::TracePlusCombiner
Definition tracepluscombiner.h:27
pappso::Trace
A simple container of DataPoint instances.
Definition trace.h:152
datapoint.h
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
mapTracePtrMetaTypeId
int mapTracePtrMetaTypeId
Definition maptrace.cpp:23
mapTraceMetaTypeId
int mapTraceMetaTypeId
Definition maptrace.cpp:22
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(pappso::MapTrace)
mzrange.h
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::MapTraceSPtr
std::shared_ptr< MapTrace > MapTraceSPtr
Definition maptrace.h:28
pappso::MapTraceCstSPtr
std::shared_ptr< const MapTrace > MapTraceCstSPtr
Definition maptrace.h:29
pappso::DataPoint
Definition datapoint.h:22
trace.h
types.h