if (getInputFormat() != null) { setInputFormat(getInputFormat());
if (getInputFormat() != null) { setInputFormat(getInputFormat());
/** * 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; }
public boolean batchFinished() throws Exception { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); Instances toFilter = getInputFormat(); int[] attsToDelete = new int[toFilter.numAttributes()]; int numToDelete = 0;
public boolean batchFinished() throws Exception { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); Instances toFilter = getInputFormat(); int[] attsToDelete = new int[toFilter.numAttributes()]; int numToDelete = 0;