LCOV - code coverage report
Current view: top level - elsa/solvers - Landweber.h (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 1 1 100.0 %
Date: 2024-05-16 04:22:26 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "LandweberIteration.h"
       4             : #include "elsaDefines.h"
       5             : 
       6             : namespace elsa
       7             : {
       8             :     /**
       9             :      * @brief Implementation of the Landweber iterations with both \f$ T \f$ and \f$ M \f$ being the
      10             :      * identity matrix. This reduces the update rule to:
      11             :      *
      12             :      * - \f$ x_{k+1} =  x_{k} + \lambda A^T (A(x_{k}) - b)\f$
      13             :      *
      14             :      * This is basically a special case of the gradient descent.
      15             :      *
      16             :      * @author David Frank
      17             :      * @see LandweberIteration
      18             :      */
      19             :     template <typename data_t = real_t>
      20             :     class Landweber : public LandweberIteration<data_t>
      21             :     {
      22             :     public:
      23             :         /// Scalar alias
      24             :         using Scalar = typename LandweberIteration<data_t>::Scalar;
      25             : 
      26             :         /**
      27             :          * @brief Constructor for classical Landweber, accepting an operator, a measurement vector
      28             :          * and a step size
      29             :          *
      30             :          * @param[in] A linear operator to solve the problem with
      31             :          * @param[in] b measurement vector of the problem
      32             :          * @param[in] stepSize the fixed step size to be used while solving
      33             :          */
      34             :         Landweber(const LinearOperator<data_t>& A, const DataContainer<data_t>& b,
      35             :                   SelfType_t<data_t> stepSize);
      36             : 
      37             :         /**
      38             :          * @brief Constructor for classical Landweber, accepting an operator and a measurement
      39             :          * vector
      40             :          *
      41             :          * @param[in] A linear operator to solve the problem with
      42             :          * @param[in] b measurment vector of the problem
      43             :          */
      44             :         Landweber(const LinearOperator<data_t>& A, const DataContainer<data_t>& b);
      45             : 
      46             :         /// make copy constructor deletion explicit
      47             :         Landweber(const Landweber<data_t>&) = delete;
      48             : 
      49             :         /// default destructor
      50           4 :         ~Landweber() override = default;
      51             : 
      52             :     protected:
      53             :         std::unique_ptr<LinearOperator<data_t>>
      54             :             setupOperators(const LinearOperator<data_t>& A) const override;
      55             : 
      56             :     private:
      57             :         /// implement the polymorphic clone operation
      58             :         Landweber<data_t>* cloneImpl() const override;
      59             : 
      60             :         /// implement the polymorphic comparison operation
      61             :         bool isEqual(const Solver<data_t>& other) const override;
      62             :     };
      63             : } // namespace elsa

Generated by: LCOV version 1.14