| 21 use nalgebra::base::allocator::Allocator; |
21 use nalgebra::base::allocator::Allocator; |
| 22 use std::ops::Mul; |
22 use std::ops::Mul; |
| 23 use num_traits::identities::{Zero, One}; |
23 use num_traits::identities::{Zero, One}; |
| 24 use crate::linops::*; |
24 use crate::linops::*; |
| 25 use crate::euclidean::*; |
25 use crate::euclidean::*; |
| 26 use crate::mapping::{Space, BasicDecomposition}; |
26 use crate::mapping::{Space, BasicDecomposition, ArithmeticFalse}; |
| 27 use crate::types::Float; |
27 use crate::types::Float; |
| 28 use crate::norms::*; |
28 use crate::norms::*; |
| 29 use crate::instance::Instance; |
29 use crate::instance::Instance; |
| 30 |
30 |
| 31 impl<SM,N,M,E> Space for Matrix<E,N,M,SM> |
31 impl<SM,N,M,E> Space for Matrix<E,N,M,SM> |
| 43 DefaultAllocator : Allocator<N,K>, |
43 DefaultAllocator : Allocator<N,K>, |
| 44 DefaultAllocator : Allocator<M,K>, |
44 DefaultAllocator : Allocator<M,K>, |
| 45 DefaultAllocator : Allocator<N,M>, |
45 DefaultAllocator : Allocator<N,M>, |
| 46 DefaultAllocator : Allocator<M,N> { |
46 DefaultAllocator : Allocator<M,N> { |
| 47 type Codomain = OMatrix<E,N,K>; |
47 type Codomain = OMatrix<E,N,K>; |
| |
48 type ArithmeticOptIn = ArithmeticFalse; |
| 48 |
49 |
| 49 #[inline] |
50 #[inline] |
| 50 fn apply<I : Instance<Matrix<E,M,K,SV>>>( |
51 fn apply<I : Instance<Matrix<E,M,K,SV>>>( |
| 51 &self, x : I |
52 &self, x : I |
| 52 ) -> Self::Codomain { |
53 ) -> Self::Codomain { |