Class OffsetEmpty
- java.lang.Object
-
- org.apache.sysds.runtime.compress.colgroup.offset.AOffset
-
- org.apache.sysds.runtime.compress.colgroup.offset.OffsetEmpty
-
- All Implemented Interfaces:
Serializable
public class OffsetEmpty extends AOffset
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sysds.runtime.compress.colgroup.offset.AOffset
AOffset.OffsetSliceInfo
-
-
Constructor Summary
Constructors Constructor Description OffsetEmpty()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
constructSkipList()
static long
estimateInMemorySize()
long
getExactSizeOnDisk()
Remember to include the ordinal of the type of offset list.long
getInMemorySize()
Get the in memory size of the Offset objectAIterator
getIterator()
Get an iterator of the offsets while also maintaining the data index pointer.AIterator
getIterator(int row)
Get an iterator that is pointing at a specific offset.int
getLength()
Get the length of the underlying array.AOffsetIterator
getOffsetIterator()
Get an OffsetIterator of current offsets not maintaining the data index.int
getOffsetToFirst()
Get the offset to the first indexint
getOffsetToLast()
Get the offset to the last valueint
getSize()
Get the number of contained elements, This method iterate the entire offset list, so it is not constant lookup.AOffset
moveIndex(int m)
Move the index start x cellsstatic OffsetEmpty
readFields(DataInput in)
AOffset.OffsetSliceInfo
slice(int l, int u)
Slice the offsets based on the specified rangevoid
write(DataOutput out)
Write the offsets to disk.-
Methods inherited from class org.apache.sysds.runtime.compress.colgroup.offset.AOffset
append, appendN, cacheIterator, clearSkipList, equals, equals, preAggregateDenseMap, preAggSparseMap, reverse, toString, verify
-
-
-
-
Method Detail
-
getIterator
public AIterator getIterator()
Description copied from class:AOffset
Get an iterator of the offsets while also maintaining the data index pointer.- Specified by:
getIterator
in classAOffset
- Returns:
- AIterator that iterate through index and dictionary offset values.
-
getOffsetIterator
public AOffsetIterator getOffsetIterator()
Description copied from class:AOffset
Get an OffsetIterator of current offsets not maintaining the data index.- Specified by:
getOffsetIterator
in classAOffset
- Returns:
- AIterator that iterator through the delta offsets.
-
write
public void write(DataOutput out) throws IOException
Description copied from class:AOffset
Write the offsets to disk. If you implement another remember to write the ordinal of the new type to disk as well and add it to the OffsetFactory.- Specified by:
write
in classAOffset
- Parameters:
out
- The output to write to- Throws:
IOException
- Exception that happens if the IO fails to write.
-
readFields
public static OffsetEmpty readFields(DataInput in) throws IOException
- Throws:
IOException
-
getIterator
public AIterator getIterator(int row)
Description copied from class:AOffset
Get an iterator that is pointing at a specific offset.- Overrides:
getIterator
in classAOffset
- Parameters:
row
- The row requested.- Returns:
- AIterator that iterate through index and dictionary offset values.
-
getOffsetToFirst
public int getOffsetToFirst()
Description copied from class:AOffset
Get the offset to the first index- Specified by:
getOffsetToFirst
in classAOffset
- Returns:
- The first index offset
-
getOffsetToLast
public int getOffsetToLast()
Description copied from class:AOffset
Get the offset to the last value- Specified by:
getOffsetToLast
in classAOffset
- Returns:
- The last values offset
-
getInMemorySize
public long getInMemorySize()
Description copied from class:AOffset
Get the in memory size of the Offset object- Specified by:
getInMemorySize
in classAOffset
- Returns:
- In memory size as a long.
-
estimateInMemorySize
public static long estimateInMemorySize()
-
getExactSizeOnDisk
public long getExactSizeOnDisk()
Description copied from class:AOffset
Remember to include the ordinal of the type of offset list.- Specified by:
getExactSizeOnDisk
in classAOffset
- Returns:
- the size on disk as a long.
-
getSize
public int getSize()
Description copied from class:AOffset
Get the number of contained elements, This method iterate the entire offset list, so it is not constant lookup.
-
slice
public AOffset.OffsetSliceInfo slice(int l, int u)
Description copied from class:AOffset
Slice the offsets based on the specified range
-
moveIndex
public AOffset moveIndex(int m)
Description copied from class:AOffset
Move the index start x cells
-
getLength
public int getLength()
Description copied from class:AOffset
Get the length of the underlying array. This does not reflect the number of contained elements, since some of the elements can be skips.
-
constructSkipList
public void constructSkipList()
- Overrides:
constructSkipList
in classAOffset
-
-