68:c5f70e767511 | 80:f802ddbabcfc |
---|---|
4 | 4 |
5 use serde::Serialize; | 5 use serde::Serialize; |
6 use std::marker::PhantomData; | 6 use std::marker::PhantomData; |
7 use crate::types::*; | 7 use crate::types::*; |
8 use crate::euclidean::*; | 8 use crate::euclidean::*; |
9 use crate::mapping::{Mapping, Space, Instance}; | 9 use crate::mapping::{Mapping, Space, Instance, ArithmeticTrue}; |
10 | 10 |
11 // | 11 // |
12 // Abstract norms | 12 // Abstract norms |
13 // | 13 // |
14 | 14 |
193 F : Float, | 193 F : Float, |
194 E : NormExponent, | 194 E : NormExponent, |
195 Domain : Space + Norm<F, E>, | 195 Domain : Space + Norm<F, E>, |
196 { | 196 { |
197 type Codomain = F; | 197 type Codomain = F; |
198 type ArithmeticOptIn = ArithmeticTrue; | |
198 | 199 |
199 #[inline] | 200 #[inline] |
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 } |