1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-07-12 01:35:30 +02:00

move deletion of identities into free_reduce

This commit is contained in:
kalmar 2017-05-11 17:52:14 +02:00
parent 12cf72b476
commit 6ae234cabb

View File

@ -52,6 +52,7 @@ function free_reduce!(W::GWord)
W.symbols[i] = one(W.symbols[i])
end
end
deleteat!(W.symbols, find(x -> x.pow == 0, W.symbols))
return reduced
end
@ -62,7 +63,6 @@ function reduce!{T}(W::GWord{T})
reduced = false
while !reduced
reduced = free_reduce!(W)
deleteat!(W.symbols, find(x -> x.pow == 0, W.symbols))
end
end