Module utils

Module utils 

Source
Expand description

Utility functions shared across matrix function modules

Functionsยง

check_positive_definite
Check if all eigenvalues are positive (for positive definite matrices)
check_positive_semidefinite
Check if all eigenvalues are non-negative (for positive semidefinite matrices)
frobenius_norm
Compute the Frobenius norm of a matrix
integer_matrix_power
Compute matrix power for small integer powers using repeated squaring
is_diagonal
Check if a matrix is diagonal
is_identity
Check if a matrix is the identity matrix
is_integer
Check if a floating point number is close to an integer
is_symmetric
Check if a matrix is symmetric
is_zero_matrix
Check if a matrix is the zero matrix
matrix_add
Add two matrices: result = A + B
matrix_diff_norm
Compute the maximum absolute difference between two matrices
matrix_multiply
Compute matrix multiplication C = A * B
matrix_subtract
Subtract two matrices: result = A - B
matrix_transpose
Compute the matrix transpose
scale_matrix
Scale a matrix by a scalar: result = alpha * A