MLDatasets.jl icon indicating copy to clipboard operation
MLDatasets.jl copied to clipboard

Determine the node index for undirected HeteroGraphs

Open Dsantra92 opened this issue 2 years ago • 2 comments

Edge indices in undirected HeteroGraph are coded as,

edge_index[triplet] = ([s; t], [t; s])

Here s and t are node indices of two different types of nodes, so we need a way to determine which node type a node index belongs to.

Dsantra92 avatar Jun 21 '22 22:06 Dsantra92

Our current implementation allows us to use the first half of the graph to find out which node type an index belongs to. The problem appears when edge_indices are not stored as ([s; t], [t; s]) (in the case of user-defined graph).

Dsantra92 avatar Jun 21 '22 22:06 Dsantra92

Also if an edge (s, r, t) is un-directed, we should also allow indexing using (t, r, s). With edge_data and edge_indices being rolled out accordingly.

Dsantra92 avatar Jun 26 '22 22:06 Dsantra92