matrixpacked
Packed triangular, symmetric, Hermitian, and positive-definite matrices backed directly by traditional BLAS/LAPACK packed-column storage.
The crate stores n(n+1)/2 scalars, supports owned matrices and zero-copy
borrowed views, and exposes packed matrix-vector operations, factorizations,
solves, refinement, diagnostics, eigensolvers, and format conversions.
use ;
Running numerical operations such as this solve requires a native BLAS/LAPACK provider in the final application.
Installation
For packed storage and provider-free APIs:
[]
= "0.1"
Choose one native provider below when using linked numerical operations.
Native backend
blas and lapack are bindings, so numerical executables need a native
provider. The crate selects none by default. Enable the repository-supported
bundled provider for your platform, or link compatible symbols in the final
application:
# Linux
= { = "0.1", = ["openblas-static"] }
# Windows
= { = "0.1", = ["intel-mkl-static"] }
Select only one bundled provider. The supported Windows workflow uses MKL; the non-vcpkg OpenBLAS source build is not assumed to work there.
Cargo unifies features across the dependency graph. If different dependencies enable both bundled provider features, both providers are resolved; the crate does not reject that combination at compile time. Linking two native providers can produce conflicting symbols and is not a supported configuration, so the final application should ensure that only one provider feature is selected.
Optional nalgebra support
Enable nalgebra-interop for owned nalgebra::DMatrix conversion, explicit
triangle extraction, tolerance-aware structural validation, and nalgebra
Cholesky-backed SPD/HPD validation:
= { = "0.1", = ["nalgebra-interop"] }
Packed storage cannot be exposed as a zero-copy rectangular nalgebra view. Structured conversion is pure Rust; triangular packed/full conversion currently requires a native LAPACK provider.
Supported Rust version
The minimum supported Rust version for matrixpacked 0.1.0 is Rust 1.89.
This version covers the core crate and the optional nalgebra-interop feature.
Development commands
# Provider-free compilation and documentation
# Linux linked suite
# Windows linked suite
Runner scripts are scripts_run_lapack_examples.{sh,bat} and
scripts_run_nonlapack_examples.{sh,bat}. The batch scripts use
--intel-mkl-static; the shell LAPACK runner accepts --openblas-static.
Stability
matrixpacked is pre-1.0. Minor releases may include API changes while the
interface evolves; user-visible changes will be recorded in the changelog.
Guides and status
- Complete crate guide
- Nalgebra interoperability
- Testing and reproducibility
- LAPACK routine coverage
- Runnable example coverage
- Non-LAPACK example coverage
- Operator surface
- Changelog
License
Licensed under either of Apache License, Version 2.0 or the MIT license at your option.