use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ExplorationLimits {
pub max_states: usize,
pub max_depth: usize,
pub max_commands_per_state: usize,
}
impl ExplorationLimits {
#[must_use]
pub const fn new(max_states: usize, max_depth: usize, max_commands_per_state: usize) -> Self {
Self {
max_states,
max_depth,
max_commands_per_state,
}
}
#[must_use]
pub const fn smoke() -> Self {
Self::new(128, 6, 8)
}
#[must_use]
pub const fn standard() -> Self {
Self::new(1024, 16, 16)
}
#[must_use]
pub const fn generous() -> Self {
Self::new(8192, 32, 32)
}
#[must_use]
pub const fn with_max_states(mut self, max_states: usize) -> Self {
self.max_states = max_states;
self
}
#[must_use]
pub const fn with_max_depth(mut self, max_depth: usize) -> Self {
self.max_depth = max_depth;
self
}
#[must_use]
pub const fn with_max_commands_per_state(mut self, max_commands_per_state: usize) -> Self {
self.max_commands_per_state = max_commands_per_state;
self
}
}
impl Default for ExplorationLimits {
fn default() -> Self {
Self::standard()
}
}