Quantization of data.  
 More...
#include <QuantizationNoise.h>
Quantization of data. 
This class provides basic functionality to simulate quantization of (sensor) data. Data input can be either rounded down or rounded to a given quantization interval. It tracks the rest of the quantization for the subsequent call 
- Examples: 
- NoiseTest.cpp.
◆ QuantizationMethod
The quanitization method. 
| Enumerator | 
|---|
| FLOOR | Enum to round down  | 
| ROUND | Enum to round  | 
 
 
◆ QuantizationNoise()
  
  | 
        
          | ct::core::QuantizationNoise::QuantizationNoise | ( | double | bias = 0.0, |  
          |  |  | double | quantizationInterval = 1.0, |  
          |  |  | QuantizationMethod | method = FLOOR |  
          |  | ) |  |  |  | inline | 
 
Default constructor. 
- Parameters
- 
  
    | bias | A bias to apply after the quantization (will not be quantized!) |  | quantizationInterval | The quantization interval to quantize to |  | method | The quantization method |  
 
 
 
◆ noisify() [1/2]
  
  | 
        
          | void ct::core::QuantizationNoise::noisify | ( | double & | value, |  
          |  |  | size_t | index = 0 |  
          |  | ) |  |  |  | inline | 
 
Applies quantization to a value. 
This applies quantization to a value and stores the rest. The given index serves to track the rest of the quantization for the next call. The index is not a time index but simply an 'ID'. 
- Parameters
- 
  
    | value | The value to quantize |  | index | The identifier |  
 
- Examples: 
- NoiseTest.cpp.
References FLOOR, and ROUND.
Referenced by noisify(), and TEST().
 
 
◆ noisify() [2/2]
template<size_t size> 
  
  | 
        
          | void ct::core::QuantizationNoise::noisify | ( | Eigen::Matrix< double, size, 1 > & | value | ) |  |  | inline | 
 
Applies quantization to a vector. 
This applies quantization to a vector and stores the rest. It uses the entry in the vector as an identifier to store the rest of the value 
- Parameters
- 
  
    | value | The value to quantize |  
 
References i, and noisify().
 
 
◆ reset()
  
  | 
        
          | void ct::core::QuantizationNoise::reset | ( |  | ) |  |  | inline | 
 
Resets the quantization. 
Deletes the quantization rest to reset the quantization 
 
 
The documentation for this class was generated from the following file:
- /home/gim2rng/ct_devel_ws/src/control-toolbox/ct_core/include/ct/core/common/QuantizationNoise.h