public class EnumWrappedVec extends Vec
The Vector's domain is the union of the Test and Train domains.
The mapping is defined by int[] array, size is input Test.domain.length. Contents refer to values in the Train.domain. Extra values in the Test domain are sorted after the Train.domain - so mapped values have to be range-checked (note that returning some flag for NA, say -1, would also need to be checked for).
Modifier and Type | Class and Description |
---|---|
static class |
EnumWrappedVec.EnumWrappedChunk |
Vec.CollectDomain, Vec.CollectDomainFast, Vec.Reader, Vec.VectorGroup, Vec.Writer
Keyed.BinarySerializer<X extends Keyed>
_espc, DO_HISTOGRAMS, KEY_PREFIX_LEN, PERCENTILES, T_BAD, T_ENUM, T_NUM, T_STR, T_TIME, T_UUID, TYPE_STR
_key, EMPTY_KEY_LIST
Constructor and Description |
---|
EnumWrappedVec(Key key,
long[] espc,
java.lang.String[] toDomain,
Key masterVecKey)
Main constructor: convert from one enum to another
|
EnumWrappedVec(java.lang.String[] from,
java.lang.String[] to)
Constructor just to generate the map and domain; used in tests or when
mixing enum columns
|
Modifier and Type | Method and Description |
---|---|
Chunk |
chunkForChunkIdx(int cidx)
The Chunk for a chunk#.
|
int[] |
enum_map() |
Vec |
masterVec() |
adaptTo, align, at, at16h, at16l, at8, atStr, base, bins, byteSize, cardinality, checksum_impl, chunkForRow, chunkIdx, chunkKey, chunkKey, domain, equals, factor, get_espc, get_type_str, get_type, getVecKey, group, hashCode, isBad, isBinary, isConst, isEnum, isInt, isNA, isNumeric, isString, isTime, isUUID, lazy_bins, length, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCons, makeCopy, makeCopy, makeRand, makeRepSeq, makeSeq, makeSeq, makeSeq, makeVec, makeVec, makeZero, makeZero, makeZero, makeZero, makeZeros, makeZeros, max, maxs, mean, min, mins, mode, naCnt, nChunks, newKey, ninfs, nzCnt, open, pctiles, pinfs, postWrite, preWriting, remove_impl, set, set, set, set, setDomain, sigma, sparseRatio, startRollupStats, startRollupStats, stride, toByteArray, toDoubleArray, toEnum, toInt, toString, toStringVec
checksum, getBinarySerializer, getPublishedKeys, remove, remove, remove, remove
clone, frozenType, read_impl, read, readExternal, readJSON_impl, readJSON, toJsonString, write_impl, write, writeExternal, writeJSON_impl, writeJSON
public EnumWrappedVec(Key key, long[] espc, java.lang.String[] toDomain, Key masterVecKey)
public EnumWrappedVec(java.lang.String[] from, java.lang.String[] to)
public int[] enum_map()
public Chunk chunkForChunkIdx(int cidx)
Vec
public Vec masterVec()