public class MultiBitSetBag extends Object implements IndexBag
Modifier and Type | Field and Description |
---|---|
static int |
DFLT_BANKSIZE
Default size for a single BitSet.
|
Constructor and Description |
---|
MultiBitSetBag(long size)
Constructs a bag with a default bank size.
|
MultiBitSetBag(long size,
int bankSize)
Constructs a bag with a specified bank size.
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(long lindex)
Adds an index to this bag.
|
long |
getCount()
Returns the number of distinct indices in this bag.
|
boolean |
hasIndex(long lindex)
Indicates whether the given index has previously been added to this bag.
|
PrimitiveIterator.OfLong |
sortedLongIterator()
Returns an iterator over all the integers added to this bag,
supplied in ascending order.
|
public static final int DFLT_BANKSIZE
public MultiBitSetBag(long size)
size
- one greater than the largest permitted valuepublic MultiBitSetBag(long size, int bankSize)
size
- one greater than the largest permitted valuebankSize
- size of sub-buffers into which the storage is
dividedpublic void addIndex(long lindex)
IndexBag
If the index is outside of the range permitted by this bag, behaviour is undefined.
public boolean hasIndex(long lindex)
IndexBag
If the index is outside of the range permitted by this bag, behaviour is undefined.
public long getCount()
IndexBag
public PrimitiveIterator.OfLong sortedLongIterator()
IndexBag
sortedLongIterator
in interface IndexBag
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.