mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 14:35:28 +01:00
move deletion of identities into free_reduce
This commit is contained in:
parent
12cf72b476
commit
6ae234cabb
@ -52,6 +52,7 @@ function free_reduce!(W::GWord)
|
|||||||
W.symbols[i] = one(W.symbols[i])
|
W.symbols[i] = one(W.symbols[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
deleteat!(W.symbols, find(x -> x.pow == 0, W.symbols))
|
||||||
return reduced
|
return reduced
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -62,7 +63,6 @@ function reduce!{T}(W::GWord{T})
|
|||||||
reduced = false
|
reduced = false
|
||||||
while !reduced
|
while !reduced
|
||||||
reduced = free_reduce!(W)
|
reduced = free_reduce!(W)
|
||||||
deleteat!(W.symbols, find(x -> x.pow == 0, W.symbols))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user