MCPcopy Create free account
hub / github.com/daniel-e/rustml / add

Method add

src/datasets.rs:207–216  ·  view source on GitHub ↗

Adds a dimension for which the data is normally distributed with the given parameters.

(&self, mean: f64, std: f64)

Source from the content-addressed store, hash-verified

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() }

Callers 2

test_normal_dataFunction · 0.45
test_mixtureFunction · 0.45

Calls 1

lenMethod · 0.45

Tested by 2

test_normal_dataFunction · 0.36
test_mixtureFunction · 0.36