80 template <
typename SpectrumType>
83 if (spectrum.size() < 2)
89 double marks = (
double)param_.getValue(
"marks");
90 double parentmass = 0.0;
92 double tolerance = (
double)param_.getValue(
"tolerance");
93 std::map<double, int> matching_b_y_ions;
98 for (
Size i = 0; i < spectrum.size(); ++i)
100 while (j >= 0 && spectrum[j].getPosition()[0] > (parentmass - spectrum[i].getPosition()[0]) + tolerance)
106 if (j >= 0 && std::fabs(spectrum[i].getPosition()[0] + spectrum[j].getPosition()[0] - parentmass) < tolerance)
108 matching_b_y_ions[spectrum[i].getPosition()[0]]++;
109 matching_b_y_ions[spectrum[j].getPosition()[0]]++;
114 for (std::map<double, int>::const_iterator cmit = matching_b_y_ions.begin(); cmit != matching_b_y_ions.end(); ++cmit)
116 if (cmit->second >= marks)
118 marked.insert(std::pair<double, bool>(cmit->first,
true));
126 return "ComplementMarker";