49template <
class K,
class T,
class C,
class A,
class Predicate>
53 for(
auto i =
c.begin(),
last =
c.end(); i !=
last;)
85 std::pair<std::map<std::size_t, Bucket>::iterator,
bool> ret;
88 if(ret.second ==
false)
95 ret.first->second.push_back(spectrum_int.
getId());
109 std::vector<Bucket> bucketList;
115 if(map_pair.second.size() > 1)
116 bucketList.push_back(map_pair.second);
120 std::sort(bucketList.begin(), bucketList.end());
128 std::size_t spectrum_idx_end)
131 qDebug() <<
"spectrum_idx_begin=" << spectrum_idx_begin
132 <<
" spectrum_idx_end=" << spectrum_idx_end;
134 [spectrum_idx_begin, spectrum_idx_end](
const auto &item) {
135 return ((item.second.front() >= spectrum_idx_begin) &&
136 (item.second.back() <= spectrum_idx_end));
rearrange itemcarts into buckets
std::size_t m_itemCartCount
void addItemCart(const ItemCart &item_cart)
add ItemCart to Bucket list Each item in the cart is a key to build dedicated buckets for one item Th...
std::vector< Bucket > asSortedList() const
std::size_t getItemCartCount() const
std::map< std::size_t, Bucket > m_bucketMap
void removeBucketsWithinCartIdRange(std::size_t spectrum_idx_begin, std::size_t spectrum_idx_end)
removes buckets only showing intra relations in the spectrum index range
container for spectree items
const std::vector< std::size_t > & getItemList() const
std::size_t getId() const
void erase_if(std::map< K, T, C, A > &c, Predicate pred)
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...