Struct abc::Candidate [] [src]

pub struct Candidate<S: Clone + Send + Sync + 'static> {
    pub solution: S,
    pub fitness: f64,
}

One solution being explored by the hive, plus additional data.

This implementation was written with the expectation that the evaluate_fitness method may be very expensive, so the Candidate struct caches the computed fitness of its solution.

Fields

Actual candidate solution.

Cached fitness of the solution.

Methods

impl<S: Clone + Send + Sync + 'static> Candidate<S>
[src]

Wrap a solution with its cached fitness.

Trait Implementations

impl<S: Clone + Clone + Send + Sync + 'static> Clone for Candidate<S>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S: Clone + Send + Sync + 'static> Debug for Candidate<S> where
    S: Debug
[src]

Formats the value using the given formatter.