mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
trivial updates to show, ==
This commit is contained in:
parent
610defe354
commit
ca23485b5e
@ -122,12 +122,11 @@ eye(G::DirectProductGroup) = G()
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function show(io::IO, G::DirectProductGroup)
|
function show(io::IO, G::DirectProductGroup)
|
||||||
println(io, "Direct product of groups")
|
println(io, "$(G.n)-fold direct product of $(G.group)")
|
||||||
join(io, G.factors, ", ", " and ")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function show(io::IO, g::DirectProductGroupElem)
|
function show(io::IO, g::DirectProductGroupElem)
|
||||||
print(io, "("*join(g.elts,",")*")")
|
print(io, "($(join(g.elts,",")))")
|
||||||
end
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -136,15 +135,19 @@ end
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
doc"""
|
||||||
|
==(g::DirectProductGroup, h::DirectProductGroup)
|
||||||
|
> Checks if two direct product groups are the same.
|
||||||
|
"""
|
||||||
function (==)(G::DirectProductGroup, H::DirectProductGroup)
|
function (==)(G::DirectProductGroup, H::DirectProductGroup)
|
||||||
G.factors == H.factors || return false
|
G.group == H.group || return false
|
||||||
|
G.n == G.n || return false
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
doc"""
|
doc"""
|
||||||
==(g::DirectProductGroupElem, h::DirectProductGroupElem)
|
==(g::DirectProductGroupElem, h::DirectProductGroupElem)
|
||||||
> Return `true` if the given elements of direct products are equal, otherwise return `false`.
|
> Checks if two direct product group elements are the same.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
function (==)(g::DirectProductGroupElem, h::DirectProductGroupElem)
|
function (==)(g::DirectProductGroupElem, h::DirectProductGroupElem)
|
||||||
parent(g) == parent(h) || return false
|
parent(g) == parent(h) || return false
|
||||||
|
Loading…
Reference in New Issue
Block a user