C# Class natix.CompactDS.DiffSet

Inheritance: Bitmap
Mostrar archivo Open project: sadit/natix Class Usage Examples

Public Properties

Property Type Description
Stream BitStream32

Protected Properties

Property Type Description
B short

Public Methods

Method Description
Access ( int pos ) : bool
Add ( int current ) : void
Add ( int current, int prev ) : void

Adds an (ordered) item to the set

AssertEquality ( Bitmap _other ) : void
Build ( IEnumerable orderedList, int n, short b, IIEncoder32 coder = null ) : void

build methods

Build ( IList orderedList, short b, IIEncoder32 coder = null ) : void
Commit ( ) : void

Write the sequence to the bitmap. DiffSet always commit items.

DiffSet ( ) : System
DiffSet ( short B ) : System
ExtractFrom ( int start_index, int count, List output ) : int

Extract 'count' differences starting from 'start_index', it saves the output in 'output'. Returns the previous absolute value to start_index (start_index - 1), i.e. the reference

Load ( BinaryReader R ) : void
Rank1 ( int pos ) : int
Save ( BinaryWriter W ) : void
Select1 ( int rank ) : int

Returns the position of the rank-th enabled bit

Select1Difference ( int rank ) : int

Returns the difference between Select1(rank) - Select1(rank-1)

Protected Methods

Method Description
AddItem ( int current, int prev ) : void

Internal method to add an (ordered) item to the set

ReadNext ( BitStreamCtx ctx ) : int
ResetReader ( ) : void
WriteNewDiff ( int u ) : void

Private Methods

Method Description
BackendAccessRank1 ( int pos, int &found_pos, BitStreamCtx ctx ) : int
BackendSelect1 ( int rank, BitStreamCtx ctx ) : int

Unlocked Select1 useful

SeqAccessRank1 ( int acc, long pos, int max, int &found_pos, BitStreamCtx ctx ) : int

Method Details

Access() public method

public Access ( int pos ) : bool
pos int
return bool

Add() public method

public Add ( int current ) : void
current int
return void

Add() public method

Adds an (ordered) item to the set
public Add ( int current, int prev ) : void
current int
prev int
return void

AddItem() protected method

Internal method to add an (ordered) item to the set
protected AddItem ( int current, int prev ) : void
current int
prev int
return void

AssertEquality() public method

public AssertEquality ( Bitmap _other ) : void
_other Bitmap
return void

Build() public method

build methods
public Build ( IEnumerable orderedList, int n, short b, IIEncoder32 coder = null ) : void
orderedList IEnumerable
n int
b short
coder IIEncoder32
return void

Build() public method

public Build ( IList orderedList, short b, IIEncoder32 coder = null ) : void
orderedList IList
b short
coder IIEncoder32
return void

Commit() public method

Write the sequence to the bitmap. DiffSet always commit items.
public Commit ( ) : void
return void

DiffSet() public method

public DiffSet ( ) : System
return System

DiffSet() public method

public DiffSet ( short B ) : System
B short
return System

ExtractFrom() public method

Extract 'count' differences starting from 'start_index', it saves the output in 'output'. Returns the previous absolute value to start_index (start_index - 1), i.e. the reference
public ExtractFrom ( int start_index, int count, List output ) : int
start_index int
count int
output List
return int

Load() public method

public Load ( BinaryReader R ) : void
R System.IO.BinaryReader
return void

Rank1() public method

public Rank1 ( int pos ) : int
pos int
return int

ReadNext() protected method

protected ReadNext ( BitStreamCtx ctx ) : int
ctx BitStreamCtx
return int

ResetReader() protected method

protected ResetReader ( ) : void
return void

Save() public method

public Save ( BinaryWriter W ) : void
W System.IO.BinaryWriter
return void

Select1() public method

Returns the position of the rank-th enabled bit
public Select1 ( int rank ) : int
rank int
return int

Select1Difference() public method

Returns the difference between Select1(rank) - Select1(rank-1)
public Select1Difference ( int rank ) : int
rank int
return int

WriteNewDiff() protected method

protected WriteNewDiff ( int u ) : void
u int
return void

Property Details

B protected_oe property

protected short B
return short

Stream public_oe property

public BitStream32,natix.CompactDS Stream
return BitStream32