3#if !defined(ae2f_Macro_BitVector_hpp)
4#define ae2f_Macro_BitVector_hpp
23 static_assert(std::is_integral<t>::value,
"t is not integer");
26 static_assert(std::is_integral<t>::value,
"t is not integer");
29 template<
typename T = t>
31 static_assert(std::is_integral<t>::value,
"t is not integer");
32 static_assert(std::is_integral<T>::value,
"T is not integer");
35 template<
typename T = t>
37 static_assert(std::is_integral<t>::value,
"t is not integer");
38 static_assert(std::is_integral<T>::value,
"T is not integer");
64 this->obj =
const_cast<const rBitVec<t>*
>(
this)->
Set(start, end, val);
69 for (
idx_t i = (
sizeof(t) << 3); i; i--)
70 if (
Get(i - 1))
return i;
#define ae2f_Macro_BitVec_SetRanged(vector, start, end, val)
Sets the bits of [vector] from index of [start] and [end] by [val]. It will normalise the values of ...
Definition BitVec.h:65
#define ae2f_Macro_BitVec_Get(vector, idx)
Gets a bit of [vector] from index of [idx].
Definition BitVec.h:45
#define _ae2f_Macro_BitVec_Filled(len, vec_t)
Generates the vector filled in 1.
Definition BitVec.h:15
#define ae2f_Macro_BitVec_GetRanged(vector, start, end)
Gets the bits of [vector] between index of [start] and [end]. It will normalise the values of [start...
Definition BitVec.h:38
uint8_t ae2f_Macro_BitVecI_t
The pre-defined index type for Bit vector.
Definition BitVec.h:10
#define ae2f_Macro_BitVec_Set(vector, idx, val)
Sets a bit of [vector] from index of [idx] by [val].
Definition BitVec.h:72
static constexpr rBitVec< t > Filled(idx_t length) noexcept
Definition BitVec.hpp:41
constexpr rBitVec< t > Set(idx_t start, idx_t end, rBitVec< t > val) const noexcept
Definition BitVec.hpp:60
constexpr const idx_t Size(const t V) noexcept
Definition BitVec.hpp:68
constexpr rBitVec< t > & Set(idx_t i, bool val) noexcept
Definition BitVec.hpp:52
constexpr rBitVec< t > Set(idx_t i, bool val) const noexcept
Definition BitVec.hpp:57
constexpr bool Get(idx_t i) const noexcept
Definition BitVec.hpp:45
ae2f_Macro_BitVecI_t idx_t
Definition BitVec.hpp:15
t obj
The actual integer.
Definition BitVec.hpp:19
constexpr rBitVec< t > Get(idx_t start, idx_t end) const noexcept
Definition BitVec.hpp:49
constexpr rBitVec(const rBitVec< T > &vec) noexcept
Definition BitVec.hpp:30
constexpr rBitVec< t > & Set(idx_t start, idx_t end, rBitVec< t > val) noexcept
Definition BitVec.hpp:63
constexpr rBitVec(const t &&obj) noexcept
Definition BitVec.hpp:25
constexpr rBitVec(const rBitVec< T > &&vec) noexcept
Definition BitVec.hpp:36
constexpr rBitVec(const t &obj) noexcept
Definition BitVec.hpp:21