add convenience method for direct product
This commit is contained in:
parent
765f9841cf
commit
4fcdd30bf9
|
@ -100,3 +100,7 @@ Base.show(io::IO, G::DirectProduct) =
|
||||||
print(io, "Direct product of $(G.first) and $(G.last)")
|
print(io, "Direct product of $(G.first) and $(G.last)")
|
||||||
Base.show(io::IO, g::DirectProductElement) =
|
Base.show(io::IO, g::DirectProductElement) =
|
||||||
print(io, "( $(join(g.elts, ",")) )")
|
print(io, "( $(join(g.elts, ",")) )")
|
||||||
|
|
||||||
|
# Convenience methods
|
||||||
|
Base.first(g::DirectProductElement) = first(g.elts)
|
||||||
|
Base.last(g::DirectProductElement) = last(g.elts)
|
||||||
|
|
Loading…
Reference in New Issue