pub trait Observation<const R: usize>:
Debug
+ Clone
+ Send
+ Sync
+ Serialize
+ for<'de> Deserialize<'de> {
const RANK: usize = R;
// Required method
fn shape() -> [usize; R];
}Expand description
The Observation trait defines how an agent perceives the world. It
represents something that can be observed from the environment.
Implements Serialize and Deserialize for storage in a replay buffer.
Provided Associated Constants§
Sourceconst RANK: usize = R
const RANK: usize = R
The rank of this observation space — i.e. the number of axes (tensor order), not the size of any axis.
“Rank” here means the count of indices needed to address an element
(NumPy ndim, Burn’s Tensor<B, R>), not matrix rank or CP-decomposition
rank. This is automatically set to match the const generic parameter R.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".