LCOV - code coverage report
Current view: top level - elsa/line_search - FixedStepSize.h (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 1 1 100.0 %
Date: 2024-12-21 07:37:52 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "LineSearchMethod.h"
       4             : 
       5             : namespace elsa
       6             : {
       7             :     /**
       8             :      * @brief Fixed Step Size
       9             :      *
      10             :      * Simply returns a fixed step size.
      11             :      *
      12             :      * @author
      13             :      * - Said Alghabra - initial code
      14             :      *
      15             :      * @tparam data_t data type for the domain and range of the problem, defaulting to real_t
      16             :      */
      17             :     template <typename data_t = real_t>
      18             :     class FixedStepSize : public LineSearchMethod<data_t>
      19             :     {
      20             :     public:
      21             :         FixedStepSize(const Functional<data_t>& problem, data_t step_size = 1);
      22          78 :         ~FixedStepSize() override = default;
      23             : 
      24             :         /// make copy constructor deletion explicit
      25             :         FixedStepSize(const FixedStepSize<data_t>&) = delete;
      26             : 
      27             :         data_t solve(DataContainer<data_t> xi, DataContainer<data_t> di) override;
      28             : 
      29             :         /// implement the polymorphic comparison operation
      30             :         bool isEqual(const LineSearchMethod<data_t>& other) const override;
      31             : 
      32             :     private:
      33             :         // the fixed step size
      34             :         data_t _step_size;
      35             : 
      36             :         /// implement the polymorphic clone operation
      37             :         FixedStepSize<data_t>* cloneImpl() const override;
      38             :     };
      39             : } // namespace elsa

Generated by: LCOV version 1.14