oa::ml::rollout::RolloutBuffer

Stateful fixed-capacity owner for one categorical on-policy rollout. Appends, validity reset, and final GAE are recorded on the owning engine; host observation remains the explicit submit-and-wait boundary. Storage is allocated once and overwritten in place across completed collection cycles.

StRust public API

Declaration

pub struct RolloutBuffer { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn append(&mut self, transition: &RolloutTransition) -> Result<()>
pub fn finalize(&mut self, config: GaeConfig) -> Result<()>
pub fn reset(&mut self) -> Result<()>
pub fn is_full(&self) -> bool
pub const fn is_finalized(&self) -> bool
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub const fn capacity(&self) -> usize
pub const fn config(&self) -> &RolloutConfig
pub const fn batch(&self) -> &RolloutBatch

Associated Functions

pub fn new(engine: &Engine, config: RolloutConfig) -> Result<Self>

Public Method Documentation

pub fn append(&mut self, transition: &RolloutTransition) -> Result<()>
No public source comment is attached to this declaration.
pub fn finalize(&mut self, config: GaeConfig) -> Result<()>
No public source comment is attached to this declaration.
pub fn reset(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn is_full( &self ) -> bool
No public source comment is attached to this declaration.
pub const fn is_finalized( &self ) -> bool
No public source comment is attached to this declaration.
pub const fn len( &self ) -> usize
No public source comment is attached to this declaration.
pub const fn is_empty( &self ) -> bool
No public source comment is attached to this declaration.
pub const fn capacity( &self ) -> usize
No public source comment is attached to this declaration.
pub const fn config( &self ) -> &RolloutConfig
No public source comment is attached to this declaration.
pub const fn batch( &self ) -> &RolloutBatch
No public source comment is attached to this declaration.
pub fn new( engine: &Engine, config: RolloutConfig ) -> Result<Self>
No public source comment is attached to this declaration.