private static double [ ] toDoubleAray ( Integer [ ] intArray , HashSet < Integer > skipIndex ) { double [ ] res = new double [ intArray . length - skipIndex . size ( ) ] ; int skip = 0 ; for ( int i = 0 ; i < intArray . length ; i ++ ) { if ( skipIndex . contains ( i ) ) { skip ++ ; continue ; } res [ i - skip ] = intArray [ i ] . doubleValue ( ) ; } return res ; }
Converts an array into array of doubles skipping specified indeces .