Returns the ith coordinate of this vector
(&self, i: usize)
| 35 | |
| 36 | /// Returns the ith coordinate of this vector |
| 37 | pub fn get(&self, i: usize) -> f64 { |
| 38 | *self.st.get(&i).unwrap_or(&0.0) |
| 39 | } |
| 40 | |
| 41 | /// Returns the number of nonzero entries in this vector. |
| 42 | pub fn nnz(&self) -> usize { |