Skip to content

Commit

Permalink
Complete 'SweepLineKey' class
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Mar 7, 2020
1 parent bcce0bd commit 455b28f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions bentley_ottmann/core/sweep_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,11 @@ def __init__(self, sweep_line: SweepLine, event: Event) -> None:

__repr__ = generate_repr(__init__)

def __eq__(self, other: 'SweepLineKey') -> bool:
return (self.event == other.event
if isinstance(other, SweepLineKey)
else NotImplemented)

def __lt__(self, other: 'SweepLineKey') -> bool:
"""
Checks if the segment (or at least the point) associated with event
is lower than other's.
"""
if not isinstance(other, SweepLineKey):
return NotImplemented
if self is other:
return False
event, other_event = self.event, other.event
Expand Down

0 comments on commit 455b28f

Please sign in to comment.