|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.sux4j.bits.AbstractRank
public abstract class AbstractRank
An abstract implementation of Rank
providing a few obvious derived methods.
Constructor Summary | |
---|---|
AbstractRank()
|
Method Summary | |
---|---|
long |
count()
Returns the number of ones in the bit vector indexed by this class. |
long |
rank(long from,
long to)
Returns the number of ones in the specified interval. |
long |
rankZero(long pos)
Returns the number of zeroes preceding the specified position. |
long |
rankZero(long from,
long to)
Returns the number of zeroes in the specified interval. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.sux4j.bits.Rank |
---|
bitVector, numBits, rank |
Constructor Detail |
---|
public AbstractRank()
Method Detail |
---|
public long count()
Rank
count
in interface Rank
public long rank(long from, long to)
Rank
rank
in interface Rank
from
- a position in the bit vector.to
- a position in the bit vector.
from
(inclusive) and to
(exclusive); if
to
is smaller than from
, 0 is returned.public long rankZero(long pos)
Rank
rankZero
in interface Rank
pos
- a position in the bit vector.
pos
.public long rankZero(long from, long to)
Rank
rankZero
in interface Rank
from
- a position in the bit vector.to
- a position in the bit vector.
from
(inclusive) and to
(exclusive); if
to
is smaller than from
, 0 is returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |