GCC Code Coverage Report


Directory: ./
File: tasks/sizov_d_global_search/common/include/common.hpp
Date: 2026-01-10 02:40:41
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 0 0 -%
Branches: 1 4 25.0%

Line Branch Exec Source
1 #pragma once
2
3 #include <functional>
4 #include <string>
5
6 #include "task/include/task.hpp"
7
8 namespace sizov_d_global_search {
9
10 using Function = std::function<double(double)>;
11
12
1/4
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 8 taken 280 times.
✗ Branch 9 not taken.
660 struct Problem {
13 Function func;
14 double left = 0.0;
15 double right = 0.0;
16 double accuracy = 1e-4;
17 double reliability = 3.0;
18 int max_iterations = 300;
19 bool enable_stable_heuristic = true;
20 bool enable_point_limit = true;
21 };
22
23 struct Solution {
24 double argmin = 0.0;
25 double value = 0.0;
26 int iterations = 0;
27 bool converged = false;
28 };
29
30 struct TestCase {
31 std::string name;
32 Problem problem;
33 };
34
35 static constexpr double kDefaultAccuracy = 1e-4;
36 static constexpr double kDefaultReliability = 3.0;
37 static constexpr int kDefaultMaxIterations = 300;
38
39 using InType = Problem;
40 using OutType = Solution;
41 using TestType = TestCase;
42 using BaseTask = ppc::task::Task<InType, OutType>;
43
44 } // namespace sizov_d_global_search
45