Cardinal
Functions
bin_utility Namespace Reference

Functions

unsigned int linearBin (const Real &value, const std::vector< Real > &bounds)
 
Real midpoint (const unsigned int &bin, const std::vector< Real > &bounds)
 

Function Documentation

◆ linearBin()

unsigned int bin_utility::linearBin ( const Real &  value,
const std::vector< Real > &  bounds 
)

Map value onto a linear binning

Parameters
[in]valueinput value
[in]boundsbounds of the bins
Returns
bin index

◆ midpoint()

Real bin_utility::midpoint ( const unsigned int &  bin,
const std::vector< Real > &  bounds 
)

Get the midpoint of a bin

Parameters
[in]binindex
[in]boundsbounds of the bins
Returns
midpoint