public void addShingledSeries ( String key , Map < String , Integer > shingledSeries ) { // allocate the weights array corresponding to the time series int [ ] counts = new int [ this . indexTable . size ( ) ] ; // fill in the counts for ( String str : shingledSeries . keySet ( ) ) { Integer idx = this . indexTable . get ( str ) ; if ( null == idx ) { throw new IndexOutOfBoundsException ( "the requested shingle " + str + " doesn't exist!" ) ; } counts [ idx ] = shingledSeries . get ( str ) ; } shingles . put ( key , counts ) ; }
Adds a shingled series assuring the proper index .