|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.di.mg4j.index.IndexIterators
public class IndexIterators
A class providing static methods and objects that do useful things with index iterators.
| Nested Class Summary | |
|---|---|
protected static class |
IndexIterators.PositionsIterator
|
| Field Summary | |
|---|---|
static IndexIterator[] |
EMPTY_ARRAY
|
| Constructor Summary | |
|---|---|
protected |
IndexIterators()
|
| Method Summary | |
|---|---|
static int[] |
positionArray(IndexIterator indexIterator)
Returns the positions of an index iterator as an array. |
static int[] |
positionArray(IndexIterator indexIterator,
int[] position)
Writes the positions of an index iterator into an array; if the array is not large enough, it will be reallocated using IntArrays.grow(int[], int). |
static IntIterator |
positionIterator(IndexIterator indexIterator)
Returns an IntIterator view of the positions of an index iterator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final IndexIterator[] EMPTY_ARRAY
| Constructor Detail |
|---|
protected IndexIterators()
| Method Detail |
|---|
public static int[] positionArray(IndexIterator indexIterator)
throws IOException
Note that this method just iterates IndexIterator.nextPosition(). If the
method has already been called, the positions that have been already returned will be missing.
IndexIterator.nextPosition().
IOException
public static int[] positionArray(IndexIterator indexIterator,
int[] position)
throws IOException
IntArrays.grow(int[], int).
Note that this method just iterates IndexIterator.nextPosition(). If the
method has already been called, the positions that have been already returned will be missing.
position, if it was large enough to contain all positions; a new, larger array otherwise.
IOExceptionpublic static IntIterator positionIterator(IndexIterator indexIterator)
IntIterator view of the positions of an index iterator.
Note that this method just offers of a view of IndexIterator.nextPosition(). If the
method has already been called, the positions that have been already returned will be missing.
IntIterator view of the positions obtained by repeatedly calling IndexIterator.nextPosition().
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||