|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRankSelect
Main methods for Rank & Select based indexes.
Field Summary | |
---|---|
static int |
DISK
|
static int |
MEMORY
|
Method Summary | |
---|---|
long |
count1(long start,
long end)
Returns the number of 1s in the selected range of the source |
void |
createIndex(int mode)
Creates the index in memory or on disk. |
void |
createIndex(int mode,
float spaceOccupancy)
Creates the index in memory or on disk using the specified amount of space |
boolean |
get(long index)
Returns the value at the specified position |
long |
ISize()
Returns the size in bits of the index |
void |
load()
Loads the data structures from the default file(s) |
void |
load(Directory input)
This methods acts as load() , but load data structures from a Directory |
long |
rank0(long pos)
Returns the rank0 at the pos-th bit (starting from 0) |
long |
rank1(long pos)
Returns the rank1 at the pos-th bit (starting from 0) |
long |
Scard()
Returns the number of 1s in the source |
long |
select1(long rank)
Returns the position of the rank-th 1 (starting from 0) |
long |
Ssize()
Returns the size in bits of the source file. |
void |
store()
Stores data structures in the default file(s). |
void |
store(Directory output)
This methods acts as store() , but store data structures inside a Directory |
Field Detail |
---|
static final int MEMORY
static final int DISK
Method Detail |
---|
void createIndex(int mode) throws IOException
mode
- the mode of creation (MEMORY
or DISK
)
IOException
void createIndex(int mode, float spaceOccupancy) throws IOException
mode
- the mode of creation (MEMORY
or DISK
)spaceOccupancy
- is the space occupancy in terms of % of the source dimension that the index must achieve
IOException
long Ssize()
long ISize() throws IOException
IOException
long Scard() throws IOException
IOException
boolean get(long index) throws IOException
IOException
long count1(long start, long end) throws IOException
IOException
long rank1(long pos) throws IOException
pos
- is the position to analyze
IOException
long rank0(long pos) throws IOException
pos
- is the position to analyze
IOException
long select1(long rank) throws IOException
rank
- is the rank to find
IOException
void load() throws IOException
IOException
void load(Directory input) throws IOException
load()
, but load data structures from a Directory
input
- the source Directory; must be opened in READ_MODE
IOException
void store() throws IOException
IOException
void store(Directory output) throws IOException
store()
, but store data structures inside a Directory
output
- the destination Directory; must be opened in WRITE_MODE
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |