nlib
nn::nlib::SmartBitmapPtr< N, BIT > クラステンプレートfinal

Rank/Select操作つきのビットデータを保持するデータ構造です。 [詳解]

#include "nn/nlib/SmartBitmap.h"

+ nn::nlib::SmartBitmapPtr< N, BIT > の継承関係図

公開型

enum  { ARRAY_SIZE = CrtpBase::WORD_COUNT }
 

公開メンバ関数

void Init (BIT *bitmap) noexcept
 ビットデータへのポインタを設定します。 [詳解]
 
- 基底クラス nn::nlib::SmartBitmapCrtp< N, SmartBitmapPtr< N, BIT >, BIT > に属する継承公開メンバ関数
unsigned int GetBitVectorSize () const noexcept
 ビットデータのサイズを返します。 [詳解]
 
const BIT * GetBitVector () const noexcept
 ビットデータへのポインタを返します。 [詳解]
 
bool Has (unsigned int idx) const noexcept
 値が集合に含まれているかどうかをテストします。 [詳解]
 
bool operator[] (const unsigned int idx) const noexcept
 値が集合に含まれているかどうかをテストします。 [詳解]
 
unsigned int Rank1 (unsigned int idx) const noexcept
 Rank操作を行います。 [詳解]
 
unsigned int Rank0 (unsigned int idx) const noexcept
 Rank操作を行います。 [詳解]
 
int Select1 (unsigned int nth) const noexcept
 nth 番目の1ビットの場所を返します。nth は0から開始します。 [詳解]
 
int Select0 (unsigned int nth) const noexcept
 nth 番目の0ビットの場所を返します。nth は0から開始します。 [詳解]
 
bool Set (unsigned int idx) noexcept
 集合に32bit符号なし整数を追加します。 [詳解]
 
bool Set (unsigned int idx, bool value) noexcept
 ビットデータのビットを設定します。 [詳解]
 
bool TurnOn (unsigned int idx) noexcept
 集合に32bit符号なし整数を追加します。 [詳解]
 
bool Unset (unsigned int idx) noexcept
 集合から32bit符号なし整数を取り除きます。 [詳解]
 
void Reset () noexcept
 オブジェクトをコンストラクタが呼ばれた直後の状態にします。
 

詳解

template<size_t N, class BIT = uint64_t>
class nn::nlib::SmartBitmapPtr< N, BIT >

Rank/Select操作つきのビットデータを保持するデータ構造です。

テンプレート引数
Nビットデータのサイズ(N bits)
説明
データメンバにビットデータのポインタを保持しています。 外部にビットデータが(静的に)存在してそれを利用したい場合に向いています。 ワード内のビットデータはLSB(最下位ビット)から並べなくてはならないことに注意してください。

SmartBitmap.h160 行目に定義があります。

列挙型メンバ詳解

§ anonymous enum

template<size_t N, class BIT = uint64_t>
anonymous enum

anonymous enum

列挙値
ARRAY_SIZE 

ビットデータに必要なサイズ(ワード単位)

SmartBitmap.h165 行目に定義があります。

関数詳解

§ Init()

template<size_t N, class BIT = uint64_t>
nn::nlib::SmartBitmapPtr< N, BIT >::Init ( BIT *  bitmap)
inlinenoexcept

ビットデータへのポインタを設定します。

引数
[in]bitmapビットデータへのポインタ。SmartBitmapPtr::ARRAY_SIZEワードの大きさが必要

SmartBitmap.h167 行目に定義があります。


このクラス詳解は次のファイルから抽出されました: