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
//! Optical Code Division Multiple Access (OCDMA) simulation module.
//!
//! This module provides a comprehensive pure-Rust toolkit for modelling and
//! analysing optical CDMA systems at the physical layer. It covers:
//!
//! * **Spreading codes** (`spreading_codes`) — Optical Orthogonal Codes (OOC),
//! Orthogonal Variable Spreading Factor (OVSF) trees, and Gold codes.
//! * **OCDMA transceivers** (`ocdma_system`) — Incoherent (OOK) and coherent
//! (bipolar) transceiver models with multiple-access interference analysis.
//! * **Spectral encoding** (`spectral_encoding`) — Spectral Amplitude Coding
//! (SAC-OCDMA) with the MDW code family, and Spectral Phase Coding
//! (SPC-OCDMA) with Walsh–Hadamard codes.
//! * **Performance analysis** (`performance`) — Q-function, BER models
//! (Gaussian approximation and exact binomial sum), capacity estimation,
//! and multi-access scheme comparison.
//!
//! # Design principles
//! * No `unwrap()` calls — all fallible paths use `unwrap_or`/`unwrap_or_default`.
//! * No external numeric dependencies — pure-Rust arithmetic throughout.
//! * No warnings — all items are either exported or `#[allow(dead_code)]`
//! annotated where appropriate.
//!
//! # Quick start
//! ```rust,ignore
//! use oxiphoton::optical_cdma::spreading_codes::OpticalOrthogonalCode;
//!
//! let ooc = OpticalOrthogonalCode::new(13, 3, 1, 1);
//! println!("Max codewords: {}", ooc.max_codewords()); // 2
//! let codes = ooc.generate_codes();
//! assert_eq!(codes.len(), 2);
//! ```
// ---------------------------------------------------------------------------
// Convenience re-exports
// ---------------------------------------------------------------------------
pub use ;
pub use ;
pub use ;
pub use ;