diff --git a/include/xcdat/bc_vector_7.hpp b/include/xcdat/bc_vector_7.hpp index b9cbc5b..8ec1b3c 100644 --- a/include/xcdat/bc_vector_7.hpp +++ b/include/xcdat/bc_vector_7.hpp @@ -17,11 +17,11 @@ class bc_vector_7 { private: std::uint64_t m_num_frees = 0; - vector_wrapper m_ints_l1; - vector_wrapper m_ints_l2; - vector_wrapper m_ints_l3; - vector_wrapper m_ints_l4; - std::array, max_levels - 1> m_ranks; + immutable_vector m_ints_l1; + immutable_vector m_ints_l2; + immutable_vector m_ints_l3; + immutable_vector m_ints_l4; + std::array, max_levels - 1> m_ranks; compact_vector m_links; bit_vector m_leaves; diff --git a/include/xcdat/bc_vector_8.hpp b/include/xcdat/bc_vector_8.hpp index ed86e33..a4ed365 100644 --- a/include/xcdat/bc_vector_8.hpp +++ b/include/xcdat/bc_vector_8.hpp @@ -15,7 +15,7 @@ class bc_vector_8 { private: std::uint32_t m_num_levels = 0; std::uint64_t m_num_frees = 0; - std::array, max_levels> m_bytes; + std::array, max_levels> m_bytes; std::array m_nexts; compact_vector m_links; bit_vector m_leaves; diff --git a/include/xcdat/bit_vector.hpp b/include/xcdat/bit_vector.hpp index 60de39e..f70d94f 100644 --- a/include/xcdat/bit_vector.hpp +++ b/include/xcdat/bit_vector.hpp @@ -7,7 +7,7 @@ #include "essentials/essentials.hpp" #include "bit_tools.hpp" -#include "vector_wrapper.hpp" +#include "immutable_vector.hpp" namespace xcdat { @@ -77,9 +77,9 @@ class bit_vector { private: std::uint64_t m_size = 0; std::uint64_t m_num_ones = 0; - vector_wrapper m_bits; - vector_wrapper m_rank_hints; - vector_wrapper m_select_hints; + immutable_vector m_bits; + immutable_vector m_rank_hints; + immutable_vector m_select_hints; public: bit_vector() = default; diff --git a/include/xcdat/code_table.hpp b/include/xcdat/code_table.hpp index 7d2567d..c38a14f 100644 --- a/include/xcdat/code_table.hpp +++ b/include/xcdat/code_table.hpp @@ -3,7 +3,7 @@ #include #include -#include "vector_wrapper.hpp" +#include "immutable_vector.hpp" namespace xcdat { @@ -11,7 +11,7 @@ class code_table { private: std::uint64_t m_max_length = 0; std::array m_table; - vector_wrapper m_alphabet; + immutable_vector m_alphabet; struct counter_type { std::uint8_t ch; diff --git a/include/xcdat/compact_vector.hpp b/include/xcdat/compact_vector.hpp index 06310fe..de8f0a5 100644 --- a/include/xcdat/compact_vector.hpp +++ b/include/xcdat/compact_vector.hpp @@ -4,7 +4,7 @@ #include "bit_tools.hpp" #include "exception.hpp" -#include "vector_wrapper.hpp" +#include "immutable_vector.hpp" namespace xcdat { @@ -14,7 +14,7 @@ class compact_vector { std::uint64_t m_size = 0; std::uint64_t m_bits = 0; std::uint64_t m_mask = 0; - vector_wrapper m_chunks; + immutable_vector m_chunks; public: compact_vector() = default; diff --git a/include/xcdat/vector_wrapper.hpp b/include/xcdat/immutable_vector.hpp similarity index 69% rename from include/xcdat/vector_wrapper.hpp rename to include/xcdat/immutable_vector.hpp index 9440ba4..3441a4f 100644 --- a/include/xcdat/vector_wrapper.hpp +++ b/include/xcdat/immutable_vector.hpp @@ -6,21 +6,21 @@ namespace xcdat { template -class vector_wrapper { +class immutable_vector { private: std::vector m_vec; public: - vector_wrapper() = default; - virtual ~vector_wrapper() = default; + immutable_vector() = default; + virtual ~immutable_vector() = default; - vector_wrapper(const vector_wrapper&) = delete; - vector_wrapper& operator=(const vector_wrapper&) = delete; + immutable_vector(const immutable_vector&) = delete; + immutable_vector& operator=(const immutable_vector&) = delete; - vector_wrapper(vector_wrapper&&) noexcept = default; - vector_wrapper& operator=(vector_wrapper&&) noexcept = default; + immutable_vector(immutable_vector&&) noexcept = default; + immutable_vector& operator=(immutable_vector&&) noexcept = default; - explicit vector_wrapper(std::vector&& vec) { + explicit immutable_vector(std::vector&& vec) { steal(vec); } @@ -34,7 +34,7 @@ class vector_wrapper { } void clear() { - *this = vector_wrapper(); + *this = immutable_vector(); } inline std::uint64_t size() const { diff --git a/include/xcdat/tail_vector.hpp b/include/xcdat/tail_vector.hpp index ef1081e..639b49d 100644 --- a/include/xcdat/tail_vector.hpp +++ b/include/xcdat/tail_vector.hpp @@ -8,7 +8,7 @@ #include "bit_vector.hpp" #include "exception.hpp" -#include "vector_wrapper.hpp" +#include "immutable_vector.hpp" namespace xcdat { @@ -116,7 +116,7 @@ class tail_vector { }; private: - vector_wrapper m_chars; + immutable_vector m_chars; bit_vector m_terms; public: