1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-24 02:00:30 +01:00

new low-level compute_SOS function

This commit is contained in:
kalmarek 2017-10-27 18:29:19 +02:00
parent d8b2f0ab30
commit 8defd71b59

View File

@ -30,23 +30,22 @@ function groupring_square(vect::AbstractVector, l, pm)
return GroupRings.mul!(similar(zzz), zzz, zzz, pm)
end
function compute_SOS(sqrt_matrix, elt::GroupRingElem)
n = size(sqrt_matrix,2)
l = length(elt.coeffs)
pm = parent(elt).pm
function compute_SOS(Q::AbstractArray, pm::Array{Int,2}, l::Int)
n = size(Q,2)
# result = zeros(eltype(sqrt_matrix), l)
# result = zeros(eltype(Q), l)
# for i in 1:n
# result .+= groupring_square(view(sqrt_matrix,:,i), l, pm)
# result .+= groupring_square(view(Q,:,i), l, pm)
# end
@everywhere groupring_square = PropertyT.groupring_square
result = @parallel (+) for i in 1:n
groupring_square(view(sqrt_matrix,:,i), length(elt.coeffs), parent(elt).pm)
print(" $i")
groupring_square(view(Q,:,i), l, pm)
end
return GroupRingElem(result, parent(elt))
return result
end
function correct_to_augmentation_ideal{T<:Rational}(sqrt_matrix::Array{T,2})