src/edh/discretization/lib.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "../../fast/rsort32/lib.hpp" | ||
| 4 | |||
| 5 | namespace tifa_libs { | ||
| 6 | |||
| 7 | template <common_range T> | ||
| 8 | 790581 | CEXP T uniq(T v) NE { | |
| 9 | 790581 | tifa_libs::sort(v); | |
| 10 | 790581 | auto r = unique(begin(v), end(v)); | |
| 11 | 2371743 | return {begin(v), begin(r)}; | |
| 12 | } | ||
| 13 | template <common_range T> | ||
| 14 | 54 | CEXP std::pair<T, vecu> gen_id(T CR v) NE { | |
| 15 | 54 | const T _ = uniq(v); | |
| 16 | 54 | vecu _1; | |
| 17 | 54 | _1.reserve(v.size()); | |
| 18 |
4/4std::pair<std::vector<int, std::allocator<int> >, std::vector<unsigned int, std::allocator<unsigned int> > > tifa_libs::gen_id<std::vector<int, std::allocator<int> > >(std::vector<int, std::allocator<int> > const&):
✓ Branch 6 taken 1528840 times.
✓ Branch 7 taken 24 times.
std::pair<std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> > > tifa_libs::gen_id<std::vector<unsigned int, std::allocator<unsigned int> > >(std::vector<unsigned int, std::allocator<unsigned int> > const&):
✓ Branch 6 taken 1800747 times.
✓ Branch 7 taken 30 times.
|
3329641 | flt_ (u32, i, 0, (u32)v.size()) _1.push_back(u32(lower_bound(_, v[i]) - begin(_))); |
| 19 | 54 | return {_, _1}; | |
| 20 | 54 | } | |
| 21 | |||
| 22 | } // namespace tifa_libs | ||
| 23 |