<commit_before>#ifndef ALPHA_ARRAYVOXMAP_HEADER
#define ALPHA_ARRAYVOXMAP_HEADER

#include "Vector3.hpp"
#include <vector>

namespace nt {

template <class Voxel>
class ArrayVoxmap
{
    std::vector<Voxel> _voxmap;
    const Vector3<int> _size;
public:
    ArrayVoxmap(const Vector3<int>& size);
    const Vector3<int>& size() const;
};

ArrayVoxmap(const Vector3<int>& size) :
    _voxmap(),
    _size(size)
{
    _voxmap.resize(_size.x() * _size.y() * _size.z());
}

const Vector3<int>& ArrayVoxmap::size() const
{
    return _size;
}

Voxel& get(const int x, const int y, const int z)
{<commit_msg>ArrayVoxmap: Added resize methods<commit_after>#ifndef ALPHA_ARRAYVOXMAP_HEADER
#define ALPHA_ARRAYVOXMAP_HEADER

#include "Vector3.hpp"
#include <vector>

namespace nt {

template <class Voxel>
class ArrayVoxmap
{
    std::vector<Voxel> _voxmap;
    Vector3<int> _size;
public:
    ArrayVoxmap() :
        _voxmap(),
        _size()
    {}

    ArrayVoxmap(const Vector3<int>& size);
    const Vector3<int>& size() const;

    Voxel get(const int x, const int y, const int z) const;

    void resize(const Vector3<int>& size);
};

template <class Voxel>
const Vector3<int>& ArrayVoxmap<Voxel>::size() const
{
    return _size;
}

template <class Voxel>
void ArrayVoxmap<Voxel>::resize(const Vector3<int>& size)
{
    _voxmap.clear();
    _size.set(0, 0, 0);
    _voxmap.resize(size.x() * size.y() * size.z());
    _size = size;
}

template <class Voxel>
Voxel ArrayVoxmap<Voxel>::get(const int x, const int y, const int z) const
{
{'fraction_non_alphanumeric': 0.13642297650130547, 'fraction_numerical': 0.010443864229765013, 'mean_word_length': 4.304498269896194, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, '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': '6158511', 'n_tokens_mistral': 602, 'n_tokens_neox': 587, 'n_words': 139}