mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 15:25:29 +01:00
Warn in multiplication of elts of K[G], when discarding a product
This commit is contained in:
parent
6cdc9a980b
commit
cb15964bfd
@ -71,11 +71,17 @@ function group_star_multiplication{T<:Number}(X::GroupAlgebraElement{T},
|
|||||||
|
|
||||||
result = zeros(X.coordinates)
|
result = zeros(X.coordinates)
|
||||||
for (i,x) in enumerate(X.coordinates), (j,y) in enumerate(Y.coordinates)
|
for (i,x) in enumerate(X.coordinates), (j,y) in enumerate(Y.coordinates)
|
||||||
|
if x*y == 0
|
||||||
|
nothing
|
||||||
|
else
|
||||||
index = X.product_matrix[i,j]
|
index = X.product_matrix[i,j]
|
||||||
if index != 0
|
if index == 0
|
||||||
|
throw(DomainError("The product don't seem to belong to the span of basis!"))
|
||||||
|
else
|
||||||
result[index]+= x*y
|
result[index]+= x*y
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return GroupAlgebraElement(result, X.product_matrix)
|
return GroupAlgebraElement(result, X.product_matrix)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user