public class InMemoryGoedelIndex extends java.lang.Object implements ArraySortingGopher
| Constructor and Description |
|---|
InMemoryGoedelIndex() |
InMemoryGoedelIndex(long[] goedels,
long[] offsets,
int size) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(int index)
Compares the key of the item at the given index with the current
remembered key.
|
int |
getSize()
Returns the number of items in the array.
|
java.lang.Object |
keyAt(int index) |
void |
loadFromDump(java.io.File offsetsFile) |
void |
loadFromDump(java.lang.String dumpPath) |
void |
remember(int index)
Remembers the key at the given index for future comparisons.
|
void |
savePacked(java.io.File dumpFile,
java.io.File offsetFile) |
void |
saveToDump(java.io.File offsetFile) |
void |
saveToDump(java.lang.String dumpPath) |
void |
sort() |
static void |
sortAndPackGoedelDump(java.io.File dumpFile,
java.io.File offsetsFile) |
static void |
sortAndPackGoedelDump(java.io.File dumpFile,
java.io.File offsetsFile,
long[] offsets,
long[] goedels,
int size) |
static void |
sortGoedelDump(java.lang.String dumpPath) |
void |
swap(int a,
int b)
Swaps the items at the two index positions.
|
public InMemoryGoedelIndex()
public InMemoryGoedelIndex(long[] goedels,
long[] offsets,
int size)
public static void sortGoedelDump(java.lang.String dumpPath)
throws java.io.IOException
java.io.IOExceptionpublic static void sortAndPackGoedelDump(java.io.File dumpFile,
java.io.File offsetsFile)
throws java.io.IOException
java.io.IOExceptionpublic static void sortAndPackGoedelDump(java.io.File dumpFile,
java.io.File offsetsFile,
long[] offsets,
long[] goedels,
int size)
throws java.io.IOException
java.io.IOExceptionpublic void loadFromDump(java.lang.String dumpPath)
throws java.io.IOException
java.io.IOExceptionpublic void loadFromDump(java.io.File offsetsFile)
throws java.io.IOException
java.io.IOExceptionpublic void saveToDump(java.lang.String dumpPath)
throws java.io.IOException
java.io.IOExceptionpublic void saveToDump(java.io.File offsetFile)
throws java.io.IOException
java.io.IOExceptionpublic void savePacked(java.io.File dumpFile,
java.io.File offsetFile)
throws java.io.IOException
java.io.IOExceptionpublic void sort()
public void remember(int index)
ArraySortingGopherremember in interface ArraySortingGopherpublic int compare(int index)
ArraySortingGophercompare in interface ArraySortingGopherpublic java.lang.Object keyAt(int index)
public int getSize()
ArraySortingGophergetSize in interface ArraySortingGopherpublic void swap(int a,
int b)
ArraySortingGopherswap in interface ArraySortingGopher