libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches

Description

Bin mappers for use with tcspc::map_to_bins.

Bin mappers define the following members:

  • [[nodiscard]] auto n_bins() const -> std::size_t, which returns the number of bins to which datapoints are mapped, and
  • auto operator()(datapoint_type d) -> std::optional<bin_index_type>, where datapoint_type and bin_index_type must match the tcspc::map_to_bins() processor's NumericTraits. This function call operator maps the datapoint d to a bin index.

The mapping operator() is captured by the tcspc::bin_mapper_for concept. n_bins() is an additional convention not enforced by the concept.

(n_bins() is provided for convenience and is not used by tcspc::map_to_bins. Thus, any invokable, such as a lambda, can be used as a bin mapper.)

Concepts

concept  tcspc::bin_mapper_for
 Concept that is satisfied when T conforms to the libtcspc bin mapper interface mapping datapoints of type Datapoint to bin indices of type BinIndex.

Classes

class  tcspc::linear_bin_mapper< NumericTraits >
 Bin mapper for linear histograms of arbitrary size. More...
struct  tcspc::power_of_2_bin_mapper< NDataBits, NHistoBits, Flip, NumericTraits >
 Bin mapper that discards the least significant bits. More...
class  tcspc::unique_bin_mapper< NumericTraits >
 Bin mapper that maps unique datapoints to consecutive bin indices. More...