1pub mod algorithm;
8pub mod test_function;
9pub mod utils;
10
11pub mod prelude {
13 pub use crate::algorithm::*;
14 pub use crate::test_function::*;
15 pub use crate::utils::*;
16}
17
18#[derive(thiserror::Error, Debug)]
20pub enum MetaheuristicError {
21 #[error("Invalid dimension: expected {expected}, got {got}")]
22 InvalidDimension {
23 expected: usize,
24 got: usize,
25 },
26 #[error("Invalid bounds: min values must be less than max values")]
27 InvalidBounds,
28 #[error("Optimization failed: {0}")]
29 OptimizationError(String),
30}
31
32pub type Result<T> = std::result::Result<T, MetaheuristicError>;