#include <bin1d.hpp>
Definition at line 44 of file bin1d.hpp.
◆ Bin1D() [1/3]
ralab::base::resample::Bin1D::Bin1D |
( |
| ) |
|
|
inline |
Definition at line 50 of file bin1d.hpp.
std::vector< double > breaks_
◆ Bin1D() [2/3]
ralab::base::resample::Bin1D::Bin1D |
( |
std::vector< double > & |
breaks | ) |
|
|
inline |
Definition at line 52 of file bin1d.hpp.
55 {
57 }
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...
void setBreaks(const std::vector< double > &breaks)
References setBreaks().
◆ Bin1D() [3/3]
ralab::base::resample::Bin1D::Bin1D |
( |
const Bin1D & |
rhs | ) |
|
|
inline |
◆ setBreaks()
void ralab::base::resample::Bin1D::setBreaks |
( |
const std::vector< double > & |
breaks | ) |
|
|
inline |
◆ reset()
void ralab::base::resample::Bin1D::reset |
( |
| ) |
|
|
inline |
◆ getBreaks() [1/2]
void ralab::base::resample::Bin1D::getBreaks |
( |
std::vector< double > & |
breaks | ) |
const |
|
inline |
◆ getBreaks() [2/2]
const std::vector< double > & ralab::base::resample::Bin1D::getBreaks |
( |
| ) |
const |
|
inline |
◆ inRange()
bool ralab::base::resample::Bin1D::inRange |
( |
double |
dat | ) |
const |
|
inline |
◆ operator()() [1/2]
std::size_t ralab::base::resample::Bin1D::operator() |
( |
double |
dat | ) |
const |
|
inline |
◆ operator()() [2/2]
void ralab::base::resample::Bin1D::operator() |
( |
double |
dat1, |
|
|
double |
dat2, |
|
|
std::vector< int32_t > & |
idx, |
|
|
std::vector< double > & |
dist |
|
) |
| const |
|
inline |
Definition at line 99 of file bin1d.hpp.
104 {
107
111 idx.resize(n);
112 dist.resize(n);
113
114 if(ub1 == ub2 ){
115 idx[0] = ub1-1;
116 dist[0] = dat2 - dat1;
117 return;
118 }
119 else{
120 for(
int64_t i = 0; it1 != (it2+1) ; i++, it1++){
121 idx[i] = ub1 + i - 1;
122 if(i == 0)
123 {
124 dist[i] = *(it1) - dat1;
125 }
126 else if( i < n - 1 )
127 {
128 dist[i] = *(it1) - *(it1-1);
129 }
130 else
131 {
132 dist[i] = dat2 - *(it1-1);
133 }
134 }
135 }
136
137 }
References begbreaks_, and endbreaks_.
◆ breaks_
std::vector<double> ralab::base::resample::Bin1D::breaks_ |
◆ begbreaks_
double* ralab::base::resample::Bin1D::begbreaks_ |
◆ endbreaks_
double* ralab::base::resample::Bin1D::endbreaks_ |
The documentation for this struct was generated from the following file:
- /build/libpwiz-MRabzf/libpwiz-3.0.18342/pwiz/utility/findmf/base/resample/bin1d.hpp