12 #include "../../trace/trace.h"
13 #include "../../types.h"
14 #include "../../utils.h"
15 #include "../../pappsoexception.h"
16 #include "../../exception/exceptionoutofrange.h"
54 const Trace &trace)
const
61 for(
auto ¤t_data_point : trace)
65 if(!current_data_point.y)
70 std::map<double, double>::iterator map_iterator;
72 std::pair<std::map<pappso_double, pappso_double>::iterator,
bool> result;
74 result = map_trace.insert(
75 std::pair<pappso_double, pappso_double>(
x, current_data_point.y));
87 result.first->second += current_data_point.y;
106 if(!map_trace_in.size())
107 return map_trace_out;
int m_decimalPlaces
Number of decimals to use for the keys (x values)
virtual ~TracePlusCombiner()
virtual MapTrace & combine(MapTrace &map_trace, const Trace &trace) const override
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 TracePlusCombiner > TracePlusCombinerCstSPtr