Skip to content

Commit

Permalink
Added a Unidirectional Sort (i.e. pass-through) sort method
Browse files Browse the repository at this point in the history
  • Loading branch information
drlukeparry committed Apr 10, 2021
1 parent 4d8747f commit 0f2304f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pyslm/hatching/sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ def sort(self, vectors: np.ndarray) -> np.ndarray:
"""
raise NotImplementedError('Sort method must be implemented')


class UnidirectionalSort(BaseSort):
"""
Method simply passes the hatch vectors in their current form.
"""
def __init__(self):
pass

def __str__(self):
return 'Unidrectional Hatch Sort'

def sort(self, scanVectors: np.ndarray) -> np.ndarray:
""" This approach simply flips the odd pair of hatches"""


class AlternateSort(BaseSort):
"""
Sort method flips pairs of scan vectors so that their direction alternates across adjacent vectors.
Expand Down

0 comments on commit 0f2304f

Please sign in to comment.