LCOV - code coverage report
Current view: top level - elsa/functionals - LInfNorm.cpp (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 18 19 94.7 %
Date: 2024-05-16 04:22:26 Functions: 24 24 100.0 %

          Line data    Source code
       1             : #include "LInfNorm.h"
       2             : #include "DataContainer.h"
       3             : #include "TypeCasts.hpp"
       4             : 
       5             : #include <stdexcept>
       6             : 
       7             : namespace elsa
       8             : {
       9             :     template <typename data_t>
      10             :     LInfNorm<data_t>::LInfNorm(const DataDescriptor& domainDescriptor)
      11             :         : Functional<data_t>(domainDescriptor)
      12          16 :     {
      13          16 :     }
      14             : 
      15             :     template <typename data_t>
      16             :     data_t LInfNorm<data_t>::evaluateImpl(const DataContainer<data_t>& Rx) const
      17           4 :     {
      18           4 :         return Rx.lInfNorm();
      19           4 :     }
      20             : 
      21             :     template <typename data_t>
      22             :     void LInfNorm<data_t>::getGradientImpl(const DataContainer<data_t>&,
      23             :                                            DataContainer<data_t>&) const
      24           4 :     {
      25           4 :         throw LogicError("LInfNorm: not differentiable, so no gradient! (busted!)");
      26           4 :     }
      27             : 
      28             :     template <typename data_t>
      29             :     LinearOperator<data_t> LInfNorm<data_t>::getHessianImpl(const DataContainer<data_t>&) const
      30           4 :     {
      31           4 :         throw LogicError("LInfNorm: not differentiable, so no Hessian! (busted!)");
      32           4 :     }
      33             : 
      34             :     template <typename data_t>
      35             :     LInfNorm<data_t>* LInfNorm<data_t>::cloneImpl() const
      36           4 :     {
      37           4 :         return new LInfNorm(this->getDomainDescriptor());
      38           4 :     }
      39             : 
      40             :     template <typename data_t>
      41             :     bool LInfNorm<data_t>::isEqual(const Functional<data_t>& other) const
      42           4 :     {
      43           4 :         if (!Functional<data_t>::isEqual(other))
      44           0 :             return false;
      45             : 
      46           4 :         return is<LInfNorm>(other);
      47           4 :     }
      48             : 
      49             :     // ------------------------------------------
      50             :     // explicit template instantiation
      51             :     template class LInfNorm<float>;
      52             :     template class LInfNorm<double>;
      53             :     template class LInfNorm<complex<float>>;
      54             :     template class LInfNorm<complex<double>>;
      55             : 
      56             : } // namespace elsa

Generated by: LCOV version 1.14