Trait ExperienceBufferBase

Source
pub trait ExperienceBufferBase {
    type Item;

    // Required methods
    fn push(&mut self, tr: Self::Item) -> Result<()>;
    fn len(&self) -> usize;
}
Expand description

Interface of buffers of experiences from environments.

You can push items, which has an arbitrary type. This trait is usually required by processes sampling experiences.

Required Associated Types§

Source

type Item

Items pushed into the buffer.

Required Methods§

Source

fn push(&mut self, tr: Self::Item) -> Result<()>

Pushes a transition into the buffer.

Source

fn len(&self) -> usize

The number of samples in the buffer.

Implementors§