Top Description Fields Constructors Methods
com.googlecode.javaewah32

public final Class IteratorAggregation32

Additional top-level classes in compilation unit: ORIt, XORIt, AndIt.

extends Object
Class Inheritance
Imports
com.googlecode.javaewah.CloneableIterator, java.util.Arrays, .Collections, .Iterator, .LinkedList

Set of helper functions to aggregate bitmaps.

Field Summary

Modifier and TypeField and Description
public static final int
DEFAULT_MAX_BUF_SIZE

An optimization option.

Constructor Summary

AccessConstructor and Description
private
IteratorAggregation32()

Private constructor to prevent instantiation

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
andToContainer(final BitmapStorage32 container, int desiredrlwcount, final IteratingRLW32 rlwi, IteratingRLW32 rlwj)

pack-priv static void
andToContainer(final BitmapStorage32 container, final IteratingRLW32 rlwi, IteratingRLW32 rlwj)

public static IteratingRLW32

Returns:

and aggregate
bufferedand
(final IteratingRLW32...
iterators to aggregate
al
)

Aggregate the iterators using a bitmap buffer.

public static IteratingRLW32

Returns:

and aggregate
bufferedand
(final int
size of the internal buffer used by the iterator in 64-bit words
bufSize
,
final IteratingRLW32...
iterators to aggregate
al
)

Aggregate the iterators using a bitmap buffer.

public static IteratingRLW32

Returns:

or aggregate
bufferedor
(final IteratingRLW32...
iterators to aggregate
al
)

Aggregate the iterators using a bitmap buffer.

public static IteratingRLW32

Returns:

or aggregate
bufferedor
(final int
size of the internal buffer used by the iterator in 64-bit words
bufSize
,
final IteratingRLW32...
iterators to aggregate
al
)

Aggregate the iterators using a bitmap buffer.

public static IteratingRLW32

Returns:

xor aggregate
bufferedxor
(final IteratingRLW32...
iterators to aggregate
al
)

Aggregate the iterators using a bitmap buffer.

public static IteratingRLW32

Returns:

xor aggregate
bufferedxor
(final int
size of the internal buffer used by the iterator in 64-bit words
bufSize
,
final IteratingRLW32...
iterators to aggregate
al
)

Aggregate the iterators using a bitmap buffer.

protected static int

Returns:

how many written
discharge
(final BitmapStorage32
target for writes
container
,
IteratingRLW32
source of data
i
,
int
maximal number of writes
max
)

Write out up to max words, returns how many were written

protected static void
dischargeAsEmpty(final BitmapStorage32
where we write
container
,
final IteratingRLW32
the iterator
i
)

Write out the content of the iterator, but as if it were all zeros.

protected static int

Returns:

how many written
dischargeNegated
(final BitmapStorage32
target for writes
container
,
IteratingRLW32
source of data
i
,
int
maximal number of writes
max
)

Write out up to max negated words, returns how many were written

protected static int
inplaceand(int[] bitmap, IteratingRLW32 i)

protected static int
inplaceor(int[] bitmap, IteratingRLW32 i)

protected static int
inplacexor(int[] bitmap, IteratingRLW32 i)

public static IteratingRLW32

Returns:

negated version of the iterator
not
(final IteratingRLW32
iterator to negate
x
)

public static void
xorToContainer(final BitmapStorage32
where to write
container
,
int
number of words to be written (max)
desiredrlwcount
,
final IteratingRLW32
first iterator to aggregate
rlwi
,
IteratingRLW32
second iterator to aggregate
rlwj
)

Compute the first few words of the XOR aggregate between two iterators.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_MAX_BUF_SIZEback to summary
public static final int DEFAULT_MAX_BUF_SIZE

An optimization option. Larger values may improve speed, but at the expense of memory.

Constructor Detail

IteratorAggregation32back to summary
private IteratorAggregation32()

Private constructor to prevent instantiation

Method Detail

andToContainerback to summary
pack-priv static void andToContainer(final BitmapStorage32 container, int desiredrlwcount, final IteratingRLW32 rlwi, IteratingRLW32 rlwj)
andToContainerback to summary
pack-priv static void andToContainer(final BitmapStorage32 container, final IteratingRLW32 rlwi, IteratingRLW32 rlwj)
bufferedandback to summary
public static IteratingRLW32 bufferedand(final IteratingRLW32... al)

Aggregate the iterators using a bitmap buffer.

Parameters
al:IteratingRLW32[]

iterators to aggregate

Returns:IteratingRLW32

and aggregate

bufferedandback to summary
public static IteratingRLW32 bufferedand(final int bufSize, final IteratingRLW32... al)

Aggregate the iterators using a bitmap buffer.

Parameters
bufSize:int

size of the internal buffer used by the iterator in 64-bit words

al:IteratingRLW32[]

iterators to aggregate

Returns:IteratingRLW32

and aggregate

bufferedorback to summary
public static IteratingRLW32 bufferedor(final IteratingRLW32... al)

Aggregate the iterators using a bitmap buffer.

Parameters
al:IteratingRLW32[]

iterators to aggregate

Returns:IteratingRLW32

or aggregate

bufferedorback to summary
public static IteratingRLW32 bufferedor(final int bufSize, final IteratingRLW32... al)

Aggregate the iterators using a bitmap buffer.

Parameters
bufSize:int

size of the internal buffer used by the iterator in 64-bit words

al:IteratingRLW32[]

iterators to aggregate

Returns:IteratingRLW32

or aggregate

bufferedxorback to summary
public static IteratingRLW32 bufferedxor(final IteratingRLW32... al)

Aggregate the iterators using a bitmap buffer.

Parameters
al:IteratingRLW32[]

iterators to aggregate

Returns:IteratingRLW32

xor aggregate

bufferedxorback to summary
public static IteratingRLW32 bufferedxor(final int bufSize, final IteratingRLW32... al)

Aggregate the iterators using a bitmap buffer.

Parameters
bufSize:int

size of the internal buffer used by the iterator in 64-bit words

al:IteratingRLW32[]

iterators to aggregate

Returns:IteratingRLW32

xor aggregate

dischargeback to summary
protected static int discharge(final BitmapStorage32 container, IteratingRLW32 i, int max)

Write out up to max words, returns how many were written

Parameters
container:BitmapStorage32

target for writes

i:IteratingRLW32

source of data

max:int

maximal number of writes

Returns:int

how many written

dischargeAsEmptyback to summary
protected static void dischargeAsEmpty(final BitmapStorage32 container, final IteratingRLW32 i)

Write out the content of the iterator, but as if it were all zeros.

Parameters
container:BitmapStorage32

where we write

i:IteratingRLW32

the iterator

dischargeNegatedback to summary
protected static int dischargeNegated(final BitmapStorage32 container, IteratingRLW32 i, int max)

Write out up to max negated words, returns how many were written

Parameters
container:BitmapStorage32

target for writes

i:IteratingRLW32

source of data

max:int

maximal number of writes

Returns:int

how many written

inplaceandback to summary
protected static int inplaceand(int[] bitmap, IteratingRLW32 i)
inplaceorback to summary
protected static int inplaceor(int[] bitmap, IteratingRLW32 i)
inplacexorback to summary
protected static int inplacexor(int[] bitmap, IteratingRLW32 i)
notback to summary
public static IteratingRLW32 not(final IteratingRLW32 x)
Parameters
x:IteratingRLW32

iterator to negate

Returns:IteratingRLW32

negated version of the iterator

xorToContainerback to summary
public static void xorToContainer(final BitmapStorage32 container, int desiredrlwcount, final IteratingRLW32 rlwi, IteratingRLW32 rlwj)

Compute the first few words of the XOR aggregate between two iterators.

Parameters
container:BitmapStorage32

where to write

desiredrlwcount:int

number of words to be written (max)

rlwi:IteratingRLW32

first iterator to aggregate

rlwj:IteratingRLW32

second iterator to aggregate