LCOV - code coverage report
Current view: top level - elsa/generators - NoiseGenerators.h (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 2 2 100.0 %
Date: 2024-12-21 07:37:52 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "DataContainer.h"
       4             : #include <random>
       5             : 
       6             : namespace elsa
       7             : {
       8             : 
       9             :     struct NoNoiseGenerator {
      10             :     public:
      11             :         template <typename data_t>
      12             :         DataContainer<data_t> operator()(const DataContainer<data_t>& dc) const;
      13             :     };
      14             : 
      15             :     struct GaussianNoiseGenerator {
      16             :     public:
      17           2 :         GaussianNoiseGenerator(real_t mean, real_t stddev) : _mean(mean), _stddev(stddev) {}
      18             : 
      19             :         template <typename data_t>
      20             :         DataContainer<data_t> operator()(const DataContainer<data_t>& dc) const;
      21             : 
      22             :     private:
      23             :         real_t _mean{0.0};
      24             :         real_t _stddev{0.0};
      25             :     };
      26             : 
      27             :     struct PoissonNoiseGenerator {
      28             :     public:
      29           2 :         PoissonNoiseGenerator(real_t mean) : _mean(mean) {}
      30             : 
      31             :         template <typename data_t>
      32             :         DataContainer<data_t> operator()(const DataContainer<data_t>& dc) const;
      33             : 
      34             :     private:
      35             :         real_t _mean{0.0};
      36             :     };
      37             : } // namespace elsa

Generated by: LCOV version 1.14