--- a/src/bisection_tree/btfn.rs Mon Sep 01 20:55:34 2025 -0500 +++ b/src/bisection_tree/btfn.rs Mon Sep 01 23:03:27 2025 -0500 @@ -1,4 +1,4 @@ -use crate::instance::{ClosedSpace, Instance, Ownable, Space}; +use crate::instance::{ClosedSpace, Instance, MyCow, Ownable, Space}; use crate::mapping::{BasicDecomposition, DifferentiableImpl, DifferentiableMapping, Mapping}; use crate::types::Float; use numeric_literals::replace_float_literals; @@ -48,10 +48,23 @@ self } - /// Returns an owned instance of a reference. fn clone_owned(&self) -> Self::OwnedVariant { self.clone() } + + fn owned_cow<'b>(self) -> MyCow<'b, Self::OwnedVariant> + where + Self: 'b, + { + MyCow::Owned(self.into_owned()) + } + + fn ref_owned_cow<'b>(&'b self) -> MyCow<'b, Self::OwnedVariant> + where + Self: 'b, + { + MyCow::Owned(self.into_owned()) + } } impl<F: Float, G, BT, const N: usize> Space for BTFN<F, G, BT, N>