Skip to content

Commit

Permalink
Allow more coefficients in linear_combination (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoongNoonien authored Jan 17, 2025
1 parent 72c5311 commit 1affccb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/GenericCharacter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function omega(char::SimpleGenericCharacter{T}) where {T<:NfPoly}
end

@doc raw"""
linear_combination(coeffs::Vector{Int64}, chars::Vector{<:GenericCharacter})
linear_combination(coeffs::Vector{<:RingElement}, chars::Vector{<:GenericCharacter})
Return the linear combination of the character types `chars` with coefficients `coeffs`.
Expand All @@ -189,7 +189,7 @@ Generic character of GL2
(-1)*exp(2π𝑖((i*kl2)//(q - 1))) + (5)*exp(2π𝑖((i*kl1)//(q - 1)))
```
"""
function linear_combination(coeffs::Vector{Int64}, chars::Vector{<:GenericCharacter})
function linear_combination(coeffs::Vector{<:RingElement}, chars::Vector{<:GenericCharacter})
length(coeffs) == length(chars) ||
error("Different number of coefficients and character types.")
n = length(coeffs)
Expand Down Expand Up @@ -242,7 +242,7 @@ function linear_combination(coeffs::Vector{Int64}, chars::Vector{<:GenericCharac
end

@doc raw"""
linear_combination(coeffs::Vector{Int64}, chars::Vector{SimpleGenericCharacter{T}}) where T <: NfPoly
linear_combination(coeffs::Vector{<:RingElement}, chars::Vector{SimpleGenericCharacter{T}}) where T <: NfPoly
Return the linear combination of the character types `chars` with coefficients `coeffs`.
Expand All @@ -260,7 +260,7 @@ Generic character of GL3
```
"""
function linear_combination(
coeffs::Vector{Int64}, chars::Vector{SimpleGenericCharacter{T}}
coeffs::Vector{<:RingElement}, chars::Vector{SimpleGenericCharacter{T}}
) where {T<:NfPoly}
length(coeffs) == length(chars) ||
error("Different number of coefficients and character types.")
Expand Down

0 comments on commit 1affccb

Please sign in to comment.