Commit Graph

11 Commits

Author SHA1 Message Date
Andreas Longva df1ef991f3 Test SparsityPattern and CSR try_* constructors 2021-01-26 10:11:24 +01:00
Andreas Longva d98f2d2ad7 sparse-nalgebra: Update nalgebra version 2021-01-26 10:11:24 +01:00
Andreas Longva ff435110b9 Implement CSR::disassemble and SparsityPattern::disassemble 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 7e94a1539a Add an (incomplete) overview of planned functionality for nalgebra-sparse
The way it is currently written is temporary, but it helps structure
the work towards an initial MVP.
2021-01-26 10:11:24 +01:00
Andreas Longva b1199da206 Verify data validity in try_* constructors
We can easily create the CSR and CSC constructors by using the
SparsityPattern constructors. However, one lingering problem
is giving meaningful error messages. When forwarding error messages
from the SparsityPattern constructor, the error messages must
be written in terms of "major" or "minor" dimensions, and using
general terms like "lanes", instead of "rows" and "columns".
When forwarding these messages up to CSR or CSC constructors,
they are not directly meaningful to an end user. We should find
a better solution to this problem, so that end users get
more meaningful messages.
2021-01-26 10:11:24 +01:00
Andreas Longva 7f5b702a49 CSR row access and iterators 2021-01-26 10:11:24 +01:00
Andreas Longva 41425ae52c Use inline instead of inline(always) 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