mirror of
https://github.com/kalmarek/SmallHyperbolic
synced 2024-11-23 15:35:27 +01:00
add type to TriangleGrp
This commit is contained in:
parent
9319fb2186
commit
adda6845b5
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user