use reverse_dict

This commit is contained in:
kalmar 2017-05-17 11:34:03 +02:00
parent a7683c6fcc
commit ab0b6c871a
1 changed files with 1 additions and 1 deletions

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