Commit Graph

58 Commits

Author SHA1 Message Date
Andreas Longva 46442d6060 Initial basic proptest support for CooMatrix (missing tests) 2021-01-26 10:11:24 +01:00
Andreas Longva ec339f9108 Implement CSC matrix basic API
The CSC matrix API mirrors the CSR matrix API. However, there
are subtle differences throughout (both in the available
methods and the implementation) that I believe makes any attempt
to avoid the duplicate effort futile.
2021-01-26 10:11:24 +01:00
Andreas Longva 4cd47327c9 Test that CSR::disassemble avoids cloning when possible 2021-01-26 10:11:24 +01:00
Andreas Longva df1ef991f3 Test SparsityPattern and CSR try_* constructors 2021-01-26 10:11:24 +01:00
Andreas Longva a15e78a6b7 Put COO, CSR, SparsityPattern and related types in their own modules
This mimics how std does it, e.g. std::vec::Vec. This avoids potential
problems down the road, where adding more types might clutter the
API interface and generated documentation.
2021-01-26 10:11:24 +01:00
Andreas Longva 7a5f8ef1ea Redesign error handling for CSR and SparsityPattern construction
SparsityPattern's constructor now returns a fine-grained error
enum that enumerates possible errors. We use this to build a more
user-friendly error when constructing CSR matrices.

We also overhauled the main SparseFormatError error type by
making it a struct containing a *Kind type and an underlying error
that contains the message.
2021-01-26 10:11:24 +01:00
Andreas Longva b0ffd55962 Initial CSR and SparsityPattern impls (WIP) 2021-01-26 10:11:24 +01:00
Andreas Longva 1dbccfeb7c Initial COO implementation 2021-01-26 10:11:24 +01:00