public abstract class MappeableContainer extends Object implements Iterable<Short>, Cloneable, Externalizable
| Constructor and Description |
|---|
MappeableContainer() |
| Modifier and Type | Method and Description |
|---|---|
abstract MappeableContainer |
add(int begin,
int end)
Return a new container with all shorts in [begin,end)
added using an unsigned interpretation.
|
abstract MappeableContainer |
add(short x)
Add a short to the container.
|
abstract MappeableContainer |
and(MappeableArrayContainer x)
Computes the bitwise AND of this container with another (intersection).
|
abstract MappeableContainer |
and(MappeableBitmapContainer x)
Computes the bitwise AND of this container with another (intersection).
|
protected MappeableContainer |
and(MappeableContainer x) |
abstract MappeableContainer |
and(MappeableRunContainer x)
Computes the bitwise AND of this container with another (intersection).
|
abstract MappeableContainer |
andNot(MappeableArrayContainer x)
Computes the bitwise ANDNOT of this container with another (difference).
|
abstract MappeableContainer |
andNot(MappeableBitmapContainer x)
Computes the bitwise ANDNOT of this container with another (difference).
|
protected MappeableContainer |
andNot(MappeableContainer x) |
abstract MappeableContainer |
andNot(MappeableRunContainer x)
Computes the bitwise ANDNOT of this container with another (difference).
|
abstract void |
clear()
Empties the container
|
abstract MappeableContainer |
clone() |
abstract boolean |
contains(short x)
Checks whether the contain contains the provided value
|
abstract void |
fillLeastSignificant16bits(int[] x,
int i,
int mask)
Fill the least significant 16 bits of the integer array, starting at
index index, with the short values from this container.
|
abstract MappeableContainer |
flip(short x)
Add a short to the container if it is not present, otherwise remove it.
|
protected abstract int |
getArraySizeInBytes()
Size of the underlying array
|
abstract int |
getCardinality()
Computes the distinct number of short values in the container.
|
String |
getContainerName()
Get the name of this container.
|
abstract ShortIterator |
getReverseShortIterator()
Iterator to visit the short values in the container in descending order.
|
abstract ShortIterator |
getShortIterator()
Iterator to visit the short values in the container in ascending order.
|
abstract int |
getSizeInBytes()
Computes an estimate of the memory usage of this container.
|
abstract MappeableContainer |
iadd(int begin,
int end)
Add all shorts in [begin,end) using an unsigned interpretation.
|
abstract MappeableContainer |
iand(MappeableArrayContainer x)
Computes the in-place bitwise AND of this container with another
(intersection).
|
abstract MappeableContainer |
iand(MappeableBitmapContainer x)
Computes the in-place bitwise AND of this container with another
(intersection).
|
protected MappeableContainer |
iand(MappeableContainer x) |
abstract MappeableContainer |
iand(MappeableRunContainer x)
Computes the in-place bitwise AND of this container with another
(intersection).
|
abstract MappeableContainer |
iandNot(MappeableArrayContainer x)
Computes the in-place bitwise ANDNOT of this container with another
(difference).
|
abstract MappeableContainer |
iandNot(MappeableBitmapContainer x)
Computes the in-place bitwise ANDNOT of this container with another
(difference).
|
protected MappeableContainer |
iandNot(MappeableContainer x) |
abstract MappeableContainer |
iandNot(MappeableRunContainer x)
Computes the in-place bitwise ANDNOT of this container with another
(difference).
|
abstract MappeableContainer |
inot(int rangeStart,
int rangeEnd)
Computes the in-place bitwise NOT of this container (complement).
|
abstract boolean |
intersects(MappeableArrayContainer x)
Returns true if the current container intersects the other container.
|
abstract boolean |
intersects(MappeableBitmapContainer x)
Returns true if the current container intersects the other container.
|
boolean |
intersects(MappeableContainer x)
Returns true if the current container intersects the other container.
|
abstract boolean |
intersects(MappeableRunContainer x)
Returns true if the current container intersects the other container.
|
abstract MappeableContainer |
ior(MappeableArrayContainer x)
Computes the in-place bitwise OR of this container with another (union).
|
abstract MappeableContainer |
ior(MappeableBitmapContainer x)
Computes the in-place bitwise OR of this container with another (union).
|
protected MappeableContainer |
ior(MappeableContainer x) |
abstract MappeableContainer |
ior(MappeableRunContainer x)
Computes the in-place bitwise OR of this container with another (union).
|
abstract MappeableContainer |
iremove(int begin,
int end)
Remove shorts in [begin,end) using an unsigned interpretation.
|
protected abstract boolean |
isArrayBacked() |
abstract MappeableContainer |
ixor(MappeableArrayContainer x)
Computes the in-place bitwise XOR of this container with another (symmetric difference).
|
abstract MappeableContainer |
ixor(MappeableBitmapContainer x)
Computes the in-place bitwise XOR of this container with another (symmetric difference).
|
protected MappeableContainer |
ixor(MappeableContainer x) |
abstract MappeableContainer |
ixor(MappeableRunContainer x)
Computes the in-place bitwise XOR of this container with another (symmetric difference).
|
MappeableContainer |
lazyIOR(MappeableContainer x)
Computes the in-place bitwise OR of this container with another
(union).
|
MappeableContainer |
lazyOR(MappeableContainer x)
Computes the bitwise OR of this container with another (union).
|
abstract MappeableContainer |
limit(int maxcardinality)
Create a new MappeableContainer containing at most maxcardinality integers.
|
abstract MappeableContainer |
not(int rangeStart,
int rangeEnd)
Computes the bitwise NOT of this container (complement).
|
abstract MappeableContainer |
or(MappeableArrayContainer x)
Computes the bitwise OR of this container with another (union).
|
abstract MappeableContainer |
or(MappeableBitmapContainer x)
Computes the bitwise OR of this container with another (union).
|
protected MappeableContainer |
or(MappeableContainer x) |
abstract MappeableContainer |
or(MappeableRunContainer x)
Computes the bitwise OR of this container with another (union).
|
static MappeableContainer |
rangeOfOnes(int start,
int last)
Create a container initialized with a range of consecutive values
|
abstract int |
rank(short lowbits)
Rank returns the number of integers that are smaller or equal to x (Rank(infinity) would be GetCardinality()).
|
abstract MappeableContainer |
remove(int begin,
int end)
Return a new container with all shorts in [begin,end)
remove using an unsigned interpretation.
|
abstract MappeableContainer |
remove(short x)
Remove the short from this container.
|
abstract MappeableContainer |
repairAfterLazy()
The output of a lazyOR or lazyIOR might be an invalid container, this
should be called on it.
|
abstract MappeableContainer |
runOptimize()
Convert to MappeableRunContainers, when the result is smaller.
|
abstract short |
select(int j)
Return the jth value
|
abstract int |
serializedSizeInBytes()
Report the number of bytes required to serialize this container.
|
abstract void |
trim()
If possible, recover wasted memory.
|
protected abstract void |
writeArray(DataOutput out)
Write just the underlying array.
|
abstract MappeableContainer |
xor(MappeableArrayContainer x)
Computes the bitwise XOR of this container with another (symmetric difference).
|
abstract MappeableContainer |
xor(MappeableBitmapContainer x)
Computes the bitwise XOR of this container with another (symmetric difference).
|
protected MappeableContainer |
xor(MappeableContainer x) |
abstract MappeableContainer |
xor(MappeableRunContainer x)
Computes the bitwise XOR of this container with another (symmetric difference).
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, iterator, spliteratorreadExternal, writeExternalpublic String getContainerName()
public static MappeableContainer rangeOfOnes(int start, int last)
start - first indexlast - last index (range is exclusive)public abstract MappeableContainer add(short x)
x - short to be addedpublic abstract MappeableContainer and(MappeableArrayContainer x)
x - other containerpublic abstract MappeableContainer and(MappeableBitmapContainer x)
x - other containerpublic abstract MappeableContainer and(MappeableRunContainer x)
x - other containerprotected MappeableContainer and(MappeableContainer x)
public abstract MappeableContainer andNot(MappeableArrayContainer x)
x - other containerpublic abstract MappeableContainer andNot(MappeableBitmapContainer x)
x - other containerpublic abstract MappeableContainer andNot(MappeableRunContainer x)
x - other containerprotected MappeableContainer andNot(MappeableContainer x)
public abstract void clear()
public abstract MappeableContainer clone()
public abstract boolean contains(short x)
x - value to checkpublic abstract void fillLeastSignificant16bits(int[] x,
int i,
int mask)
x - provided arrayi - starting indexmask - indicates most significant bitspublic abstract MappeableContainer flip(short x)
x - short to be addedprotected abstract int getArraySizeInBytes()
public abstract int getCardinality()
public abstract ShortIterator getShortIterator()
public abstract ShortIterator getReverseShortIterator()
public abstract int getSizeInBytes()
public abstract MappeableContainer iand(MappeableArrayContainer x)
x - other containerpublic abstract MappeableContainer iand(MappeableBitmapContainer x)
x - other containerpublic abstract MappeableContainer iand(MappeableRunContainer x)
x - other containerprotected MappeableContainer iand(MappeableContainer x)
public abstract MappeableContainer iandNot(MappeableArrayContainer x)
x - other containerpublic abstract MappeableContainer iandNot(MappeableBitmapContainer x)
x - other containerpublic abstract MappeableContainer iandNot(MappeableRunContainer x)
x - other containerprotected MappeableContainer iandNot(MappeableContainer x)
public abstract MappeableContainer inot(int rangeStart, int rangeEnd)
rangeStart - beginning of range (inclusive); 0 is beginning of this
container.rangeEnd - ending of range (exclusive)public boolean intersects(MappeableContainer x)
x - other containerpublic abstract boolean intersects(MappeableArrayContainer x)
x - other containerpublic abstract boolean intersects(MappeableBitmapContainer x)
x - other containerpublic abstract boolean intersects(MappeableRunContainer x)
x - other containerpublic abstract MappeableContainer ior(MappeableArrayContainer x)
x - other containerpublic abstract MappeableContainer ior(MappeableBitmapContainer x)
x - other containerpublic abstract MappeableContainer ior(MappeableRunContainer x)
x - other containerprotected MappeableContainer ior(MappeableContainer x)
public abstract MappeableContainer ixor(MappeableArrayContainer x)
x - other containerpublic abstract MappeableContainer ixor(MappeableBitmapContainer x)
x - other containerpublic abstract MappeableContainer ixor(MappeableRunContainer x)
x - other containerprotected MappeableContainer ixor(MappeableContainer x)
public MappeableContainer lazyOR(MappeableContainer x)
x - other containerpublic MappeableContainer lazyIOR(MappeableContainer x)
x - other containerpublic abstract MappeableContainer repairAfterLazy()
public abstract MappeableContainer not(int rangeStart, int rangeEnd)
rangeStart - beginning of range (inclusive); 0 is beginning of this
container.rangeEnd - ending of range (exclusive)public abstract MappeableContainer or(MappeableArrayContainer x)
x - other containerpublic abstract MappeableContainer or(MappeableBitmapContainer x)
x - other containerpublic abstract MappeableContainer or(MappeableRunContainer x)
x - other containerprotected MappeableContainer or(MappeableContainer x)
public abstract MappeableContainer remove(short x)
x - to be removedpublic abstract int serializedSizeInBytes()
public abstract void trim()
protected abstract void writeArray(DataOutput out) throws IOException
out - output streamIOException - in case of failurepublic abstract MappeableContainer xor(MappeableArrayContainer x)
x - other containerpublic abstract MappeableContainer xor(MappeableBitmapContainer x)
x - other containerpublic abstract MappeableContainer xor(MappeableRunContainer x)
x - other parameterprotected MappeableContainer xor(MappeableContainer x)
public abstract int rank(short lowbits)
lowbits - upper limitpublic abstract short select(int j)
j - index of the valuepublic abstract MappeableContainer limit(int maxcardinality)
maxcardinality - maximal cardinalitypublic abstract MappeableContainer iadd(int begin, int end)
begin - start of range (inclusive)end - end of range (exclusive)public abstract MappeableContainer iremove(int begin, int end)
begin - start of range (inclusive)end - end of range (exclusive)public abstract MappeableContainer add(int begin, int end)
begin - start of range (inclusive)end - end of range (exclusive)public abstract MappeableContainer remove(int begin, int end)
begin - start of range (inclusive)end - end of range (exclusive)public abstract MappeableContainer runOptimize()
protected abstract boolean isArrayBacked()
Copyright © 2015. All Rights Reserved.