public static Vec compose ( TransfVec origVec , int [ ] [ ] transfMap , String [ ] domain , boolean keepOrig ) { // Do a mapping from INT -> ENUM -> this vector ENUM int [ ] [ ] domMap = Utils . compose ( new int [ ] [ ] { origVec . _values , origVec . _indexes } , transfMap ) ; Vec result = origVec . masterVec ( ) . makeTransf ( domMap [ 0 ] , domMap [ 1 ] , domain ) ; ; if ( ! keepOrig ) DKV . remove ( origVec . _key ) ; return result ; }
Compose given origVector with given transformation . Always returns a new vector . Original vector is kept if keepOrig is true .