pub trait State: Sized {
// Required methods
fn get_value(&self, at_idx: usize) -> f64;
fn execute_action(&mut self, action: usize) -> f64;
fn get(&mut self) -> Option<&mut Self>;
}Expand description
Defines a single state which can use the current context to get the next data.
Required Methods§
fn get_value(&self, at_idx: usize) -> f64
Sourcefn execute_action(&mut self, action: usize) -> f64
fn execute_action(&mut self, action: usize) -> f64
Updates the impact of the factor. For example, if data[0] has been accessed, we increase the index so data[1] is accessed next (in classification). In RL, we act on the environment and internally update the termination state, and hold the new state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.