<commit_before>#pragma once

#include <array>

namespace Halley {
    template <typename T, size_t nSamples = 30>
    class Averaging {
    public:
        Averaging() {
            samples[0] = {};
        }

        void pushValue(T value) {
        	if constexpr (!std::is_floating_point_v<T>) {
            	totalValue -= samples[idx];
		        totalValue += value;
            }
            samples[idx] = value;

            idx = (idx + 1) % static_cast<uint32_t>(nSamples);
            nValues = std::min(nValues + 1, static_cast<uint32_t>(nSamples));
        }<commit_msg>Fix header<commit_after>#pragma once

#include <array>
#include <numeric>

namespace Halley {
    template <typename T, size_t nSamples = 30>
    class Averaging {
    public:
        Averaging() {
            samples[0] = {};
        }

        void pushValue(T value) {
        	if constexpr (!std::is_floating_point_v<T>) {
            	totalValue -= samples[idx];
		        totalValue += value;
            }
            samples[idx] = value;

            idx = (idx + 1) % static_cast<uint32_t>(nSamples);
            nValues = std::min(nValues + 1, static_cast<uint32_t>(nSamples));
        }
{'fraction_non_alphanumeric': 0.1228813559322034, 'fraction_numerical': 0.015254237288135594, 'mean_word_length': 1.9823232323232323, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '5389276', 'n_tokens_mistral': 394, 'n_tokens_neox': 362, 'n_words': 77}