1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-25 18:15:29 +01:00

iteration for GFField

This commit is contained in:
kalmarek 2018-09-21 19:10:28 +02:00
parent 37af8ec218
commit 3b1694f851

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