12 #include "../../trace/trace.h"
13 #include "../../types.h"
14 #include "../../utils.h"
15 #include "../../pappsoexception.h"
16 #include "../../exception/exceptionoutofrange.h"
61 Trace filtered_trace(trace);
67 if(!filtered_trace.size())
71 for(
auto ¤t_data_point : filtered_trace)
75 if(!current_data_point.y)
80 std::map<double, double>::iterator map_iterator;
82 std::pair<std::map<pappso_double, pappso_double>::iterator,
bool> result;
84 result = map_trace.insert(
85 std::pair<pappso_double, pappso_double>(
x, current_data_point.y));
97 result.first->second += current_data_point.y;
116 if(!map_trace_in.size())
117 return map_trace_out;
Trace & filter(Trace &trace) const override
FilterResampleKeepXRange m_filterXRange
int m_decimalPlaces
Number of decimals to use for the keys (x values)
bool m_isApplyXRangeFilter
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