200 fn apply<I : Instance<Domain>>(&self, x : I) -> F { |
201 fn apply<I : Instance<Domain>>(&self, x : I) -> F { |
201 x.eval(|r| r.norm(self.exponent)) |
202 x.eval(|r| r.norm(self.exponent)) |
202 } |
203 } |
203 } |
204 } |
204 |
205 |
205 pub trait Normed<F : Num = f64> : Space + Norm<F, Self::NormExp> { |
206 pub trait Normed<F : Num = f64> : AXPY + Norm<F, Self::NormExp> { |
206 type NormExp : NormExponent; |
207 type NormExp : NormExponent; |
207 |
208 |
208 fn norm_exponent(&self) -> Self::NormExp; |
209 fn norm_exponent(&self) -> Self::NormExp; |
209 |
210 |
210 #[inline] |
211 #[inline] |