BitStream
bitstream::bounded_range Class Reference

Class for quantizing single-precision floats into a range and precision. More...

#include <bounded_range.h>

Public Member Functions

constexpr bounded_range () noexcept
 
constexpr bounded_range (float min, float max, float precision) noexcept
 
constexpr float get_min () const noexcept
 
constexpr float get_max () const noexcept
 
constexpr float get_precision () const noexcept
 
constexpr uint32_t get_bits_required () const noexcept
 
constexpr uint32_t quantize (float value) const noexcept
 
constexpr float dequantize (uint32_t data) const noexcept
 

Detailed Description

Class for quantizing single-precision floats into a range and precision.

Constructor & Destructor Documentation

◆ bounded_range() [1/2]

constexpr bitstream::bounded_range::bounded_range ( )
inlineconstexprnoexcept

◆ bounded_range() [2/2]

constexpr bitstream::bounded_range::bounded_range ( float  min,
float  max,
float  precision 
)
inlineconstexprnoexcept

Member Function Documentation

◆ dequantize()

constexpr float bitstream::bounded_range::dequantize ( uint32_t  data) const
inlineconstexprnoexcept

◆ get_bits_required()

constexpr uint32_t bitstream::bounded_range::get_bits_required ( ) const
inlineconstexprnoexcept

◆ get_max()

constexpr float bitstream::bounded_range::get_max ( ) const
inlineconstexprnoexcept

◆ get_min()

constexpr float bitstream::bounded_range::get_min ( ) const
inlineconstexprnoexcept

◆ get_precision()

constexpr float bitstream::bounded_range::get_precision ( ) const
inlineconstexprnoexcept

◆ quantize()

constexpr uint32_t bitstream::bounded_range::quantize ( float  value) const
inlineconstexprnoexcept

The documentation for this class was generated from the following file: