GCC Code Coverage Report


Directory: ./
File: tasks/nalitov_d_dijkstras_algorithm/common/include/common.hpp
Date: 2026-06-04 20:25:32
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 0 0 -%
Branches: 3 6 50.0%

Line Branch Exec Source
1 #pragma once
2
3 #include <cstdint>
4 #include <limits>
5 #include <string>
6 #include <tuple>
7 #include <vector>
8
9 #include "task/include/task.hpp"
10
11 namespace nalitov_d_dijkstras_algorithm {
12
13 /// Идентификатор вершины (нумерация 0 .. vertex_count-1).
14 using NodeId = int;
15 /// Вес ребра и значение кратчайшего пути в очереди — один тип, чтобы не смешивать переполнения.
16 using Cost = int;
17
18 /// Ориентированное ребро с неотрицательным весом.
19 struct Arc {
20 NodeId from{};
21 NodeId to{};
22 Cost weight{};
23 };
24
25 /// Описание задачи: размер, старт и явный список рёбер.
26
3/6
✓ Branch 1 taken 968 times.
✗ Branch 2 not taken.
✓ Branch 6 taken 72 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 4624 times.
✗ Branch 10 not taken.
5808 struct GraphDescriptor {
27 int n{};
28 int source{};
29 std::vector<Arc> arcs;
30 };
31
32 /// «Бесконечность» для недостижимых вершин (запас под сумму в релаксациях).
33 constexpr Cost kInf = std::numeric_limits<Cost>::max() / 2;
34
35 using InType = GraphDescriptor;
36 using OutType = std::int64_t;
37 using TestType = std::tuple<InType, OutType, std::string>;
38 using BaseTask = ppc::task::Task<InType, OutType>;
39
40 } // namespace nalitov_d_dijkstras_algorithm
41