C# Class Platform.Data.Core.Collections.BitString

А что если хранить карту значений, где каждый бит будет означать присутствует ли блок в 64 бит в массиве значений. 64 бита по 0 бит, будут означать отсутствие 64-х блоков по 64 бита. Т.е. упаковка 512 байт в 8 байт. Подобный принцип можно применять и к 64-ём блокам и т.п. По сути это карта значений. С помощью которой можно быстро проверять есть ли значения непосредственно далее (ниже по уровню). Или как таблица виртуальной памяти где номер блока означает его присутствие и адрес. TODO: Compare what is faster to store BitSetsIn16Bits or to calculate it TODO: Avoid int usage (replace to long)
显示文件 Open project: Konard/LinksPlatform Class Usage Examples

Public Methods

Method Description
And ( BitString other ) : BitString
BitString ( BitString bits ) : System
BitString ( int length, bool defaultValue ) : System
BitString ( long length ) : System
Clone ( ) : object
CountCommonBits ( BitString other ) : int
CountSet ( ) : int
Get ( long index ) : bool
GetCommonIndices ( BitString other ) : List
GetFirstSetBitIndex ( ) : int
GetLastCommonBitIndex ( BitString other ) : int
GetLastSetBitIndex ( ) : int
GetSetIndeces ( ) : List
GetSetIndecesCount ( ) : int
GetSetUInt64Indices ( ) : List
HaveCommonBits ( BitString other ) : bool
Not ( ) : BitString
Or ( BitString value ) : BitString
Reset ( long index ) : void
Set ( long index ) : void
Set ( long index, bool value ) : void
SetAll ( bool value ) : void
Xor ( BitString value ) : BitString
this ( int index ) : bool

Private Methods

Method Description
BitString ( ) : System
EnsureArgumentIsValid ( BitString other ) : void
GetCore ( long index ) : bool
RefreshBordersByWord ( long wordIndex ) : void
ResetCore ( long index ) : void
SetCore ( long index ) : void

Method Details

And() public method

public And ( BitString other ) : BitString
other BitString
return BitString

BitString() public method

public BitString ( BitString bits ) : System
bits BitString
return System

BitString() public method

public BitString ( int length, bool defaultValue ) : System
length int
defaultValue bool
return System

BitString() public method

public BitString ( long length ) : System
length long
return System

Clone() public method

public Clone ( ) : object
return object

CountCommonBits() public method

public CountCommonBits ( BitString other ) : int
other BitString
return int

CountSet() public method

public CountSet ( ) : int
return int

Get() public method

public Get ( long index ) : bool
index long
return bool

GetCommonIndices() public method

public GetCommonIndices ( BitString other ) : List
other BitString
return List

GetFirstSetBitIndex() public method

public GetFirstSetBitIndex ( ) : int
return int

GetLastCommonBitIndex() public method

public GetLastCommonBitIndex ( BitString other ) : int
other BitString
return int

GetLastSetBitIndex() public method

public GetLastSetBitIndex ( ) : int
return int

GetSetIndeces() public method

public GetSetIndeces ( ) : List
return List

GetSetIndecesCount() public method

public GetSetIndecesCount ( ) : int
return int

GetSetUInt64Indices() public method

public GetSetUInt64Indices ( ) : List
return List

HaveCommonBits() public method

public HaveCommonBits ( BitString other ) : bool
other BitString
return bool

Not() public method

public Not ( ) : BitString
return BitString

Or() public method

public Or ( BitString value ) : BitString
value BitString
return BitString

Reset() public method

public Reset ( long index ) : void
index long
return void

Set() public method

public Set ( long index ) : void
index long
return void

Set() public method

public Set ( long index, bool value ) : void
index long
value bool
return void

SetAll() public method

public SetAll ( bool value ) : void
value bool
return void

Xor() public method

public Xor ( BitString value ) : BitString
value BitString
return BitString

this() public method

public this ( int index ) : bool
index int
return bool