Commit Graph

27 Commits

Author SHA1 Message Date
Andreas Longva 31c911d4fb Change proptest strategies to use DimRange 2021-01-26 10:11:24 +01:00
Andreas Longva 3eab45d81b Replace spmm_pattern with spmm_{csr/csc}_pattern 2021-01-26 10:11:24 +01:00
Andreas Longva e655fed4fa Replace Arc<SparsityPattern> with SparsityPattern
After much deliberation, I have come to the conclusion that the
benefits do not really outweigh the added complexity. Even though
the added complexity is relatively minor, it makes it somewhat
more complicated to inter-op with other sparse linear algebra
libraries in the future.
2021-01-26 10:11:24 +01:00
Andreas Longva 3b1303d1e0 Implement lower/upper triangular solve for CSC matrices 2021-01-26 10:11:24 +01:00
Andreas Longva 885480a634 Implement CSR/CSC * Dense std operations 2021-01-26 10:11:24 +01:00
Andreas Longva b7a7f967b8 Implement Neg, Div, DivAssign for Csr/CscMatrix 2021-01-26 10:11:24 +01:00
Andreas Longva 0b4356eb0e Implement Sub for Csr/CscMatrix 2021-01-26 10:11:24 +01:00
Andreas Longva 7aeb663165 Implement matrix-scalar multiplication 2021-01-26 10:11:24 +01:00
Andreas Longva dbdf5567fc Implement arithmetic operations for CSC matrices 2021-01-26 10:11:24 +01:00
Andreas Longva 66cbd26702 Add prealloc suffix to spmm_csr and spadd_csr
The suffix is intended to communicate that these methods
assume `preallocated` storage, i.e. they try to store the
result in a matrix which already has the correct sparsity
pattern for the operation.
2021-01-26 10:11:24 +01:00
Andreas Longva 4af3fcbdd3 Reorder parameters in ops to intuitive order 2021-01-26 10:11:24 +01:00
Andreas Longva fe8592fde1 Refactor ops to use new Op type instead of separate Transpose flag 2021-01-26 10:11:24 +01:00
Andreas Longva c6a8fcdee2 Simplify spadd_pattern API and name 2021-01-26 10:11:24 +01:00
Andreas Longva b25848838b Implement CSR-CSR matrix multiplication 2021-01-26 10:11:24 +01:00
Andreas Longva d9cfe5cb3e Improve dimension assertions for spadd_csr 2021-01-26 10:11:24 +01:00
Andreas Longva 2d534a6133 Implement spmm_csr 2021-01-26 10:11:24 +01:00
Andreas Longva 9db17f00e7 Implement spmm_pattern 2021-01-26 10:11:24 +01:00
Andreas Longva c4285d9fb3 remove spmv_coo 2021-01-26 10:11:24 +01:00
Andreas Longva 41941e62c8 Implement CSR-CSR addition 2021-01-26 10:11:24 +01:00
Andreas Longva 830df6d07b Implement Csr/CscMatrix::transpose() 2021-01-26 10:11:24 +01:00
Andreas Longva 8b7b836a37 Make CsrMatrix/CscMatrix::pattern() return reference 2021-01-26 10:11:24 +01:00
Andreas Longva 4420237ede Implement spadd_build_pattern 2021-01-26 10:11:24 +01:00
Andreas Longva 7c68950614 Simplify transposition API in spmm_csr_dense 2021-01-26 10:11:24 +01:00
Andreas Longva 1ae03d9ebb Implement spmm_csr_dense 2021-01-26 10:11:24 +01:00
Andreas Longva 41ce9a23df Remove CooMatrix::to_dense() and `Scalar` trait bound, add ::nnz() 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 1dbccfeb7c Initial COO implementation 2021-01-26 10:11:24 +01:00