pub struct PendulumState<B: Backend> {
pub time: I32<B>,
pub theta: F32<B>,
pub theta_dot: F32<B>,
pub last_u: F32<B>,
}Expand description
The state of a Pendulum episode. The fields are in the order of gymnax’s
EnvState leaves.
Fields§
§time: I32<B>Steps taken in the episode.
theta: F32<B>The angle of the pendulum (0 is upright).
theta_dot: F32<B>The angular velocity.
last_u: F32<B>The last torque applied (after clipping).
Trait Implementations§
Source§impl<B: Backend> Tree<B> for PendulumState<B>
impl<B: Backend> Tree<B> for PendulumState<B>
Source§type On<__RuxlaC: Backend> = PendulumState<__RuxlaC>
type On<__RuxlaC: Backend> = PendulumState<__RuxlaC>
The same structure on backend
C.Source§fn unflatten_like(
&self,
leaves: &mut dyn Iterator<Item = <B as Backend>::Leaf>,
) -> Self
fn unflatten_like( &self, leaves: &mut dyn Iterator<Item = <B as Backend>::Leaf>, ) -> Self
Builds a value of the same structure from leaves.
Auto Trait Implementations§
impl<B> Freeze for PendulumState<B>
impl<B> RefUnwindSafe for PendulumState<B>
impl<B> Send for PendulumState<B>
impl<B> Sync for PendulumState<B>
impl<B> Unpin for PendulumState<B>
impl<B> UnsafeUnpin for PendulumState<B>
impl<B> UnwindSafe for PendulumState<B>
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