pub trait DataProvider {
// Required methods
fn num_samples(&self) -> usize;
fn get_batch(&self, indices: &[usize]) -> Vec<f64>;
fn get_full_data(&self) -> Vec<f64>;
}
Expand description
Data provider trait for stochastic optimization
Required Methods§
Sourcefn num_samples(&self) -> usize
fn num_samples(&self) -> usize
Get the total number of samples
Sourcefn get_full_data(&self) -> Vec<f64>
fn get_full_data(&self) -> Vec<f64>
Get the full dataset