<commit_before><commit_msg>add Cell<commit_after>#ifndef MINIASCAPE_CELL
#define MINIASCAPE_CELL
#include <vector>
#include <array>

namespace miniascape
{

constexpr static int DYNAMIC = -1;

template<int I_neighbors, typename T_state>
struct Cell
{
    using state_type = T_state;
    constexpr static int number_of_neighbors = I_neighbors;
    using self_type = Cell<number_of_neighbors, state_type>;
    using self_ptr = Cell<number_of_neighbors, state_type>*;
    using neighbor_container = std::array<self_ptr, number_of_neighbors>;

    explicit Cell(){}
    virtual ~Cell() = default;

    state_type         state;
    neighbor_container neighbors;
};

template<typename T_state>
struct Cell<0, T_state>
{
    using state_type = T_state;
    constexpr static int number_of_neighbors = 0;
    using self_type = Cell<number_of_neighbors, state_type>;
    using self_ptr = Cell<number_of_neighbors, state_type>*;

    explicit Cell(){}
    virtual ~Cell() = default;

    state_type state;
};

template<typename T_state>
struct Cell<DYNAMIC, T_state>
{
    using state_type = T_state;
    constexpr static int number_of_neighbors = DYNAMIC;
    using self_type = Cell<number_of_neighbors, state_type>;
    using self_ptr = Cell<number_of_neighbors, state_type>*;
    using neighbor_container = std::vector<self_ptr>;

    explicit Cell(){}
    virtual ~Cell() = default;

    state_type state;
    neighbor_container neighbors;
};

}

#endif /* MINIASCAPE_CELL */
{'fraction_non_alphanumeric': 0.09257998638529612, 'fraction_numerical': 0.0020422055820285907, 'mean_word_length': 4.526315789473684, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '3901402', 'n_tokens_mistral': 518, 'n_tokens_neox': 500, 'n_words': 114}