border-core 0.0.5

Reinforcement learning library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! SubBatch, which consists [Batch](crate::Batch).

/// Represents a SubBatch, which consists [Batch](crate::Batch).
pub trait SubBatch {
    /// Builds a subbatch with a capacity.
    fn new(capacity: usize) -> Self;

    /// Pushes the samples in `data`.
    fn push(&mut self, i: usize, data: &Self);

    /// Takes samples in the batch.
    fn sample(&self, ixs: &Vec<usize>) -> Self;
}