1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! # GenHDC — Genetic Hyperdimensional Computing
//!
//! GenHDC is a Rust crate for **Hyperdimensional Computing (HDC) / Vector
//! Symbolic Architectures (VSA)** plus **genetic operators** on concept
//! genomes.
//!
//! The HDC engine (`HdcEngine`) was **extracted from Mimer**, a continuously
//! running production Rust agent. It provides 10 000-dimensional bipolar
//! vectors with bind, bundle, unbind, and permutation.
//!
//! The genetic layer (`ConceptGenome`) adds inheritance, mutation,
//! CRISPR-like targeted editing, and epigenetic expression — sitting on top
//! of any HDC representation.
//!
//! ## Quick start (HDC)
//!
//! ```rust
//! use genhdc::{HdcEngine, DIMENSIONS};
//!
//! let mut hdc = HdcEngine::with_seed(DIMENSIONS, 42);
//! let a = hdc.encode("apple");
//! let b = hdc.encode("color");
//! let bound = hdc.bind(&a, &b);
//! let recovered = hdc.unbind(&bound, &b);
//! assert!(hdc.similarity(&recovered, &a) > 0.9);
//! ```
//!
//! ## Quick start (genetic layer)
//!
//! ```rust
//! use genhdc::ConceptGenome;
//!
//! let apple = ConceptGenome::primordial("apple", 0);
//! let snake = ConceptGenome::primordial("snake", 0);
//! let eats = ConceptGenome::inherit(&snake, &apple, "eats", 1);
//! assert_eq!(eats.generation, 1);
//! ```
pub use ;
pub use ;