diff --git a/src/main/scala/nak/cluster/GDBSCAN.scala b/src/main/scala/nak/cluster/GDBSCAN.scala index ed47568..a28517b 100644 --- a/src/main/scala/nak/cluster/GDBSCAN.scala +++ b/src/main/scala/nak/cluster/GDBSCAN.scala @@ -67,7 +67,7 @@ class GDBSCAN[T]( clustered add neighbour } // if the neighbour point is a cluster, join the neighbourhood - if (isCorePoint(neighbour, neighbourhood)) neighbourhood ++ newNeighbours else neighbourhood + if (isCorePoint(neighbour, newNeighbours)) neighbourhood ++ newNeighbours else neighbourhood } }