question: public static List < List < Double > > partitionVariable ( List < Double > arr , int chunk ) { int count = 0 ; List < List < Double > > ret = new ArrayList < List < Double > > ( ) ; while ( count < arr . size ( ) ) { List < Double > sublist = arr . subList ( count , count + chunk ) ; count += chunk ; ret . add ( sublist ) ; } for ( List < Double > lists : ret ) { if ( lists . size ( ) < chunk ) ret . remove ( lists ) ; } return ret ; }
target:  This will partition the given whole variable data applyTransformToDestination in to the specified chunk number.