Skip to main content

fpm_rs/reconstruction/
batch.rs

1#[derive(Clone, Debug)]
2pub struct Batch {
3    pub indices: Vec<usize>,
4    pub batch_index: usize,
5}
6
7impl Batch {
8    pub fn new(indices: Vec<usize>, batch_index: usize) -> Self {
9        Self {
10            indices,
11            batch_index,
12        }
13    }
14
15    pub fn single(frame: usize) -> Self {
16        Self::new(vec![frame], 0)
17    }
18}