public FeatureNode [] parseRow(String [] row) {
                FeatureNode [] example = new FeatureNode[row.length-1];
                int maxindex = 0;
                for (int i=1; i<row.length; i++) {
                        String [] iv = row[i].split(":");
                        int index = Integer.parseInt(iv[0]);
                        if (index <= maxindex) {
                                throw new IllegalArgumentException("indices must be in increasing order!");
                        }
                        maxindex = index;
                        double value = Double.parseDouble(iv[1]);
                        example[i-1] = new FeatureNode(index, value);
                }
                if (n < maxindex)
                        n = maxindex;
                return example;
        }