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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! # Advanced Algorithms Library
//!
//! A comprehensive Rust library providing high-performance implementations of advanced algorithms
//! across multiple domains including:
//!
//! - **Numerical Analysis & Linear Algebra**: FFT, QR Decomposition, Newton-Raphson, SVD
//! - **Number Theory & Cryptography**: Miller-Rabin Primality Test, Extended Euclidean Algorithm, Mersenne Twister
//! - **Optimization & Statistics**: Gradient Descent, Levenberg-Marquardt, Monte Carlo Integration
//! - **Graph Algorithms**: Dijkstra's, A*, Bellman-Ford, Floyd-Warshall
//!
//! ## Features
//!
//! - **High Performance**: Optimized implementations with multi-threading support via Rayon
//! - **Well Documented**: Comprehensive documentation with examples for each algorithm
//! - **Type Safe**: Leverages Rust's type system for correctness
//! - **Numerically Stable**: Implementations prioritize numerical stability
//!
//! ## Quick Start
//!
//! ```rust
//! use advanced_algorithms::numerical::fft;
//! use advanced_algorithms::optimization::gradient_descent;
//! use advanced_algorithms::number_theory::miller_rabin;
//!
//! // Fast Fourier Transform
//! let signal = vec![1.0, 2.0, 3.0, 4.0];
//! let spectrum = fft::fft(&signal);
//!
//! // Check if a number is prime
//! let is_prime = miller_rabin::is_prime(17, 10);
//! ```
// Re-export commonly used types
pub use Complex64;
/// Common error type for the library
/// Result type for algorithm operations
pub type Result<T> = Result;