src/euclidean.rs

branch
dev
changeset 197
1f301affeae3
parent 192
883b7d010297
equal deleted inserted replaced
196:3697375f4ee9 197:1f301affeae3
18 /// as an inner product. 18 /// as an inner product.
19 // TODO: remove F parameter, use VectorSpace::Field 19 // TODO: remove F parameter, use VectorSpace::Field
20 pub trait Euclidean<F: Float = f64>: 20 pub trait Euclidean<F: Float = f64>:
21 VectorSpace<Field = F, PrincipalV = Self::PrincipalE> + Reflexive<F, DualSpace = Self::PrincipalE> 21 VectorSpace<Field = F, PrincipalV = Self::PrincipalE> + Reflexive<F, DualSpace = Self::PrincipalE>
22 { 22 {
23 /// Principal form of the space; always equal to [`Space::Principal`] and 23 /// Principal form of the space; always equal to [`crate::linops::Space::Principal`] and
24 /// [`VectorSpace::PrincipalV`], but with more traits guaranteed. 24 /// [`VectorSpace::PrincipalV`], but with more traits guaranteed.
25 type PrincipalE: ClosedEuclidean<F>; 25 type PrincipalE: ClosedEuclidean<F>;
26 26
27 // Inner product 27 // Inner product
28 fn dot<I: Instance<Self>>(&self, other: I) -> F; 28 fn dot<I: Instance<Self>>(&self, other: I) -> F;

mercurial