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.


Actual candidate solution.

Cached fitness of the solution.


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

Wrap a solution with its cached fitness.

Trait Implementations

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

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

Formats the value using the given formatter.