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
1 changed files with 4 additions and 4 deletions

View File

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