|
libtcspc C++ API
Streaming TCSPC and time tag data processing
|
Bin mapper that maps unique datapoints to consecutive bin indices.
This is intended for use with datapoints that only have a small number of unique values (for example, those from tcspc::channel_data_mapper).
Each datapoint value is mapped to a bin index starting from 0, assigned in the order in which the value is encountered.
The datapoint values for each bin index can later be retrieved via the context.
| DataTypes | data type set specifying datapoint_type and bin_index_type. |
Public Member Functions | |
| unique_bin_mapper (access_tracker< unique_bin_mapper_access< typename DataTypes::datapoint_type > > &&tracker, arg::max_bin_index< typename DataTypes::bin_index_type > max_bin_index) | |
| Construct with context and parameter. | |
| auto | n_bins () const -> std::size_t |
| Implements bin mapper requirement. | |
| auto | operator() (typename DataTypes::datapoint_type datapoint) -> std::optional< typename DataTypes::bin_index_type > |
| Implements bin mapper requirement. | |
|
inlineexplicit |
Construct with context and parameter.
| tracker | access tracker for later access of the datapoint values |
| max_bin_index | number of bins minus one (must not be negative) |