Skip to content

Commit

Permalink
minor bug fix in sparse matrix notes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiyaok2 committed Oct 31, 2024
1 parent d693952 commit c52fbed
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions notes/sparse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ sort: 10
author:
- CS 357 Course Staff
changelog:
-
name: Kaiyao Ke
netid: kaiyaok2
date: 2024-10-31
message: minor bug fix
-
name: Kriti Chandak
netid: kritic3
Expand Down Expand Up @@ -42,9 +47,9 @@ A \\(m \times n\\) matrix is called sparse if it has <span>\\(O(min(m, n))\\)</s

A sparse matrix aims to store large matrices efficiently without storing many zeros, which allows for more economical computations. It also saves storage space, which can reduce memory overhead on a system.

The number of operations required to add two dense matrices <span>\\(\mathbf{P}\\)</span>, <span>\\(\mathbf{Q}\\)</span> is <span>\\(O(n(\mathbf{P}) \times n(\mathbf{Q}))\\)</span> where <span>\\((n(\mathbf{X}))\\)</span> is the number of elements in <span>\\(\mathbf{X}\\)</span>.
The number of operations required to add two dense matrices <span>\\(\mathbf{P}\\)</span>, <span>\\(\mathbf{Q}\\)</span> is <span>\\(O(n(\mathbf{P}) + n(\mathbf{Q}))\\)</span> where <span>\\((n(\mathbf{X}))\\)</span> is the number of elements in <span>\\(\mathbf{X}\\)</span>.

The number of operations required to add two sparse matrices <span>\\(\mathbf{P}\\)</span>, <span>\\(\mathbf{Q}\\)</span> is <span>\\(O(nnz(\mathbf{P}) \times nnz(\mathbf{Q}))\\)</span> where <span>\\((nnz(\mathbf{X}))\\)</span> is the number of non-zero elements in <span>\\(\mathbf{X}\\)</span>.
The number of operations required to add two sparse matrices <span>\\(\mathbf{P}\\)</span>, <span>\\(\mathbf{Q}\\)</span> is <span>\\(O(nnz(\mathbf{P}) + nnz(\mathbf{Q}))\\)</span> where <span>\\((nnz(\mathbf{X}))\\)</span> is the number of non-zero elements in <span>\\(\mathbf{X}\\)</span>.

## Storage Solutions

Expand Down

0 comments on commit c52fbed

Please sign in to comment.