1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-25 18:15:29 +01:00

fix warnings with ^(..., n::Integer)

This commit is contained in:
kalmarek 2018-09-21 18:47:02 +02:00
parent b5af5fc9b5
commit 68763ca37b
2 changed files with 5 additions and 1 deletions

View File

@ -271,7 +271,7 @@ end
> Return the direct-product group operation of elements, i.e. component-wise
> operation as defined by `operations` field of the parent object.
"""
function *(g::DirectProductGroupElem{T}, h::DirectProductGroupElem{T}, check::Bool=true) where {T}
function *(g::DirectProductGroupElem, h::DirectProductGroupElem, check::Bool=true)
if check
parent(g) == parent(h) || throw(DomainError(
"Can not multiply elements of different groups!"))
@ -279,6 +279,8 @@ function *(g::DirectProductGroupElem{T}, h::DirectProductGroupElem{T}, check::Bo
return DirectProductGroupElem([a*b for (a,b) in zip(g.elts,h.elts)])
end
^(g::DirectProductGroupElem, n::Integer) = Base.power_by_squaring(g, n)
@doc doc"""
inv(g::DirectProductGroupElem)
> Return the inverse of the given element in the direct product group.

View File

@ -182,6 +182,8 @@ function *(g::WreathProductElem, h::WreathProductElem)
return WreathProductElem(g.n*g.p(h.n), g.p*h.p, false)
end
^(g::WreathProductElem, n::Integer) = Base.power_by_squaring(g, n)
@doc doc"""
inv(g::WreathProductElem)
> Returns the inverse of element of a wreath product, according to the formula