@brief Fast search for spectrum range begin Returns the first scan which has equal or higher (>=) RT than @p rt. @note Make sure the spectra are sorted with respect to retention time! Otherwise the result is undefined. */
| 153 | @note Make sure the spectra are sorted with respect to retention time! Otherwise the result is undefined. |
| 154 | */ |
| 155 | MSExperiment::ConstIterator MSExperiment::RTBegin(CoordinateType rt) const |
| 156 | { |
| 157 | SpectrumType s; |
| 158 | s.setRT(rt); |
| 159 | return lower_bound(spectra_.begin(), spectra_.end(), s, SpectrumType::RTLess()); |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | @brief Fast search for spectrum range end (returns the past-the-end iterator) |