-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
assemble into sorted and deduped coo directly
Currently we assemble sparse matrices as unstructured coo with repeated indices and sort and dedup later. The downside of this approach is that we're wasting memory because of the duplicated indices, and if we're assembling a matrix more than once, e.g. for Newton, we always have to sort and dedup, even if the sparse structure doesn't change. This patch changes `Evaluable.assparse` such that the indices are sorted and deduped first, and the values are then inflated using the unique indices.
- Loading branch information
1 parent
3566344
commit 2ae40b8
Showing
1 changed file
with
82 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters