Interface IColIndex
-
- All Known Implementing Classes:
AColIndex
,ArrayIndex
,RangeIndex
,SingleIndex
,TwoIndex
public interface IColIndex
Class to contain column indexes for the compression column groups.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IColIndex.ColIndexType
static class
IColIndex.SliceResult
A Class for slice results containing indexes for the slicing of dictionaries, and the resulting column index
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IColIndex
combine(IColIndex other)
combine the indexes of this colIndex with another, it is expected that all calls to this contains unique indexes, and no copies of values.boolean
contains(IColIndex a, IColIndex b)
This contains method is not strict since it only verifies one element is contained from each a and b.boolean
containsStrict(IColIndex a, IColIndex b)
This contains both a and b ...boolean
equals(Object other)
boolean
equals(IColIndex other)
long
estimateInMemorySize()
Get the in memory size of this object.int
findIndex(int i)
Find the index of the value given return negative if non existing.int
get(int i)
Get the index at a specific location, Note that many of the underlying implementations does not throw exceptions on indexes that are completely wrong, so all implementations that use this index should always be well behaved.long
getExactSizeOnDisk()
Get the exact size on disk to enable preallocation of the disk output buffer sizesint
hashCode()
boolean
isContiguous()
Get if these columns are contiguous, meaning all indexes are integers at increments of 1.IIterate
iterator()
A Iterator of the indexes see the iterator interface for details.IColIndex
shift(int i)
Return a new column index where the values are shifted by the specified amount.int
size()
Get the size of the index aka, how many columns is containedIColIndex.SliceResult
slice(int l, int u)
void
write(DataOutput out)
Write out the IO representation of this column index
-
-
-
Method Detail
-
size
int size()
Get the size of the index aka, how many columns is contained- Returns:
- The size of the array
-
get
int get(int i)
Get the index at a specific location, Note that many of the underlying implementations does not throw exceptions on indexes that are completely wrong, so all implementations that use this index should always be well behaved.- Parameters:
i
- The index to get- Returns:
- the column index at the index.
-
shift
IColIndex shift(int i)
Return a new column index where the values are shifted by the specified amount. It is returning a new instance of the index.- Parameters:
i
- The amount to shift- Returns:
- the new instance of an index.
-
write
void write(DataOutput out) throws IOException
Write out the IO representation of this column index- Parameters:
out
- The Output to write into- Throws:
IOException
- IO exceptions in case of for instance not enough disk space
-
getExactSizeOnDisk
long getExactSizeOnDisk()
Get the exact size on disk to enable preallocation of the disk output buffer sizes- Returns:
- The exact disk representation size
-
estimateInMemorySize
long estimateInMemorySize()
Get the in memory size of this object.- Returns:
- The memory size of this object
-
iterator
IIterate iterator()
A Iterator of the indexes see the iterator interface for details.- Returns:
- A iterator for the indexes contained.
-
findIndex
int findIndex(int i)
Find the index of the value given return negative if non existing.- Parameters:
i
- the value to find inside the allocation- Returns:
- The index of the value.
-
slice
IColIndex.SliceResult slice(int l, int u)
-
equals
boolean equals(IColIndex other)
-
contains
boolean contains(IColIndex a, IColIndex b)
This contains method is not strict since it only verifies one element is contained from each a and b.- Parameters:
a
- one array to contain at least one value fromb
- another array to contain at least one value from- Returns:
- if the other arrays contain values from this array
-
containsStrict
boolean containsStrict(IColIndex a, IColIndex b)
This contains both a and b ... it is strict because it verifies all cells. Note it returns false if there are more elements in this than the sum of a and b.- Parameters:
a
- one other array to containb
- another array to contain- Returns:
- if this array contains both a and b
-
combine
IColIndex combine(IColIndex other)
combine the indexes of this colIndex with another, it is expected that all calls to this contains unique indexes, and no copies of values.- Parameters:
other
- The other array- Returns:
- The combined array
-
isContiguous
boolean isContiguous()
Get if these columns are contiguous, meaning all indexes are integers at increments of 1. ex: 1,2,3,4,5,6 is contiguous 1,3,4 is not.- Returns:
- If the Columns are contiguous.
-
-