laboroai / border

A reinforcement learning library in Rust
Apache License 2.0
40 stars 8 forks source link

[v0.0.6] Fix SimpleReplayBuffer::len() #51

Closed taku-y closed 2 years ago

taku-y commented 2 years ago
    fn len(&self) -> usize {
        if self.i < self.capacity {
            self.i
        } else {
            self.capacity
        }
    }