| 
    libpappsomspp
    
   Library for mass spectrometry 
   | 
 
#include <bucketclustering.h>
Public Member Functions | |
| BucketClustering () | |
| 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 The buckets will then reference the carts that contains one item   | |
| std::size_t | getItemCartCount () const | 
| std::vector< Bucket > | asSortedList () const | 
| std::size_t | size () const | 
| 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   | |
Private Attributes | |
| std::map< std::size_t, Bucket > | m_bucketMap | 
| std::size_t | m_itemCartCount = 0 | 
Definition at line 55 of file bucketclustering.h.
| pappso::spectree::BucketClustering::BucketClustering | ( | ) | 
Initializes and fill the map collection containing the buckets and their content (spectra identifiers). The spectra identifiers and masses sets are read from Spectrum objects.
| spectra | an array of Spectrum | 
Definition at line 60 of file bucketclustering.cpp.
| void pappso::spectree::BucketClustering::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 The buckets will then reference the carts that contains one item
| item_cart | to add in the bucket list | 
Definition at line 79 of file bucketclustering.cpp.
References pappso::spectree::ItemCart::getId(), pappso::spectree::ItemCart::getItemList(), m_bucketMap, and m_itemCartCount.
| std::vector< Bucket > pappso::spectree::BucketClustering::asSortedList | ( | ) | const | 
Iterate the buckets present in the map collection and store them into a raw array of buckets lexicographically sorted based on the buckets content. Erase the map representation afterwards to spare memory.
Definition at line 102 of file bucketclustering.cpp.
References m_bucketMap.
Referenced by pappso::spectree::SpecTree::SpecTree().
| std::size_t pappso::spectree::BucketClustering::getItemCartCount | ( | ) | const | 
Definition at line 72 of file bucketclustering.cpp.
References m_itemCartCount.
Referenced by pappso::spectree::SpecTree::SpecTree().
| void pappso::spectree::BucketClustering::removeBucketsWithinCartIdRange | ( | std::size_t | spectrum_idx_begin, | 
| std::size_t | spectrum_idx_end ) | 
removes buckets only showing intra relations in the spectrum index range
removes buckets if their relationships implies only spectrum within the range of index given as arguments
| spectrum_idx_begin | spectrum index defining the starting boundary | 
| spectrum_idx_end | spectrum index defining the ending boundary | 
Definition at line 127 of file bucketclustering.cpp.
References pappso::spectree::erase_if(), and m_bucketMap.
| std::size_t pappso::spectree::BucketClustering::size | ( | ) | const | 
Provides access to the number of buckets present in the collection.
Definition at line 65 of file bucketclustering.cpp.
References m_bucketMap.
      
  | 
  private | 
Map of the mass value to the bucket representing this mass value. This representation is mainly used to fill the data and is then stored into a raw array and disposed.
Definition at line 119 of file bucketclustering.h.
Referenced by addItemCart(), asSortedList(), removeBucketsWithinCartIdRange(), and size().
      
  | 
  private | 
Definition at line 121 of file bucketclustering.h.
Referenced by addItemCart(), and getItemCartCount().