/** Creates a new subset lexical strategy. * @param subset the subset of terms. */ public FrequencyLexicalStrategy( final LongSet subset ) { final long[] t = subset.toLongArray(); Arrays.sort( t ); localNumber = new Long2LongOpenHashMap(); localNumber.defaultReturnValue( -1 ); for( int i = 0; i < t.length; i++ ) localNumber.put( t[ i ], i ); }
long v; final Long2LongOpenHashMap counts = new Long2LongOpenHashMap(); counts.defaultReturnValue(-1); for(final LongIterator i = values.iterator(); i.hasNext();) { v = i.nextLong(); System.arraycopy(keysArray, 0, remap = new long[escape], 0, remap.length); final Long2LongOpenHashMap map = new Long2LongOpenHashMap(); map.defaultReturnValue(-1); for(int i = 0; i < escape; i++) map.put(remap[i], i);
long v; final Long2LongOpenHashMap counts = new Long2LongOpenHashMap(); counts.defaultReturnValue(-1); for(final LongIterator i = values.iterator(); i.hasNext();) { v = i.nextLong(); System.arraycopy(keysArray, 0, remap = new long[escape], 0, remap.length); final Long2LongOpenHashMap map = new Long2LongOpenHashMap(); map.defaultReturnValue(-1); for(int i = 0; i < escape; i++) map.put(remap[i], i);