All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.tsingjyujing.geo.algorithm.cluster.GeoKMeans.scala Maven / Gradle / Ivy

There is a newer version: 2.8.9-2.11
Show newest version
package com.github.tsingjyujing.geo.algorithm.cluster

import com.github.tsingjyujing.geo.basic.IGeoPoint
import com.github.tsingjyujing.geo.util.mathematical.Probability

/**
  * Standard Geo K-Means with uniformed initialize on sphere
  *
  * @tparam T type of point
  */
class GeoKMeans[T <: IGeoPoint] extends BaseGeoKMeans[T] {
    override def initializePoints(points: Iterable[T], k: Int): Iterable[IGeoPoint] = (1 to k).map(_ => {
        Probability.sphereUniform
    })
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy