<commit_before>#pragma once

#include <algorithm>
#include <random>
#include <tuple>


template<typename Number>
static auto ordered_pair_helper(std::true_type,
                                Number min_number,
                                Number max_number) {
  static_assert(std::is_integral<Number>(),
                "``Number`` should be arithmetic type.");

  if (min_number >= max_number) {
    throw std::invalid_argument("``min_number`` should be less "
                                    "than ``max_number``.");
  }

  static std::random_device random_device;
  std::uniform_int_distribution<Number> left_number_distribution(
      min_number,
      max_number / 4 + min_number / 4
  );
  Number left_number = left_number_distribution(random_device);
  std::uniform_int_distribution<Number> right_number_distribution(
      max_number / 2 + min_number / 2,
      max_number
  );
  Number right_number = right_number_distribution(random_device);
  return std::make_tuple(left_number, right_number);
}


template<typename Number>
static auto ordered_pair_helper(std::false_type,
                                Number min_number,
                                Number max_number) {
  static_assert(std::is_floating_point<Number>(),
                "``Number`` should be floating point type.");<commit_msg>Added limits for distributions' borders<commit_after>#pragma once

#include <algorithm>
#include <random>
#include <tuple>


template<typename Number>
static auto ordered_pair_helper(std::true_type,
                                Number min_number,
                                Number max_number) {
  static_assert(std::is_integral<Number>(),
                "``Number`` should be arithmetic type.");

  if (min_number >= max_number) {
    throw std::invalid_argument("``min_number`` should be less "
                                    "than ``max_number``.");
  }

  static std::random_device random_device;
  std::uniform_int_distribution<Number> left_number_distribution(
      min_number,
      std::max(min_number + 1, max_number / 4 + min_number / 4)
  );
  Number left_number = left_number_distribution(random_device);
  std::uniform_int_distribution<Number> right_number_distribution(
      std::min(max_number - 1, max_number / 2 + min_number / 2),
      max_number
  );
  Number right_number = right_number_distribution(random_device);
  return std::make_tuple(left_number, right_number);
}


template<typename Number>
static auto ordered_pair_helper(std::false_type,
                                Number min_number,
                                Number max_number) {
  static_assert(std::is_floating_point<Number>(),
                "``Number`` should be floating point type.");
{'fraction_non_alphanumeric': 0.0997056659308315, 'fraction_numerical': 0.003679175864606328, 'mean_word_length': 2.786908077994429, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6847181', 'n_tokens_mistral': 787, 'n_tokens_neox': 734, 'n_words': 157}