pub trait Negate<G, C> {
// Required method
fn negate(&self) -> Self;
}
Expand description
Negate the contents of a stream.
Required Methods§
Sourcefn negate(&self) -> Self
fn negate(&self) -> Self
Creates a new collection whose counts are the negation of those in the input.
This method is most commonly used with concat
to get those element in one collection but not another.
However, differential dataflow computations are still defined for all values of the difference type R
,
including negative counts.
§Examples
use differential_dataflow::input::Input;
::timely::example(|scope| {
let data = scope.new_collection_from(1 .. 10).1;
let odds = data.filter(|x| x % 2 == 1);
let evens = data.filter(|x| x % 2 == 0);
odds.negate()
.concat(&data)
.assert_eq(&evens);
});
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.