|
1 | 1 | //! DTOs: bus adapters between cognitive speed zones. |
2 | 2 | //! |
3 | | -//! Φ Dispersion: StreamDto — sensor output enters the field |
4 | | -//! Ψ Interference: ResonanceDto — the ripple field IS f64[4096] |
5 | | -//! B Consequence: BusDto — committed thought with provenance |
6 | | -//! Γ Collapse: ThoughtStruct — stabilized, persisted, text is lazy |
| 3 | +//! Φ Dispersion: StreamDto — sensor output enters the field |
| 4 | +//! Ψ Interference: PerturbationDto — the ripple field IS f64[4096] |
| 5 | +//! B Consequence: BusDto — committed thought with provenance |
| 6 | +//! Γ Collapse: ThoughtStruct — stabilized, persisted, text is lazy |
7 | 7 |
|
8 | 8 | use crate::engine::CODEBOOK_SIZE; |
9 | 9 |
|
@@ -47,24 +47,37 @@ pub struct StreamDto { |
47 | 47 | } |
48 | 48 |
|
49 | 49 | // ═══════════════════════════════════════════════════════════════════════════ |
50 | | -// Ψ — ResonanceDto: the ripple field |
| 50 | +// Ψ — PerturbationDto: the ripple field |
51 | 51 | // ═══════════════════════════════════════════════════════════════════════════ |
52 | 52 |
|
53 | | -/// ResonanceDto IS f64[4096] energy. Not a struct with candidate lists. |
| 53 | +/// PerturbationDto IS f64[4096] energy. Not a struct with candidate lists. |
54 | 54 | /// |
55 | 55 | /// High energy at entry 42 = "thought 42 resonates." |
56 | 56 | /// Zero at entry 200 = "thought 200 destructively interfered." |
57 | 57 | /// Spike at entry 7 = "thought 7 crystallizing." |
| 58 | +/// |
| 59 | +/// D-PERT-1: renamed from `ResonanceDto` — this is the mechanical |
| 60 | +/// Morton-tile inverse-pyramid perturbation field (Ψ), distinct from the |
| 61 | +/// PERSPECTIVAL (Piaget Three-Mountains) `ResonanceDto` in |
| 62 | +/// `awareness_dto.rs`, which keeps the `ResonanceDto` name. |
58 | 63 | #[derive(Clone, Debug)] |
59 | | -pub struct ResonanceDto { |
| 64 | +pub struct PerturbationDto { |
60 | 65 | /// Energy distribution. f32 — matches u8 distance table precision. |
61 | 66 | pub energy: Vec<f32>, |
62 | 67 | pub cycle_count: u16, |
63 | 68 | pub converged: bool, |
64 | 69 | pub top_k: [(u16, f32); 8], |
65 | 70 | } |
66 | 71 |
|
67 | | -impl ResonanceDto { |
| 72 | +/// D-PERT-1: `ResonanceDto` (mechanical Ψ) renamed to `PerturbationDto`. |
| 73 | +/// `ResonanceDto` now names only the perspectival awareness DTO in |
| 74 | +/// `awareness_dto.rs`. |
| 75 | +#[deprecated( |
| 76 | + note = "renamed to PerturbationDto (D-PERT-1); ResonanceDto now names only the perspectival awareness DTO" |
| 77 | +)] |
| 78 | +pub type ResonanceDto = PerturbationDto; |
| 79 | + |
| 80 | +impl PerturbationDto { |
68 | 81 | /// Build from f32 energy array (fixed-size legacy compat). |
69 | 82 | pub fn from_energy(energy: &[f32; CODEBOOK_SIZE], cycles: u16) -> Self { |
70 | 83 | Self::from_energy_f32(energy.as_slice(), cycles) |
@@ -237,7 +250,7 @@ mod tests { |
237 | 250 | energy[100] = 0.3; |
238 | 251 | energy[200] = 0.2; |
239 | 252 |
|
240 | | - let res = ResonanceDto::from_energy(&energy, 5); |
| 253 | + let res = PerturbationDto::from_energy(&energy, 5); |
241 | 254 | assert_eq!(res.top_k[0].0, 42); |
242 | 255 | assert!((res.top_k[0].1 - 0.5).abs() < 1e-10); |
243 | 256 | assert_eq!(res.top_k[1].0, 100); |
|
0 commit comments