tiny_solver::optimizer::common

Trait Optimizer

Source
pub trait Optimizer {
    // Required method
    fn optimize(
        &self,
        problem: &Problem,
        initial_values: &HashMap<String, DVector<f64>>,
        optimizer_option: Option<OptimizerOptions>,
    ) -> Option<HashMap<String, DVector<f64>>>;

    // Provided method
    fn apply_dx(
        &self,
        dx: &DVector<f64>,
        params: &mut HashMap<String, DVector<f64>>,
        variable_name_to_col_idx_dict: &HashMap<String, usize>,
        fixed_var_indexes: &HashMap<String, HashSet<usize>>,
        variable_bounds: &HashMap<String, HashMap<usize, (f64, f64)>>,
    ) { ... }
}

Required Methods§

Source

fn optimize( &self, problem: &Problem, initial_values: &HashMap<String, DVector<f64>>, optimizer_option: Option<OptimizerOptions>, ) -> Option<HashMap<String, DVector<f64>>>

Provided Methods§

Source

fn apply_dx( &self, dx: &DVector<f64>, params: &mut HashMap<String, DVector<f64>>, variable_name_to_col_idx_dict: &HashMap<String, usize>, fixed_var_indexes: &HashMap<String, HashSet<usize>>, variable_bounds: &HashMap<String, HashMap<usize, (f64, f64)>>, )

Implementors§