<commit_before>#ifndef TEST_CASE_SET_H
#define TEST_CASE_SET_H

#include <iostream>
#include <fstream>
#include <set>
#include <algorithm>

#include "base/array.h"
#include "base/vector.h"
#include "tools/string_utils.h"
#include "tools/Random.h"
#include "tools/random_utils.h"

template <int INPUT_LENGTH>
class TestcaseSet {
protected:
    using input_t = emp::array<int, INPUT_LENGTH>;
    using output_t = std::set<int>;
    using test_case_t = std::pair<input_t, output_t>;
    emp::vector<test_case_t> test_cases;
    emp::vector<std::function<output_t(input_t)> > groups;
    emp::vector<emp::vector<output_t> > correct_choices;
    emp::Random * random;
    int trials  = 1;

public:
    TestcaseSet(std::string filename, emp::Random * r) : random(r) {
        LoadTestcases(filename);
    }

    emp::vector<std::pair<input_t, output_t> >& GetTestcases() {
        return test_cases;
    }

    emp::vector<emp::vector<int> >& GetCorrectChoices() {
        return correct_choices;
    }

    emp::vector<size_t> GetValidSubset() {
        int count = 0;<commit_msg>Final version of testcaseset<commit_after>#ifndef TEST_CASE_SET_H
#define TEST_CASE_SET_H

#include <iostream>
#include <fstream>
#include <set>
#include <algorithm>

#include "base/array.h"
#include "base/vector.h"
#include "tools/string_utils.h"
#include "tools/Random.h"
#include "tools/random_utils.h"

template <int INPUT_LENGTH>
class TestcaseSet {
protected:
    using input_t = emp::array<int, INPUT_LENGTH>;
    using output_t = std::set<int>;
    using test_case_t = std::pair<input_t, output_t>;
    emp::vector<test_case_t> test_cases;
    emp::vector<std::function<output_t(input_t)> > groups;
    emp::vector<emp::vector<output_t> > correct_choices;
    emp::Random * random;
    int trials  = 20;

public:
    TestcaseSet(std::string filename, emp::Random * r) : random(r) {
        LoadTestcases(filename);
    }

    emp::vector<std::pair<input_t, output_t> >& GetTestcases() {
        return test_cases;
    }

    emp::vector<emp::vector<output_t> >& GetCorrectChoices() {
        return correct_choices;
    }

    int GetNFuncs() {
        return groups.size();
    }

    emp::vector<size_t> GetValidSubset() {
        int count = 0;
{'fraction_non_alphanumeric': 0.13991031390134528, 'fraction_numerical': 0.002242152466367713, 'mean_word_length': 4.212616822429907, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '5791138', 'n_tokens_mistral': 803, 'n_tokens_neox': 785, 'n_words': 148}