|
41 | 41 | """
|
42 | 42 | add_self_loops(g::GNNHeteroGraph, edge_t::EType)
|
43 | 43 |
|
44 |
| -If the source node type is the same as destination node type in `edge_t`, |
45 |
| -return a graph with the same features as `g` but also adding self-loops |
46 |
| -of the specified type, `edge_t`. Otherwise it returns `g` unchanged. |
| 44 | +If the source node type is the same as the destination node type in `edge_t`, |
| 45 | +return a graph with the same features as `g` but also add self-loops |
| 46 | +of the specified type, `edge_t`. Otherwise, it returns `g` unchanged. |
47 | 47 |
|
48 |
| -Nodes with already existing self-loops of type edge_t will obtain |
49 |
| -a second self-loop of type edge_t. |
| 48 | +Nodes with already existing self-loops of type `edge_t` will obtain |
| 49 | +a second set of self-loops of the same type. |
50 | 50 |
|
51 |
| -If the graphs has edge weights for edges of type edge_t, the new edges will have weight 1. |
| 51 | +If the graph has edge weights for edges of type `edge_t`, the new edges will have weight 1. |
52 | 52 |
|
53 |
| -If no edges of type edge_t exist, or all existing edges have no weight, |
54 |
| -then all new self loops will have no weight. |
| 53 | +If no edges of type `edge_t` exist, or all existing edges have no weight, |
| 54 | +then all new self-loops will have no weight. |
55 | 55 | """
|
56 | 56 | function add_self_loops(g::GNNHeteroGraph{Tuple{T, T, V}}, edge_t::EType) where {T <: AbstractVector{<:Integer}, V}
|
57 | 57 | function get_edge_weight_nullable(g::GNNHeteroGraph{<:COO_T}, edge_t::EType)
|
|
0 commit comments