I'm working with algorithms that filter their input (that is, remove part of it), and I'm not sure this phrase is unambiguous:

This function returns the filtered elements.

Is it obvious that filtered here means the elements that have passed the filter? Or could it mean the elements that have been filtered out?

If both are present, I believe it's easier to eliminate the ambiguity:

  1. This function returns a pair of lists (filtered_out,filtered_in) .
  2. This function returns a pair of lists (filtered_out,filtrate).

Buf if I see just a variable named filtered, without the _out and _in suffixes, I'm not sure which one should be inferred.


2 Answers 2


I agree that the original wording is ambiguous. Also I don't think "filtered in" makes sense, because we do not use the preposition in with to filter, but only the preposition out.

I would suggest that, to remove all ambiguity, you use expressions such as:

... those elements that passed through the filter.
... those elements retained by the filter.

  • Thanks for the suggestions. Indeed "filtered in" seems quite strange, perhaps "filtered through" at best, but avoiding "filtered" at all seems to be a more reasonable solution.
    – anol
    Jul 3, 2013 at 17:06

The 'filtered' elements could be assumed to be 'those elements hitting the filter(ing process).

I'd certainly use one of the three options:

This function returns those elements previously filtered out.

This function returns those elements not previously filtered out.

This function returns all those elements previously having undergone the filtering process.

  • I liked your suggestions and they might come in handy, but @TrevorD's formulations seem more concise and by avoiding using "filtered" at all, they steer clear of the issue. I do think "not filtered out" is a nice solution as well.
    – anol
    Jul 3, 2013 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.