mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 07:20:28 +01:00
The performant version of group_star_multiplication
This commit is contained in:
parent
5dc0dff3ff
commit
5bc90f49e1
@ -64,10 +64,10 @@ function group_star_multiplication{T<:Number}(X::GroupAlgebraElement{T},
|
||||
X.product_matrix == Y.product_matrix || ArgumentError(
|
||||
"Elements don't seem to belong to the same Group Algebra!")
|
||||
result = zeros(X.coordinates)
|
||||
for (i,x) in enumerate(X.coordinates), (j,y) in enumerate(Y.coordinates)
|
||||
if x*y == 0
|
||||
nothing
|
||||
else
|
||||
for (i,x) in enumerate(X.coordinates)
|
||||
if x != 0
|
||||
for (j,y) in enumerate(Y.coordinates)
|
||||
if y != 0
|
||||
index = X.product_matrix[i,j]
|
||||
if index == 0
|
||||
throw(ArgumentError("The product don't seem to belong to the span of basis!"))
|
||||
@ -76,6 +76,8 @@ function group_star_multiplication{T<:Number}(X::GroupAlgebraElement{T},
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return GroupAlgebraElement(result, X.product_matrix)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user