G-Node / nix

Neuroscience information exchange format
https://readthedocs.org/projects/nixio/
Other
67 stars 36 forks source link

'Section.findRelated' 'findUpstream' vs 'findSideways' #691

Closed mpsonntag closed 7 years ago

mpsonntag commented 7 years ago

The nix.Section method findRelated returns the first occurrence matching a filter criterion starting from any Section and returns it. To do this, it first searches downstream of the calling section, then upstream and then sideways.

The current implementation of findUpstream and findSideways are very similar. It looks likefindUpstream already implements the "sideways" search. Maybe the findUpstream function could be refactored to speed up the upwards search or the "sideways" search was supposed to search sideways further down than it does currently.