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

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "elsaDefines.h"
       4             : #include "LinearOperator.h"
       5             : #include "DataContainer.h"
       6             : 
       7             : #include <optional>
       8             : #include <variant>
       9             : #include <vector>
      10             : 
      11             : namespace elsa
      12             : {
      13             :     /**
      14             :      * @brief Regularized inversion. This solves a system of equations of a
      15             :      * stacked operator
      16             :      */
      17             :     template <class data_t>
      18             :     DataContainer<data_t>
      19             :         reguarlizedInversion(const LinearOperator<data_t>& op, const DataContainer<data_t>& b,
      20             :                              const std::vector<std::unique_ptr<LinearOperator<data_t>>>& regOps,
      21             :                              const std::vector<DataContainer<data_t>>& regData,
      22             :                              std::variant<data_t, std::vector<data_t>> lambda, index_t niters = 5,
      23             :                              std::optional<DataContainer<data_t>> W = std::nullopt,
      24             :                              std::optional<DataContainer<data_t>> x0 = std::nullopt);
      25             : 
      26             :     template <class data_t>
      27             :     DataContainer<data_t>
      28             :         reguarlizedInversion(const LinearOperator<data_t>& op, const DataContainer<data_t>& b,
      29             :                              const LinearOperator<data_t>& regOp,
      30             :                              const DataContainer<data_t>& regData, SelfType_t<data_t> lambda,
      31             :                              index_t niters = 5,
      32             :                              std::optional<DataContainer<data_t>> W = std::nullopt,
      33             :                              std::optional<DataContainer<data_t>> x0 = std::nullopt)
      34          24 :     {
      35          24 :         std::vector<std::unique_ptr<LinearOperator<data_t>>> regOps;
      36          24 :         regOps.emplace_back(regOp.clone());
      37             : 
      38          24 :         std::vector<DataContainer<data_t>> regDatas;
      39          24 :         regDatas.emplace_back(regData);
      40             : 
      41          24 :         return reguarlizedInversion<data_t>(op, b, regOps, regDatas, lambda, niters, W, x0);
      42          24 :     }
      43             : } // namespace elsa

Generated by: LCOV version 1.14