1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-14 06:10:28 +01:00

algebra_square -> groupring_square, using groupring_mult

This commit is contained in:
kalmar 2017-05-28 20:00:22 +02:00
parent 2adcf0bc13
commit b589fb9844

View File

@ -10,10 +10,10 @@ function EOI{T<:Number}(Δ::GroupRingElem{T}, λ::T)
return Δ*Δ - λ*Δ
end
function algebra_square(vect, elt)
function groupring_square(vect, elt)
zzz = zeros(eltype(vect), elt.coeffs)
zzz[1:length(vect)] = vect
return GroupAlgebras.algebra_multiplication(zzz, zzz, parent(elt).pm)
return GroupRings.groupring_mult(zzz, zzz, parent(elt).pm)
end
function compute_SOS(sqrt_matrix, elt)
@ -22,11 +22,11 @@ function compute_SOS(sqrt_matrix, elt)
# result = zeros(T, length(elt.coeffs))
# for i in 1:n
# result += algebra_square(sqrt_matrix[:,i], elt)
# result += groupring_square(sqrt_matrix[:,i], elt)
# end
result = @parallel (+) for i in 1:n
PropertyT.algebra_square(sqrt_matrix[:,i], elt)
groupring_square(sqrt_matrix[:,i], elt)
end
return GroupRingElem(result, parent(elt))
end