mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 14:35:28 +01:00
pretty printing for automorphisms
This commit is contained in:
parent
b191457526
commit
939d231bbe
@ -84,6 +84,16 @@ Base.show(io::IO, ::Type{<:AbstractFPGroupElement{<:AutomorphismGroup{T}}}) wher
|
|||||||
|
|
||||||
Base.show(io::IO, A::AutomorphismGroup) = print(io, "automorphism group of ", object(A))
|
Base.show(io::IO, A::AutomorphismGroup) = print(io, "automorphism group of ", object(A))
|
||||||
|
|
||||||
|
function Base.show(io::IO, ::MIME"text/plain", a::AbstractFPGroupElement{<:AutomorphismGroup})
|
||||||
|
println(io, " ┌ $(a):")
|
||||||
|
d = domain(a)
|
||||||
|
im = evaluate(a)
|
||||||
|
for (x, imx) in zip(d, im[1:end-1])
|
||||||
|
println(io, " │ $x ↦ $imx")
|
||||||
|
end
|
||||||
|
println(io, " └ $(last(d)) ↦ $(last(im))")
|
||||||
|
end
|
||||||
|
|
||||||
## Automorphism Evaluation
|
## Automorphism Evaluation
|
||||||
|
|
||||||
domain(f::AbstractFPGroupElement{<:AutomorphismGroup}) = deepcopy(parent(f).domain)
|
domain(f::AbstractFPGroupElement{<:AutomorphismGroup}) = deepcopy(parent(f).domain)
|
||||||
|
Loading…
Reference in New Issue
Block a user