private static double [ ] toArray ( List < Double > list ) { double [ ] values = new double [ list . size ( ) ] ; for ( int i = 0 ; i < values . length ; i ++ ) { values [ i ] = list . get ( i ) ; } return values ; }
Method for turning a list of doubles to an array .