<commit_before>/*******************************************************************************
 * include/util/common.hpp
 *
 * Copyright (C) 2017 <NAME> <<EMAIL>>
 *
 * All rights reserved. Published under the BSD-2 license in the LICENSE file.
 ******************************************************************************/

#pragma once

#include <vector>
#include <type_traits>

#include "bit_vectors.hpp"
#include "huffman/huff_bit_vectors.hpp"

class wavelet_structure {

public:
  inline wavelet_structure() = default;

  inline wavelet_structure(bit_vectors&& bvs, std::vector<uint64_t>&& zeros)
  : bvs_(std::move(bvs)), zeros_(std::move(zeros)) { }

  wavelet_structure(huff_bit_vectors&& bvs, std::vector<uint64_t>&& zeros)
  : huff_bvs_(std::move(bvs)), zeros_(std::move(zeros)) { }

  inline wavelet_structure(bit_vectors&& bvs) : bvs_(std::move(bvs)) {}

  wavelet_structure(huff_bit_vectors&& bvs) : huff_bvs_(std::move(bvs)) { }

  // Prevent accidental copies
  wavelet_structure(wavelet_structure const&) = delete;
  wavelet_structure& operator =(wavelet_structure const&) = delete;

  // Allow moving
  inline wavelet_structure(wavelet_structure&& other) = default;
  inline wavelet_structure& operator =(wavelet_structure&& other) = default;

  inline uint64_t levels() const {
    return bvs_.levels();
  }

  inline bit_vectors const& bvs() const {
    return bvs_;
  }

  huff_bit_vectors const& huff_bvs() const {
    return huff_bvs_;
  }

  inline std::vector<uint64_t> const& zeros() const {
    return zeros_;
  }
private:<commit_msg>add a bit of consistency into wavelet_structure.hpp<commit_after>/*******************************************************************************
 * include/util/common.hpp
 *
 * Copyright (C) 2017 <NAME> <<EMAIL>>
 *
 * All rights reserved. Published under the BSD-2 license in the LICENSE file.
 ******************************************************************************/

#pragma once

#include <vector>
#include <type_traits>

#include "bit_vectors.hpp"
#include "huffman/huff_bit_vectors.hpp"

class wavelet_structure {

public:
  wavelet_structure() = default;

  wavelet_structure(bit_vectors&& bvs, std::vector<uint64_t>&& zeros)
  : bvs_(std::move(bvs)), zeros_(std::move(zeros)) { }

  wavelet_structure(huff_bit_vectors&& bvs, std::vector<uint64_t>&& zeros)
  : huff_bvs_(std::move(bvs)), zeros_(std::move(zeros)) { }

  wavelet_structure(bit_vectors&& bvs) : bvs_(std::move(bvs)) { }

  wavelet_structure(huff_bit_vectors&& bvs) : huff_bvs_(std::move(bvs)) { }

  // Prevent accidental copies
  wavelet_structure(wavelet_structure const&) = delete;
  wavelet_structure& operator =(wavelet_structure const&) = delete;

  // Allow moving
  wavelet_structure(wavelet_structure&& other) = default;
  wavelet_structure& operator =(wavelet_structure&& other) = default;

  inline uint64_t levels() const {
    return bvs_.levels();
  }

  inline bit_vectors const& bvs() const {
    return bvs_;
  }

  huff_bit_vectors const& huff_bvs() const {
    return huff_bvs_;
  }

  inline std::vector<uint64_t> const& zeros() const {
    return zeros_;
  }
private:
{'fraction_non_alphanumeric': 0.21998722860791825, 'fraction_numerical': 0.008301404853128991, 'mean_word_length': 5.694444444444445, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '909659', 'n_tokens_mistral': 1070, 'n_tokens_neox': 983, 'n_words': 210}