graaf 0.112.0

Work with directed graphs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Proptest strategies

use proptest::strategy::Strategy;

/// Generate an arc's head and tail.
///
/// # Arguments
///
/// * `order`: The digraph's order.
pub fn arc(order: usize) -> impl Strategy<Value = (usize, usize)> {
    (1..order, 1..order).prop_filter("u != v", |(u, v)| u != v)
}