11 #include "../../trace/trace.h"
12 #include "../../types.h"
13 #include "../../utils.h"
14 #include "../../pappsoexception.h"
15 #include "../../exception/exceptionoutofrange.h"
60 for(
auto ¤t_data_point : trace)
64 if(!current_data_point.y)
72 std::map<double, double>::iterator map_iterator;
74 std::pair<std::map<pappso_double, pappso_double>::iterator,
bool> result;
79 result = map_trace.insert(
80 std::pair<pappso_double, pappso_double>(
x, -current_data_point.y));
96 result.first->second -= current_data_point.y;
116 if(!map_trace_in.size())
117 return map_trace_out;
int m_decimalPlaces
Number of decimals to use for the keys (x values)
virtual MapTrace & combine(MapTrace &map_trace, const Trace &trace) const override
virtual ~TraceMinusCombiner()
A simple container of DataPoint instances.
static pappso_double roundToDecimals(pappso_double value, int decimal_places)
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
std::shared_ptr< const TraceMinusCombiner > TraceMinusCombinerCstSPtr