Skip to main content

CompiledAction

Trait CompiledAction 

Source
pub trait CompiledAction:
    Copy
    + Send
    + Sync
    + Debug {
    // Required methods
    fn pattern(space: &ActionSpace, i: u64) -> Self;
    fn from_flat(actions: Actions<'_>, i: usize) -> Self;
    fn from_joint(space: &ActionSpace, index: usize) -> Self;
}
Expand description

An action of a compiled environment.

Required Methods§

Source

fn pattern(space: &ActionSpace, i: u64) -> Self

Action i of the fixed pseudo-random sequence of ActionValue::pattern.

Source

fn from_flat(actions: Actions<'_>, i: usize) -> Self

The action of environment i in a flat buffer.

Source

fn from_joint(space: &ActionSpace, index: usize) -> Self

The joint action index (ActionValue::from_joint).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CompiledAction for f32

Source§

fn pattern(space: &ActionSpace, i: u64) -> Self

Source§

fn from_flat(actions: Actions<'_>, i: usize) -> Self

Source§

fn from_joint(_: &ActionSpace, _: usize) -> Self

Source§

impl CompiledAction for i32

Source§

fn pattern(space: &ActionSpace, i: u64) -> Self

Source§

fn from_flat(actions: Actions<'_>, i: usize) -> Self

Source§

fn from_joint(_: &ActionSpace, index: usize) -> Self

Source§

impl<const N: usize> CompiledAction for [f32; N]

Source§

fn pattern(space: &ActionSpace, i: u64) -> Self

Source§

fn from_flat(actions: Actions<'_>, i: usize) -> Self

Source§

fn from_joint(_: &ActionSpace, _: usize) -> Self

Source§

impl<const N: usize> CompiledAction for [i32; N]

Source§

fn pattern(space: &ActionSpace, i: u64) -> Self

Source§

fn from_flat(actions: Actions<'_>, i: usize) -> Self

Source§

fn from_joint(space: &ActionSpace, index: usize) -> Self

Implementors§