PathData now works as follows:
Internally, it uses a Data object from PyG to store all paths in one graph. The original node indices are remapped to new indices so that each path stays a path and does not "collapse" to a graph. The original node index is saved in data.node_sequence similar to the usage of node_sequence in MultiOrderModel. Additionally, we save for each path the number of nodes and edges that correspond to the path, as well as a weight. This enables us e.g. to select the first node in each path using e.g. cumsum. Although the number of nodes is equal to the number of edges + 1, we save them individually as preparation for the integration of DAGs.
Fixes #195 by redesigning
PathData
.PathData
now works as follows: Internally, it uses aData
object fromPyG
to store all paths in one graph. The original node indices are remapped to new indices so that each path stays a path and does not "collapse" to a graph. The original node index is saved indata.node_sequence
similar to the usage of node_sequence inMultiOrderModel
. Additionally, we save for each path the number of nodes and edges that correspond to the path, as well as a weight. This enables us e.g. to select the first node in each path using e.g.cumsum
. Although the number of nodes is equal to the number of edges + 1, we save them individually as preparation for the integration of DAGs.