Skip to content

Commit b8ab464

Browse files
Copilotkrlmlr
andcommitted
refactor: Replace _impl aliases with explicit wrapper functions in R/topology.R (#2398)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: krlmlr <[email protected]> Co-authored-by: Kirill Müller <[email protected]> Co-authored-by: Kirill Müller <[email protected]>
1 parent 5736053 commit b8ab464

File tree

3 files changed

+172
-56
lines changed

3 files changed

+172
-56
lines changed

R/aaa-auto.R

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7356,7 +7356,7 @@ isomorphic_vf2_impl <- function(
73567356
# Argument checks
73577357
ensure_igraph(graph1)
73587358
ensure_igraph(graph2)
7359-
if (missing(vertex.color1)) {
7359+
if (is_missing(vertex.color1)) {
73607360
if ("color" %in% vertex_attr_names(graph1)) {
73617361
vertex.color1 <- V(graph1)$color
73627362
} else {
@@ -7366,7 +7366,7 @@ isomorphic_vf2_impl <- function(
73667366
if (!is.null(vertex.color1)) {
73677367
vertex.color1 <- as.numeric(vertex.color1)-1
73687368
}
7369-
if (missing(vertex.color2)) {
7369+
if (is_missing(vertex.color2)) {
73707370
if ("color" %in% vertex_attr_names(graph2)) {
73717371
vertex.color2 <- V(graph2)$color
73727372
} else {
@@ -7376,7 +7376,7 @@ isomorphic_vf2_impl <- function(
73767376
if (!is.null(vertex.color2)) {
73777377
vertex.color2 <- as.numeric(vertex.color2)-1
73787378
}
7379-
if (missing(edge.color1)) {
7379+
if (is_missing(edge.color1)) {
73807380
if ("color" %in% edge_attr_names(graph1)) {
73817381
edge.color1 <- E(graph1)$color
73827382
} else {
@@ -7386,7 +7386,7 @@ isomorphic_vf2_impl <- function(
73867386
if (!is.null(edge.color1)) {
73877387
edge.color1 <- as.numeric(edge.color1)-1
73887388
}
7389-
if (missing(edge.color2)) {
7389+
if (is_missing(edge.color2)) {
73907390
if ("color" %in% edge_attr_names(graph2)) {
73917391
edge.color2 <- E(graph2)$color
73927392
} else {
@@ -7423,7 +7423,7 @@ get_isomorphisms_vf2_callback_impl <- function(
74237423
# Argument checks
74247424
ensure_igraph(graph1)
74257425
ensure_igraph(graph2)
7426-
if (missing(vertex.color1)) {
7426+
if (is_missing(vertex.color1)) {
74277427
if ("color" %in% vertex_attr_names(graph1)) {
74287428
vertex.color1 <- V(graph1)$color
74297429
} else {
@@ -7433,7 +7433,7 @@ get_isomorphisms_vf2_callback_impl <- function(
74337433
if (!is.null(vertex.color1)) {
74347434
vertex.color1 <- as.numeric(vertex.color1)-1
74357435
}
7436-
if (missing(vertex.color2)) {
7436+
if (is_missing(vertex.color2)) {
74377437
if ("color" %in% vertex_attr_names(graph2)) {
74387438
vertex.color2 <- V(graph2)$color
74397439
} else {
@@ -7443,7 +7443,7 @@ get_isomorphisms_vf2_callback_impl <- function(
74437443
if (!is.null(vertex.color2)) {
74447444
vertex.color2 <- as.numeric(vertex.color2)-1
74457445
}
7446-
if (missing(edge.color1)) {
7446+
if (is_missing(edge.color1)) {
74477447
if ("color" %in% edge_attr_names(graph1)) {
74487448
edge.color1 <- E(graph1)$color
74497449
} else {
@@ -7453,7 +7453,7 @@ get_isomorphisms_vf2_callback_impl <- function(
74537453
if (!is.null(edge.color1)) {
74547454
edge.color1 <- as.numeric(edge.color1)-1
74557455
}
7456-
if (missing(edge.color2)) {
7456+
if (is_missing(edge.color2)) {
74577457
if ("color" %in% edge_attr_names(graph2)) {
74587458
edge.color2 <- E(graph2)$color
74597459
} else {
@@ -7490,7 +7490,7 @@ count_isomorphisms_vf2_impl <- function(
74907490
# Argument checks
74917491
ensure_igraph(graph1)
74927492
ensure_igraph(graph2)
7493-
if (missing(vertex.color1)) {
7493+
if (is_missing(vertex.color1)) {
74947494
if ("color" %in% vertex_attr_names(graph1)) {
74957495
vertex.color1 <- V(graph1)$color
74967496
} else {
@@ -7500,7 +7500,7 @@ count_isomorphisms_vf2_impl <- function(
75007500
if (!is.null(vertex.color1)) {
75017501
vertex.color1 <- as.numeric(vertex.color1)-1
75027502
}
7503-
if (missing(vertex.color2)) {
7503+
if (is_missing(vertex.color2)) {
75047504
if ("color" %in% vertex_attr_names(graph2)) {
75057505
vertex.color2 <- V(graph2)$color
75067506
} else {
@@ -7510,7 +7510,7 @@ count_isomorphisms_vf2_impl <- function(
75107510
if (!is.null(vertex.color2)) {
75117511
vertex.color2 <- as.numeric(vertex.color2)-1
75127512
}
7513-
if (missing(edge.color1)) {
7513+
if (is_missing(edge.color1)) {
75147514
if ("color" %in% edge_attr_names(graph1)) {
75157515
edge.color1 <- E(graph1)$color
75167516
} else {
@@ -7520,7 +7520,7 @@ count_isomorphisms_vf2_impl <- function(
75207520
if (!is.null(edge.color1)) {
75217521
edge.color1 <- as.numeric(edge.color1)-1
75227522
}
7523-
if (missing(edge.color2)) {
7523+
if (is_missing(edge.color2)) {
75247524
if ("color" %in% edge_attr_names(graph2)) {
75257525
edge.color2 <- E(graph2)$color
75267526
} else {
@@ -7557,7 +7557,7 @@ get_isomorphisms_vf2_impl <- function(
75577557
# Argument checks
75587558
ensure_igraph(graph1)
75597559
ensure_igraph(graph2)
7560-
if (missing(vertex.color1)) {
7560+
if (is_missing(vertex.color1)) {
75617561
if ("color" %in% vertex_attr_names(graph1)) {
75627562
vertex.color1 <- V(graph1)$color
75637563
} else {
@@ -7567,7 +7567,7 @@ get_isomorphisms_vf2_impl <- function(
75677567
if (!is.null(vertex.color1)) {
75687568
vertex.color1 <- as.numeric(vertex.color1)-1
75697569
}
7570-
if (missing(vertex.color2)) {
7570+
if (is_missing(vertex.color2)) {
75717571
if ("color" %in% vertex_attr_names(graph2)) {
75727572
vertex.color2 <- V(graph2)$color
75737573
} else {
@@ -7577,7 +7577,7 @@ get_isomorphisms_vf2_impl <- function(
75777577
if (!is.null(vertex.color2)) {
75787578
vertex.color2 <- as.numeric(vertex.color2)-1
75797579
}
7580-
if (missing(edge.color1)) {
7580+
if (is_missing(edge.color1)) {
75817581
if ("color" %in% edge_attr_names(graph1)) {
75827582
edge.color1 <- E(graph1)$color
75837583
} else {
@@ -7587,7 +7587,7 @@ get_isomorphisms_vf2_impl <- function(
75877587
if (!is.null(edge.color1)) {
75887588
edge.color1 <- as.numeric(edge.color1)-1
75897589
}
7590-
if (missing(edge.color2)) {
7590+
if (is_missing(edge.color2)) {
75917591
if ("color" %in% edge_attr_names(graph2)) {
75927592
edge.color2 <- E(graph2)$color
75937593
} else {
@@ -7643,7 +7643,7 @@ subisomorphic_vf2_impl <- function(
76437643
# Argument checks
76447644
ensure_igraph(graph1)
76457645
ensure_igraph(graph2)
7646-
if (missing(vertex.color1)) {
7646+
if (is_missing(vertex.color1)) {
76477647
if ("color" %in% vertex_attr_names(graph1)) {
76487648
vertex.color1 <- V(graph1)$color
76497649
} else {
@@ -7653,7 +7653,7 @@ subisomorphic_vf2_impl <- function(
76537653
if (!is.null(vertex.color1)) {
76547654
vertex.color1 <- as.numeric(vertex.color1)-1
76557655
}
7656-
if (missing(vertex.color2)) {
7656+
if (is_missing(vertex.color2)) {
76577657
if ("color" %in% vertex_attr_names(graph2)) {
76587658
vertex.color2 <- V(graph2)$color
76597659
} else {
@@ -7663,7 +7663,7 @@ subisomorphic_vf2_impl <- function(
76637663
if (!is.null(vertex.color2)) {
76647664
vertex.color2 <- as.numeric(vertex.color2)-1
76657665
}
7666-
if (missing(edge.color1)) {
7666+
if (is_missing(edge.color1)) {
76677667
if ("color" %in% edge_attr_names(graph1)) {
76687668
edge.color1 <- E(graph1)$color
76697669
} else {
@@ -7673,7 +7673,7 @@ subisomorphic_vf2_impl <- function(
76737673
if (!is.null(edge.color1)) {
76747674
edge.color1 <- as.numeric(edge.color1)-1
76757675
}
7676-
if (missing(edge.color2)) {
7676+
if (is_missing(edge.color2)) {
76777677
if ("color" %in% edge_attr_names(graph2)) {
76787678
edge.color2 <- E(graph2)$color
76797679
} else {
@@ -7710,7 +7710,7 @@ count_subisomorphisms_vf2_impl <- function(
77107710
# Argument checks
77117711
ensure_igraph(graph1)
77127712
ensure_igraph(graph2)
7713-
if (missing(vertex.color1)) {
7713+
if (is_missing(vertex.color1)) {
77147714
if ("color" %in% vertex_attr_names(graph1)) {
77157715
vertex.color1 <- V(graph1)$color
77167716
} else {
@@ -7720,7 +7720,7 @@ count_subisomorphisms_vf2_impl <- function(
77207720
if (!is.null(vertex.color1)) {
77217721
vertex.color1 <- as.numeric(vertex.color1)-1
77227722
}
7723-
if (missing(vertex.color2)) {
7723+
if (is_missing(vertex.color2)) {
77247724
if ("color" %in% vertex_attr_names(graph2)) {
77257725
vertex.color2 <- V(graph2)$color
77267726
} else {
@@ -7730,7 +7730,7 @@ count_subisomorphisms_vf2_impl <- function(
77307730
if (!is.null(vertex.color2)) {
77317731
vertex.color2 <- as.numeric(vertex.color2)-1
77327732
}
7733-
if (missing(edge.color1)) {
7733+
if (is_missing(edge.color1)) {
77347734
if ("color" %in% edge_attr_names(graph1)) {
77357735
edge.color1 <- E(graph1)$color
77367736
} else {
@@ -7740,7 +7740,7 @@ count_subisomorphisms_vf2_impl <- function(
77407740
if (!is.null(edge.color1)) {
77417741
edge.color1 <- as.numeric(edge.color1)-1
77427742
}
7743-
if (missing(edge.color2)) {
7743+
if (is_missing(edge.color2)) {
77447744
if ("color" %in% edge_attr_names(graph2)) {
77457745
edge.color2 <- E(graph2)$color
77467746
} else {
@@ -7777,7 +7777,7 @@ get_subisomorphisms_vf2_impl <- function(
77777777
# Argument checks
77787778
ensure_igraph(graph1)
77797779
ensure_igraph(graph2)
7780-
if (missing(vertex.color1)) {
7780+
if (is_missing(vertex.color1)) {
77817781
if ("color" %in% vertex_attr_names(graph1)) {
77827782
vertex.color1 <- V(graph1)$color
77837783
} else {
@@ -7787,7 +7787,7 @@ get_subisomorphisms_vf2_impl <- function(
77877787
if (!is.null(vertex.color1)) {
77887788
vertex.color1 <- as.numeric(vertex.color1)-1
77897789
}
7790-
if (missing(vertex.color2)) {
7790+
if (is_missing(vertex.color2)) {
77917791
if ("color" %in% vertex_attr_names(graph2)) {
77927792
vertex.color2 <- V(graph2)$color
77937793
} else {
@@ -7797,7 +7797,7 @@ get_subisomorphisms_vf2_impl <- function(
77977797
if (!is.null(vertex.color2)) {
77987798
vertex.color2 <- as.numeric(vertex.color2)-1
77997799
}
7800-
if (missing(edge.color1)) {
7800+
if (is_missing(edge.color1)) {
78017801
if ("color" %in% edge_attr_names(graph1)) {
78027802
edge.color1 <- E(graph1)$color
78037803
} else {
@@ -7807,7 +7807,7 @@ get_subisomorphisms_vf2_impl <- function(
78077807
if (!is.null(edge.color1)) {
78087808
edge.color1 <- as.numeric(edge.color1)-1
78097809
}
7810-
if (missing(edge.color2)) {
7810+
if (is_missing(edge.color2)) {
78117811
if ("color" %in% edge_attr_names(graph2)) {
78127812
edge.color2 <- E(graph2)$color
78137813
} else {
@@ -7868,7 +7868,7 @@ canonical_permutation_bliss_impl <- function(
78687868
) {
78697869
# Argument checks
78707870
ensure_igraph(graph)
7871-
if (missing(colors)) {
7871+
if (is_missing(colors)) {
78727872
if ("color" %in% vertex_attr_names(graph)) {
78737873
colors <- V(graph)$color
78747874
} else {
@@ -7921,7 +7921,7 @@ isomorphic_bliss_impl <- function(
79217921
# Argument checks
79227922
ensure_igraph(graph1)
79237923
ensure_igraph(graph2)
7924-
if (missing(colors1)) {
7924+
if (is_missing(colors1)) {
79257925
if ("color" %in% vertex_attr_names(graph1)) {
79267926
colors1 <- V(graph1)$color
79277927
} else {
@@ -7931,7 +7931,7 @@ isomorphic_bliss_impl <- function(
79317931
if (!is.null(colors1)) {
79327932
colors1 <- as.numeric(colors1)-1
79337933
}
7934-
if (missing(colors2)) {
7934+
if (is_missing(colors2)) {
79357935
if ("color" %in% vertex_attr_names(graph2)) {
79367936
colors2 <- V(graph2)$color
79377937
} else {
@@ -7964,7 +7964,7 @@ count_automorphisms_bliss_impl <- function(
79647964
) {
79657965
# Argument checks
79667966
ensure_igraph(graph)
7967-
if (missing(colors)) {
7967+
if (is_missing(colors)) {
79687968
if ("color" %in% vertex_attr_names(graph)) {
79697969
colors <- V(graph)$color
79707970
} else {
@@ -7996,7 +7996,7 @@ automorphism_group_bliss_impl <- function(
79967996
) {
79977997
# Argument checks
79987998
ensure_igraph(graph)
7999-
if (missing(colors)) {
7999+
if (is_missing(colors)) {
80008000
if ("color" %in% vertex_attr_names(graph)) {
80018001
colors <- V(graph)$color
80028002
} else {
@@ -8911,7 +8911,7 @@ is_vertex_coloring_impl <- function(
89118911
) {
89128912
# Argument checks
89138913
ensure_igraph(graph)
8914-
if (missing(types)) {
8914+
if (is_missing(types)) {
89158915
if ("color" %in% vertex_attr_names(graph)) {
89168916
types <- V(graph)$color
89178917
} else {
@@ -8958,7 +8958,7 @@ is_edge_coloring_impl <- function(
89588958
) {
89598959
# Argument checks
89608960
ensure_igraph(graph)
8961-
if (missing(types)) {
8961+
if (is_missing(types)) {
89628962
if ("color" %in% edge_attr_names(graph)) {
89638963
types <- E(graph)$color
89648964
} else {

0 commit comments

Comments
 (0)