Skip to content

Commit 7f346dc

Browse files
committed
Pretty show in v0.7
1 parent dbb53e3 commit 7f346dc

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/BandedBlockBandedMatrix.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,15 @@ end
267267
return v
268268
end
269269

270+
## structured matrix methods ##
271+
if VERSION  v"0.7-"
272+
function Base.replace_in_print_matrix(A::BandedBlockBandedMatrix, i::Integer, j::Integer, s::AbstractString)
273+
bi = global2blockindex(A.block_sizes, (i, j))
274+
I,J = bi.I
275+
i,j = bi.α
276+
-A.l J-I  A.u && -A.λ j-i A.μ ? s : Base.replace_with_centered_mark(s)
277+
end
278+
end
270279

271280

272281
######

src/BlockBandedMatrix.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@ end
230230
return v
231231
end
232232

233+
## structured matrix methods ##
234+
if VERSION  v"0.7-"
235+
function Base.replace_in_print_matrix(A::BlockBandedMatrix, i::Integer, j::Integer, s::AbstractString)
236+
bi = global2blockindex(A.block_sizes, (i, j))
237+
I,J = bi.I
238+
-A.l J-I  A.u ? s : Base.replace_with_centered_mark(s)
239+
end
240+
end
241+
233242
############
234243
# Indexing #
235244
############

0 commit comments

Comments
 (0)