mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-10-15 08:05:35 +02:00
DomainError -> ArgumentError as the former don't accept message
This commit is contained in:
parent
cb15964bfd
commit
3a79623c48
@ -48,7 +48,7 @@ end
|
|||||||
(==)(X::GroupAlgebraElement, Y::GroupAlgebraElement) = isequal(X,Y)
|
(==)(X::GroupAlgebraElement, Y::GroupAlgebraElement) = isequal(X,Y)
|
||||||
|
|
||||||
function add{T<:Number}(X::GroupAlgebraElement{T}, Y::GroupAlgebraElement{T})
|
function add{T<:Number}(X::GroupAlgebraElement{T}, Y::GroupAlgebraElement{T})
|
||||||
X.product_matrix == Y.product_matrix || throw(DomainError(
|
X.product_matrix == Y.product_matrix || throw(ArgumentError(
|
||||||
"Elements don't seem to belong to the same Group Algebra!"))
|
"Elements don't seem to belong to the same Group Algebra!"))
|
||||||
return GroupAlgebraElement(X.coordinates+Y.coordinates, X.product_matrix)
|
return GroupAlgebraElement(X.coordinates+Y.coordinates, X.product_matrix)
|
||||||
end
|
end
|
||||||
@ -66,7 +66,7 @@ end
|
|||||||
|
|
||||||
function group_star_multiplication{T<:Number}(X::GroupAlgebraElement{T},
|
function group_star_multiplication{T<:Number}(X::GroupAlgebraElement{T},
|
||||||
Y::GroupAlgebraElement{T})
|
Y::GroupAlgebraElement{T})
|
||||||
X.product_matrix == Y.product_matrix || DomainError(
|
X.product_matrix == Y.product_matrix || ArgumentError(
|
||||||
"Elements don't seem to belong to the same Group Algebra!")
|
"Elements don't seem to belong to the same Group Algebra!")
|
||||||
|
|
||||||
result = zeros(X.coordinates)
|
result = zeros(X.coordinates)
|
||||||
@ -76,7 +76,7 @@ function group_star_multiplication{T<:Number}(X::GroupAlgebraElement{T},
|
|||||||
else
|
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!"))
|
throw(ArgumentError("The product don't seem to belong to the span of basis!"))
|
||||||
else
|
else
|
||||||
result[index]+= x*y
|
result[index]+= x*y
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user