-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
We have specialized display of sparse matrices, but it isn't used when the matrix is wrapped in Hermitian:
For example, this looks nice:
julia> S = sprand(1000,1000,0.0001); S = S + S' + I
1000×1000 SparseMatrixCSC{Float64, Int64} with 1182 stored entries:
⎡⠱⢆⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠠⠀⠀⠀⠀⠠⠐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⎤
⎢⠈⠀⠑⢄⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠰⠀⠀⠀⠀⠠⠀⠀⠀⎥
⎢⠀⠀⠀⠀⠑⢄⠀⠀⠀⠀⠈⠀⠄⠀⠠⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠈⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⠑⢄⠀⠀⠀⠂⠀⠀⠁⢂⠀⡔⠈⠀⠀⠀⠀⠀⠠⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠤⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠀⠕⢅⢀⠀⠀⢐⠀⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⢀⠀⎥
⎢⠀⠀⠄⠀⠂⠀⠠⠀⠀⠐⠑⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⢀⠀⠀⡀⠀⎥
⎢⠀⠀⠀⠀⠀⠁⠀⠀⢀⢀⠀⠀⠑⢄⠄⠀⠀⠀⢀⠀⠠⠂⠀⠀⠀⠀⠀⠁⠀⠂⠠⠀⠀⠀⠀⢀⠄⠈⠀⠀⎥
⎢⣀⠀⠀⠀⡀⠂⠡⢀⠀⡀⠀⠀⠀⠁⠑⢄⠐⠀⠀⠀⠀⠀⠀⠀⢀⠀⠂⠀⠀⠈⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⢀⠤⠀⠀⠀⠀⠀⠀⠐⠀⠑⢄⢄⠀⠀⠀⡂⠀⠀⢀⠀⢀⠀⠀⠀⠀⠀⠀⡀⠀⠠⠀⠀⠀⎥
⎢⠀⠂⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠑⠑⢄⠀⠀⠀⠀⠀⠀⠠⠀⠀⠀⡀⠄⠀⠠⠀⠀⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠠⠂⠀⠀⠀⠀⠀⠀⠑⢄⠈⠀⠠⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⎥
⎢⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠈⠀⠀⠂⠀⠑⢄⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⎥
⎢⠐⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠐⠀⠀⠀⠐⠀⢀⠀⠀⠀⠂⠀⠀⡑⢌⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠈⠀⠀⢀⠀⠂⠠⠀⠀⠀⠀⠀⠑⢄⠀⠀⠀⠀⠀⠁⠈⠠⠀⠈⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠠⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠀⠂⠀⠀⠀⠀⠀⠀⡀⠀⎥
⎢⠀⠀⢂⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠌⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠛⢄⠀⠄⠀⠀⠀⠀⠀⡄⎥
⎢⠀⠀⠀⠀⠠⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠁⠀⠀⠄⠀⠀⠀⠀⠄⠑⢄⠄⠠⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⢀⠀⠄⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠂⡀⠀⠀⠀⠀⠀⡁⠑⢄⠀⠀⠀⠀⎥
⎢⠀⠀⠀⠂⡀⠀⠀⠀⠠⠀⠀⠀⡀⠁⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠂⠀⎥
⎣⠀⢀⠀⠀⠀⠀⠀⡄⠀⠐⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠤⠀⠀⠀⠀⠈⠀⠑⢄⎦
but Hermitian(S) falls back to the generic AbstractMatrix display, which is much less useful:
julia> show(IOContext(stdout, :limit=>true, :displaysize=>(20,80)), "text/plain", Hermitian(S))
1000×1000 Hermitian{Float64, SparseMatrixCSC{Float64, Int64}}:
1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ … ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ … ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋮ ⋮ ⋱ ⋮
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ … ⋅ ⋅ 1.0 ⋅ ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅ ⋅
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1.0 ⋅
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1.0Metadata
Metadata
Assignees
Labels
No labels