src/scaled.rs

changeset 55
15f01efc034b
parent 46
90cc221eb52b
child 56
34f8ec636368
--- a/src/scaled.rs	Sat Dec 07 21:54:59 2024 -0500
+++ b/src/scaled.rs	Sun Dec 15 01:10:52 2024 -0500
@@ -2,7 +2,7 @@
 Implementation of scaling of functions on a manifold by a scalar.
 */
 
-use alg_tools::mapping::Apply;
+use alg_tools::mapping::{Mapping, Instance};
 use crate::manifold::ManifoldPoint;
 use crate::fb::{Grad, Desc, Prox};
 
@@ -22,10 +22,10 @@
     }
 }
 
-impl<M, G : Apply<M, Output=f64>> Apply<M> for Scaled< G> {
-    type Output = f64;
+impl<M, G : Mapping<M, Codomain=f64>> Mapping<M> for Scaled< G> {
+    type Codomain = f64;
 
-    fn apply(&self, x : M) -> Self::Output {
+    fn apply<I : Instance<M>>(&self, x : I) -> Self::Codomain {
         self.g.apply(x) * self.α
     }
 }

mercurial