GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 45 / 0 / 45
Functions: 100.0% 45 / 0 / 45
Branches: -% 0 / 0 / 0

src/graph/ds/alist/lib.hpp
Line Branch Exec Source
1 #pragma once
2
3 #include "../graph_c/lib.hpp"
4
5 namespace tifa_libs {
6 namespace alist_impl_ {
7 template <class T, class... Info>
8 class alist_tag : public graph_info_impl_::graph_tag_base<Info...> {
9 using base_t = graph_info_impl_::graph_tag_base<Info...>;
10 vvec<graph_info_impl_::E<T>> g;
11
12 protected:
13 using val_t = T;
14 3784 CEXPE alist_tag(u32 n) NE : base_t(n), g(n) {}
15
16 public:
17 49 CEXP void build() CNE {}
18 318242869 CEXP void add_arc(u32 u, auto&&... args) NE { base_t::add_arc(u, std::forward<decltype(args)>(args)...), g[u].emplace_back(std::forward<decltype(args)>(args)...); }
19 176937995 ND CEXP u32 vsize() CNE { return (u32)g.size(); }
20 908753 ND CEXP u32 deg_out(u32 u) CNE { return (u32)g[u].size(); }
21
22 320774832 CEXP auto CR operator[](u32 u) CNE { return g[u]; }
23 24992968 CEXP auto& operator[](u32 u) NE { return g[u]; }
24 };
25 } // namespace alist_impl_
26 template <class Et = void, class... Info>
27 using alist = graph_impl_::graph<alist_impl_::alist_tag<Et, Info...>>;
28
29 } // namespace tifa_libs
30