You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code comes from the abandoned oscar-system/Oscar.jl#4334, and can be used to convert a GroupAlgebraElem (with sparse rep!) to a Dict{Group, elem_type(base_ring_type(...)) using Dict(x). I put this here in case someone wants to extend it for the dense rep and put it in the src.
function Base.length(x::GroupAlgebraElem)
@assert Hecke._is_sparse(x)
returnlength(x.coeffs_sparse)
endfunction Base.iterate(x::GroupAlgebraElem)
@assert Hecke._is_sparse(x)
next =iterate(x.coeffs_sparse)
isnothing(next) &&returnnothing
(i, c), st = next
return (parent(x).base_to_group[i], c), st
endfunction Base.iterate(x::GroupAlgebraElem, st)
@assert Hecke._is_sparse(x)
next =iterate(x.coeffs_sparse, st)
isnothing(next) &&returnnothing
(i, c), st = next
return (parent(x).base_to_group[i], c), st
end
The text was updated successfully, but these errors were encountered:
The following code comes from the abandoned oscar-system/Oscar.jl#4334, and can be used to convert a
GroupAlgebraElem
(with sparse rep!) to aDict{Group, elem_type(base_ring_type(...))
usingDict(x)
. I put this here in case someone wants to extend it for the dense rep and put it in the src.The text was updated successfully, but these errors were encountered: