Module structured

Module structured 

Source
Expand description

Structured matrices support (Toeplitz, circulant) for efficient representations

This module provides implementations of various structured matrices that have special properties allowing for efficient storage and operations.

§Overview

Structured matrices are matrices with special patterns that allow them to be represented using far fewer parameters than general matrices. This provides significant memory savings and computational advantages for large matrices.

§Types of Structured Matrices

  • Toeplitz matrices: Matrices where each descending diagonal from left to right is constant
  • Circulant matrices: Special Toeplitz matrices where each row is a cyclic shift of the first row
  • Hankel matrices: Matrices where each ascending diagonal from left to right is constant

§Examples

use scirs2_core::ndarray::{Array1, array};
use scirs2_linalg::structured::{ToeplitzMatrix, StructuredMatrix};

// Create a Toeplitz matrix from its first row and column
let first_row = array![1.0, 2.0, 3.0];
let first_col = array![1.0, 4.0, 5.0];

let toeplitz = ToeplitzMatrix::new(first_row.view(), first_col.view()).unwrap();

// The matrix represented is:
// [1.0, 2.0, 3.0]
// [4.0, 1.0, 2.0]
// [5.0, 4.0, 1.0]

// Apply to a vector efficiently without forming the full matrix
let x = array![1.0, 2.0, 3.0];
let y = toeplitz.matvec(&x.view()).unwrap();

Structs§

CirculantMatrix
Circulant matrix implementation
HankelMatrix
Hankel matrix implementation
ToeplitzMatrix
Toeplitz matrix implementation

Traits§

StructuredMatrix
A trait for structured matrices that can be represented efficiently

Functions§

circulant_determinant
Compute determinant of a circulant matrix
circulant_eigenvalues
Compute eigenvalues of a circulant matrix
circulant_inverse_fft
FFT-based circulant matrix inverse
circulant_matvec_direct
Direct circulant matrix-vector multiplication
circulant_matvec_fft
FFT-based circulant matrix-vector multiplication
dftmatrix_multiply
Discrete Fourier Transform matrix multiplication
fast_toeplitz_inverse
Fast Toeplitz matrix inversion using the Gohberg-Semencul formula
gohberg_semencul_inverse
Gohberg-Semencul formula for efficient Toeplitz matrix inversion
hadamard_transform
Fast Walsh-Hadamard transform
hankel_determinant
Compute determinant of a Hankel matrix
hankel_matvec
Hankel matrix-vector multiplication
hankel_matvec_fft
FFT-based Hankel matrix-vector multiplication
hankel_svd
Compute SVD of a Hankel matrix
levinson_durbin
Levinson-Durbin algorithm for solving Toeplitz systems
solve_circulant
Solve a Circulant system
solve_circulant_fft
FFT-based circulant system solver
solve_toeplitz
Solve a Toeplitz system using the Levinson algorithm
solve_tridiagonal_lu
Solve tridiagonal system using LU decomposition
solve_tridiagonal_thomas
Solve tridiagonal system using Thomas algorithm
structured_to_operator
Convert a structured matrix to a matrix-free operator
tridiagonal_determinant
Compute determinant of a tridiagonal matrix
tridiagonal_eigenvalues
Compute eigenvalues of a tridiagonal matrix
tridiagonal_eigenvectors
Compute eigenvectors of a tridiagonal matrix
tridiagonal_matvec
Tridiagonal matrix-vector multiplication
yule_walker
Yule-Walker equations solver