28#include <boost/cstdint.hpp>
51 std::vector<double> &
breaks,
52 std::vector<uint32_t> & indic
69 const std::vector<uint32_t> & indic )
71 if((
breaks.size() - 1 ) != indic.size()){
72 throw std::out_of_range(
"breaks.size == inic + 1 , failed!" );
95 template<
typename InputIterator>
99 std::vector<std::pair<std::size_t, std::size_t> > & bucketPairs
102 std::size_t index(0);
103 std::pair<std::size_t, bool> res;
104 for(;beg !=end; ++beg, ++index)
109 bucketPairs.push_back(std::make_pair(res.first , index ));
122 std::size_t ub = std::distance(
begbreaks_,it2);
128 return std::make_pair(ub,
true);
130 return std::make_pair(ub,
false);
133 return std::make_pair(0,
false);
void breaks(double minMass, double maxMass, TMassComparator tmassComp, std::vector< double > &breaks, bool exact=false)
Segment mass range according to Mass Compare functor could be used to histogram a dataset or to compu...
EQUISPACEINTERPOL Interpolation on a equidistantly spaced grid.
std::vector< double > breaks_
std::pair< std::size_t, bool > operator()(double dat)
Bucket1D & operator=(const Bucket1D &rhs)
void operator()(InputIterator beg, InputIterator end, std::vector< std::pair< std::size_t, std::size_t > > &bucketPairs)
The result tells you in which bucket which input should end up.
std::vector< uint32_t > indicator_
Bucket1D(std::vector< double > &breaks, std::vector< uint32_t > &indic)
CTor.
Bucket1D(const Bucket1D &rhs)
CCTor.
void set(const std::vector< double > &breaks, const std::vector< uint32_t > &indic)
set the data