C# Class natix.CompactDS.BitAccess

Bit access methods
Mostrar archivo Open project: sadit/natix

Public Methods

Method Description
AssignBit ( int bitmap, int i, bool x ) : int

Assign the (i+1)th bit to x. Overload using int as bitmap

GetBit ( List bitmap, int i ) : bool

Gets the (i+1)th bit. Overload using bytes.

GetBit ( List bitmap, long i ) : bool

Gets the (i+1)th bit.

GetBit ( int bitmap, int i ) : bool

Gets the (i+1)th bit. Overload using int as bitmap

Log2 ( int u ) : int

floor(Log2) of the specified u.

Log2 ( long u ) : int
Rank1 ( List bitmap, int start, int count, int bitpos ) : int
Rank1 ( uint bitmap, int bitpos ) : int

Returns Rank1(bitpos) at bitmap

ResetBit ( int bitmap, int i ) : int

Reset the (i+1)th bit. Overload using int as bitmap

ResetBit ( List bitmap, int i ) : void

Resets the (i+1)th bit. Overload using bytes.

ResetBit ( List bitmap, long i ) : void

Resets the (i+1)th bit.

Reverse ( int bitmap, int size ) : int

Reverse the first size bits inside the bitmap

Select1 ( List bitmap, int start, int atmostcount, int rank ) : int

Select1 of rank in bitmap. The boundaries are start and start+atmostcount

Select1 ( uint bitmap, int rank ) : int

Select1 of rank

Select1 ( uint bitmap, int rank, int &rankout ) : int

Select of the (rank) th the specified bitmap, rank and rankout.

Select1BitArgs ( List bitmap, int start_bit, int max_count_bits, int rank ) : int

Select1 of rank, the bit sequences is bitmap. The search starts in start_bit, reviewing atmost max_count_bits.

SetBit ( int bitmap, int i ) : int

Enables the (i+1)th bit. Overload using int as bitmap

SetBit ( List bitmap, int i ) : void

Enalbes the (i+1)th bit.

SetBit ( List bitmap, long i ) : void

Enables the (i+1)th bit.

ToAsciiString ( uint u ) : string

Prints u as a bit string

ToAsciiString ( ulong u ) : string

Prints u as a bit string

Method Details

AssignBit() public static method

Assign the (i+1)th bit to x. Overload using int as bitmap
public static AssignBit ( int bitmap, int i, bool x ) : int
bitmap int
i int
x bool
return int

GetBit() public static method

Gets the (i+1)th bit. Overload using bytes.
public static GetBit ( List bitmap, int i ) : bool
bitmap List
i int
return bool

GetBit() public static method

Gets the (i+1)th bit.
public static GetBit ( List bitmap, long i ) : bool
bitmap List
i long
return bool

GetBit() public static method

Gets the (i+1)th bit. Overload using int as bitmap
public static GetBit ( int bitmap, int i ) : bool
bitmap int
i int
return bool

Log2() public static method

floor(Log2) of the specified u.
public static Log2 ( int u ) : int
u int
return int

Log2() public static method

public static Log2 ( long u ) : int
u long
return int

Rank1() public static method

public static Rank1 ( List bitmap, int start, int count, int bitpos ) : int
bitmap List
start int
count int
bitpos int
return int

Rank1() public static method

Returns Rank1(bitpos) at bitmap
public static Rank1 ( uint bitmap, int bitpos ) : int
bitmap uint
bitpos int
return int

ResetBit() public static method

Reset the (i+1)th bit. Overload using int as bitmap
public static ResetBit ( int bitmap, int i ) : int
bitmap int
i int
return int

ResetBit() public static method

Resets the (i+1)th bit. Overload using bytes.
public static ResetBit ( List bitmap, int i ) : void
bitmap List
i int
return void

ResetBit() public static method

Resets the (i+1)th bit.
public static ResetBit ( List bitmap, long i ) : void
bitmap List
i long
return void

Reverse() public static method

Reverse the first size bits inside the bitmap
public static Reverse ( int bitmap, int size ) : int
bitmap int
size int
return int

Select1() public static method

Select1 of rank in bitmap. The boundaries are start and start+atmostcount
public static Select1 ( List bitmap, int start, int atmostcount, int rank ) : int
bitmap List
start int
atmostcount int
rank int
return int

Select1() public static method

Select1 of rank
public static Select1 ( uint bitmap, int rank ) : int
bitmap uint
rank int
return int

Select1() public static method

Select of the (rank) th the specified bitmap, rank and rankout.
public static Select1 ( uint bitmap, int rank, int &rankout ) : int
bitmap uint
rank int
rankout int
return int

Select1BitArgs() public static method

Select1 of rank, the bit sequences is bitmap. The search starts in start_bit, reviewing atmost max_count_bits.
public static Select1BitArgs ( List bitmap, int start_bit, int max_count_bits, int rank ) : int
bitmap List
start_bit int
max_count_bits int
rank int
return int

SetBit() public static method

Enables the (i+1)th bit. Overload using int as bitmap
public static SetBit ( int bitmap, int i ) : int
bitmap int
i int
return int

SetBit() public static method

Enalbes the (i+1)th bit.
public static SetBit ( List bitmap, int i ) : void
bitmap List
i int
return void

SetBit() public static method

Enables the (i+1)th bit.
public static SetBit ( List bitmap, long i ) : void
bitmap List
i long
return void

ToAsciiString() public static method

Prints u as a bit string
public static ToAsciiString ( uint u ) : string
u uint
return string

ToAsciiString() public static method

Prints u as a bit string
public static ToAsciiString ( ulong u ) : string
u ulong
return string