Skip to content

Commit 92e81ef

Browse files
authored
Improve docstrings of blockrowsupport/blockcolsupport (#275)
1 parent 28a5c27 commit 92e81ef

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

src/blocklinalg.jl

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@ blockrowsupport(_, A, k) = blockaxes(A,2)
22
"""
33
blockrowsupport(A, k)
44
5-
Return an iterator containing the possible non-zero blocks in the k-th block-row of A.
5+
Return an iterator containing the possible non-zero blocks in the `k`-th block-row of `A`.
66
77
# Examples
88
```jldoctest
9-
julia> B = BlockArray(collect(reshape(1:9, 3, 3)), [1,2], [1,2])
10-
2-blocked 3×3 BlockMatrix{Int64}:
11-
1 │ 4 7
12-
───┼──────
13-
2 │ 5 8
14-
3 │ 6 9
9+
julia> B = BlockArray(collect(reshape(1:9, 3, 3)), [1,2], [1,1,1])
10+
3-blocked 3×3 BlockMatrix{Int64}:
11+
1 │ 4 7
12+
───┼─────┼──
13+
2 │ 5 8
14+
3 │ 6 9
1515
1616
julia> BlockArrays.blockrowsupport(B, 2)
17-
2-element BlockRange{1, Tuple{Base.OneTo{Int64}}}:
17+
3-element BlockRange{1, Tuple{Base.OneTo{Int64}}}:
1818
Block(1)
1919
Block(2)
20+
Block(3)
2021
```
2122
"""
2223
blockrowsupport(A, k) = blockrowsupport(MemoryLayout(A), A, k)
@@ -27,16 +28,16 @@ blockcolsupport(_, A, j) = Block.(colsupport(blocks(A), Int.(j)))
2728
"""
2829
blockcolsupport(A, j)
2930
30-
Return an iterator containing the possible non-zero blocks in the j-th block-column of A.
31+
Return an iterator containing the possible non-zero blocks in the `j`-th block-column of `A`.
3132
3233
# Examples
3334
```jldoctest
34-
julia> B = BlockArray(collect(reshape(1:9, 3, 3)), [1,2], [1,2])
35-
2-blocked 3×3 BlockMatrix{Int64}:
36-
1 │ 4 7
37-
───┼──────
38-
2 │ 5 8
39-
3 │ 6 9
35+
julia> B = BlockArray(collect(reshape(1:9, 3, 3)), [1,2], [1,1,1])
36+
3-blocked 3×3 BlockMatrix{Int64}:
37+
1 │ 4 7
38+
───┼─────┼──
39+
2 │ 5 8
40+
3 │ 6 9
4041
4142
julia> BlockArrays.blockcolsupport(B, 2)
4243
2-element BlockRange{1, Tuple{Base.OneTo{Int64}}}:

0 commit comments

Comments
 (0)