Genome restructurized

This commit is contained in:
rendo 2026-03-26 12:12:54 +05:00
commit 23d9ab696c
5 changed files with 109 additions and 20 deletions

View file

@ -1,21 +1,12 @@
use std::collections::HashMap;
#[cfg(test)]
mod tests;
pub mod plant_templates;
pub mod edge;
pub mod gene;
pub mod genome;
#[derive(Clone,Copy,PartialEq,Eq)]
pub struct GeneID;
pub trait Gene {}
#[derive(Default)]
pub struct PlantGenome {
pub edges: HashMap<GeneID,Vec<GeneID>>,
pub vertices: HashMap<GeneID,Box<dyn Gene>>
}
impl PlantGenome {
pub fn new() -> Self {
Self {
edges: HashMap::new(),
vertices: HashMap::new()
}
}
pub mod prelude {
pub use crate::genetics::edge::*;
pub use crate::genetics::genome::*;
pub use crate::genetics::gene::*;
}