<commit_before>#ifndef CUHKSZ_RANDOM_DISTRIBUTION
#define CUHKSZ_RANDOM_DISTRIBUTION
#include "random/Random.h"

namespace cuhksz {
template <typename ResultType>
class Distribution {
 public:
  Distribution() : Distribution(*(new Random())) { newedRandom = true; }

  explicit Distribution(Random& random) : randomGenerator(&random) {
    newedRandom = false;
  }
  virtual ~Distribution() {
    if (newedRandom) delete randomGenerator;
  }
  virtual ResultType next() = 0;

  void setRandomGenerator(Random& random) {
    if (newedRandom) delete randomGenerator;
    newedRandom = false;
    randomGenerator = &random;
  }

 protected:
  Random* randomGenerator = nullptr;

 private:
  bool newedRandom;
};
}  // namespace cuhksz

#endif  // CUHKSZ_RANDOM_DISTRIBUTION<commit_msg>delete all copy relating methods in Distribution<commit_after>#ifndef CUHKSZ_RANDOM_DISTRIBUTION
#define CUHKSZ_RANDOM_DISTRIBUTION
#include "random/Random.h"

namespace cuhksz {
template <typename ResultType>
class Distribution {
 public:
  Distribution() : Distribution(*(new Random())) { newedRandom = true; }

  explicit Distribution(Random& random) : randomGenerator(&random) {
    newedRandom = false;
  }
  virtual ~Distribution() {
    if (newedRandom) delete randomGenerator;
  }
  virtual ResultType next() = 0;

  void setRandomGenerator(Random& random) {
    if (newedRandom) delete randomGenerator;
    newedRandom = false;
    randomGenerator = &random;
  }

  Distribution(Distribution&) = delete;
  Distribution(Distribution&&) = delete;
  Distribution& operator=(Distribution&) = delete;
  Distribution& operator=(Distribution&&) = delete;

 protected:
  Random* randomGenerator = nullptr;

 private:
  bool newedRandom;
};
}  // namespace cuhksz

#endif  // CUHKSZ_RANDOM_DISTRIBUTION
{'fraction_non_alphanumeric': 0.1031390134529148, 'fraction_numerical': 0.0011210762331838565, 'mean_word_length': 4.95, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5505243', 'n_tokens_mistral': 556, 'n_tokens_neox': 540, 'n_words': 129}