<commit_before>// Catch
#include <catch.hpp>
#include <helper.hpp>

// Mantella
#include <mantella>

TEST_CASE("quasiRandomSequence: getHaltonSequence", "") {
  arma::Mat<double>::fixed<2, 5> expected;

  expected = {
    0.0, 0.0,
    1.0/2.0, 1.0/3.0,
    1.0/4.0, 2.0/3.0,
    3.0/4.0, 1.0/9.0,
    1.0/8.0, 4.0/9.0,
  };
  compare(mant::getHaltonSequence({2, 3}, {0, 0}, 5), expected);

  expected = {
    3.0/4.0, 1.0/9.0,
    1.0/8.0, 4.0/9.0,
    5.0/8.0, 7.0/9.0,
    3.0/8.0, 2.0/9.0,
    7.0/8.0, 5.0/9.0,
  };
  compare(mant::getHaltonSequence({2, 3}, {3, 3}, 5), expected);

  CHECK_THROWS_AS(mant::getHaltonSequence({1}, {3, 3}, 5), std::logic_error);
}

TEST_CASE("quasiRandomSequence: getVanDerCorputSequence", "") {
  compare(mant::getVanDerCorputSequence(2, 0, 5), {0.0, 1.0/2.0, 1.0/4.0, 3.0/4.0, 1.0/8.0});
  compare(mant::getVanDerCorputSequence(3, 3, 5), {1.0/9.0, 4.0/9.0, 7.0/9.0, 2.0/9.0, 5.0/9.0});
}
<commit_msg>test: Added one more exception test<commit_after>// Catch
#include <catch.hpp>
#include <helper.hpp>

// Mantella
#include <mantella>

TEST_CASE("quasiRandomSequence: getHaltonSequence", "") {
  arma::Mat<double>::fixed<2, 5> expected;

  expected = {
    0.0, 0.0,
    1.0/2.0, 1.0/3.0,
    1.0/4.0, 2.0/3.0,
    3.0/4.0, 1.0/9.0,
    1.0/8.0, 4.0/9.0,
  };
  compare(mant::getHaltonSequence({2, 3}, {0, 0}, 5), expected);

  expected = {
    3.0/4.0, 1.0/9.0,
    1.0/8.0, 4.0/9.0,
    5.0/8.0, 7.0/9.0,
    3.0/8.0, 2.0/9.0,
    7.0/8.0, 5.0/9.0,
  };
  compare(mant::getHaltonSequence({2, 3}, {3, 3}, 5), expected);

  CHECK_THROWS_AS(mant::getHaltonSequence({1}, {3, 3}, 5), std::logic_error);
  CHECK_THROWS_AS(mant::getHaltonSequence({4, 5}, {3}, 6), std::logic_error);
}

TEST_CASE("quasiRandomSequence: getVanDerCorputSequence", "") {
  compare(mant::getVanDerCorputSequence(2, 0, 5), {0.0, 1.0/2.0, 1.0/4.0, 3.0/4.0, 1.0/8.0});
  compare(mant::getVanDerCorputSequence(3, 3, 5), {1.0/9.0, 4.0/9.0, 7.0/9.0, 2.0/9.0, 5.0/9.0});
}

{'fraction_non_alphanumeric': 0.25303643724696356, 'fraction_numerical': 0.1396761133603239, 'mean_word_length': 3.0101419878296145, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3419336', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1002, 'n_words': 152}