pub struct ReplayTransition { /* private fields */ }Expand description
One batch of transitions to append to a ReplayBuffer.
Implementations§
Source§impl ReplayTransition
impl ReplayTransition
Sourcepub fn new(
observation: Matrix,
action: Matrix,
next_observation: Matrix,
reward: Matrix,
terminated: Matrix,
truncated: Matrix,
) -> Self
pub fn new( observation: Matrix, action: Matrix, next_observation: Matrix, reward: Matrix, terminated: Matrix, truncated: Matrix, ) -> Self
Construct an unchecked replay transition carrier.
ReplayBuffer::append validates every field against its configuration.
Sourcepub const fn observation(&self) -> &Matrix
pub const fn observation(&self) -> &Matrix
Return the observations.
Sourcepub const fn next_observation(&self) -> &Matrix
pub const fn next_observation(&self) -> &Matrix
Return the successor observations.
Sourcepub const fn terminated(&self) -> &Matrix
pub const fn terminated(&self) -> &Matrix
Return termination flags.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ReplayTransition
impl !Send for ReplayTransition
impl !Sync for ReplayTransition
impl !UnwindSafe for ReplayTransition
impl Forget for ReplayTransition
impl Freeze for ReplayTransitionwhere
*const RcInner<RefCell<RuntimeState>> is !null: Freeze,
PhantomData<RcInner<RefCell<RuntimeState>>>: Freeze,
*const RcInner<StorageInner> is !null: Freeze,
PhantomData<RcInner<StorageInner>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<usize>: Freeze,
*const RcInner<MatrixSemantic> is !null: Freeze,
PhantomData<RcInner<MatrixSemantic>>: Freeze,
PhantomData<Rc<()>>: Freeze,
impl Move for ReplayTransition
impl Unpin for ReplayTransition
impl UnsafeUnpin for ReplayTransitionwhere
*const RcInner<RefCell<RuntimeState>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<RuntimeState>>>: UnsafeUnpin,
*const RcInner<StorageInner> is !null: UnsafeUnpin,
PhantomData<RcInner<StorageInner>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
*const RcInner<MatrixSemantic> is !null: UnsafeUnpin,
PhantomData<RcInner<MatrixSemantic>>: UnsafeUnpin,
PhantomData<Rc<()>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more