mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 15:25:29 +01:00
new low-level compute_SOS function
This commit is contained in:
parent
d8b2f0ab30
commit
8defd71b59
@ -30,23 +30,22 @@ function groupring_square(vect::AbstractVector, l, pm)
|
|||||||
return GroupRings.mul!(similar(zzz), zzz, zzz, pm)
|
return GroupRings.mul!(similar(zzz), zzz, zzz, pm)
|
||||||
end
|
end
|
||||||
|
|
||||||
function compute_SOS(sqrt_matrix, elt::GroupRingElem)
|
function compute_SOS(Q::AbstractArray, pm::Array{Int,2}, l::Int)
|
||||||
n = size(sqrt_matrix,2)
|
n = size(Q,2)
|
||||||
l = length(elt.coeffs)
|
|
||||||
pm = parent(elt).pm
|
|
||||||
|
|
||||||
# result = zeros(eltype(sqrt_matrix), l)
|
# result = zeros(eltype(Q), l)
|
||||||
# for i in 1:n
|
# for i in 1:n
|
||||||
# result .+= groupring_square(view(sqrt_matrix,:,i), l, pm)
|
# result .+= groupring_square(view(Q,:,i), l, pm)
|
||||||
# end
|
# end
|
||||||
|
|
||||||
@everywhere groupring_square = PropertyT.groupring_square
|
@everywhere groupring_square = PropertyT.groupring_square
|
||||||
|
|
||||||
result = @parallel (+) for i in 1:n
|
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
|
end
|
||||||
|
|
||||||
return GroupRingElem(result, parent(elt))
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function correct_to_augmentation_ideal{T<:Rational}(sqrt_matrix::Array{T,2})
|
function correct_to_augmentation_ideal{T<:Rational}(sqrt_matrix::Array{T,2})
|
||||||
|
Loading…
Reference in New Issue
Block a user