use crate::HostTypes;
pub trait Partition<H: HostTypes> {
type IrreducibleSet: IrreducibleSet<H>;
fn irreducibles(&self) -> &Self::IrreducibleSet;
type ReducibleSet: ReducibleSet<H>;
fn reducibles(&self) -> &Self::ReducibleSet;
type UnitGroup: UnitGroup<H>;
fn units(&self) -> &Self::UnitGroup;
type Complement: Complement<H>;
fn exterior(&self) -> &Self::Complement;
fn density(&self) -> H::Decimal;
type TypeDefinition: crate::user::type_::TypeDefinition<H>;
fn source_type(&self) -> &Self::TypeDefinition;
fn witt_length(&self) -> u64;
type FreeRank: FreeRank<H>;
fn site_budget(&self) -> &Self::FreeRank;
fn is_exhaustive(&self) -> bool;
}
pub trait Component<H: HostTypes> {
type Datum: crate::kernel::schema::Datum<H>;
fn member(&self) -> &[Self::Datum];
fn cardinality(&self) -> u64;
}
pub trait IrreducibleSet<H: HostTypes>: Component<H> {}
pub trait ReducibleSet<H: HostTypes>: Component<H> {}
pub trait UnitGroup<H: HostTypes>: Component<H> {}
pub trait Complement<H: HostTypes>: Component<H> {
type TermExpression: crate::kernel::schema::TermExpression<H>;
fn exterior_criteria(&self) -> &Self::TermExpression;
}
pub trait SiteIndex<H: HostTypes> {
fn site_position(&self) -> u64;
fn site_state(&self) -> u64;
type SiteIndexTarget: SiteIndex<H>;
fn ancilla_site(&self) -> &Self::SiteIndexTarget;
}
pub trait FreeRank<H: HostTypes> {
fn total_sites(&self) -> u64;
fn pinned_count(&self) -> u64;
fn free_rank(&self) -> u64;
fn is_closed(&self) -> bool;
type SiteIndex: SiteIndex<H>;
fn has_site(&self) -> &[Self::SiteIndex];
type SiteBinding: SiteBinding<H>;
fn has_binding(&self) -> &[Self::SiteBinding];
fn reversible_strategy(&self) -> bool;
}
pub trait SiteBinding<H: HostTypes> {
type Constraint: crate::user::type_::Constraint<H>;
fn pinned_by(&self) -> &Self::Constraint;
type SiteIndex: SiteIndex<H>;
fn pins_coordinate(&self) -> &Self::SiteIndex;
}
pub trait PartitionProduct<H: HostTypes> {
type Partition: Partition<H>;
fn left_factor(&self) -> &Self::Partition;
fn right_factor(&self) -> &Self::Partition;
}
pub trait PartitionCoproduct<H: HostTypes> {
type Partition: Partition<H>;
fn left_summand(&self) -> &Self::Partition;
fn right_summand(&self) -> &Self::Partition;
}
pub trait FreeRankObservable<H: HostTypes>: crate::bridge::observable::Observable<H> {}
pub mod irreducible {}
pub mod reducible {}
pub mod units {}
pub mod exterior {}