C# Class natix.CompactDS.DiffSet64

Inheritance: natix.CompactDS.RankSelectBase64
显示文件 Open project: sadit/natix Class Usage Examples

Public Properties

Property Type Description
Stream BitStream32

Protected Properties

Property Type Description
B short
Coder IIEncoder64
M int
N long

Public Methods

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

Adds an (ordered) item to the set

AssertEquality ( Bitmap64 _other ) : void
Build ( IEnumerable orderedList, long n, short b, IIEncoder64 coder = null ) : void

build methods

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

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

DiffSet64 ( ) : System
DiffSet64 ( short B ) : System
ExtractFrom ( int start_index, int count, IList output ) : long

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 Input ) : void
Rank1 ( long pos ) : long
Save ( BinaryWriter Output ) : void
Select1 ( long rank ) : long

Returns the position of the rank-th enabled bit

Select1 ( long rank, UnraveledSymbolXLB unraveled_ctx ) : long
Select1Difference ( int rank ) : long

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

Protected Methods

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

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

ReadNext ( natix.CompactDS.BitStreamCtxRL ctx ) : long
ResetReader ( natix.CompactDS.BitStreamCtxRL ctx ) : void
WriteNewDiff ( long u ) : void

Private Methods

Method Description
BackendAccessRank1 ( long pos, long &found_pos, natix.CompactDS.BitStreamCtxRL ctx ) : long
BackendSelect1 ( int rank, natix.CompactDS.BitStreamCtxRL ctx ) : long

Unlocked Select1 useful to some lowlevel operations

SeqAccessRank1 ( long acc, long pos, int max, long &found_pos, natix.CompactDS.BitStreamCtxRL ctx ) : long

Method Details

Access() public method

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

Add() public method

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

Add() public method

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

AddItem() protected method

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

AssertEquality() public method

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

Build() public method

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

Build() public method

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

Commit() public method

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

DiffSet64() public method

public DiffSet64 ( ) : System
return System

DiffSet64() public method

public DiffSet64 ( 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, IList output ) : long
start_index int
count int
output IList
return long

Load() public method

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

Rank1() public method

public Rank1 ( long pos ) : long
pos long
return long

ReadNext() protected method

protected ReadNext ( natix.CompactDS.BitStreamCtxRL ctx ) : long
ctx natix.CompactDS.BitStreamCtxRL
return long

ResetReader() protected method

protected ResetReader ( natix.CompactDS.BitStreamCtxRL ctx ) : void
ctx natix.CompactDS.BitStreamCtxRL
return void

Save() public method

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

Select1() public method

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

Select1() public method

public Select1 ( long rank, UnraveledSymbolXLB unraveled_ctx ) : long
rank long
unraveled_ctx UnraveledSymbolXLB
return long

Select1Difference() public method

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

WriteNewDiff() protected method

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

Property Details

B protected_oe property

protected short B
return short

Coder protected_oe property

protected IIEncoder64 Coder
return IIEncoder64

M protected_oe property

protected int M
return int

N protected_oe property

protected long N
return long

Stream public_oe property

public BitStream32,natix.CompactDS Stream
return BitStream32