use crate::DType;
use super::GlobalOptions;
use numr::error::Result;
use numr::runtime::Runtime;
use numr::tensor::Tensor;
#[derive(Debug, Clone)]
pub struct SimulatedAnnealingResult<R: Runtime<DType = DType>> {
pub x: Tensor<R>,
pub fun: f64,
pub iterations: usize,
pub nfev: usize,
pub converged: bool,
}
pub trait SimulatedAnnealingAlgorithms<R: Runtime<DType = DType>> {
fn simulated_annealing<F>(
&self,
f: F,
lower_bounds: &Tensor<R>,
upper_bounds: &Tensor<R>,
options: &GlobalOptions,
) -> Result<SimulatedAnnealingResult<R>>
where
F: Fn(&Tensor<R>) -> Result<f64>;
}