pub struct GenericTransitionBatch<O, A>{
pub obs: O,
pub act: A,
pub next_obs: O,
pub reward: Vec<f32>,
pub is_terminated: Vec<i8>,
pub is_truncated: Vec<i8>,
pub weight: Option<Vec<f32>>,
pub ix_sample: Option<Vec<usize>>,
}
Expand description
A generic implementation of TransitionBatch
.
Fields§
§obs: O
Observations.
act: A
Actions.
next_obs: O
Next observations.
reward: Vec<f32>
Rewards.
is_terminated: Vec<i8>
Termination flags.
is_truncated: Vec<i8>
Truncation flags.
weight: Option<Vec<f32>>
Priority weights.
ix_sample: Option<Vec<usize>>
Sample indices.
Implementations§
Source§impl<O, A> GenericTransitionBatch<O, A>
impl<O, A> GenericTransitionBatch<O, A>
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates new batch with the given capacity.
Trait Implementations§
Auto Trait Implementations§
impl<O, A> Freeze for GenericTransitionBatch<O, A>
impl<O, A> RefUnwindSafe for GenericTransitionBatch<O, A>where
O: RefUnwindSafe,
A: RefUnwindSafe,
impl<O, A> Send for GenericTransitionBatch<O, A>
impl<O, A> Sync for GenericTransitionBatch<O, A>
impl<O, A> Unpin for GenericTransitionBatch<O, A>
impl<O, A> UnwindSafe for GenericTransitionBatch<O, A>where
O: UnwindSafe,
A: UnwindSafe,
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