From 601c2080e9667ba686e39823c1ebd58844550002 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 19 Aug 2018 17:27:44 +0200 Subject: Rename bit vector types --- chilbert/Hilbert.ipp | 54 +++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) (limited to 'chilbert/Hilbert.ipp') diff --git a/chilbert/Hilbert.ipp b/chilbert/Hilbert.ipp index 81eb7fd..0b02fba 100644 --- a/chilbert/Hilbert.ipp +++ b/chilbert/Hilbert.ipp @@ -19,10 +19,10 @@ #ifndef CHILBERT_ALGORITHM_HPP #define CHILBERT_ALGORITHM_HPP -#include "chilbert/BigBitVec.hpp" -#include "chilbert/FixBitVec.hpp" +#include "chilbert/DynamicBitVec.hpp" #include "chilbert/GrayCodeRank.hpp" #include "chilbert/Hilbert.hpp" +#include "chilbert/SmallBitVec.hpp" #include "chilbert/StaticBitVec.hpp" #include @@ -50,8 +50,8 @@ num_bits(const T&, std::enable_if_t::value>* = nullptr) template size_t num_bits(const T& vec, - std::enable_if_t::value || - std::is_same::value>* = nullptr) + std::enable_if_t::value || + std::is_same::value>* = nullptr) { return vec.size(); } @@ -316,15 +316,15 @@ coords_to_compact_index(const P* const p, size_t* const ds = new size_t[m]; if (mn > FBV_BITS) { - CBigBitVec h(mn); - detail::coords_to_index( + DynamicBitVec h(mn); + detail::coords_to_index( p, m, n, h, std::move(scratch), ds); - compact_index(ms, ds, n, m, h, hc); + compact_index(ms, ds, n, m, h, hc); } else { - CFixBitVec h(mn); - detail::coords_to_index( + SmallBitVec h(mn); + detail::coords_to_index( p, m, n, h, std::move(scratch), ds); - compact_index(ms, ds, n, m, h, hc); + compact_index(ms, ds, n, m, h, hc); } delete[] ds; @@ -415,10 +415,11 @@ coords_to_index(const P* const p, const size_t m, const size_t n, H& h) if (n <= FBV_BITS) { // Intermediate variables will fit in fixed width - detail::coords_to_index(p, m, n, h, CFixBitVec(n)); + detail::coords_to_index(p, m, n, h, SmallBitVec(n)); } else { - // Otherwise, they must be BigBitVecs - detail::coords_to_index(p, m, n, h, CBigBitVec(n)); + // Otherwise, they must be DynamicBitVecs + detail::coords_to_index( + p, m, n, h, DynamicBitVec(n)); } } @@ -433,10 +434,11 @@ index_to_coords(P* const p, const size_t m, const size_t n, const H& h) if (n <= FBV_BITS) { // Intermediate variables will fit in fixed width - detail::index_to_coords(p, m, n, h, CFixBitVec(n)); + detail::index_to_coords(p, m, n, h, SmallBitVec(n)); } else { - // Otherwise, they must be BigBitVecs - detail::index_to_coords(p, m, n, h, CBigBitVec(n)); + // Otherwise, they must be DynamicBitVecs + detail::index_to_coords( + p, m, n, h, DynamicBitVec(n)); } } @@ -453,12 +455,12 @@ coords_to_compact_index(const P* const p, if (n <= FBV_BITS) { // Intermediate variables will fit in fixed width - detail::coords_to_compact_index( - p, ms, n, hc, CFixBitVec(n), M, m); + detail::coords_to_compact_index( + p, ms, n, hc, SmallBitVec(n), M, m); } else { - // Otherwise, they must be BigBitVecs - detail::coords_to_compact_index( - p, ms, n, hc, CBigBitVec(n), M, m); + // Otherwise, they must be DynamicBitVecs + detail::coords_to_compact_index( + p, ms, n, hc, DynamicBitVec(n), M, m); } } @@ -475,13 +477,13 @@ compact_index_to_coords(P* const p, if (n <= FBV_BITS) { // Intermediate variables will fit in fixed width - CFixBitVec scratch(n); - detail::compact_index_to_coords( + SmallBitVec scratch(n); + detail::compact_index_to_coords( p, ms, n, hc, std::move(scratch), M, m); } else { - // Otherwise, they must be BigBitVecs - CBigBitVec scratch(n); - detail::compact_index_to_coords( + // Otherwise, they must be DynamicBitVecs + DynamicBitVec scratch(n); + detail::compact_index_to_coords( p, ms, n, hc, std::move(scratch), M, m); } } -- cgit v1.2.1