add sparse kwarg to transform

This commit is contained in:
kalmar 2017-06-09 11:58:21 +02:00
parent c98e853268
commit 53ea594438

View File

@ -97,10 +97,9 @@ function init_OrbitData(name::String)
return m, orbData
end
function transform{T}(U::AbstractArray{T,2}, V::AbstractArray{T,2}, eps=eps(T))
function transform{T}(U::AbstractArray{T,2}, V::AbstractArray{T,2}, eps=eps(T); sparse=true)
w = U'*V*U
# sparsify!(w, eps)
# dropzeros!(w)
sparse && sparsify!(w, eps)
return w
end