mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 03:40:29 +01:00
add supp, rename augmentation -> aug
This commit is contained in:
parent
9f6b7f4236
commit
2318128f6d
@ -66,7 +66,7 @@ mutable struct GroupRingElem{T, A<:AbstractVector, GR<:GroupRing} <: RingElem
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
export GroupRing, GroupRingElem, complete!, create_pm, star
|
export GroupRing, GroupRingElem, complete!, create_pm, star, aug, supp
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
@ -509,7 +509,9 @@ length(X::GroupRingElem) = countnz(X.coeffs)
|
|||||||
|
|
||||||
norm(X::GroupRingElem, p=2) = norm(X.coeffs, p)
|
norm(X::GroupRingElem, p=2) = norm(X.coeffs, p)
|
||||||
|
|
||||||
augmentation(X::GroupRingElem) = sum(X.coeffs)
|
aug(X::GroupRingElem) = sum(X.coeffs)
|
||||||
|
|
||||||
|
supp(X::GroupRingElem) = parent(X).basis[findn(X.coeffs)]
|
||||||
|
|
||||||
function rationalize{T<:Integer, S<:Integer}(::Type{T}, X::GroupRingElem{S})
|
function rationalize{T<:Integer, S<:Integer}(::Type{T}, X::GroupRingElem{S})
|
||||||
return convert(Rational{T}, X)
|
return convert(Rational{T}, X)
|
||||||
|
Loading…
Reference in New Issue
Block a user