Trait AgentsState

Source
pub trait AgentsState<T>: AlgorithmState<T> {
    type Agent: Agent<T>;

    // Required method
    fn get_agents(&self) -> Vec<&Self::Agent>;
}
Expand description

The trait for algotithms where use agents (genetic algorithm, partical swarm algorithm etc).

T - type of a point in search space for goal function.

Required Associated Types§

Required Methods§

Source

fn get_agents(&self) -> Vec<&Self::Agent>

Returns vector with references to all agents

Implementors§

Source§

impl<'a, T: Clone> AgentsState<T> for Population<'a, T>

Source§

impl<T: Clone> AgentsState<Vec<T>> for Swarm<T>