src/bisection_tree/support.rs

branch
dev
changeset 80
f802ddbabcfc
parent 68
c5f70e767511
--- a/src/bisection_tree/support.rs	Tue Dec 31 08:48:50 2024 -0500
+++ b/src/bisection_tree/support.rs	Mon Dec 23 23:27:45 2024 -0500
@@ -7,7 +7,8 @@
 use crate::types::{Float, Num};
 use crate::maputil::map2;
 use crate::mapping::{
-    Instance, Mapping, DifferentiableImpl, DifferentiableMapping, Space
+    Instance, Mapping, DifferentiableImpl, DifferentiableMapping, Space,
+    ArithmeticTrue
 };
 use crate::sets::Cube;
 use crate::loc::Loc;
@@ -112,6 +113,7 @@
 impl<'a, T, V : Space, F : Float, const N : usize> Mapping<Loc<F, N>> for Shift<T,F,N>
 where T : Mapping<Loc<F, N>, Codomain=V> {
     type Codomain = V;
+    type ArithmeticOptIn = ArithmeticTrue;
 
     #[inline]
     fn apply<I : Instance<Loc<F, N>>>(&self, x : I) -> Self::Codomain {
@@ -295,6 +297,7 @@
 impl<'a, T, F : Float, const N : usize> Mapping<Loc<F, N>> for Normalised<T>
 where T : Norm<F, L1> + Mapping<Loc<F,N>, Codomain=F> {
     type Codomain = F;
+    type ArithmeticOptIn = ArithmeticTrue;
 
     #[inline]
     fn apply<I : Instance<Loc<F, N>>>(&self, x : I) -> Self::Codomain {

mercurial