BNN-UPC / datanetAPI

Apache License 2.0
26 stars 11 forks source link

hi: #1

Closed Binghao-Yan closed 3 years ago

Binghao-Yan commented 3 years ago

Hi,

Thank you for the great work! This work is really wonderful. I am using the API to read the data set, but when I use the ‘DatanetAPI._create_routing_matrix’ function, I don't know what is the input format of the parameter 'routing_file'? And which file should be input here?

I would appreciate it if you could help me. Thank you! Have a nice day!

Best Binghao-Yan

albert-lopez commented 3 years ago

Hi Binghao-yan, _create_routing_matrix is an internal function of the API. In general we recommend to use only the methods specified in the README file which are the public ones. To obtain the routing information associated with the current sample, you can use s.get_routing_matrix() to obtain all the routing table or s.get_srcdst_routing(src,dst) if you want to get a specific path. Having said that, the routing file required by this function can be found in the routings path of the dataset. The parameter routing_file is a string containing the location of the routing file and for each samples is stored in the private variable s._routing_file.

Regards

Albert