| 454 domination!(Linfinity, L1); |
454 domination!(Linfinity, L1); |
| 455 domination!(Linfinity, L2); |
455 domination!(Linfinity, L2); |
| 456 domination!(L2, L1); |
456 domination!(L2, L1); |
| 457 |
457 |
| 458 impl<F: Float, const N: usize> Euclidean<F> for Loc<N, F> { |
458 impl<F: Float, const N: usize> Euclidean<F> for Loc<N, F> { |
| 459 type OwnedEuclidean = Self; |
459 type PrincipalE = Self; |
| 460 |
460 |
| 461 /// This implementation is not stabilised as it's meant to be used for very small vectors. |
461 /// This implementation is not stabilised as it's meant to be used for very small vectors. |
| 462 /// Use [`nalgebra`] for larger vectors. |
462 /// Use [`nalgebra`] for larger vectors. |
| 463 #[inline] |
463 #[inline] |
| 464 fn dot<I: Instance<Self>>(&self, other: I) -> F { |
464 fn dot<I: Instance<Self>>(&self, other: I) -> F { |
| 737 self.iter() |
737 self.iter() |
| 738 } |
738 } |
| 739 } |
739 } |
| 740 |
740 |
| 741 impl<F: Num, const N: usize> Space for Loc<N, F> { |
741 impl<F: Num, const N: usize> Space for Loc<N, F> { |
| 742 type OwnedSpace = Self; |
742 type Principal = Self; |
| 743 type Decomp = BasicDecomposition; |
743 type Decomp = BasicDecomposition; |
| 744 } |
744 } |
| 745 |
745 |
| 746 impl<F: Float, const N: usize> Mapping<Loc<N, F>> for Loc<N, F> { |
746 impl<F: Float, const N: usize> Mapping<Loc<N, F>> for Loc<N, F> { |
| 747 type Codomain = F; |
747 type Codomain = F; |
| 753 |
753 |
| 754 impl<F: Float, const N: usize> Linear<Loc<N, F>> for Loc<N, F> {} |
754 impl<F: Float, const N: usize> Linear<Loc<N, F>> for Loc<N, F> {} |
| 755 |
755 |
| 756 impl<F: Float, const N: usize> VectorSpace for Loc<N, F> { |
756 impl<F: Float, const N: usize> VectorSpace for Loc<N, F> { |
| 757 type Field = F; |
757 type Field = F; |
| 758 type Owned = Self; |
758 type PrincipalV = Self; |
| 759 |
759 |
| 760 // #[inline] |
760 // #[inline] |
| 761 // fn make_origin_generator(&self) -> StaticEuclideanOriginGenerator { |
761 // fn make_origin_generator(&self) -> StaticEuclideanOriginGenerator { |
| 762 // StaticEuclideanOriginGenerator |
762 // StaticEuclideanOriginGenerator |
| 763 // } |
763 // } |
| 764 |
764 |
| 765 #[inline] |
765 #[inline] |
| 766 fn similar_origin(&self) -> Self::Owned { |
766 fn similar_origin(&self) -> Self::PrincipalV { |
| 767 Self::ORIGIN |
767 Self::ORIGIN |
| 768 } |
768 } |
| 769 |
769 |
| 770 #[inline] |
770 #[inline] |
| 771 fn similar_origin_inst<I: Instance<Self>>(_: I) -> Self::Owned { |
771 fn similar_origin_inst<I: Instance<Self>>(_: I) -> Self::PrincipalV { |
| 772 Self::ORIGIN |
772 Self::ORIGIN |
| 773 } |
773 } |
| 774 |
774 |
| 775 // #[inline] |
775 // #[inline] |
| 776 // fn into_owned(self) -> Self::Owned { |
776 // fn into_owned(self) -> Self::Owned { |