fetish_lib/
data_points.rs

1extern crate ndarray;
2extern crate ndarray_linalg;
3
4use ndarray::*;
5
6///Data points as input and output
7///matrices, where each row is another data-point
8///and every data-point is assumed to have a weight of 1.
9pub struct DataPoints {
10    pub in_vecs : Array2<f32>,
11    pub out_vecs : Array2<f32>
12}
13
14impl DataPoints {
15    ///Gets the number of data-points in this [`DataPoints`].
16    pub fn num_points(&self) -> usize {
17        self.in_vecs.shape()[0]
18    }
19}