Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr authored Nov 26, 2024
2 parents ee6cd2e + 1085de3 commit 0e9d1a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 72 deletions.
71 changes: 1 addition & 70 deletions tests/testthat/_snaps/centrality.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,78 +105,9 @@
---

Code
eigen_centrality(g, scale = FALSE)
invisible(eigen_centrality(g, scale = FALSE))
Condition
Warning:
The `scale` argument of `eigen_centrality()` always as if TRUE as of igraph 2.1.1.
i Normalization is always performed
Output
$vector
[1] 1 1 1 1 1 1 1 1 1 1
$value
[1] 2
$options
$options$bmat
[1] "I"
$options$n
[1] 10
$options$which
[1] "LA"
$options$nev
[1] 1
$options$tol
[1] 0
$options$ncv
[1] 0
$options$ldv
[1] 0
$options$ishift
[1] 1
$options$maxiter
[1] 3000
$options$nb
[1] 1
$options$mode
[1] 1
$options$start
[1] 1
$options$sigma
[1] 0
$options$sigmai
[1] 0
$options$info
[1] 0
$options$iter
[1] 1
$options$nconv
[1] 1
$options$numop
[1] 7
$options$numopb
[1] 0
$options$numreo
[1] 5

9 changes: 7 additions & 2 deletions tests/testthat/test-centrality.R
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,11 @@ test_that("arpack works for non-symmetric matrices", {

test_that("eigen_centrality() deprecated scale argument", {
g <- make_ring(10, directed = FALSE)
expect_snapshot(eigen_centrality(g, scale = TRUE))
expect_snapshot(eigen_centrality(g, scale = FALSE))
expect_snapshot({
eigen_centrality(g, scale = TRUE)
})
# For some reason, this produces different outputs on Windows and macOS
expect_snapshot({
invisible(eigen_centrality(g, scale = FALSE))
})
})

0 comments on commit 0e9d1a3

Please sign in to comment.