pub struct EnvironmentTransition { /* private fields */ }Expand description
One batched environment step result preserving termination and truncation.
Implementations§
Source§impl EnvironmentTransition
impl EnvironmentTransition
Sourcepub fn new(
observation: Matrix,
next_observation: Matrix,
reward: Matrix,
terminated: Matrix,
truncated: Matrix,
) -> Self
pub fn new( observation: Matrix, next_observation: Matrix, reward: Matrix, terminated: Matrix, truncated: Matrix, ) -> Self
Construct an owned transition value; EnvironmentSpec::validate_transition
proves its complete field contract together with the action.
Sourcepub const fn observation(&self) -> &Matrix
pub const fn observation(&self) -> &Matrix
Return the observation before the action.
Sourcepub const fn next_observation(&self) -> &Matrix
pub const fn next_observation(&self) -> &Matrix
Return the observation after the action.
Sourcepub const fn terminated(&self) -> &Matrix
pub const fn terminated(&self) -> &Matrix
Return task-terminal flags, distinct from truncation.
Auto Trait Implementations§
impl !RefUnwindSafe for EnvironmentTransition
impl !Send for EnvironmentTransition
impl !Sync for EnvironmentTransition
impl !UnwindSafe for EnvironmentTransition
impl Forget for EnvironmentTransition
impl Freeze for EnvironmentTransitionwhere
*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 EnvironmentTransition
impl Unpin for EnvironmentTransition
impl UnsafeUnpin for EnvironmentTransitionwhere
*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