Skip to content

Commit c8a79eb

Browse files
committed
Add example
1 parent d3d3144 commit c8a79eb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/generic.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,24 @@ function _isbanded_impl(A, kl, ku)
14931493
beyond ku, where the elements should all be zero. The reason we separate this from the
14941494
third group is that we may loop over all the rows using A[:, col] instead of A[rowrange, col],
14951495
which is usually faster.
1496+
1497+
E.g., in the following 6x10 matrix with (kl,ku) = (-1,1):
1498+
1 1 0 0 0 0 0 0 0 0
1499+
1 2 2 0 0 0 0 0 0 0
1500+
0 2 3 3 0 0 0 0 0 0
1501+
0 0 3 4 4 0 0 0 0 0
1502+
0 0 0 4 5 5 0 0 0 0
1503+
0 0 0 0 5 6 6 0 0 0
1504+
1505+
last_col_nonzeroblocks: 7, as every column beyond this is entirely zero
1506+
last_col_emptytoprows: 2, as there are zeros above the stored bands beyond this column
1507+
last_col_nonemptybottomrows: 4, as there are no zeros below the stored bands beyond this column
1508+
colrange_onlybottomrows: 1:2, as these columns only have zeros below the stored bands
1509+
colrange_topbottomrows: 3:4, as these columns have zeros both above and below the stored bands
1510+
colrange_onlytoprows_nonzero: 5:7, as these columns only have zeros above the stored bands
1511+
colrange_zero_block: 8:10, as every column in this range is filled with zeros
1512+
1513+
These are used to determine which rows to check for zeros in each column.
14961514
=#
14971515

14981516
last_col_nonzeroblocks = size(A,1) + ku # fully zero rectangular block beyond this column

0 commit comments

Comments
 (0)