private ListDouble convertToListDouble(List<String> tokens) {
        double[] values = new double[tokens.size()];
        for (int i = 0; i < values.length; i++) {
            if (tokens.get(i).isEmpty()) {
                values[i] = Double.NaN;
            } else {
                values[i] = Double.parseDouble(tokens.get(i));
            }
        }
        return new ArrayDouble(values);
    }
private ListDouble convertToListDouble ( List < String > tokens ) { double [ ] values = new double [ tokens . size ( ) ] ; for ( int i = 0 ; i < values . length ; i ++ ) { if ( tokens . get ( i ) . isEmpty ( ) ) { values [ i ] = Double . NaN ; } else { values [ i ] = Double . parseDouble ( tokens . get ( i ) ) ; } } return new ArrayDouble ( values ) ; }
Given a list of tokens, convert them to a list of numbers.

@param tokens the tokens to be converted
@return the number list