| 33 | constexpr int ROUND_TO_VALID = 5; |
| 34 | |
| 35 | bool CheckDistribution(const vec_pair_t& distribution) { |
| 36 | set_int_t nodes; |
| 37 | for (const auto& pair : distribution) { |
| 38 | if (nodes.count(pair.first)) { |
| 39 | DXERROR("Duplicate node: %" PRIu64 " in distribution.", pair.first); |
| 40 | return false; |
| 41 | } else { |
| 42 | nodes.emplace(pair.first); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | return !nodes.empty(); |
| 47 | } |
| 48 | |
| 49 | void DrawKHypothesis(int k, const vec_pair_t& ground_truth_distribution, |
| 50 | vec_pair_t* distribution_to_validate) { |