Skip to content

Commit 2d03c65

Browse files
committed
Fix debug printing
1 parent 64a7cc8 commit 2d03c65

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/debug.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ function Base.getindex(bgpm::SystemStructurePrintMatrix, i::Integer, j::Integer)
7373
end
7474
end
7575

76+
struct IncidenceMarker <: Number
77+
active::Bool
78+
end
79+
Base.show(io::IO, inc::IncidenceMarker) = print(io, inc.active ? "x" : " ")
80+
7681
function Base.show(io::IO, mime::MIME"text/plain", s::SystemStructure)
7782
@unpack graph, solvable_graph, var_to_diff, eq_to_diff = s
7883
if !get(io, :limit, true) || !get(io, :mtk_limit, true)
@@ -81,7 +86,7 @@ function Base.show(io::IO, mime::MIME"text/plain", s::SystemStructure)
8186
" variables\n")
8287
Base.print_matrix(io, SystemStructurePrintMatrix(s))
8388
else
84-
S = incidence_matrix(s.graph, Num(Sym{Real}(:×)))
89+
S = incidence_matrix(s.graph, IncidenceMarker(true))
8590
print(io, "Incidence matrix:")
8691
show(io, mime, S)
8792
end

0 commit comments

Comments
 (0)