|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwater.Iced
water.fvec.Chunk
public abstract class Chunk
A compression scheme, over a chunk - a single array of bytes. The *actual* vector header info is in the Vec struct - which contains info to find all the bytes of the distributed vector. This struct is basically a 1-entry chunk cache of the total vector. Subclasses of this abstract class implement (possibly empty) compression schemes.
Field Summary | |
---|---|
protected Chunk |
_chk
|
int |
_len
|
long |
_start
|
Vec |
_vec
|
Method Summary | |
---|---|
double |
at_slow(long i)
Slightly slower than 'at0' inside a chunk; goes (very) slow outside the chunk instead of throwing. |
double |
at(long i)
Load a double value. |
double |
at0(int i)
The zero-based API. |
protected abstract long |
at8_impl(int idx)
|
long |
at8_slow(long i)
|
long |
at8(long i)
Load a long value. |
long |
at80(int i)
|
protected abstract double |
atd_impl(int idx)
Chunk-specific readers. |
long |
byteSize()
|
int |
cidx()
|
Chunk |
clone()
|
void |
close(int cidx,
Futures fs)
After writing we must call close() to register the bulk changes |
byte[] |
getBytes()
|
protected abstract boolean |
isNA_impl(int idx)
|
boolean |
isNA_slow(long i)
|
boolean |
isNA(long i)
Fetch the missing-status the slow way. |
boolean |
isNA0(int i)
|
int |
pformat_len()
|
protected int |
pformat_len0()
|
protected int |
pformat_len0(double scale,
int lg)
|
java.lang.String |
pformat()
|
protected java.lang.String |
pformat0()
|
abstract Chunk |
read(AutoBuffer bb)
Deserialize from the AutoBuffer into a pre-existing 'this' object. |
boolean |
readable()
|
double |
set(long i,
double d)
Write element the slow way, as a double. |
float |
set(long i,
float f)
Write element the slow way, as a float. |
long |
set(long i,
long l)
Write element the slow way, as a long. |
double |
set0(int idx,
double d)
Set a double element in a chunk given a 0-based chunk local index. |
float |
set0(int idx,
float f)
Set a floating element in a chunk given a 0-based chunk local index. |
long |
set0(int idx,
long l)
Set a long element in a chunk given a 0-based chunk local index. |
boolean |
setNA(long i)
Set the element as missing the slow way. |
boolean |
setNA0(int idx)
Set the element in a chunk as missing given a 0-based chunk local index. |
java.lang.String |
toString()
|
boolean |
writable()
|
abstract AutoBuffer |
write(AutoBuffer bb)
Chunk-specific implementations of read & write |
Methods inherited from class water.Iced |
---|
frozenType, init, newInstance, toDocField, writeJSON, writeJSONFields |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public long _start
public int _len
protected Chunk _chk
public Vec _vec
Method Detail |
---|
public final boolean readable()
public final boolean writable()
public final byte[] getBytes()
public final long at8(long i)
Loads from the 1-entry chunk cache, or misses-out. This version uses absolute element numbers, but must convert them to chunk-relative indices - requiring a load from an aliasing local var, leading to lower quality JIT'd code (similar issue to using iterator objects).
Slightly slower than 'at0' since it range checks within a chunk.
public final double at(long i)
Loads from the 1-entry chunk cache, or misses-out. This version uses absolute element numbers, but must convert them to chunk-relative indices - requiring a load from an aliasing local var, leading to lower quality JIT'd code (similar issue to using iterator objects).
Slightly slower than 'at80' since it range checks within a chunk.
public final boolean isNA(long i)
public final double at0(int i)
public final long at80(int i)
public final boolean isNA0(int i)
public final double at_slow(long i)
public final long at8_slow(long i)
public final boolean isNA_slow(long i)
public final long set(long i, long l)
public final double set(long i, double d)
public final float set(long i, float f)
public final boolean setNA(long i)
public final long set0(int idx, long l)
public final double set0(int idx, double d)
public final float set0(int idx, float f)
public final boolean setNA0(int idx)
public void close(int cidx, Futures fs)
public int cidx()
protected abstract double atd_impl(int idx)
protected abstract long at8_impl(int idx)
protected abstract boolean isNA_impl(int idx)
public abstract AutoBuffer write(AutoBuffer bb)
write
in interface Freezable
write
in class Iced
public abstract Chunk read(AutoBuffer bb)
Freezable
read
in interface Freezable
read
in class Iced
public java.lang.String pformat()
public int pformat_len()
protected java.lang.String pformat0()
protected int pformat_len0()
protected int pformat_len0(double scale, int lg)
public Chunk clone()
clone
in class Iced
public java.lang.String toString()
toString
in class java.lang.Object
public long byteSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |