Genome restructurized
This commit is contained in:
parent
964a8c49ad
commit
23d9ab696c
5 changed files with 109 additions and 20 deletions
|
|
@ -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::*;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue