public class Rank extends Object
Modifier and Type | Field and Description |
---|---|
int |
length
The length.
|
Constructor and Description |
---|
Rank(byte[] text,
long[] aAlphabet)
Constructor.
|
Rank(long[] originalBitfield,
int length)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getAllocatedBytes()
Returns the number of bytes for the allocated arrays.
|
int |
getRank(int index,
boolean zeros)
Returns the rank.
|
int |
getRankOne(int index)
Returns the rank of ones.
|
int |
getRankZero(int index)
Returns the rank of zeros.
|
boolean |
isOne(int index)
Returns true if the value is equal to one.
|
int |
isOneInt(int index)
Returns true if the value is equal to one.
|
public Rank(byte[] text, long[] aAlphabet)
text
- the textaAlphabet
- the alphabetpublic Rank(long[] originalBitfield, int length)
originalBitfield
- an original bitfieldlength
- length of original bitfieldpublic int getRank(int index, boolean zeros)
index
- the valuezeros
- the zerospublic final int getRankOne(int index)
index
- the valuepublic int getRankZero(int index)
index
- the valuepublic boolean isOne(int index)
index
- the valuepublic int isOneInt(int index)
index
- the valuepublic int getAllocatedBytes()
Copyright © 2018. All rights reserved.