use open_hypergraphs::array::vec::*;
use open_hypergraphs::strict::hypergraph::{arrow::*, *};
use open_hypergraphs::strict::open_hypergraph::*;
use crate::hypergraph::strategy::{DiscreteSpan, Labels};
use proptest::strategy::{BoxedStrategy, Strategy};
pub type Obj = i8;
pub type Arr = u8;
pub fn arb_object() -> BoxedStrategy<Obj> {
(0..10i8).boxed()
}
pub fn arb_arrow() -> BoxedStrategy<Arr> {
(0..5u8).boxed()
}
pub fn arb_labels() -> BoxedStrategy<Labels<Obj, Arr>> {
crate::hypergraph::strategy::arb_labels(arb_object(), arb_arrow())
}
pub fn arb_hypergraph() -> BoxedStrategy<Hypergraph<VecKind, Obj, Arr>> {
arb_labels()
.prop_flat_map(crate::hypergraph::strategy::arb_hypergraph)
.boxed()
}
pub fn arb_inclusion() -> BoxedStrategy<HypergraphArrow<VecKind, Obj, Arr>> {
arb_hypergraph()
.prop_flat_map(move |g| {
arb_labels().prop_flat_map(move |labels| {
crate::hypergraph::strategy::arb_inclusion(labels, g.clone())
})
})
.boxed()
}
pub fn arb_discrete_span() -> BoxedStrategy<DiscreteSpan<Obj, Arr>> {
arb_labels()
.prop_flat_map(crate::hypergraph::strategy::arb_discrete_span)
.boxed()
}
pub fn arb_open_hypergraph() -> BoxedStrategy<OpenHypergraph<VecKind, Obj, Arr>> {
arb_labels()
.prop_flat_map(crate::open_hypergraph::strategy::arb_open_hypergraph::<Obj, Arr>)
.boxed()
}
pub fn arb_composite_open_hypergraph(
n: usize,
) -> BoxedStrategy<Vec<OpenHypergraph<VecKind, Obj, Arr>>> {
crate::open_hypergraph::strategy::arb_composite_open_hypergraph(n, arb_labels())
}
pub fn arb_labeled_cospan() -> BoxedStrategy<crate::hypergraph::strategy::LabeledCospan<Obj>> {
crate::hypergraph::strategy::arb_labeled_cospan(arb_object())
}