C# 클래스 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)
파일 보기 프로젝트 열기: Konard/LinksPlatform 1 사용 예제들

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
BitString ( ) : System
EnsureArgumentIsValid ( BitString other ) : void
GetCore ( long index ) : bool
RefreshBordersByWord ( long wordIndex ) : void
ResetCore ( long index ) : void
SetCore ( long index ) : void

메소드 상세

And() 공개 메소드

public And ( BitString other ) : BitString
other BitString
리턴 BitString

BitString() 공개 메소드

public BitString ( BitString bits ) : System
bits BitString
리턴 System

BitString() 공개 메소드

public BitString ( int length, bool defaultValue ) : System
length int
defaultValue bool
리턴 System

BitString() 공개 메소드

public BitString ( long length ) : System
length long
리턴 System

Clone() 공개 메소드

public Clone ( ) : object
리턴 object

CountCommonBits() 공개 메소드

public CountCommonBits ( BitString other ) : int
other BitString
리턴 int

CountSet() 공개 메소드

public CountSet ( ) : int
리턴 int

Get() 공개 메소드

public Get ( long index ) : bool
index long
리턴 bool

GetCommonIndices() 공개 메소드

public GetCommonIndices ( BitString other ) : List
other BitString
리턴 List

GetFirstSetBitIndex() 공개 메소드

public GetFirstSetBitIndex ( ) : int
리턴 int

GetLastCommonBitIndex() 공개 메소드

public GetLastCommonBitIndex ( BitString other ) : int
other BitString
리턴 int

GetLastSetBitIndex() 공개 메소드

public GetLastSetBitIndex ( ) : int
리턴 int

GetSetIndeces() 공개 메소드

public GetSetIndeces ( ) : List
리턴 List

GetSetIndecesCount() 공개 메소드

public GetSetIndecesCount ( ) : int
리턴 int

GetSetUInt64Indices() 공개 메소드

public GetSetUInt64Indices ( ) : List
리턴 List

HaveCommonBits() 공개 메소드

public HaveCommonBits ( BitString other ) : bool
other BitString
리턴 bool

Not() 공개 메소드

public Not ( ) : BitString
리턴 BitString

Or() 공개 메소드

public Or ( BitString value ) : BitString
value BitString
리턴 BitString

Reset() 공개 메소드

public Reset ( long index ) : void
index long
리턴 void

Set() 공개 메소드

public Set ( long index ) : void
index long
리턴 void

Set() 공개 메소드

public Set ( long index, bool value ) : void
index long
value bool
리턴 void

SetAll() 공개 메소드

public SetAll ( bool value ) : void
value bool
리턴 void

Xor() 공개 메소드

public Xor ( BitString value ) : BitString
value BitString
리턴 BitString

this() 공개 메소드

public this ( int index ) : bool
index int
리턴 bool