LCOV - code coverage report
Current view: top level - elsa/operators - ZeroOperator.cpp (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 17 18 94.4 %
Date: 2024-05-16 04:22:26 Functions: 16 20 80.0 %

          Line data    Source code
       1             : #include "ZeroOperator.h"
       2             : #include "Timer.h"
       3             : #include "TypeCasts.hpp"
       4             : 
       5             : namespace elsa
       6             : {
       7             :     template <typename data_t>
       8             :     ZeroOperator<data_t>::ZeroOperator(const DataDescriptor& domainDescriptor,
       9             :                                        const DataDescriptor& rangeDescriptor)
      10             :         : LinearOperator<data_t>(domainDescriptor, rangeDescriptor)
      11          14 :     {
      12          14 :     }
      13             : 
      14             :     template <typename data_t>
      15             :     void ZeroOperator<data_t>::applyImpl(const DataContainer<data_t>&,
      16             :                                          DataContainer<data_t>& Ax) const
      17           4 :     {
      18           4 :         Timer timeguard("ZeroOperator", "apply");
      19           4 :         Ax = 0;
      20           4 :     }
      21             : 
      22             :     template <typename data_t>
      23             :     void ZeroOperator<data_t>::applyAdjointImpl(const DataContainer<data_t>&,
      24             :                                                 DataContainer<data_t>& Aty) const
      25           4 :     {
      26           4 :         Timer timeguard("ZeroOperator", "applyAdjoint");
      27           4 :         Aty = 0;
      28           4 :     }
      29             : 
      30             :     template <typename data_t>
      31             :     ZeroOperator<data_t>* ZeroOperator<data_t>::cloneImpl() const
      32           2 :     {
      33           2 :         return new ZeroOperator(this->getDomainDescriptor(), this->getRangeDescriptor());
      34           2 :     }
      35             : 
      36             :     template <typename data_t>
      37             :     bool ZeroOperator<data_t>::isEqual(const LinearOperator<data_t>& other) const
      38           2 :     {
      39           2 :         if (!LinearOperator<data_t>::isEqual(other))
      40           0 :             return false;
      41             : 
      42           2 :         return is<ZeroOperator>(other);
      43           2 :     }
      44             : 
      45             :     // ------------------------------------------
      46             :     // explicit template instantiation
      47             :     template class ZeroOperator<float>;
      48             :     template class ZeroOperator<complex<float>>;
      49             :     template class ZeroOperator<double>;
      50             :     template class ZeroOperator<complex<double>>;
      51             : 
      52             : } // namespace elsa

Generated by: LCOV version 1.14