Don't create random
This commit is contained in:
parent
bc9896d327
commit
9ca98f10be
@ -352,10 +352,10 @@ class LightCalculator(val parent: ICellAccess, val width: Int, val height: Int)
|
||||
val clusterCount = threads.size.coerceAtMost(pointLights.size)
|
||||
val clusters = ArrayList<TaskCluster>(clusterCount)
|
||||
val startingPoints = IntArraySet()
|
||||
val rand = Random(System.nanoTime())
|
||||
// val rand = Random(System.nanoTime())
|
||||
|
||||
while (startingPoints.size < clusterCount) {
|
||||
//startingPoints.add(rand.nextInt(0, pointLights.size))
|
||||
// startingPoints.add(rand.nextInt(0, pointLights.size))
|
||||
startingPoints.add(startingPoints.size)
|
||||
}
|
||||
|
||||
@ -399,7 +399,7 @@ class LightCalculator(val parent: ICellAccess, val width: Int, val height: Int)
|
||||
// check their centres of mass, and probably
|
||||
// merge clusters which are too close to each other,
|
||||
// to avoid excess work
|
||||
// if we merge something, re-run k-clusters algorithm
|
||||
// if we merge something, re-run k-means algorithm
|
||||
if (converged) {
|
||||
for (cluster1 in clusters) {
|
||||
for (cluster2 in clusters) {
|
||||
|
Loading…
Reference in New Issue
Block a user