use rand::Rng;
use crate::base::{error::StateSamplingError, state::State};
pub use crate::base::spaces::{
real_vector_state_space::RealVectorStateSpace, so2_state_space::SO2StateSpace,
};
pub trait StateSpace {
type StateType: State;
fn distance(&self, state1: &Self::StateType, state2: &Self::StateType) -> f64;
fn interpolate(
&self,
from: &Self::StateType,
to: &Self::StateType,
t: f64,
state: &mut Self::StateType,
);
fn enforce_bounds(&self, state: &mut Self::StateType);
fn satisfies_bounds(&self, state: &Self::StateType) -> bool;
fn sample_uniform(&self, rng: &mut impl Rng) -> Result<Self::StateType, StateSamplingError>;
}