slu.testing.createTestMatrix
Create a standard test matrix.
Syntax
slu.testing.createTestMatrix(type, n, options?)
Description
Create a standard test matrix. Generates matrices commonly used for testing and benchmarking sparse linear solvers. Each matrix type has known properties that make it useful for specific tests. Available matrix types: - `'tridiagonal'`: Tridiagonal matrix (bandwidth 1) - `'laplacian_2d'`: 2D Laplacian / 5-point stencil - `'laplacian_3d'`: 3D Laplacian / 7-point stencil - `'random'`: Random dense matrix (diagonally dominant) - `'sparse_random'`: Random sparse matrix - `'poisson'`: Poisson problem matrix - `'diagonal'`: Random diagonal matrix - `'identity'`: Identity matrix - `'hilbert'`: Hilbert matrix (ill-conditioned) - `'lehmer'`: Lehmer matrix (positive definite)
Parameters
| Name | Description |
|---|---|
| type | - Type of test matrix to create |
| n | - Matrix size (n x n) |
| options(optional) | - Generation options |
Returns
TestMatrixResult