Trait border_core::core::base::Obs[][src]

pub trait Obs: Clone + Debug {
    fn dummy(n_procs: usize) -> Self;
fn merge(self, obs_reset: Self, is_done: &[i8]) -> Self;
fn n_procs(&self) -> usize;
fn batch_size(&self) -> usize; }
Expand description

Represents an observation of the environment.

Required methods

fn dummy(n_procs: usize) -> Self[src]

Returns a dummy observation.

The observation created with this method is ignored.

fn merge(self, obs_reset: Self, is_done: &[i8]) -> Self[src]

Replace elements of observation where is_done[i] == 1.0. This method assumes that is_done.len() == n_procs.

fn n_procs(&self) -> usize[src]

Returns the number of processes that created this observation; it assumes a synchronous vectorized environment.

TODO: consider to remove this, replace with batch_size().

fn batch_size(&self) -> usize[src]

Returns the batch size.

Implementors