Adds a dimension for which the data is normally distributed with the given parameters.
(&self, mean: f64, std: f64)
| 205 | /// Adds a dimension for which the data is normally distributed with |
| 206 | /// the given parameters. |
| 207 | pub fn add(&self, mean: f64, std: f64) -> NormalData { |
| 208 | |
| 209 | let mut n = self.normal.clone(); |
| 210 | n.push(Normal::new(mean, std)); |
| 211 | |
| 212 | NormalData { |
| 213 | rng: self.rng.clone(), |
| 214 | normal: n |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | /// Returns the number of dimensions added via the `add` method. |
| 219 | pub fn len(&self) -> usize { self.normal.len() } |