iteration for GFField

This commit is contained in:
kalmarek 2018-09-21 19:10:28 +02:00
parent 37af8ec218
commit 3b1694f851
1 changed files with 15 additions and 0 deletions

View File

@ -434,4 +434,19 @@ function generate_balls(S::Vector{T}, Id::T=one(parent(first(S))); radius=2, op=
return B, sizes
end
########### iteration for GFField
length(F::AbstractAlgebra.GFField) = order(F)
function iterate(F::AbstractAlgebra.GFField, s=0)
if s >= order(F)
return nothing
else
return F(s), s+1
end
end
eltype(::Type{AbstractAlgebra.GFField{I}}) where I = AbstractAlgebra.gfelem{I}
end # of module Groups