for(int i = 0; i < getInputFormat().numInstances(); i++) { convertInstance(getInputFormat().instance(i));
for(int i = 0; i < in.numInstances(); i++) { convertInstance(in.instance(i));
  public boolean batchFinished() throws Exception {    if (getInputFormat() == null) {      throw new Exception("No input instance format defined");    }    if (m_MinArray == null) {         // Compute minimums and maximums      m_MinArray = new double[getInputFormat().numAttributes()];      m_MaxArray = new double[getInputFormat().numAttributes()];      m_Keep = new boolean[getInputFormat().numAttributes()];      for (int i = 0; i < getInputFormat().numAttributes(); i++) {	m_MinArray[i] = Double.NaN;      }      for (int j = 0; j < getInputFormat().numInstances(); j++) {	double[] value = getInputFormat().instance(j).toDoubleArray();	for (int i = 0; i < getInputFormat().numAttributes(); i++) {	  if (getInputFormat().attribute(i).isNumeric()) {	    if (!Instance.isMissingValue(value[i])) {	      if (Double.isNaN(m_MinArray[i])) {		m_MinArray[i] = m_MaxArray[i] = value[i];	      } else {		if (value[i] < m_MinArray[i]) {		  m_MinArray[i] = value[i];		}		if (value[i] > m_MaxArray[i]) {		  m_MaxArray[i] = value[i];		}	      }	    }	  }	}       }      FastVector attributes = new FastVector();      for (int i = 0; i< getInputFormat().numAttributes() ; i++) {        if ((!getInputFormat().attribute(i).isNumeric()) ||             (m_MinArray[i] < m_MaxArray[i]) || (m_MaxArray[i] > 0) ) {          attributes.addElement(getInputFormat().attribute(i).copy());          m_Keep[i] = true;        }      }      Instances outputFormat = new Instances(getInputFormat().relationName(),					     attributes, 0);       setOutputFormat(outputFormat);      // Convert pending input instances      for(int i = 0; i < getInputFormat().numInstances(); i++) {	convertInstance(getInputFormat().instance(i));      }      // Free memory      flushInput();    }     m_NewBatch = true;    return (numPendingOutput() != 0);  }