Struct border_core::SyncSampler
source · pub struct SyncSampler<E, P>where
E: Env,
P: StepProcessorBase<E>,{ /* private fields */ }
Implementations§
source§impl<E, P> SyncSampler<E, P>where
E: Env,
P: StepProcessorBase<E>,
impl<E, P> SyncSampler<E, P>where E: Env, P: StepProcessorBase<E>,
sourcepub fn sample_and_push<A, R, R_>(
&mut self,
agent: &mut A,
buffer: &mut R_
) -> Result<Record>where
A: Agent<E, R>,
R: ReplayBufferBase<PushedItem = P::Output>,
R_: ReplayBufferBase<PushedItem = R::PushedItem>,
pub fn sample_and_push<A, R, R_>( &mut self, agent: &mut A, buffer: &mut R_ ) -> Result<Record>where A: Agent<E, R>, R: ReplayBufferBase<PushedItem = P::Output>, R_: ReplayBufferBase<PushedItem = R::PushedItem>,
Samples transitions and pushes them into the replay buffer.
The replay buffer R_
, to which samples will be pushed, has to accept
PushedItem
that are the same with Agent::R
.
Auto Trait Implementations§
impl<E, P> RefUnwindSafe for SyncSampler<E, P>where E: RefUnwindSafe, P: RefUnwindSafe, <E as Env>::Obs: RefUnwindSafe,
impl<E, P> Send for SyncSampler<E, P>where E: Send, P: Send, <E as Env>::Obs: Send,
impl<E, P> Sync for SyncSampler<E, P>where E: Sync, P: Sync, <E as Env>::Obs: Sync,
impl<E, P> Unpin for SyncSampler<E, P>where E: Unpin, P: Unpin, <E as Env>::Obs: Unpin,
impl<E, P> UnwindSafe for SyncSampler<E, P>where E: UnwindSafe, P: UnwindSafe, <E as Env>::Obs: 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