Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Example: Adaptive Beamforming

Crate: kwavers
Run: cargo run -p kwavers --example adaptive_beamforming
Source: crates/kwavers/examples/adaptive_beamforming.rs

What This Example Demonstrates

This example is an architecture-focused tour of the adaptive beamforming stack after the ADR-001 refactor. Instead of running a numeric reconstruction, it documents how the monolithic implementation was split into focused submodules while preserving compatibility and test coverage.

ComponentAPIValue
Architectureadaptive_beamforming::{adaptive, conventional, subspace, tapering, past, opast}Focused modules replace the old 2193-line implementation
API ownershipkwavers_analysis::...::adaptive::MinimumVarianceAnalysis owns adaptive weighting; transducer owns hardware interfaces
VerificationPackage Nextest and strict ClippyValidates the current source graph

Key Code Snippet

println!("Adaptive Beamforming - Architecture Refactoring Complete");
println!("=======================================================");

println!("\n✓ REFACTORING ACHIEVEMENTS:");
println!("  • Eliminated monolithic algorithms_old.rs (2193 lines)");
println!("  • Split into focused submodules (<500 lines each)");
println!("  • Removed code duplication across algorithms");
println!("  • Feature-gated legacy implementations");
println!("  • Maintained 100% backwards compatibility");

Expected Output (if applicable)

The executable prints refactoring achievements, quality-assurance checks, and the new module layout rather than generating beamformed images.

Book Chapter

← Transducer Arrays and Beamforming