Package smile.linalg
package smile.linalg
Type-safe enumerations and constants for BLAS, LAPACK, and ARPACK.
All classes in this package are thin, allocation-free wrappers around the integer and byte flags consumed by the native libraries. Using these enums instead of raw integer literals makes call sites self-documenting and prevents hard-to-detect argument-ordering bugs.
Enum overview
| Enum | Purpose | Used by |
|---|---|---|
Order |
Matrix memory layout: ROW_MAJOR (C) vs COL_MAJOR (Fortran) |
CBLAS, CLAPACK |
Transpose |
Matrix operation: none / transpose / conjugate-transpose | CBLAS, CLAPACK |
UPLO |
Which triangle is stored for symmetric/triangular matrices | CBLAS, CLAPACK |
Diag |
Whether a triangular matrix has a unit diagonal | CBLAS, CLAPACK |
Side |
Whether a symmetric matrix multiplies on the left or right | CBLAS |
EVDJob |
Whether eigenvectors are computed (dgeev, dsyevd) |
CLAPACK |
SVDJob |
Which singular vectors are computed (dgesdd) |
CLAPACK |
EigenRange |
Range of eigenvalues to compute (dsyevr) |
CLAPACK |
Native library bindings
The sub-packages contain Java bindings generated by jextract (Java
Foreign Function & Memory API, Java 22+):
smile.linalg.blas— CBLAS (OpenBLAS / Accelerate / MKL)smile.linalg.lapack— CLAPACK (OpenBLAS / Accelerate / MKL)smile.linalg.arpack— ARPACK (sparse eigendecomposition)
smile.lib.blas— overrides the BLAS library name (default:openblason Linux,blason macOS,libopenblason Windows).
-
Enum ClassesClassDescriptionThe flag if a triangular matrix has unit diagonal elements.The option of eigenvalue range for LAPACK symmetric eigensolver routines (e.g.,
dsyevr,ssyevr).The option controlling whether eigenvectors are computed by LAPACK eigenvalue routines (e.g.,dgeev,dsyevd).Matrix memory layout (storage order).The side on which a symmetric matrix appears in a matrix-matrix operation.The option controlling which singular vectors are computed by LAPACK routines such asdgesddanddgesvd.Matrix transpose operation passed to BLAS/LAPACK routines.Which triangular part of a symmetric or triangular matrix is stored.