pub trait NeuromorphicAlgorithm<T> {
type Input;
type Output;
type Error;
// Required methods
fn fit(&mut self, data: &Self::Input) -> Result<Self::Output, Self::Error>;
fn predict(&self, data: &Self::Input) -> Result<Self::Output, Self::Error>;
fn parameters(&self) -> T;
fn reset(&mut self);
}Expand description
Neuromorphic algorithm trait for unified interface
This trait provides a common interface for all neuromorphic algorithms, enabling interchangeable use and consistent API across different approaches.
Required Associated Types§
Required Methods§
Sourcefn fit(&mut self, data: &Self::Input) -> Result<Self::Output, Self::Error>
fn fit(&mut self, data: &Self::Input) -> Result<Self::Output, Self::Error>
Fit the algorithm to spatial data
Sourcefn predict(&self, data: &Self::Input) -> Result<Self::Output, Self::Error>
fn predict(&self, data: &Self::Input) -> Result<Self::Output, Self::Error>
Predict using the trained algorithm
Sourcefn parameters(&self) -> T
fn parameters(&self) -> T
Get algorithm parameters