Skip to content

Why using a directed graph in the code? #36

@elun15

Description

@elun15

Hello!

In the paper it is stated that the problem is modelled with an undirected graph, however, while checking the code I saw the graph is computed as follows:

self.graph_obj = Graph(x = node_feats, edge_attr = torch.cat((edge_feats, edge_feats), dim = 0),
                               edge_index = torch.cat((edge_ixs, torch.stack((edge_ixs[1], edge_ixs[0]))), dim=1))

As far as I understand the edges' connections (edge_index) are computed by concatenating all the previously computed edges but in the opposite direction, i.e. creating a directed graph. Am I correct?

Could you please tell me the differences in performance and/or the advantages of using a directed graph?
Thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions