Returns the product v * self, where v is interpreted as a row vector. In other words, it returns a linear combination of the rows of self with coefficients given by v. Panics if the length of v is different from the number of rows of self.
(&self, v: &[F])
| 125 | /// |
| 126 | /// Panics if the length of v is different from the number of rows of self. |
| 127 | pub(crate) fn row_mul(&self, v: &[F]) -> Vec<F> { |
| 128 | assert_eq!( |
| 129 | v.len(), |
| 130 | self.n, |
| 131 | "Invalid row multiplication: vector has {} elements whereas each matrix column has {}", |
| 132 | v.len(), |
| 133 | self.n |
| 134 | ); |
| 135 | |
| 136 | cfg_into_iter!(0..self.m) |
| 137 | .map(|col| { |
| 138 | inner_product( |
| 139 | v, |
| 140 | &cfg_into_iter!(0..self.n) |
| 141 | .map(|row| self.entries[row][col]) |
| 142 | .collect::<Vec<F>>(), |
| 143 | ) |
| 144 | }) |
| 145 | .collect() |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | #[inline] |
nothing calls this directly
no test coverage detected