pub trait RealValuedGenome: EvolutionaryGenome<Allele = f64> {
// Required methods
fn genes(&self) -> &[f64];
fn genes_mut(&mut self) -> &mut [f64];
fn from_genes(genes: Vec<f64>) -> Result<Self, GenomeError>;
// Provided method
fn apply_bounds(&mut self, bounds: &MultiBounds) { ... }
}Expand description
Trait for genomes that can be represented as real vectors
Required Methods§
Sourcefn from_genes(genes: Vec<f64>) -> Result<Self, GenomeError>
fn from_genes(genes: Vec<f64>) -> Result<Self, GenomeError>
Create from a vector of genes
Provided Methods§
Sourcefn apply_bounds(&mut self, bounds: &MultiBounds)
fn apply_bounds(&mut self, bounds: &MultiBounds)
Apply bounds to all genes
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".