src/nalgebra_support.rs

branch
dev
changeset 129
d2994e34a5f5
parent 124
6aa955ad8122
child 131
8264d72aa347
child 132
89371dc4d637
equal deleted inserted replaced
128:f75bf34adda0 129:d2994e34a5f5
101 fn apply_mut<'a, I: Instance<Matrix<E, M, K, SV1>>>(&self, y: &mut Matrix<E, N, K, SV2>, x: I) { 101 fn apply_mut<'a, I: Instance<Matrix<E, M, K, SV1>>>(&self, y: &mut Matrix<E, N, K, SV2>, x: I) {
102 x.eval(|x̃| self.mul_to(x̃, y)) 102 x.eval(|x̃| self.mul_to(x̃, y))
103 } 103 }
104 } 104 }
105 105
106 impl<SM, SV1, M, E> AXPY<E, Vector<E, M, SV1>> for Vector<E, M, SM> 106 impl<SM, SV1, M, E> AXPY<Vector<E, M, SV1>> for Vector<E, M, SM>
107 where 107 where
108 SM: StorageMut<E, M> + Clone, 108 SM: StorageMut<E, M> + Clone,
109 SV1: Storage<E, M> + Clone, 109 SV1: Storage<E, M> + Clone,
110 M: Dim, 110 M: Dim,
111 E: Scalar + Zero + One + Float, 111 E: Scalar + Zero + One + Float,
112 DefaultAllocator: Allocator<M>, 112 DefaultAllocator: Allocator<M>,
113 { 113 {
114 type Field = E;
114 type Owned = OVector<E, M>; 115 type Owned = OVector<E, M>;
115 116
116 #[inline] 117 #[inline]
117 fn axpy<I: Instance<Vector<E, M, SV1>>>(&mut self, α: E, x: I, β: E) { 118 fn axpy<I: Instance<Vector<E, M, SV1>>>(&mut self, α: E, x: I, β: E) {
118 x.eval(|x̃| Matrix::axpy(self, α, x̃, β)) 119 x.eval(|x̃| Matrix::axpy(self, α, x̃, β))

mercurial