1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-22 16:05:27 +01:00

relax type assumptions in compute_SOS and else

This commit is contained in:
kalmarek 2019-06-25 17:35:46 +02:00
parent b5f12501f9
commit 7a8b21db3c
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
2 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ function compute_SOS(RG::GroupRing, Q::AbstractMatrix{<:Real})
return GroupRingElem(result, RG)
end
function compute_SOS_square(pm::AbstractMatrix{<:Integer}, Q::AbstractMatrix{<:Real})
function compute_SOS_square(pm::AbstractMatrix{<:Integer}, Q::AbstractMatrix)
result = zeros(eltype(Q), maximum(pm));
for i in 1:size(Q,2)
@ -47,12 +47,12 @@ function compute_SOS_square(pm::AbstractMatrix{<:Integer}, Q::AbstractMatrix{<:R
return result
end
function compute_SOS_square(RG::GroupRing, Q::AbstractMatrix{<:Real})
function compute_SOS_square(RG::GroupRing, Q::AbstractMatrix)
return GroupRingElem(compute_SOS_square(RG.pm, Q), RG)
end
function augIdproj(Q::AbstractMatrix{T}) where {T<:Real}
result = zeros(size(Q))
function augIdproj(Q::AbstractMatrix{T}) where T
result = zeros(T, size(Q))
l = size(Q, 2)
Threads.@threads for j in 1:l
col = sum(view(Q, :,j))/l

View File

@ -58,9 +58,9 @@ function orthSVD(M::AbstractMatrix{T}) where {T<:AbstractFloat}
return fact.U[:,1:M_rank]
end
function orbit_decomposition(G::Group, E::Vector, rdict=GroupRings.reverse_dict(E))
orbit_decomposition(G::Group, E::AbstractVector, rdict=GroupRings.reverse_dict(E)) = orbit_decomposition(collect(G), E, rdict)
elts = collect(G)
function orbit_decomposition(elts::AbstractVector{<:GroupElem}, E::AbstractVector, rdict=GroupRings.reverse_dict(E))
tovisit = trues(size(E));
orbits = Vector{Vector{Int}}()