You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LinearAlgebra.UniformScaling(interval(J.λ, d; format = format))
12
+
13
+
# by-pass generic `opnorm` from LinearAlgebra to prevent NG flag
14
+
15
+
function LinearAlgebra.opnorm1(A::AbstractMatrix{T}) where {T<:RealOrComplexI}
16
+
LinearAlgebra.require_one_based_indexing(A)
17
+
m, n = size(A)
18
+
Tnorm = typeof(float(real(zero(T))))
19
+
Tsum = promote_type(Float64, Tnorm)
20
+
nrm = zero(Tsum)
21
+
@inbounds begin
22
+
for j = 1:n
23
+
nrmj = zero(Tsum)
24
+
for i = 1:m
25
+
nrmj += LinearAlgebra.norm(A[i,j])
26
+
end
27
+
nrm = max(nrm, nrmj)
28
+
end
29
+
end
30
+
return convert(Tnorm, nrm)
31
+
end
32
+
33
+
function LinearAlgebra.opnormInf(A::AbstractMatrix{T}) where {T<:RealOrComplexI}
34
+
LinearAlgebra.require_one_based_indexing(A)
35
+
m, n = size(A)
36
+
Tnorm = typeof(float(real(zero(T))))
37
+
Tsum = promote_type(Float64, Tnorm)
38
+
nrm = zero(Tsum)
39
+
@inbounds begin
40
+
for i = 1:m
41
+
nrmi = zero(Tsum)
42
+
for j = 1:n
43
+
nrmi += LinearAlgebra.norm(A[i,j])
44
+
end
45
+
nrm = max(nrm, nrmi)
46
+
end
47
+
end
48
+
return convert(Tnorm, nrm)
49
+
end
50
+
51
+
# matrix eigenvalues
52
+
53
+
function LinearAlgebra.eigvals!(A::AbstractMatrix{<:Interval}; permute::Bool=true, scale::Bool=true, sortby::Union{Function,Nothing}=LinearAlgebra.eigsortby)
LinearAlgebra.UniformScaling(interval(J.λ, d; format = format))
5
-
6
-
7
-
8
-
# by-pass generic `opnorm` from LinearAlgebra to prevent NG flag
9
-
10
-
function LinearAlgebra.opnorm1(A::AbstractMatrix{T}) where {T<:RealOrComplexI}
11
-
LinearAlgebra.require_one_based_indexing(A)
12
-
m, n = size(A)
13
-
Tnorm = typeof(float(real(zero(T))))
14
-
Tsum = promote_type(Float64, Tnorm)
15
-
nrm = zero(Tsum)
16
-
@inbounds begin
17
-
for j = 1:n
18
-
nrmj = zero(Tsum)
19
-
for i = 1:m
20
-
nrmj += LinearAlgebra.norm(A[i,j])
21
-
end
22
-
nrm = max(nrm, nrmj)
23
-
end
24
-
end
25
-
return convert(Tnorm, nrm)
26
-
end
27
-
28
-
function LinearAlgebra.opnormInf(A::AbstractMatrix{T}) where {T<:RealOrComplexI}
29
-
LinearAlgebra.require_one_based_indexing(A)
30
-
m, n = size(A)
31
-
Tnorm = typeof(float(real(zero(T))))
32
-
Tsum = promote_type(Float64, Tnorm)
33
-
nrm = zero(Tsum)
34
-
@inbounds begin
35
-
for i = 1:m
36
-
nrmi = zero(Tsum)
37
-
for j = 1:n
38
-
nrmi += LinearAlgebra.norm(A[i,j])
39
-
end
40
-
nrm = max(nrm, nrmi)
41
-
end
42
-
end
43
-
return convert(Tnorm, nrm)
44
-
end
45
-
46
-
47
-
48
1
# matrix inversion
49
2
# note: use the contraction mapping theorem, only works when the entries of A have small radii
50
3
@@ -63,88 +16,7 @@ function Base.inv(A::Matrix{<:RealOrComplexI})
63
16
return A⁻¹
64
17
end
65
18
66
-
67
-
68
-
# matrix eigenvalues
69
-
70
-
function LinearAlgebra.eigvals!(A::AbstractMatrix{<:Interval}; permute::Bool=true, scale::Bool=true, sortby::Union{Function,Nothing}=LinearAlgebra.eigsortby)
0 commit comments