OpenMS
Loading...
Searching...
No Matches
NuXLPrecursorIndex Struct Reference

Sorted precursor masses (same order as the multimap they are created from) with a bucket index. More...

#include <OpenNuXL/include/NuXLSearchIndex.h>

Public Member Functions

template<class MultiMap >
void build (const MultiMap &mm)
 
std::pair< size_t, size_t > range_ (double x) const
 
size_t lowerBound (double x) const
 == multimap::lower_bound / upper_bound (as index)
 
size_t upperBound (double x) const
 

Public Attributes

std::vector< double > mass
 
std::vector< std::pair< Size, int > > scan_and_isotope
 
double lo = 0
 
std::vector< uint32_t > bucket
 bucket[k] = index of the first precursor with mass >= lo + k * BIN
 

Static Public Attributes

static constexpr double BIN = 0.05
 

Detailed Description

Sorted precursor masses (same order as the multimap they are created from) with a bucket index.

Member Function Documentation

◆ build()

template<class MultiMap >
void build ( const MultiMap &  mm)
inline

◆ lowerBound()

size_t lowerBound ( double  x) const
inline

== multimap::lower_bound / upper_bound (as index)

References NuXLPrecursorIndex::mass, and NuXLPrecursorIndex::range_().

◆ range_()

std::pair< size_t, size_t > range_ ( double  x) const
inline

◆ upperBound()

size_t upperBound ( double  x) const
inline

Member Data Documentation

◆ BIN

constexpr double BIN = 0.05
staticconstexpr

◆ bucket

std::vector<uint32_t> bucket

bucket[k] = index of the first precursor with mass >= lo + k * BIN

Referenced by NuXLPrecursorIndex::build(), and NuXLPrecursorIndex::range_().

◆ lo

double lo = 0

◆ mass

◆ scan_and_isotope

std::vector<std::pair<Size, int> > scan_and_isotope