You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: GNNGraphs/src/transform.jl
+9-20Lines changed: 9 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ end
44
44
Return a graph constructed from `g` where self-loops (edges from a node to itself)
45
45
are removed.
46
46
47
-
See also [`add_self_loops`](@ref) and [`remove_multi_edges`](@ref).
47
+
See also [`add_self_loops`](@ref) and [`coalesce`](@ref).
48
48
"""
49
49
functionremove_self_loops(g::GNNGraph{<:COO_T})
50
50
s, t =edge_index(g)
@@ -146,15 +146,14 @@ function remove_edges(g::GNNGraph{<:COO_T}, p = 0.5)
146
146
end
147
147
148
148
"""
149
-
remove_multi_edges(g::GNNGraph; aggr=+)
149
+
coalesce(g::GNNGraph; aggr=+)
150
150
151
-
Remove multiple edges (also called parallel edges or repeated edges) from graph `g`.
152
-
Possible edge features are aggregated according to `aggr`, that can take value
153
-
`+`,`min`, `max` or `mean`.
151
+
Return a new GNNGraph where all multiple edges between the same pair of nodes are merged (using aggr for edge weights and features), and the edge indices are sorted lexicographically (by source, then target).
152
+
This method is only applicable to graphs of type `:coo`.
154
153
155
-
See also [`remove_self_loops`](@ref), [`has_multi_edges`](@ref), and [`to_bidirected`](@ref).
@@ -184,16 +183,6 @@ function remove_multi_edges(g::GNNGraph{<:COO_T}; aggr = +)
184
183
g.ndata, edata, g.gdata, true)
185
184
end
186
185
187
-
"""
188
-
coalesce_graph(g::GNNGraph)
189
-
190
-
Return a new GNNGraph where all multiple edges between the same pair of nodes are merged (using aggr for edge weights and features), and the edge indices are sorted lexicographically (by source, then target).
191
-
This method is only applicable to graphs of type `:coo`.
0 commit comments