If I have a set of numbers, and I say I will filter the primes, that means to me that I will remove the primes, and return the remainder.
If I have a set of numbers, and I say I will sieve the primes, that means to me that I will keep the primes, and discard the remainder.
Is this correct usage of filter and sieve? Are they opposites?
Any alternative verbs that would express the notion of going through a set and choosing only those that meet a particular criteria?