aboutsummaryrefslogtreecommitdiffstats
path: root/chilbert/Hilbert.ipp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-08-19 17:27:44 +0200
committerDavid Robillard <d@drobilla.net>2018-09-29 14:49:25 +0200
commit601c2080e9667ba686e39823c1ebd58844550002 (patch)
treebdd7fed29ff7f7ddaaad45fe6aaad5d9d4348e2c /chilbert/Hilbert.ipp
parent0013efd3cc0c2aa9150c983babd52d3de8e32744 (diff)
downloadchilbert-601c2080e9667ba686e39823c1ebd58844550002.tar.gz
chilbert-601c2080e9667ba686e39823c1ebd58844550002.tar.bz2
chilbert-601c2080e9667ba686e39823c1ebd58844550002.zip
Rename bit vector types
Diffstat (limited to 'chilbert/Hilbert.ipp')
-rw-r--r--chilbert/Hilbert.ipp54
1 files changed, 28 insertions, 26 deletions
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 <cassert>
@@ -50,8 +50,8 @@ num_bits(const T&, std::enable_if_t<std::is_integral<T>::value>* = nullptr)
template <class T>
size_t
num_bits(const T& vec,
- std::enable_if_t<std::is_same<T, CFixBitVec>::value ||
- std::is_same<T, CBigBitVec>::value>* = nullptr)
+ std::enable_if_t<std::is_same<T, SmallBitVec>::value ||
+ std::is_same<T, DynamicBitVec>::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<P, CBigBitVec, I>(
+ DynamicBitVec h(mn);
+ detail::coords_to_index<P, DynamicBitVec, I>(
p, m, n, h, std::move(scratch), ds);
- compact_index<CBigBitVec, HC>(ms, ds, n, m, h, hc);
+ compact_index<DynamicBitVec, HC>(ms, ds, n, m, h, hc);
} else {
- CFixBitVec h(mn);
- detail::coords_to_index<P, CFixBitVec, I>(
+ SmallBitVec h(mn);
+ detail::coords_to_index<P, SmallBitVec, I>(
p, m, n, h, std::move(scratch), ds);
- compact_index<CFixBitVec, HC>(ms, ds, n, m, h, hc);
+ compact_index<SmallBitVec, HC>(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, H, CFixBitVec>(p, m, n, h, CFixBitVec(n));
+ detail::coords_to_index<P, H, SmallBitVec>(p, m, n, h, SmallBitVec(n));
} else {
- // Otherwise, they must be BigBitVecs
- detail::coords_to_index<P, H, CBigBitVec>(p, m, n, h, CBigBitVec(n));
+ // Otherwise, they must be DynamicBitVecs
+ detail::coords_to_index<P, H, DynamicBitVec>(
+ 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, H, CFixBitVec>(p, m, n, h, CFixBitVec(n));
+ detail::index_to_coords<P, H, SmallBitVec>(p, m, n, h, SmallBitVec(n));
} else {
- // Otherwise, they must be BigBitVecs
- detail::index_to_coords<P, H, CBigBitVec>(p, m, n, h, CBigBitVec(n));
+ // Otherwise, they must be DynamicBitVecs
+ detail::index_to_coords<P, H, DynamicBitVec>(
+ 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, HC, CFixBitVec>(
- p, ms, n, hc, CFixBitVec(n), M, m);
+ detail::coords_to_compact_index<P, HC, SmallBitVec>(
+ p, ms, n, hc, SmallBitVec(n), M, m);
} else {
- // Otherwise, they must be BigBitVecs
- detail::coords_to_compact_index<P, HC, CBigBitVec>(
- p, ms, n, hc, CBigBitVec(n), M, m);
+ // Otherwise, they must be DynamicBitVecs
+ detail::coords_to_compact_index<P, HC, DynamicBitVec>(
+ 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<P, HC, CFixBitVec>(
+ SmallBitVec scratch(n);
+ detail::compact_index_to_coords<P, HC, SmallBitVec>(
p, ms, n, hc, std::move(scratch), M, m);
} else {
- // Otherwise, they must be BigBitVecs
- CBigBitVec scratch(n);
- detail::compact_index_to_coords<P, HC, CBigBitVec>(
+ // Otherwise, they must be DynamicBitVecs
+ DynamicBitVec scratch(n);
+ detail::compact_index_to_coords<P, HC, DynamicBitVec>(
p, ms, n, hc, std::move(scratch), M, m);
}
}