pub struct RolloutTransition { /* private fields */ }Expand description
One vector-environment transition whose values remain device-resident.
Implementations§
Source§impl RolloutTransition
impl RolloutTransition
Sourcepub fn new(
observation: Matrix,
action: Matrix,
reward: Matrix,
value: Matrix,
next_value: Matrix,
log_probability: Matrix,
terminated: Matrix,
truncated: Matrix,
) -> Self
pub fn new( observation: Matrix, action: Matrix, reward: Matrix, value: Matrix, next_value: Matrix, log_probability: Matrix, terminated: Matrix, truncated: Matrix, ) -> Self
Construct one categorical vector-environment transition.
Shape, dtype, and runtime compatibility are checked by
RolloutBuffer::append against that buffer’s configuration.
Sourcepub const fn observation(&self) -> &Matrix
pub const fn observation(&self) -> &Matrix
Return the batched observation.
Sourcepub const fn next_value(&self) -> &Matrix
pub const fn next_value(&self) -> &Matrix
Return the estimated values after each transition.
Sourcepub const fn log_probability(&self) -> &Matrix
pub const fn log_probability(&self) -> &Matrix
Return the action log probabilities under the collecting policy.
Sourcepub const fn terminated(&self) -> &Matrix
pub const fn terminated(&self) -> &Matrix
Return the environment termination mask.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RolloutTransition
impl !Send for RolloutTransition
impl !Sync for RolloutTransition
impl !UnwindSafe for RolloutTransition
impl Forget for RolloutTransition
impl Freeze for RolloutTransitionwhere
*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 RolloutTransition
impl Unpin for RolloutTransition
impl UnsafeUnpin for RolloutTransitionwhere
*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