File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -533,15 +533,14 @@ function distance_to_set(
533533 _check_dimension (x, set)
534534 # We should return the norm of `A` defined by:
535535 # ```julia
536- # λ, U = LinearAlgebra.eigvals (_reshape(x, set))
536+ # λ, U = LinearAlgebra.eigen (_reshape(x, set))
537537 # λ_negative = LinearAlgebra.Diagonal(min.(zero(T), λ))
538538 # A = LinearAlgebra.Symmetric(U * λ_negative * U')
539+ # LinearAlgebra.norm(A, 2)
539540 # ```
540- # The norm should correspond to `MOI.Utilities.set_dot`
541- # so it's the Frobenius norm.
542- # The Frobenius norm of `A` which is Euclidean
543- # norm of the vector of eigenvalues.
541+ # The norm should correspond to `MOI.Utilities.set_dot` so it's the
542+ # Frobenius norm, which is the Euclidean norm of the vector of eigenvalues.
544543 eigvals = LinearAlgebra. eigvals (_reshape (x, set))
545- neg_eigvals = min .(zero (T), eigvals)
546- return LinearAlgebra. norm (neg_eigvals , 2 )
544+ eigvals . = min .(zero (T), eigvals)
545+ return LinearAlgebra. norm (eigvals , 2 )
547546end
You can’t perform that action at this time.
0 commit comments