We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd690a8 commit c919e6fCopy full SHA for c919e6f
test/sa_tests.jl
@@ -215,4 +215,19 @@ function test_approximate_spectral_radius()
215
216
end
217
218
+ # Symmetric matrices
219
+ for A in cases
220
+ A = A + A'
221
+ E,V = eig(A)
222
+ E = abs.(E)
223
+ largest_eig = find(E .== maximum(E))[1]
224
+ expected_eig = E[largest_eig]
225
+
226
+ @test isapprox(approximate_spectral_radius(A), expected_eig)
227
228
+ end
229
230
+ # Test poisson matrix
231
+ A = poisson(50, 50)
232
233
0 commit comments