Trait Agent

Source
pub trait Agent<T> {
    // Required methods
    fn get_parameter(&self) -> &T;
    fn get_goal(&self) -> f64;
}
Expand description

The trait for single point in search space. The trait used with AlgorithmWithAgents.

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

Required Methods§

Source

fn get_parameter(&self) -> &T

Returns parameter (point in search space) of the agent.

Source

fn get_goal(&self) -> f64

Returns value of a goal function for current agent.

Implementors§

Source§

impl<T> Agent<Vec<T>> for Particle<T>

Source§

impl<T> Agent<T> for Individual<T>