Skip to content

Commit f5c5f96

Browse files
authored
Merge pull request #129 from stan-dev/bugfix/csr-to-dense-matrix
Fix description of arguments of csr_to_dense_matrix
2 parents 39bf5b6 + 2ca012a commit f5c5f96

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/functions-reference/sparse_matrix_operations.Rmd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,12 @@ a single function.
9494
`matrix` **`csr_to_dense_matrix`**`(int m, int n, vector w, int[] v, int[] u)`<br>\newline
9595
Return dense $\text{m} \times \text{n}$ matrix with non-zero matrix
9696
entries w, column indices v, and row starting indices u; the vector w
97-
and arrays v and u must all be the same size, and the arrays v and u
98-
must have index values bounded by m and n. see section [compressed row storage](#CSR) for
99-
more details.
97+
and array v must be the same size (corresponding to the total number of
98+
nonzero entries in the matrix), array v must have index values bounded
99+
by m, array u must have length equal to m + 1 and contain index values
100+
bounded by the number of nonzeros (except for the last entry, which must
101+
be equal to the number of nonzeros plus one). See section
102+
[compressed row storage](#CSR) for more details.
100103

101104
## Sparse Matrix Arithmetic
102105

@@ -116,4 +119,3 @@ rather than $A$ as a sparse matrix.
116119
Multiply the $\text{m} \times \text{n}$ matrix represented by values
117120
w, column indices v, and row start indices u by the vector b; see
118121
[compressed row storage](#CSR).
119-

0 commit comments

Comments
 (0)