1
0
mirror of https://github.com/kalmarek/SmallHyperbolic synced 2024-07-27 21:10:31 +02:00

add type to TriangleGrp

This commit is contained in:
Marek Kaluba 2022-01-18 02:17:19 +01:00
parent 9319fb2186
commit adda6845b5
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -1,4 +1,5 @@
struct TriangleGrp struct TriangleGrp
type::NTuple{3,Int}
generators::Vector{String} generators::Vector{String}
relations::Vector{String} relations::Vector{String}
order1::Int order1::Int
@ -21,9 +22,9 @@ _name(G) = "G_$(G.order1)_$(G.order2)_$(G.order3)_$(G.index)"
name(G::TriangleGrp) = _name(G) name(G::TriangleGrp) = _name(G)
grp_name(nt::NamedTuple) = _name(nt) grp_name(nt::NamedTuple) = _name(nt)
latex_name(G::TriangleGrp) ="\$G^{$(G.order1),$(G.order2),$(G.order3)}_$(G.index)" latex_name(G::TriangleGrp) = "\$G^{$(G.order1),$(G.order2),$(G.order3)}_$(G.index)"
function TriangleGrp(generators, relations, nt::NamedTuple) function TriangleGrp(type::NTuple{3,Int}, generators, relations, nt::NamedTuple)
# @assert fieldnames(SmallHyperbolicGrp) == propertynames(nt) # @assert fieldnames(SmallHyperbolicGrp) == propertynames(nt)
hyperbolic, witness = if hasproperty(nt, :hyperbolic) hyperbolic, witness = if hasproperty(nt, :hyperbolic)
h = _tf_missing(nt.hyperbolic) h = _tf_missing(nt.hyperbolic)
@ -37,6 +38,7 @@ function TriangleGrp(generators, relations, nt::NamedTuple)
end end
TriangleGrp( TriangleGrp(
type,
convert(Vector{String}, generators), convert(Vector{String}, generators),
convert(Vector{String}, relations), convert(Vector{String}, relations),
convert(Int, nt.order1), convert(Int, nt.order1),