CCT.NUI.Core.Clustering.KMeans.SetCenterRandomlyForEmptyCluster C# (CSharp) Method

SetCenterRandomlyForEmptyCluster() private method

private SetCenterRandomlyForEmptyCluster ( ClusterPrototype cluster ) : void
cluster ClusterPrototype
return void
        private void SetCenterRandomlyForEmptyCluster(ClusterPrototype cluster)
        {
            if (cluster.PointCount == 0)
            {
                cluster.SetCenter(this.random.Next(0, this.size.Width - 1), this.random.Next(0, this.size.Height - 1), this.random.Next((int)this.zRange.Min, (int)this.zRange.Max));
            }
        }