causal_hub/datasets/
mod.rs

1mod table;
2pub use table::*;
3
4mod trajectory;
5pub use trajectory::*;
6
7/// A trait for dataset.
8pub trait Dataset {
9    /// The type of the values.
10    type Values;
11
12    /// The values of the dataset.
13    ///
14    /// # Returns
15    ///
16    /// A reference to the values.
17    ///
18    fn values(&self) -> &Self::Values;
19
20    /// The sample size.
21    ///
22    /// # Notes
23    ///
24    /// If the dataset is weighted, this should return the sum of the weights.
25    ///
26    /// # Returns
27    ///
28    /// The number of samples in the dataset.
29    ///
30    fn sample_size(&self) -> f64;
31}