/** * Input an instance for filtering. * * @param instance the input instance * @return true if the filtered instance may now be collected with output(). */ @Override public boolean input(Instance instance) { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); } if (m_NewBatch) { resetQueue(); m_NewBatch = false; } if (m_removeFilter != null) { m_removeFilter.input(instance); Instance processed = m_removeFilter.output(); copyValues(processed, false, instance.dataset(), outputFormatPeek()); push(processed, false); // No need to copy return true; } bufferInput(instance); return false; }
/** * Input an instance for filtering. * * @param instance the input instance * @return true if the filtered instance may now be collected with output(). */ @Override public boolean input(Instance instance) { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); } if (m_NewBatch) { resetQueue(); m_NewBatch = false; } if (m_removeFilter != null) { m_removeFilter.input(instance); Instance processed = m_removeFilter.output(); copyValues(processed, false, instance.dataset(), outputFormatPeek()); push(processed, false); // No need to copy return true; } bufferInput(instance); return false; }