-
-
Notifications
You must be signed in to change notification settings - Fork 206
Open
Description
I have saved the edgelist of the graph that's created at
rigraph/tests/testthat/test-structural-properties.R
Lines 930 to 934 in fd62234
g4 <- sample_gnp(1000, p = 5 / 1000) | |
r4 <- knn(g4) | |
expect_equal(r4$knn[1000], 20 / 3) | |
expect_equal(length(r4$knnk), 15) | |
expect_equal(r4$knnk[12], 19 / 3) |
b-next
devtools::load_all()
#> ℹ Loading igraph
g4 <- read_graph("bla.txt")
r4 <- knn(g4)
r4$knn[1000] # 20 / 3
#> [1] 5
length(r4$knnk) # 15
#> [1] 15
r4$knnk[12] # 19 / 3
#> [1] 5.638889
main
library("igraph")
#>
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:stats':
#>
#> decompose, spectrum
#> The following object is masked from 'package:base':
#>
#> union
g4 <- read_graph("bla.txt")
r4 <- knn(g4)
r4$knn[1000] # 20 / 3
#> [1] 5
length(r4$knnk) # 15
#> [1] 15
r4$knnk[12] # 19 / 3
#> [1] 5.638889
Created on 2025-10-03 with reprex v2.1.1
So actually it is the same. To me it means that now for whatever reason in the test we are not drawing the same graph any more.
@schochastics would you recommend:
- updating the expectation
- splitting the test so that in the future we have better control of what the random graph is?
Metadata
Metadata
Assignees
Labels
No labels