1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-12-29 11:00:28 +01:00

use reverse_dict

This commit is contained in:
kalmar 2017-05-17 11:34:03 +02:00
parent a7683c6fcc
commit ab0b6c871a

View File

@ -73,7 +73,7 @@ function GroupRing(G::Group, pm::Array{Int,2}, basis::Vector)
size(pm,1) == size(pm,2) || throw("pm must be of size (n,n), got
$(size(pm))")
eltype(basis) == elem_type(G) || throw("basis must consist of elements of $G")
basis_dict = Dict(g => i for (i,g) in enumerate(basis))
basis_dict = reverse_dict(basis)
return GroupRing(Group, pm, basis, basis_dict)
end