pub trait Encodeable {
type Phenotype;
const NAME: &str;
const HASH: i32 = _;
// Required methods
fn morphology() -> Vec<GeneBounds>;
fn encode(&self) -> Vec<i64>;
fn decode(genes: &[i64]) -> Self::Phenotype;
}Expand description
Trait for types that can be encoded as genomes for genetic algorithm optimization. Provides the interface between domain-specific types and the GA engine.
Required Associated Constants§
Provided Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn morphology() -> Vec<GeneBounds>
fn morphology() -> Vec<GeneBounds>
Returns the gene bounds that define the search space structure.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".