Skip to content

Commit 847c762

Browse files
committed
pretty print BimoduleSector
1 parent a86643b commit 847c762

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/bimodulesector.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ end
1212
BimoduleSector{Name}(data::NTuple{3,Int}) where {Name} = BimoduleSector{Name}(data...)
1313
const A4Object = BimoduleSector{:A4}
1414

15+
Base.convert(::Type{<:BimoduleSector{Name}}, labels::NTuple{3,Int}) where {Name} = BimoduleSector{Name}(labels...)
16+
17+
function Base.show(io::IO, a::BimoduleSector{Name}) where {Name}
18+
if get(io, :typeinfo, nothing) === typeof(a)
19+
print(io, (a.i, a.j, a.label))
20+
else
21+
print(io, typeof(a), (a.i, a.j, a.label))
22+
end
23+
return nothing
24+
end
25+
1526
# Utility implementations
1627
# -----------------------
1728
function Base.isless(a::I, b::I) where {I<:BimoduleSector}

0 commit comments

Comments
 (0)