divelab / DIG

A library for graph deep learning research
https://diveintographs.readthedocs.io/
GNU General Public License v3.0
1.86k stars 281 forks source link

about the code in 'xyz_to_dat' function #183

Closed jiaminglei-lei closed 1 year ago

jiaminglei-lei commented 1 year ago

This is a great project !

I have some problems about 'xyz_to_dat' function below : https://github.com/divelab/DIG/blob/a6eaa06e3352fbd1838a1f817d095068801a14d2/dig/threedgraph/utils/geometric_computing.py#L29-L30

How to understand these two lines? j is the source of edges, and adj_t_row = adj_t[j] means to obtains the edge whose sender and receiver are same?

It confuses me, any idea please reply.

limei0307 commented 1 year ago

Hi @jiaminglei-lei,

Thanks for your interest in our work! I uploaded an example to better understand this function. Specifically, adj_t_row = adj_t[j] is used to find neighbors for each edge and construct triplet nodes.

Please let us know if you have any further questions.

Best

limei0307 commented 1 year ago

Please feel free to reopen the issue if you have any further questions!