From 5b735938a603bd0fccef0b83e206f92e194b85ba Mon Sep 17 00:00:00 2001 From: AboodXD Date: Tue, 26 Nov 2024 22:35:18 +0400 Subject: [PATCH] Fix building with Scala 2.10.6 Surprised it went unnoticed for so long. The fix has been described in alitouka#22, but no pull request was ever opened. --- .../main/scala/org/alitouka/spark/dbscan/spatial/Box.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src/main/scala/org/alitouka/spark/dbscan/spatial/Box.scala b/src/src/main/scala/org/alitouka/spark/dbscan/spatial/Box.scala index d46a71b..2128635 100644 --- a/src/src/main/scala/org/alitouka/spark/dbscan/spatial/Box.scala +++ b/src/src/main/scala/org/alitouka/spark/dbscan/spatial/Box.scala @@ -9,7 +9,7 @@ import org.alitouka.spark.dbscan.util.math.DoubleComparisonOperations._ * @param boxId A unique identifier of this box * @param partitionId Identifier of a data set partition which corresponds to this box */ -private [dbscan] class Box (val bounds: Array[BoundsInOneDimension], val boxId: BoxId = 0, val partitionId: Int = -1, var adjacentBoxes: List[Box] = Nil) +private [dbscan] class Box (val bounds: Array[BoundsInOneDimension], val boxId: BoxId = 0, val partitionId: Int = -1, @transient var adjacentBoxes: List[Box] = Nil) extends Serializable with Ordered[Box] { val centerPoint = calculateCenter (bounds) @@ -133,4 +133,4 @@ object Box { val newBounds = centerPoint.coordinates.map ( c => new BoundsInOneDimension(c, c, true) ).toArray new Box (newBounds).extendBySizeOfOtherBox(size) } -} \ No newline at end of file +}