Skip to content

Commit

Permalink
DOC: Docstring explaining subnet_linker_numba optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
nkeim committed Apr 8, 2018
1 parent 849d89d commit 2e809a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions trackpy/linking/subnetlinker.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,18 @@ def subnet_linker_nonrecursive(source_set, dest_set, search_range, **kwargs):


def subnet_linker_numba(source_set, dest_set, search_range, **kwargs):
"""Link a subnet using a numba-accelerated algorithm.
Since this is meant to be the highest-performance option, it
has some special behaviors:
- Each source particle's forward_cands must be sorted by distance.
- Subnets with only 1 source or destination particle, or with at
most 4 source particles and 4 destination particles, are
solved using the recursive pure-Python algorithm, which has
much less overhead since it does not convert to a numpy
representation.
"""
lss = len(source_set)
lds = len(dest_set)
if lss == 0 and lds == 1:
Expand Down

0 comments on commit 2e809a7

Please sign in to comment.