public class TransfVec extends WrappedVec
The mapping is defined by a simple hash map composed of two arrays.
The first array contains values. Index of values is index into the second array _indexes
which contains final value (i.e., index to domain array).
If _indexes array is null, then index of found value is used directly.
To avoid virtual calls or additional null check for _indexes the vector
returns two implementation of underlying chunk (TransfChunk when _indexes is not null,
and FlatTransfChunk when _indexes is null.
Vec.VectorGroup, Vec.Writer| Constructor and Description |
|---|
TransfVec(int[][] mapping,
Key masterVecKey,
Key key,
long[] espc) |
TransfVec(int[][] mapping,
java.lang.String[] domain,
Key masterVecKey,
Key key,
long[] espc) |
TransfVec(int[] values,
int[] indexes,
java.lang.String[] domain,
Key masterVecKey,
Key key,
long[] espc) |
| Modifier and Type | Method and Description |
|---|---|
Chunk |
chunkForChunkIdx(int cidx)
The Chunk for a chunk#.
|
Vec |
compose(int[][] transfMap,
java.lang.String[] domain)
Compose this vector with given transformation.
|
static Vec |
compose(TransfVec origVec,
int[][] transfMap,
java.lang.String[] domain,
boolean keepOrig)
Compose given origVector with given transformation.
|
static int[][] |
pack(int[] values,
boolean[] usemap) |
static void |
sortAccording2(int[] ary,
java.lang.Integer[] sortOrder)
Sort given array according given sort order.
|
static void |
sortWith(int[] ary,
int[] ary2)
Sort two arrays - the second one is sorted according the first one.
|
masterVecalign, at, at16h, at16l, at8, atStr, base, bins, cardinality, checkMissing, chunkForRow, chunkIdx, chunkKey, chunkKey, chunkLen, domain, equals, factors, getVecKey, group, hashCode, isConst, isEnum, isInt, isNA, isString, isTime, isUUID, length, makeCon, makeCon, makeCon, makeConSeq, makeSeq, makeTransf, makeTransf, makeZero, makeZero, max, maxs, mean, min, mins, naCnt, nChunks, newKey, ninfs, nzCnt, open, pinfs, postWrite, preWriting, readable, remove_impl, rollupStats, rollupStatsKey, set_factors, set, set, set, set, sigma, stride, timeParse, toEnum, toString, writableclone, frozenType, read_impl, read, readJSON_impl, readJSON, write_impl, write, writeHTML_impl, writeHTML, writeJSON_impl, writeJSONpublic TransfVec(int[][] mapping,
java.lang.String[] domain,
Key masterVecKey,
Key key,
long[] espc)
public Chunk chunkForChunkIdx(int cidx)
VecchunkForChunkIdx in class WrappedVecpublic Vec compose(int[][] transfMap, java.lang.String[] domain)
public static Vec compose(TransfVec origVec, int[][] transfMap, java.lang.String[] domain, boolean keepOrig)
origVec - transfMap - keepOrig - TransfVec composing transformation of origVector and tranfsMappublic static int[][] pack(int[] values,
boolean[] usemap)
public static void sortWith(int[] ary,
int[] ary2)
public static void sortAccording2(int[] ary,
java.lang.Integer[] sortOrder)