public void readRow(final DataInputStream in,final double[] data,final ColumnType[] columnTypes,final boolean sparse,final double[] sparseDefaults) throws IOException {
  if (sparse) {
    System.arraycopy(sparseDefaults,0,data,0,sparseDefaults.length);
    while (true) {
      int index=in.readInt();
      if (index == -1) {
        break;
      }
 else {
        data[index]=readDatum(in,columnTypes[index]);
      }
    }
  }
 else {
    for (int attIndex=0; attIndex < columnTypes.length; attIndex++) {
      data[attIndex]=readDatum(in,columnTypes[attIndex]);
    }
  }
}

public void readRow ( final DataInputStream in , final double [ ] data , final ColumnType [ ] columnTypes , final boolean sparse , final double [ ] sparseDefaults ) throws IOException { if ( sparse ) { System . arraycopy ( sparseDefaults , 0 , data , 0 , sparseDefaults . length ) ; while ( true ) { int index = in . readInt ( ) ; if ( index == - 1 ) { break ; } else { data [ index ] = readDatum ( in , columnTypes [ index ] ) ; } } } else { for ( int attIndex = 0 ; attIndex < columnTypes . length ; attIndex ++ ) { data [ attIndex ] = readDatum ( in , columnTypes [ attIndex ] ) ; } } }
reads a single row from the stream .
