// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include namespace search::attribute { /** * Read view for the data stored in an extendable multi-value numeric * weighted set attribute vector (used by streaming visitor) that handles * optional removal of weight. * @tparam MultiValueType The multi-value type of the data to access. * @tparam BaseType The base type of the raw data to access. */ template class ExtendableNumericWeightedSetMultiValueReadView : public attribute::IMultiValueReadView { const std::vector& _data; const std::vector& _idx; const std::vector& _weights; mutable std::vector _copy; public: ExtendableNumericWeightedSetMultiValueReadView(const std::vector& data, const std::vector& idx, const std::vector& weights); ~ExtendableNumericWeightedSetMultiValueReadView() override; vespalib::ConstArrayRef get_values(uint32_t doc_id) const override; }; }