mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-09-05 14:46:44 +02:00
basic constructors of GroupRingElem
This commit is contained in:
parent
02eff23d17
commit
03de314479
@ -27,16 +27,16 @@ type GroupRingElem{T<:Number}
|
||||
end
|
||||
end
|
||||
|
||||
# GroupAlgebraElement(c,pm,b) = GroupAlgebraElement(c,pm)
|
||||
GroupAlgebraElement{T}(c::AbstractVector{T},pm) = GroupAlgebraElement{T}(c,pm)
|
||||
|
||||
convert{T<:Number}(::Type{T}, X::GroupAlgebraElement) =
|
||||
GroupAlgebraElement(convert(AbstractVector{T}, X.coefficients), X.product_matrix)
|
||||
|
||||
show{T}(io::IO, X::GroupAlgebraElement{T}) = print(io,
|
||||
"Element of Group Algebra over $T of length $(length(X)):\n $(X.coefficients)")
|
||||
|
||||
|
||||
GroupRingElem{T}(c::AbstractVector{T}, A::GroupRing) = GroupRingElem{T}(c,A)
|
||||
|
||||
convert{T<:Number}(::Type{T}, X::GroupRingElem) =
|
||||
GroupRingElem(parent(X), convert(AbstractVector{T}, X.coeffs))
|
||||
end
|
||||
|
||||
(==)(X::GroupAlgebraElement, Y::GroupAlgebraElement) = isequal(X,Y)
|
||||
|
Loading…
Reference in New Issue
Block a user