Skip to content

Commit dcde743

Browse files
committed
feature-gate experimental API additions
1 parent 75a5258 commit dcde743

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/finite_function/arrow.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ where
254254
///
255255
/// For `self : A -> B`, returns `k : (B \\ image(self)) -> B`.
256256
/// The domain may be empty.
257+
#[cfg(any(feature = "experimental", test))]
257258
pub(crate) fn image_complement_injection(&self) -> Option<Self> {
258259
let mut marker = K::Index::fill(K::I::zero(), self.target.clone());
259260
if !self.table.is_empty() {
@@ -266,6 +267,7 @@ where
266267
/// Build the canonical injection of `image(self)` into the codomain.
267268
///
268269
/// For `self : A -> B`, returns `i : image(self) -> B`.
270+
#[cfg(any(feature = "experimental", test))]
269271
pub(crate) fn canonical_image_injection(&self) -> Option<Self> {
270272
let (unique, _) = self.table.sparse_bincount();
271273
FiniteFunction::new(unique, self.target.clone())
@@ -275,6 +277,7 @@ where
275277
///
276278
/// For parallel maps `self, f_i : A_i -> B`, returns
277279
/// `[self, f_1, ..., f_n] : A + A_1 + ... + A_n -> B`.
280+
#[cfg(any(feature = "experimental", test))]
278281
pub(crate) fn coproduct_many(&self, others: &[&Self]) -> Option<Self> {
279282
let target = self.target.clone();
280283
for m in others {
@@ -308,6 +311,7 @@ where
308311
/// - `self` is not injective, or
309312
/// - `fill` is out of bounds for `A`, or
310313
/// - `A` is empty and `B` is non-empty (no total map `B -> A` exists).
314+
#[cfg(any(feature = "experimental", test))]
311315
pub(crate) fn inverse_with_fill(&self, fill: K::I) -> Option<Self> {
312316
if !self.is_injective() {
313317
return None;
@@ -340,6 +344,7 @@ where
340344
///
341345
/// Returns the unique `g : A -> B` such that `self = g ; inj`.
342346
///
347+
#[cfg(any(feature = "experimental", test))]
343348
pub(crate) fn factor_through_injective(&self, inj: &Self) -> Self {
344349
assert_eq!(
345350
self.target(),

src/strict/hypergraph/object.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use crate::finite_function::{coequalizer_universal, FiniteFunction};
44
use crate::indexed_coproduct::*;
55
use crate::operations::Operations;
66
use crate::semifinite::*;
7+
#[cfg(feature = "experimental")]
78
use crate::strict::hypergraph::arrow::HypergraphArrow;
89

910
use core::fmt::Debug;
@@ -162,6 +163,7 @@ where
162163
}
163164

164165
// Compute the pushout of a span of wire maps into hypergraphs.
166+
#[cfg(feature = "experimental")]
165167
pub(crate) fn pushout_along_span(
166168
left: &Hypergraph<K, O, A>,
167169
right: &Hypergraph<K, O, A>,

0 commit comments

Comments
 (0)