@Override public boolean input(Instance instance){
  Instance newInstance;
  double[] values;
  if (getInputFormat() == null) {
    throw new IllegalStateException("No input instance format defined");
  }
  if (m_NewBatch) {
    resetQueue();
    m_NewBatch=false;
  }
  values=instance.toDoubleArray();
  if (!instance.isMissing(m_AttIndex.getIndex())) {
    values[m_AttIndex.getIndex()]=m_SortedIndices[(int)values[m_AttIndex.getIndex()]];
  }
  newInstance=new DenseInstance(instance.weight(),values);
  copyValues(instance,false,instance.dataset(),getOutputFormat());
  push(newInstance);
  return true;
}

@ Override public boolean input ( Instance instance ) { Instance newInstance ; double [ ] values ; if ( getInputFormat ( ) == null ) { throw new IllegalStateException ( "No input instance format defined" ) ; } if ( m_NewBatch ) { resetQueue ( ) ; m_NewBatch = false ; } values = instance . toDoubleArray ( ) ; if ( ! instance . isMissing ( m_AttIndex . getIndex ( ) ) ) { values [ m_AttIndex . getIndex ( ) ] = m_SortedIndices [ ( int ) values [ m_AttIndex . getIndex ( ) ] ] ; } newInstance = new DenseInstance ( instance . weight ( ) , values ) ; copyValues ( instance , false , instance . dataset ( ) , getOutputFormat ( ) ) ; push ( newInstance ) ; return true ; }
input an instance for filtering . the instance is processed and made available for output immediately .
