mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-14 14:15:28 +01:00
relax type assumptions in compute_SOS and else
This commit is contained in:
parent
b5f12501f9
commit
7a8b21db3c
@ -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
|
||||
|
@ -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}}()
|
||||
|
Loading…
Reference in New Issue
Block a user