Trait border_core::ReplayBufferBase
source · [−]pub trait ReplayBufferBase {
type Config: Clone;
type PushedItem;
type Batch: Batch;
fn build(config: &Self::Config) -> Self;
fn len(&self) -> usize;
fn batch(&mut self, size: usize) -> Result<Self::Batch>;
fn push(&mut self, tr: Self::PushedItem) -> Result<()>;
fn update_priority(
&mut self,
ixs: &Option<Vec<usize>>,
td_err: &Option<Vec<f32>>
);
}
Expand description
Interface of replay buffers.
Associated Types
type PushedItem
type PushedItem
Items pushed into the buffer.
Required methods
Build a replay buffer from Self::Config.
Constructs a batch.
beta
- The exponent for priority.
fn push(&mut self, tr: Self::PushedItem) -> Result<()>
fn push(&mut self, tr: Self::PushedItem) -> Result<()>
Pushes a transition into the buffer.