sparsemat / sprs

sparse linear algebra library for rust
Apache License 2.0
422 stars 47 forks source link

Triplet matrix conversion to compressed storage with given Iptr #269

Closed kolstae closed 3 years ago

kolstae commented 3 years ago

It would be good to convert triplet matrix to a cs with chosen Iptr type. There might be a way to let Iptr = I as default?

kolstae commented 3 years ago

Not sure how to fix CI / test (nightly). Doesn't seem to be related to my change

mulimoen commented 3 years ago

CI can be fixed by removing -Zpackage-features from line 128 in ci.yml. This was a check for consistency of feature-flags, but has now been stabilised

kolstae commented 3 years ago

CI can be fixed by removing -Zpackage-features from line 128 in ci.yml. This was a check for consistency of feature-flags, but has now been stabilised

Should I do this in this PR though?

mulimoen commented 3 years ago

We can avoid the extra type by changing TripletMatBase to have separate types for row and columns with a default type, as done with CsMatBase. This is a ton more work with little benefit, tri matrices are only intended for construction as of now.

I'm happy with type annotations, they should be elided by type coercion in most cased as mentioned by vbarrielle

kolstae commented 3 years ago

I'm sorry but I'm not able make cargo build sprs-ldl with sprs_suitesparse_ldl and sprs_suitesparse_camd enabled. Could you help me?

mulimoen commented 3 years ago

Did nigthly break the -p option? Seems you have to specify package now, use --features sprs-ldl/sprs_suitesparse_ldl

vbarrielle commented 3 years ago

All right, thanks @kolstae and @mulimoen for figuring out the CI fix. Specifying features of dependencies is clearly a pain point in rust...