mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-10-08 22:25:34 +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
|
||||||
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,
|
show{T}(io::IO, X::GroupAlgebraElement{T}) = print(io,
|
||||||
"Element of Group Algebra over $T of length $(length(X)):\n $(X.coefficients)")
|
"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
|
end
|
||||||
|
|
||||||
(==)(X::GroupAlgebraElement, Y::GroupAlgebraElement) = isequal(X,Y)
|
(==)(X::GroupAlgebraElement, Y::GroupAlgebraElement) = isequal(X,Y)
|
||||||
|
Loading…
Reference in New Issue
Block a user