Crates.io | nnls |
lib.rs | nnls |
version | 0.3.0 |
source | src |
created_at | 2022-02-11 20:12:53.064861 |
updated_at | 2022-05-25 13:32:21.192232 |
description | Non-Negative Least Squares (nnls) |
homepage | |
repository | https://github.com/imeka/nnls |
max_upload_size | |
id | 530945 |
size | 36,905 |
This is a Rust version of nnls (Non-Negative Least Squares). It's a port from a Fortran90 script used by scipy.optimize.nnls and probably several others.
I decided to port nnls to Rust because:
static
variables throughout the code which make it unusable in parallel. If you plan to use nnls only in single-thread, you might prefer linking to that version: it has been heavily tested and has no known problem.nnls
2 times for each voxel. Several of those images has been tested and compared with the original Fortran version.unsafe
and it is forbidden to use any in this crate.panic!
in the code because there are 1 code paths in the original code which use goto
that I couldn't translate properly to Rust. I planned to handle that case but it turns out that it's never called. As I wrote, nnls
has been extensively used and I couldn't find any dataset that triggers that condition. If my programs ever panic because of this, it will be repaired quickly.