LCOV - code coverage report
Current view: top level - problems - WLSSubsetProblem.cpp (source / functions) Hit Total Coverage
Test: test_coverage.info.cleaned Lines: 0 12 0.0 %
Date: 2022-08-04 03:43:28 Functions: 0 6 0.0 %

          Line data    Source code
       1             : #include "WLSSubsetProblem.h"
       2             : 
       3             : namespace elsa
       4             : {
       5             : 
       6             :     template <typename data_t>
       7           0 :     WLSSubsetProblem<data_t>::WLSSubsetProblem(
       8             :         const LinearOperator<data_t>& A, const DataContainer<data_t>& b,
       9             :         const std::vector<std::unique_ptr<LinearOperator<data_t>>>& subsetAs)
      10           0 :         : SubsetProblem<data_t>(WLSProblem<data_t>(A, b), *wlsProblemsFromOperators(subsetAs, b))
      11             :     {
      12           0 :     }
      13             : 
      14             :     template <typename data_t>
      15           0 :     auto WLSSubsetProblem<data_t>::cloneImpl() const -> WLSSubsetProblem<data_t>*
      16             :     {
      17           0 :         return new WLSSubsetProblem<data_t>(*this);
      18             :     }
      19             : 
      20             :     template <typename data_t>
      21             :     std::unique_ptr<std::vector<std::unique_ptr<Problem<data_t>>>>
      22           0 :         WLSSubsetProblem<data_t>::wlsProblemsFromOperators(
      23             :             const std::vector<std::unique_ptr<LinearOperator<data_t>>>& subsetAs,
      24             :             const DataContainer<data_t>& b)
      25             :     {
      26             :         // Checks for blocked data descriptor and block index out of bounds are already done in
      27             :         // the DataContainer, no need to do them here.
      28             : 
      29           0 :         auto subProblems = std::make_unique<std::vector<std::unique_ptr<Problem<data_t>>>>(0);
      30           0 :         for (long unsigned int i = 0; i < subsetAs.size(); i++) {
      31           0 :             subProblems->emplace_back(std::make_unique<WLSProblem<data_t>>(
      32           0 :                 *subsetAs[i], b.getBlock(static_cast<index_t>(i))));
      33             :         }
      34             : 
      35           0 :         return subProblems;
      36           0 :     }
      37             : 
      38             :     // ------------------------------------------
      39             :     // explicit template instantiation
      40             :     template class WLSSubsetProblem<float>;
      41             :     template class WLSSubsetProblem<double>;
      42             : } // namespace elsa

Generated by: LCOV version 1.14