Skip to content

Commit

Permalink
fix error when loading agglomerate skeleton for single-segment agglom…
Browse files Browse the repository at this point in the history
…erate (#6294)
  • Loading branch information
fm3 authored Jun 22, 2022
1 parent a5a1524 commit 5156a4d
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,20 @@ class AgglomerateService @Inject()(config: DataStoreConfig) extends DataConverte
throw new Exception(s"Agglomerate has too many edges ($edgeCount > $edgeLimit)")
}
val positions: Array[Array[Long]] =
reader.uint64().readMatrixBlockWithOffset("/agglomerate_to_positions", nodeCount.toInt, 3, positionsRange(0), 0)
val edges: Array[Array[Long]] =
reader.uint64().readMatrixBlockWithOffset("/agglomerate_to_edges", edgeCount.toInt, 2, edgesRange(0), 0)
if (nodeCount == 0L) {
Array.empty[Array[Long]]
} else {
reader
.uint64()
.readMatrixBlockWithOffset("/agglomerate_to_positions", nodeCount.toInt, 3, positionsRange(0), 0)
}
val edges: Array[Array[Long]] = {
if (edgeCount == 0L) {
Array.empty[Array[Long]]
} else {
reader.uint64().readMatrixBlockWithOffset("/agglomerate_to_edges", edgeCount.toInt, 2, edgesRange(0), 0)
}
}

val nodeIdStartAtOneOffset = 1

Expand Down

0 comments on commit 5156a4d

Please sign in to comment.