@@ -797,9 +797,7 @@ test_that("preference_game_impl basic", {
797797 types = 2 ,
798798 type.dist = c(0.5 , 0.5 ),
799799 fixed.sizes = FALSE ,
800- pref.matrix = matrix (c(0.5 ,
801- 0.5 , 0.5 , 0.5 ),
802- 2 , 2 )
800+ pref.matrix = matrix (c(0.5 , 0.5 , 0.5 , 0.5 ), 2 , 2 )
803801 ))
804802})
805803test_that(" preference_game_impl errors" , {
@@ -811,9 +809,7 @@ test_that("preference_game_impl errors", {
811809 types = 2 ,
812810 type.dist = c(0.5 , 0.5 ),
813811 fixed.sizes = FALSE ,
814- pref.matrix = matrix (c(0.5 ,
815- 0.5 , 0.5 , 0.5 ),
816- 2 , 2 )
812+ pref.matrix = matrix (c(0.5 , 0.5 , 0.5 , 0.5 ), 2 , 2 )
817813 )
818814 )
819815})
@@ -826,12 +822,8 @@ test_that("asymmetric_preference_game_impl basic", {
826822 nodes = 5 ,
827823 out.types = 2 ,
828824 in .types = 2 ,
829- type.dist.matrix = matrix (c(0.5 ,
830- 0.5 , 0.5 , 0.5 ),
831- 2 , 2 ),
832- pref.matrix = matrix (c(0.5 ,
833- 0.5 , 0.5 , 0.5 ),
834- 2 , 2 )
825+ type.dist.matrix = matrix (c(0.5 , 0.5 , 0.5 , 0.5 ), 2 , 2 ),
826+ pref.matrix = matrix (c(0.5 , 0.5 , 0.5 , 0.5 ), 2 , 2 )
835827 ))
836828})
837829test_that(" asymmetric_preference_game_impl errors" , {
@@ -842,12 +834,8 @@ test_that("asymmetric_preference_game_impl errors", {
842834 nodes = - 1 ,
843835 out.types = 2 ,
844836 in .types = 2 ,
845- type.dist.matrix = matrix (c(0.5 ,
846- 0.5 , 0.5 , 0.5 ),
847- 2 , 2 ),
848- pref.matrix = matrix (c(0.5 ,
849- 0.5 , 0.5 , 0.5 ),
850- 2 , 2 )
837+ type.dist.matrix = matrix (c(0.5 , 0.5 , 0.5 , 0.5 ), 2 , 2 ),
838+ pref.matrix = matrix (c(0.5 , 0.5 , 0.5 , 0.5 ), 2 , 2 )
851839 )
852840 )
853841})
@@ -1055,14 +1043,12 @@ test_that("sbm_game_impl basic", {
10551043 local_igraph_options(print.id = FALSE )
10561044 expect_snapshot(sbm_game_impl(
10571045 n = 5 ,
1058- pref.matrix = matrix (0.5 ,
1059- 2 , 2 ),
1046+ pref.matrix = matrix (0.5 , 2 , 2 ),
10601047 block.sizes = c(2 , 3 )
10611048 ))
10621049 expect_snapshot(sbm_game_impl(
10631050 n = 5 ,
1064- pref.matrix = matrix (0.5 ,
1065- 2 , 2 ),
1051+ pref.matrix = matrix (0.5 , 2 , 2 ),
10661052 block.sizes = c(2 , 3 ),
10671053 directed = TRUE ,
10681054 loops = TRUE
@@ -1074,8 +1060,7 @@ test_that("sbm_game_impl errors", {
10741060 local_igraph_options(print.id = FALSE )
10751061 expect_snapshot_igraph_error(sbm_game_impl(
10761062 n = - 1 ,
1077- pref.matrix = matrix (0.5 ,
1078- 2 , 2 ),
1063+ pref.matrix = matrix (0.5 , 2 , 2 ),
10791064 block.sizes = c(2 , 3 )
10801065 ))
10811066})
@@ -1089,8 +1074,7 @@ test_that("hsbm_game_impl basic", {
10891074 n = 6 ,
10901075 m = 2 ,
10911076 rho = c(0.5 , 0.5 ),
1092- C = matrix (1 ,
1093- 2 , 2 ),
1077+ C = matrix (1 , 2 , 2 ),
10941078 p = 0.5
10951079 ))
10961080})
@@ -1103,8 +1087,7 @@ test_that("hsbm_game_impl errors", {
11031087 n = - 1 ,
11041088 m = 2 ,
11051089 rho = 0.5 ,
1106- C = matrix (1 , 2 ,
1107- 2 ),
1090+ C = matrix (1 , 2 , 2 ),
11081091 p = 0.5
11091092 )
11101093 )
@@ -1150,10 +1133,8 @@ test_that("hsbm_list_game_impl errors", {
11501133 mlist = c(2 , 3 ),
11511134 rholist = list (0.5 , 0.5 ),
11521135 Clist = list (
1153- matrix (1 ,
1154- 2 , 2 ),
1155- matrix (1 ,
1156- 2 , 2 )
1136+ matrix (1 , 2 , 2 ),
1137+ matrix (1 , 2 , 2 )
11571138 ),
11581139 p = 0.5
11591140 )
@@ -1218,12 +1199,10 @@ test_that("dot_product_game_impl basic", {
12181199 withr :: local_seed(20250909 )
12191200 local_igraph_options(print.id = FALSE )
12201201 expect_snapshot(dot_product_game_impl(
1221- vecs = matrix (0.5 ,
1222- 5 , 2 )
1202+ vecs = matrix (0.5 , 5 , 2 )
12231203 ))
12241204 expect_snapshot(dot_product_game_impl(
1225- vecs = matrix (0.5 ,
1226- 5 , 2 ),
1205+ vecs = matrix (0.5 , 5 , 2 ),
12271206 directed = TRUE
12281207 ))
12291208})
@@ -4042,8 +4021,7 @@ test_that("edgelist_percolation_impl basic", {
40424021 withr :: local_seed(20250909 )
40434022 local_igraph_options(print.id = FALSE )
40444023 expect_snapshot(edgelist_percolation_impl(
4045- edges = matrix (c(1 ,
4046- 2 , 2 , 3 ), ncol = 2 )
4024+ edges = matrix (c(1 , 2 , 2 , 3 ), ncol = 2 )
40474025 ))
40484026})
40494027
@@ -4564,8 +4542,7 @@ test_that("layout_mds_impl basic", {
45644542 ))
45654543 expect_snapshot(layout_mds_impl(
45664544 graph = g ,
4567- dist = matrix (1 : 9 ,
4568- nrow = 3 ),
4545+ dist = matrix (1 : 9 , nrow = 3 ),
45694546 dim = 3
45704547 ))
45714548})
@@ -4622,13 +4599,11 @@ test_that("layout_gem_impl basic", {
46224599
46234600 expect_snapshot(layout_gem_impl(
46244601 graph = g ,
4625- res = matrix (0 , nrow = 3 ,
4626- ncol = 2 )
4602+ res = matrix (0 , nrow = 3 , ncol = 2 )
46274603 ))
46284604 expect_snapshot(layout_gem_impl(
46294605 graph = g ,
4630- res = matrix (0 , nrow = 3 ,
4631- ncol = 2 ),
4606+ res = matrix (0 , nrow = 3 , ncol = 2 ),
46324607 use.seed = TRUE ,
46334608 maxiter = 10 ,
46344609 temp.max = 2 ,
@@ -4643,8 +4618,7 @@ test_that("layout_gem_impl errors", {
46434618 expect_snapshot_igraph_error(
46444619 layout_gem_impl(
46454620 graph = NULL ,
4646- res = matrix (0 , nrow = 3 ,
4647- ncol = 2 )
4621+ res = matrix (0 , nrow = 3 , ncol = 2 )
46484622 )
46494623 )
46504624})
@@ -4660,13 +4634,11 @@ test_that("layout_davidson_harel_impl basic", {
46604634
46614635 expect_snapshot(layout_davidson_harel_impl(
46624636 graph = g ,
4663- res = matrix (0 , nrow = 3 ,
4664- ncol = 2 )
4637+ res = matrix (0 , nrow = 3 , ncol = 2 )
46654638 ))
46664639 expect_snapshot(layout_davidson_harel_impl(
46674640 graph = g ,
4668- res = matrix (0 , nrow = 3 ,
4669- ncol = 2 ),
4641+ res = matrix (0 , nrow = 3 , ncol = 2 ),
46704642 use.seed = TRUE ,
46714643 maxiter = 10 ,
46724644 fineiter = 5 ,
@@ -4685,8 +4657,7 @@ test_that("layout_davidson_harel_impl errors", {
46854657 expect_snapshot_igraph_error(
46864658 layout_davidson_harel_impl(
46874659 graph = NULL ,
4688- res = matrix (0 , nrow = 3 ,
4689- ncol = 2 )
4660+ res = matrix (0 , nrow = 3 , ncol = 2 )
46904661 )
46914662 )
46924663})
@@ -4702,14 +4673,12 @@ test_that("layout_umap_impl basic", {
47024673
47034674 expect_snapshot(layout_umap_impl(
47044675 graph = g ,
4705- res = matrix (0 , nrow = 3 ,
4706- ncol = 2 ),
4676+ res = matrix (0 , nrow = 3 , ncol = 2 ),
47074677 use.seed = TRUE
47084678 ))
47094679 expect_snapshot(layout_umap_impl(
47104680 graph = g ,
4711- res = matrix (0 , nrow = 3 ,
4712- ncol = 2 ),
4681+ res = matrix (0 , nrow = 3 , ncol = 2 ),
47134682 use.seed = TRUE ,
47144683 distances = 1 : 3 ,
47154684 min.dist = 0.1 ,
@@ -4724,8 +4693,7 @@ test_that("layout_umap_impl errors", {
47244693 expect_snapshot_igraph_error(
47254694 layout_umap_impl(
47264695 graph = NULL ,
4727- res = matrix (0 , nrow = 3 ,
4728- ncol = 2 )
4696+ res = matrix (0 , nrow = 3 , ncol = 2 )
47294697 )
47304698 )
47314699})
@@ -4741,14 +4709,12 @@ test_that("layout_umap_3d_impl basic", {
47414709
47424710 expect_snapshot(layout_umap_3d_impl(
47434711 graph = g ,
4744- res = matrix (0 , nrow = 3 ,
4745- ncol = 3 ),
4712+ res = matrix (0 , nrow = 3 , ncol = 3 ),
47464713 use.seed = TRUE
47474714 ))
47484715 expect_snapshot(layout_umap_3d_impl(
47494716 graph = g ,
4750- res = matrix (0 , nrow = 3 ,
4751- ncol = 3 ),
4717+ res = matrix (0 , nrow = 3 , ncol = 3 ),
47524718 use.seed = TRUE ,
47534719 distances = 1 : 3 ,
47544720 min.dist = 0.1 ,
@@ -4763,8 +4729,7 @@ test_that("layout_umap_3d_impl errors", {
47634729 expect_snapshot_igraph_error(
47644730 layout_umap_3d_impl(
47654731 graph = NULL ,
4766- res = matrix (0 , nrow = 3 ,
4767- ncol = 3 )
4732+ res = matrix (0 , nrow = 3 , ncol = 3 )
47684733 )
47694734 )
47704735})
@@ -4808,8 +4773,7 @@ test_that("layout_align_impl basic", {
48084773
48094774 expect_snapshot(layout_align_impl(
48104775 graph = g ,
4811- layout = matrix (0 ,
4812- nrow = 3 , ncol = 2 )
4776+ layout = matrix (0 , nrow = 3 , ncol = 2 )
48134777 ))
48144778})
48154779
@@ -4819,8 +4783,7 @@ test_that("layout_align_impl errors", {
48194783 expect_snapshot_igraph_error(
48204784 layout_align_impl(
48214785 graph = NULL ,
4822- layout = matrix (0 ,
4823- nrow = 3 , ncol = 2 )
4786+ layout = matrix (0 , nrow = 3 , ncol = 2 )
48244787 )
48254788 )
48264789})
@@ -4892,13 +4855,11 @@ test_that("similarity_dice_pairs_impl basic", {
48924855
48934856 expect_snapshot(similarity_dice_pairs_impl(
48944857 graph = g ,
4895- pairs = matrix (c(1 ,
4896- 2 , 2 , 3 ), ncol = 2 )
4858+ pairs = matrix (c(1 , 2 , 2 , 3 ), ncol = 2 )
48974859 ))
48984860 expect_snapshot(similarity_dice_pairs_impl(
48994861 graph = g ,
4900- pairs = matrix (c(1 ,
4901- 2 , 2 , 3 ), ncol = 2 ),
4862+ pairs = matrix (c(1 , 2 , 2 , 3 ), ncol = 2 ),
49024863 mode = " in" ,
49034864 loops = TRUE
49044865 ))
@@ -4910,8 +4871,7 @@ test_that("similarity_dice_pairs_impl errors", {
49104871 expect_snapshot_igraph_error(
49114872 similarity_dice_pairs_impl(
49124873 graph = NULL ,
4913- pairs = matrix (c(1 ,
4914- 2 , 2 , 3 ), ncol = 2 )
4874+ pairs = matrix (c(1 , 2 , 2 , 3 ), ncol = 2 )
49154875 )
49164876 )
49174877})
@@ -5010,13 +4970,11 @@ test_that("similarity_jaccard_pairs_impl basic", {
50104970
50114971 expect_snapshot(similarity_jaccard_pairs_impl(
50124972 graph = g ,
5013- pairs = matrix (c(1 ,
5014- 2 , 2 , 3 ), ncol = 2 )
4973+ pairs = matrix (c(1 , 2 , 2 , 3 ), ncol = 2 )
50154974 ))
50164975 expect_snapshot(similarity_jaccard_pairs_impl(
50174976 graph = g ,
5018- pairs = matrix (c(1 ,
5019- 2 , 2 , 3 ), ncol = 2 ),
4977+ pairs = matrix (c(1 , 2 , 2 , 3 ), ncol = 2 ),
50204978 mode = " in" ,
50214979 loops = TRUE
50224980 ))
@@ -5028,8 +4986,7 @@ test_that("similarity_jaccard_pairs_impl errors", {
50284986 expect_snapshot_igraph_error(
50294987 similarity_jaccard_pairs_impl(
50304988 graph = NULL ,
5031- pairs = matrix (c(1 ,
5032- 2 , 2 , 3 ), ncol = 2 )
4989+ pairs = matrix (c(1 , 2 , 2 , 3 ), ncol = 2 )
50334990 )
50344991 )
50354992})
@@ -7444,8 +7401,7 @@ test_that("convex_hull_2d_impl basic", {
74447401 withr :: local_seed(20250909 )
74457402 local_igraph_options(print.id = FALSE )
74467403 expect_snapshot(convex_hull_2d_impl(
7447- data = matrix (1 : 6 ,
7448- ncol = 2 )
7404+ data = matrix (1 : 6 , ncol = 2 )
74497405 ))
74507406})
74517407
@@ -7481,8 +7437,7 @@ test_that("solve_lsap_impl basic", {
74817437 withr :: local_seed(20250909 )
74827438 local_igraph_options(print.id = FALSE )
74837439 expect_snapshot(solve_lsap_impl(
7484- c = matrix (1 : 4 ,
7485- ncol = 2 ),
7440+ c = matrix (1 : 4 , ncol = 2 ),
74867441 n = 2
74877442 ))
74887443})
0 commit comments