@@ -318,18 +318,13 @@ end
318
318
end
319
319
320
320
# # structured matrix methods ##
321
- function _bandedblockbanded_replace_in_print_matrix (A , i, j, s)
321
+ function Base . replace_in_print_matrix (A :: BandedBlockBandedMatrix , i:: Integer , j:: Integer , s:: AbstractString )
322
322
bi = findblockindex .(axes (A), (i,j))
323
323
I,J = block .(bi)
324
324
i,j = blockindex .(bi)
325
- l,u = blockbandwidths (A)
326
- λ,μ = subblockbandwidths (A)
327
- - l ≤ Int (J- I) ≤ u && - λ ≤ j- i ≤ μ ? s : Base. replace_with_centered_mark (s)
325
+ - A. l ≤ Int (J- I) ≤ A. u && - A. λ ≤ j- i ≤ A. μ ? s : Base. replace_with_centered_mark (s)
328
326
end
329
327
330
- Base. replace_in_print_matrix (A:: BandedBlockBandedMatrix , i:: Integer , j:: Integer , s:: AbstractString ) =
331
- _bandedblockbanded_replace_in_print_matrix (A, i, j, s)
332
-
333
328
334
329
# ###########
335
330
# Indexing #
@@ -418,43 +413,32 @@ sublayout(::BandedBlockBandedColumnMajor, ::Type{<:Tuple{BlockSlice{Block1},Bloc
418
413
sublayout (:: BandedBlockBandedColumnMajor , :: Type{<:Tuple{BlockSlice{BlockRange1},BlockSlice{Block1}}} ) = BandedBlockBandedColumnMajor ()
419
414
sublayout (:: BandedBlockBandedColumnMajor , :: Type{<:Tuple{BlockSlice{BlockRange1},BlockSlice{BlockIndexRange1}}} ) = BandedBlockBandedColumnMajor ()
420
415
421
- sublayout (:: AbstractBandedBlockBandedLayout , :: Type{<:Tuple{BlockSlice{Block1},BlockSlice{Block1}}} ) = BandedLayout ()
422
- sublayout (:: AbstractBandedBlockBandedLayout , :: Type{<:Tuple{BlockSlice{BlockIndexRange1},BlockSlice{BlockIndexRange1}}} ) = BandedLayout ()
423
- sublayout (:: AbstractBandedBlockBandedLayout , :: Type{<:Tuple{BlockSlice{BlockIndexRange1},BlockSlice{Block1}}} ) = BandedLayout ()
424
- sublayout (:: AbstractBandedBlockBandedLayout , :: Type{<:Tuple{BlockSlice{Block1},BlockSlice{BlockIndexRange1}}} ) = BandedLayout ()
425
- sublayout (:: AbstractBandedBlockBandedLayout , :: Type{<:Tuple{BlockSlice{BlockRange1},BlockSlice{BlockRange1}}} ) = BandedBlockBandedLayout ()
426
- sublayout (:: AbstractBandedBlockBandedLayout , :: Type{<:Tuple{BlockSlice{Block1},BlockSlice{BlockRange1}}} ) = BandedBlockBandedLayout ()
427
- sublayout (:: AbstractBandedBlockBandedLayout , :: Type{<:Tuple{BlockSlice{BlockRange1},BlockSlice{Block1}}} ) = BandedBlockBandedLayout ()
428
- sublayout (:: AbstractBandedBlockBandedLayout , :: Type{<:Tuple{BlockSlice{BlockRange1},BlockSlice{BlockIndexRange1}}} ) = BandedBlockBandedLayout ()
429
-
430
-
431
- sub_materialize (:: AbstractBandedBlockBandedLayout , V, _) = BandedBlockBandedMatrix (V)
432
-
433
416
isbanded (A:: SubArray{<:Any,2,<:BandedBlockBandedMatrix} ) = MemoryLayout (typeof (A)) == BandedColumnMajor ()
434
417
isbandedblockbanded (A:: SubArray{<:Any,2,<:BandedBlockBandedMatrix} ) = MemoryLayout (typeof (A)) == BandedBlockBandedColumnMajor ()
435
418
436
419
437
- subblockbandwidths (V:: SubArray{<:Any,2,<:Any,<:Tuple{<:BlockSlice{BlockRange1},<:BlockSlice{BlockRange1}}} ) =
438
- subblockbandwidths (parent (V))
420
+ subblockbandwidths (V:: SubBandedBlockBandedMatrix ) = subblockbandwidths (parent (V))
439
421
440
- function blockbandwidths (V:: SubArray {<:Any,2,<:Any,<:Tuple{<:BlockSlice{ BlockRange1},<:BlockSlice{ Block1}} } )
422
+ function blockbandwidths (V:: SubBandedBlockBandedMatrix {<:Any,BlockRange1, Block1} )
441
423
A = parent (V)
424
+
442
425
KR = parentindices (V)[1 ]. block. indices[1 ]
443
426
J = parentindices (V)[2 ]. block
444
427
shift = Int (KR[1 ])- Int (J)
445
428
blockbandwidth (A,1 ) - shift, blockbandwidth (A,2 ) + shift
446
429
end
447
430
448
- function blockbandwidths (V:: SubArray {<:Any,2,<:Any,<:Tuple{<:BlockSlice{<: Block1},<:BlockSlice{<: BlockRange1}} } )
431
+ function blockbandwidths (V:: SubBandedBlockBandedMatrix {<:Any,Block1, BlockRange1} )
449
432
A = parent (V)
433
+
450
434
K = parentindices (V)[1 ]. block
451
435
JR = parentindices (V)[2 ]. block. indices[1 ]
452
436
shift = Int (K)- Int (JR[1 ])
453
- l,u = blockbandwidths (A)
454
- l - shift, u + shift
437
+
438
+ blockbandwidth (A, 1 ) - shift, blockbandwidth (A, 2 ) + shift
455
439
end
456
440
457
- function blockbandwidths (V:: SubArray {<:Any,2,<:Any,<:Tuple{<:BlockSlice{<: BlockRange1},<:BlockSlice{<: BlockRange1}} } )
441
+ function blockbandwidths (V:: SubBandedBlockBandedMatrix {<:Any,BlockRange1, BlockRange1} )
458
442
A = parent (V)
459
443
460
444
KR = parentindices (V)[1 ]. block. indices[1 ]
0 commit comments