<commit_before>// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "streamed_value_builder_factory.h"
#include "streamed_value_builder.h"

namespace vespalib::eval {

struct SelectStreamedValueBuilder {
    template <typename T, typename ...Args>
    static std::unique_ptr<ValueBuilderBase> invoke(const ValueType &type, Args &&...args)
    {
        assert(check_cell_type<T>(type.cell_type()));
        return std::make_unique<StreamedValueBuilder<T>>(type, std::forward<Args>(args)...);
    }
};

std::unique_ptr<ValueBuilderBase>
StreamedValueBuilderFactory::create_value_builder_base(const ValueType &type,
                                                       size_t num_mapped_in,
                                                       size_t subspace_size_in,
                                                       size_t expected_subspaces) const
{
    return typify_invoke<1,TypifyCellType,SelectStreamedValueBuilder>(
        type.cell_type(),
        type, num_mapped_in, subspace_size_in, expected_subspaces);
}

StreamedValueBuilderFactory::~StreamedValueBuilderFactory() = default;
StreamedValueBuilderFactory StreamedValueBuilderFactory::_factory;

} // namespace

<commit_msg>fix arguments (names and explicit)<commit_after>// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "streamed_value_builder_factory.h"
#include "streamed_value_builder.h"

namespace vespalib::eval {

struct SelectStreamedValueBuilder {
    template <typename T>
    static std::unique_ptr<ValueBuilderBase> invoke(
        const ValueType &type, size_t num_mapped, 
        size_t subspace_size, size_t expected_subspaces)
    {
        assert(check_cell_type<T>(type.cell_type()));
        return std::make_unique<StreamedValueBuilder<T>>(
            type, num_mapped, subspace_size, expected_subspaces);
    }
};

std::unique_ptr<ValueBuilderBase>
StreamedValueBuilderFactory::create_value_builder_base(const ValueType &type,
                                                       size_t num_mapped,
                                                       size_t subspace_size,
                                                       size_t expected_subspaces) const
{
    return typify_invoke<1,TypifyCellType,SelectStreamedValueBuilder>(
        type.cell_type(),
        type, num_mapped, subspace_size, expected_subspaces);
}

StreamedValueBuilderFactory::~StreamedValueBuilderFactory() = default;
StreamedValueBuilderFactory StreamedValueBuilderFactory::_factory;

} // namespace


{'fraction_non_alphanumeric': 0.08231707317073171, 'fraction_numerical': 0.0022865853658536584, 'mean_word_length': 2.900445765230312, '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': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5999493', 'n_tokens_mistral': 699, 'n_tokens_neox': 680, 'n_words': 142}