Skip to main content

DatasetAdapter

Trait DatasetAdapter 

Source
pub trait DatasetAdapter {
    // Required methods
    fn name(&self) -> &'static str;
    fn load(&self, path: &Path) -> Result<ResidualStream>;
    fn exemplar(&self, seed: u64) -> ResidualStream;
}
Expand description

Trait for the five dataset adapters.

Required Methods§

Source

fn name(&self) -> &'static str

Display name (for reports + figure captions).

Source

fn load(&self, path: &Path) -> Result<ResidualStream>

Load a real subset from path. Errors if the file/directory is missing, malformed, or empty.

Source

fn exemplar(&self, seed: u64) -> ResidualStream

Generate a deterministic synthetic exemplar with the dataset’s statistical shape. seed makes the run reproducible. The returned stream’s source will be "{name}-exemplar-seed{seed}" so that no downstream report mislabels it as real data.

Implementors§