pub struct ParallelEigenSolver { /* private fields */ }Expand description
Parallel Eigenvalue Decomposition
Implements parallel algorithms for eigenvalue decomposition of symmetric matrices commonly used in cross-decomposition methods. Uses divide-and-conquer approach for large matrices and multi-threading for improved performance.
§Mathematical Background
For a symmetric matrix A, finds eigenvalues λ and eigenvectors v such that: A * v = λ * v
Uses parallel divide-and-conquer algorithm:
- Decompose matrix into smaller blocks
- Compute eigenvalues for each block in parallel
- Merge results using parallel reduction
§Examples
use sklears_cross_decomposition::ParallelEigenSolver;
use scirs2_core::ndarray::Array2;
let matrix = Array2::eye(100); // 100x100 identity matrix
let mut solver = ParallelEigenSolver::new()
.n_threads(4)
.block_size(25);
let (eigenvalues, eigenvectors) = solver.solve(&matrix).unwrap();Implementations§
Source§impl ParallelEigenSolver
impl ParallelEigenSolver
Sourcepub fn with_thread_pool(self, pool: Arc<WorkStealingThreadPool>) -> Self
pub fn with_thread_pool(self, pool: Arc<WorkStealingThreadPool>) -> Self
Use work-stealing thread pool for improved parallelism
Sourcepub fn block_size(self, block_size: usize) -> Self
pub fn block_size(self, block_size: usize) -> Self
Set block size for divide-and-conquer
Sourcepub fn max_iterations(self, max_iter: usize) -> Self
pub fn max_iterations(self, max_iter: usize) -> Self
Set maximum iterations
Sourcepub fn method(self, method: EigenMethod) -> Self
pub fn method(self, method: EigenMethod) -> Self
Set eigenvalue method
Trait Implementations§
Source§impl Clone for ParallelEigenSolver
impl Clone for ParallelEigenSolver
Source§fn clone(&self) -> ParallelEigenSolver
fn clone(&self) -> ParallelEigenSolver
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParallelEigenSolver
impl Debug for ParallelEigenSolver
Auto Trait Implementations§
impl Freeze for ParallelEigenSolver
impl !RefUnwindSafe for ParallelEigenSolver
impl Send for ParallelEigenSolver
impl Sync for ParallelEigenSolver
impl Unpin for ParallelEigenSolver
impl !UnwindSafe for ParallelEigenSolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more