macro_rules! zset_set {
( $( $key:expr_2021 ),* $(,)?) => { ... };
}Expand description
Create a Z-set with specified elements all with weight 1.
This macro is used in unit tests to create reference inputs and outputs.
It generates a Z-set of type OrdZSets.
ยงExample
The following examples shows how to construct a Z-set with (key, weight)
tuples (1, 1), (2, 1), (-3, 1):
use dbsp::{zset_set, IndexedZSet, IndexedZSetReader};
let zset = zset_set! {1, 2, -3};
assert_eq!(
zset.iter().collect::<Vec<_>>(),
vec![(-3, (), 1), (1, (), 1), (2, (), 1)]
);