Skip to content

Commit 036c9c8

Browse files
committed
some more missing type_reprs
1 parent f498c5c commit 036c9c8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/anyons.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ useful for testing.
1111
"""
1212
struct PlanarTrivial <: Sector end
1313

14+
type_repr(::Type{PlanarTrivial}) = "PlanarTrivial"
15+
1416
Base.IteratorSize(::Type{SectorValues{PlanarTrivial}}) = HasLength()
1517
Base.length(::SectorValues{PlanarTrivial}) = 1
1618
Base.iterate(::SectorValues{PlanarTrivial}, i = 0) = i == 0 ? (PlanarTrivial(), 1) : nothing
@@ -54,6 +56,8 @@ struct FibonacciAnyon <: Sector
5456
end
5557
end
5658

59+
type_repr(::Type{FibonacciAnyon}) = "FibonacciAnyon"
60+
5761
Base.IteratorSize(::Type{SectorValues{FibonacciAnyon}}) = HasLength()
5862
Base.length(::SectorValues{FibonacciAnyon}) = 2
5963
function Base.iterate(::SectorValues{FibonacciAnyon}, i = 0)
@@ -172,6 +176,8 @@ struct IsingAnyon <: Sector
172176
end
173177
end
174178

179+
type_repr(::Type{IsingAnyon}) = "IsingAnyon"
180+
175181
const all_isinganyons = (IsingAnyon(:I), IsingAnyon(), IsingAnyon())
176182

177183
Base.IteratorSize(::Type{SectorValues{IsingAnyon}}) = HasLength()

src/groups.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const SU₂ = SU{2}
7777
type_repr(::Type{ℤ₂}) = "ℤ₂"
7878
type_repr(::Type{ℤ₃}) = "ℤ₃"
7979
type_repr(::Type{ℤ₄}) = "ℤ₄"
80+
type_repr(::Type{ℤ{N}}) where {N} = "ℤ{$N}"
8081
type_repr(::Type{D₃}) = "D₃"
8182
type_repr(::Type{D₄}) = "D₄"
8283
type_repr(::Type{SU₂}) = "SU₂"

0 commit comments

Comments
 (0)