[][src]Trait radiate::engine::problem::Problem

pub trait Problem<T> {
    fn empty() -> Self;
fn solve(&self, member: &mut T) -> f32; }

Required methods

fn empty() -> Self

empty can be a new for Self, or some sort of default value, just needed to create a population with base parameters

fn solve(&self, member: &mut T) -> f32

Solve is what actually solves the problem , given a solver (the genome type) use the data in the type implementing the problem to sovle the problem and return the member's score. The result of this function is the member's fitness score

Loading content...


Loading content...