mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 03:40:29 +01:00
Revert "reparametrise parent call overloads"
This reverts commit 4b86d5d075
.
This commit is contained in:
parent
a726462488
commit
962a9e6e73
@ -112,23 +112,23 @@ end
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function {Gr,T}(RG::GroupRing{Gr,T})(S::Type=Int)
|
function (RG::GroupRing)(T::Type=Int)
|
||||||
isdefined(RG, :basis) || throw("Complete the definition of GroupRing first")
|
isdefined(RG, :basis) || throw("Complete the definition of GroupRing first")
|
||||||
return GroupRingElem(spzeros(S,length(RG.basis)), RG)
|
return GroupRingElem(spzeros(T,length(RG.basis)), RG)
|
||||||
end
|
end
|
||||||
|
|
||||||
function {Gr,T}(RG::GroupRing{Gr,T})(g::GroupElem, S::Type=Int)
|
function (RG::GroupRing)(g::GroupElem, T::Type=Int)
|
||||||
g = try
|
g = try
|
||||||
RG.group(g)
|
RG.group(g)
|
||||||
catch
|
catch
|
||||||
throw("Can't coerce $g to the underlying group of $RG")
|
throw("Can't coerce $g to the underlying group of $RG")
|
||||||
end
|
end
|
||||||
result = RG(S)
|
result = RG(T)
|
||||||
result[g] = one(S)
|
result[g] = one(T)
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function {Gr,T}(RG::GroupRing{Gr,T})(x::AbstractVector)
|
function (RG::GroupRing)(x::AbstractVector)
|
||||||
length(x) == length(RG.basis) || throw("Can not coerce to $RG: lengths differ")
|
length(x) == length(RG.basis) || throw("Can not coerce to $RG: lengths differ")
|
||||||
result = RG(eltype(x))
|
result = RG(eltype(x))
|
||||||
result.coeffs = x
|
result.coeffs = x
|
||||||
|
Loading…
Reference in New Issue
Block a user