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)
Afficher le fichier Open project: Konard/LinksPlatform Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

public And ( BitString other ) : BitString
other BitString
Résultat BitString

BitString() public méthode

public BitString ( BitString bits ) : System
bits BitString
Résultat System

BitString() public méthode

public BitString ( int length, bool defaultValue ) : System
length int
defaultValue bool
Résultat System

BitString() public méthode

public BitString ( long length ) : System
length long
Résultat System

Clone() public méthode

public Clone ( ) : object
Résultat object

CountCommonBits() public méthode

public CountCommonBits ( BitString other ) : int
other BitString
Résultat int

CountSet() public méthode

public CountSet ( ) : int
Résultat int

Get() public méthode

public Get ( long index ) : bool
index long
Résultat bool

GetCommonIndices() public méthode

public GetCommonIndices ( BitString other ) : List
other BitString
Résultat List

GetFirstSetBitIndex() public méthode

public GetFirstSetBitIndex ( ) : int
Résultat int

GetLastCommonBitIndex() public méthode

public GetLastCommonBitIndex ( BitString other ) : int
other BitString
Résultat int

GetLastSetBitIndex() public méthode

public GetLastSetBitIndex ( ) : int
Résultat int

GetSetIndeces() public méthode

public GetSetIndeces ( ) : List
Résultat List

GetSetIndecesCount() public méthode

public GetSetIndecesCount ( ) : int
Résultat int

GetSetUInt64Indices() public méthode

public GetSetUInt64Indices ( ) : List
Résultat List

HaveCommonBits() public méthode

public HaveCommonBits ( BitString other ) : bool
other BitString
Résultat bool

Not() public méthode

public Not ( ) : BitString
Résultat BitString

Or() public méthode

public Or ( BitString value ) : BitString
value BitString
Résultat BitString

Reset() public méthode

public Reset ( long index ) : void
index long
Résultat void

Set() public méthode

public Set ( long index ) : void
index long
Résultat void

Set() public méthode

public Set ( long index, bool value ) : void
index long
value bool
Résultat void

SetAll() public méthode

public SetAll ( bool value ) : void
value bool
Résultat void

Xor() public méthode

public Xor ( BitString value ) : BitString
value BitString
Résultat BitString

this() public méthode

public this ( int index ) : bool
index int
Résultat bool